diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/CHANGELOG.md b/sdk/horizondb/azure-resourcemanager-horizondb/CHANGELOG.md index 2086f61e93a25..d23a8932cd175 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/CHANGELOG.md +++ b/sdk/horizondb/azure-resourcemanager-horizondb/CHANGELOG.md @@ -1,14 +1,570 @@ # Release History -## 1.0.0-beta.3 (Unreleased) +## 1.0.0-beta.3 (2026-10-15) -### Features Added +- Azure Resource Manager HorizonDb client library for Java. This package contains Microsoft Azure SDK for HorizonDb Management SDK. Azure Resource Provider API for managing HorizonDB clusters, pools, endpoints, nodes, and firewall rules. Package api-version 2026-10-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.HorizonDbPoolProperties` was removed + +#### `models.HorizonDbReplica` was removed + +#### `models.HorizonDbAdministrators` was removed + +#### `models.HorizonDbAdministrator$UpdateStages` was removed + +#### `models.HorizonDbAdministratorAdd` was removed + +#### `models.HorizonDbParameterGroups` was removed + +#### `models.HorizonDbReplica$UpdateStages` was removed + +#### `models.HorizonDbReplicaProperties` was removed + +#### `models.ReplicaRole` was removed + +#### `models.HorizonDbReplicaForPatchUpdate` was removed + +#### `models.HorizonDbFirewallRule$DefinitionStages` was removed + +#### `models.ZonePlacementPolicy` was removed + +#### `models.HorizonDbPrivateLinkResource` was removed + +#### `models.HorizonDbParameterGroupPropertiesForPatchUpdate` was removed + +#### `models.CreateModeCluster` was removed + +#### `models.HorizonDbAdministrator$Update` was removed + +#### `models.HorizonDbComputeModelType` was removed + +#### `models.HorizonDbParameterGroup$UpdateStages` was removed + +#### `models.HorizonDbParameterGroup` was removed + +#### `models.HorizonDbPools` was removed + +#### `models.HorizonDbFirewallRule$Definition` was removed + +#### `models.HorizonDbPrivateLinkResources` was removed + +#### `models.HorizonDbParameterGroupForPatchUpdate` was removed + +#### `models.HorizonDbAdministratorProperties` was removed + +#### `models.HorizonDbCluster$Definition` was removed + +#### `models.HorizonDbAdministrator$Definition` was removed + +#### `models.HorizonDbAdministrator` was removed + +#### `models.HorizonDbCluster$Update` was removed + +#### `models.HorizonDbReplica$Definition` was removed + +#### `models.HorizonDbClusters` was removed + +#### `models.HorizonDbPrivateEndpointConnections` was removed + +#### `models.HorizonDbPool` was removed + +#### `models.CreateModePool` was removed + +#### `models.HorizonDbCluster$UpdateStages` was removed + +#### `models.ManagedServiceIdentity` was removed + +#### `models.HorizonDbFirewallRuleProperties` was removed + +#### `models.HorizonDbParameterGroupProperties` was removed + +#### `models.ManagedServiceIdentityType` was removed + +#### `models.HorizonDbReplicaPropertiesForPatchUpdate` was removed + +#### `models.HorizonDbClusterPropertiesForPatchUpdate` was removed + +#### `models.HorizonDbComputeModel` was removed + +#### `models.HorizonDbAdministratorPropertiesForAdd` was removed + +#### `models.HorizonDbReplica$Update` was removed + +#### `models.HorizonDbCluster` was removed + +#### `models.HorizonDbParameterGroupConnectionProperties` was removed + +#### `models.HorizonDbParameterGroup$Definition` was removed + +#### `models.HorizonDbClusterProperties` was removed + +#### `models.HorizonDbClusterForPatchUpdate` was removed + +#### `models.HorizonDbReplicas` was removed + +#### `models.HorizonDbFirewallRule$Update` was removed + +#### `models.HorizonDbParameterGroup$DefinitionStages` was removed + +#### `models.HorizonDbFirewallRule$UpdateStages` was removed + +#### `models.HorizonDbCluster$DefinitionStages` was removed + +#### `models.HorizonDbClusterMirroring` was removed + +#### `models.HorizonDbReplica$DefinitionStages` was removed + +#### `models.HorizonDbClusterAuthConfig` was removed + +#### `models.HorizonDbAdministrator$DefinitionStages` was removed + +#### `models.HorizonDbClusterParameterGroupConnectionProperties` was removed + +#### `models.HorizonDbFirewallRule` was removed + +#### `models.HorizonDbFirewallRules` was removed + +#### `models.HorizonDbParameterGroup$Update` was removed + +#### `models.State` was removed + +#### `models.Network` was modified + +* `publicNetworkAccess()` was removed + +#### `HorizonDbManager` was modified + +* `horizonDbReplicas()` was removed +* `horizonDbAdministrators()` was removed +* `horizonDbPrivateEndpointConnections()` was removed +* `horizonDbFirewallRules()` was removed +* `horizonDbPools()` was removed +* `horizonDbPrivateLinkResources()` was removed +* `horizonDbParameterGroups()` was removed +* `horizonDbClusters()` was removed + +### Features Added + +* `models.GeoRedundancyState` was added + +* `models.Clusters` was added + +* `models.PrivateEndpointConnections` was added + +* `models.AuthenticationProperties` was added + +* `models.ChangeDataCaptureIdentityActivationState` was added + +* `models.MicrosoftEntraAuthenticationForPatchUpdate` was added + +* `models.ScheduledMaintenancePropertiesForPatchUpdate` was added + +* `models.Pool$UpdateStages` was added + +* `models.ClusterCreateMode` was added + +* `models.Nodes` was added + +* `models.DefaultParameterGroup` was added + +* `models.PoolForPatchUpdate` was added + +* `models.ParameterGroup` was added + +* `models.ChangeDataCaptureConfiguration$UpdateStages` was added + +* `models.ChangeDataCaptureProtocol` was added + +* `models.MaintenanceType` was added + +* `models.ChangeDataCaptureReplicationState` was added + +* `models.ChangeDataCaptureDestination$Update` was added + +* `models.PoolFeatureCapability` was added + +* `models.ClusterState` was added + +* `models.ChangeDataCaptureCapabilities` was added + +* `models.ChangeDataCaptureDesiredState` was added + +* `models.ChangeDataCaptureExtensionStatus` was added + +* `models.BackupProperties` was added + +* `models.Endpoints` was added + +* `models.ChangeDataCaptureConfiguration$Definition` was added + +* `models.Pool$Definition` was added + +* `models.ChangeDataCaptureDestinationDetails` was added + +* `models.PrivateEndpointConnectionResource$Update` was added + +* `models.ChangeDataCaptureConfiguration$DefinitionStages` was added + +* `models.BackupPropertiesForPatchUpdate` was added + +* `models.Cluster$UpdateStages` was added + +* `models.LogCaptureConfiguration` was added + +* `models.PoolComputeModelForPatchUpdate` was added + +* `models.LogCaptureState` was added + +* `models.MicrosoftEntraAdministratorAdd` was added + +* `models.MaintenanceEvent` was added + +* `models.SystemScheduledMaintenanceProperties` was added + +* `models.PasswordAuthentications` was added + +* `models.PoolCapability` was added + +* `models.LogFileDownloadUrl` was added + +* `models.ParameterApplyMethod` was added + +* `models.Authentication` was added + +* `models.HorizonDbClusterDataEncryption` was added + +* `models.ChangeDataCaptureCapability` was added + +* `models.ClusterCapability` was added + +* `models.PrivateEndpointConnectionResource$Definition` was added + +* `models.EndpointRole` was added + +* `models.ChangeDataCaptureCapabilityPropertiesForPatchUpdate` was added + +* `models.ChangeDataCaptureEffectiveState` was added + +* `models.PasswordAuthenticationPropertiesForPatchUpdate` was added + +* `models.ClusterPropertiesForPatchUpdate` was added + +* `models.ChangeDataCaptureCapabilityProperties` was added + +* `models.ParameterGroup$DefinitionStages` was added + +* `models.ChangeDataCaptureDestination$Definition` was added + +* `models.FirewallRule$DefinitionStages` was added + +* `models.ParameterGroupProperties` was added + +* `models.MicrosoftEntraAdministrator$Definition` was added + +* `models.ChangeDataCaptureConfigurationPropertiesForPatchUpdate` was added + +* `models.HorizonDbClusterManagedServiceIdentity` was added + +* `models.Capabilities` was added + +* `models.NodeRole` was added + +* `models.DefaultParameterGroups` was added + +* `models.ParameterGroup$Definition` was added + +* `models.ChangeDataCaptureStatus` was added + +* `models.MicrosoftEntraAdministrator$DefinitionStages` was added + +* `models.PrivateEndpointConnectionResource$UpdateStages` was added + +* `models.Pool$DefinitionStages` was added + +* `models.MaintenanceEventProperties` was added + +* `models.MicrosoftEntraAuthenticationPropertiesForPatchUpdate` was added + +* `models.ChangeDataCaptureCapabilityForPatchUpdate` was added + +* `models.ChangeDataCaptureEngineConfigurationState` was added + +* `models.Cluster$Update` was added + +* `models.MicrosoftEntraAdministratorProperties` was added + +* `models.EndpointProperties` was added + +* `models.ChangeDataCaptureReplicationArchitecture` was added + +* `models.NodeProperties` was added + +* `models.PoolHighAvailability` was added + +* `models.LogCaptureConfigurationProperties` was added + +* `models.ParameterGroup$Update` was added + +* `models.PoolHighAvailabilityPatch` was added + +* `models.ChangeDataCaptureReplicationStatus` was added + +* `models.Pools` was added + +* `models.PoolProperties` was added + +* `models.ChangeDataCaptureIdentityValidationState` was added + +* `models.LogFile` was added + +* `models.ParameterValueSource` was added + +* `models.ScheduledMaintenanceManagementType` was added + +* `models.ParameterGroup$UpdateStages` was added + +* `models.LogFiles` was added + +* `models.PoolHighAvailabilityMode` was added + +* `models.ClusterProperties` was added + +* `models.FirewallRules` was added + +* `models.ClusterForPatchUpdate` was added + +* `models.ParameterGroupSyncStatus` was added + +* `models.MicrosoftEntraAdministrator` was added + +* `models.ChangeDataCaptureDestinationProperties` was added + +* `models.ChangeDataCaptureIdentityAssignmentState` was added + +* `models.PoolParameterGroupReference` was added + +* `models.PasswordAuthenticationForPatchUpdate` was added + +* `models.ChangeDataCaptureConfiguration$Update` was added + +* `models.MicrosoftEntraAuthentications` was added + +* `models.ReadWritePoolProperties` was added + +* `models.HorizonDbClusterEncryptionKeyStatus` was added + +* `models.ActivateChangeDataCaptureIdentityRequest` was added + +* `models.FirewallRule$Definition` was added + +* `models.ChangeDataCaptureDestinationEffectiveState` was added + +* `models.PoolParameterGroupReferenceForPatchUpdate` was added + +* `models.Pool` was added + +* `models.LogCaptureConfigurationPropertiesForPatchUpdate` was added + +* `models.ActivateChangeDataCaptureIdentityResult` was added + +* `models.ComputeModelCapability` was added + +* `models.ChangeDataCaptureConfigurations` was added + +* `models.ChangeDataCaptureDestinationPropertiesForPatchUpdate` was added + +* `models.Cluster` was added + +* `models.Pool$Update` was added + +* `models.ParameterGroupConnectionProperties` was added + +* `models.ChangeDataCaptureConfiguration` was added + +* `models.AiModelManagementStatus` was added + +* `models.LogFileProperties` was added + +* `models.Node` was added + +* `models.ClusterFeatureCapability` was added + +* `models.ChangeDataCaptureDestination$DefinitionStages` was added + +* `models.ChangeDataCaptureConfigurationForPatchUpdate` was added + +* `models.MaintenanceEvents` was added + +* `models.PostgreSqlCapabilityVersion` was added + +* `models.ComputeGenerationCapability` was added + +* `models.PasswordAuthentication` was added + +* `models.HorizonDbClusterDataEncryptionForPatchUpdate` was added + +* `models.MaintenanceEventRescheduleRequest` was added + +* `models.FirewallRuleProperties` was added + +* `models.ChangeDataCaptureTopologyBindingStatus` was added + +* `models.ChangeDataCaptureTopologyBindingState` was added + +* `models.ComputeSizeCapability` was added + +* `models.PoolComputeModelType` was added + +* `models.LogCaptureConfigurations` was added + +* `models.CapabilityProperties` was added + +* `models.ChangeDataCaptureConfigurationProperties` was added + +* `models.ParameterGroups` was added + +* `models.IdentityAssignment$Definition` was added + +* `models.MicrosoftEntraAuthenticationProperties` was added + +* `models.ChangeDataCaptureDestination$UpdateStages` was added + +* `models.Endpoint` was added + +* `models.ChangeDataCaptureDestinations` was added + +* `models.ChangeDataCaptureDestinationForPatchUpdate` was added + +* `models.MicrosoftEntraAdministratorPropertiesForAdd` was added + +* `models.NetworkForPatchUpdate` was added + +* `models.MaintenanceEventActionResponse` was added + +* `models.ComputeProcessorCapability` was added + +* `models.LogFileType` was added + +* `models.ChangeDataCaptureReadWriteEndpointState` was added + +* `models.LogCaptureConfigurationForPatchUpdate` was added + +* `models.DefaultParameterGroupProperties` was added + +* `models.HorizonDbClusterIdentityType` was added + +* `models.PrivateLinkResource` was added + +* `models.ParameterGroupForPatchUpdate` was added + +* `models.Authentications` was added + +* `models.ScheduledMaintenanceProperties` was added + +* `models.Cluster$Definition` was added + +* `models.IdentityAssignment` was added + +* `models.ChangeDataCapturePrerequisiteStatus` was added + +* `models.MicrosoftEntraAdministrators` was added + +* `models.PoolState` was added + +* `models.IdentityAssignments` was added + +* `models.FirewallRule` was added + +* `models.PasswordAuthenticationProperties` was added + +* `models.EndpointScope` was added + +* `models.PoolComputeModel` was added + +* `models.ChangeDataCaptureDestinationType` was added + +* `models.ParameterGroupPropertiesForPatchUpdate` was added + +* `models.IdentityAssignment$DefinitionStages` was added + +* `models.ChangeDataCaptureIdentityAssignmentProperties` was added + +* `models.PostgreSqlVersionCapability` was added + +* `models.PrivateLinkResources` was added + +* `models.PrivateEndpointConnectionResource$DefinitionStages` was added + +* `models.ComputeProcessorType` was added + +* `models.Capability` was added + +* `models.ChangeDataCaptureExtensionState` was added + +* `models.HorizonDbClusterDataEncryptionType` was added + +* `models.PoolPropertiesForPatchUpdate` was added + +* `models.MicrosoftEntraAuthentication` was added + +* `models.PostgreSqlVersion` was added + +* `models.ProvisionedComputeModelCapability` was added + +* `models.MaintenanceEventStatus` was added + +* `models.FabricDestinationDetails` was added + +* `models.ChangeDataCaptureUsageProfile` was added + +* `models.ChangeDataCaptureDestination` was added + +* `models.Cluster$DefinitionStages` was added + +* `models.IdentityValidationStatus` was added + +#### `models.Network` was modified + +* `withPublicAccess(models.PublicNetworkAccessState)` was added +* `publicAccess()` was added + +#### `models.ParameterProperties` was modified + +* `defaultValue()` was added +* `valueSource()` was added + +#### `HorizonDbManager` was modified -### Other Changes +* `changeDataCaptureCapabilities()` was added +* `firewallRules()` was added +* `identityAssignments()` was added +* `passwordAuthentications()` was added +* `privateLinkResources()` was added +* `parameterGroups()` was added +* `capabilities()` was added +* `nodes()` was added +* `defaultParameterGroups()` was added +* `pools()` was added +* `clusters()` was added +* `microsoftEntraAdministrators()` was added +* `privateEndpointConnections()` was added +* `logFiles()` was added +* `changeDataCaptureDestinations()` was added +* `authentications()` was added +* `maintenanceEvents()` was added +* `logCaptureConfigurations()` was added +* `microsoftEntraAuthentications()` was added +* `endpoints()` was added +* `changeDataCaptureConfigurations()` was added + +#### `models.PrivateEndpointConnectionResource` was modified + +* `resourceGroupName()` was added +* `refresh(com.azure.core.util.Context)` was added +* `refresh()` was added +* `update()` was added ## 1.0.0-beta.2 (2026-08-20) diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/README.md b/sdk/horizondb/azure-resourcemanager-horizondb/README.md index c82695c4d0981..1be74fa751ea4 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/README.md +++ b/sdk/horizondb/azure-resourcemanager-horizondb/README.md @@ -2,7 +2,7 @@ Azure Resource Manager HorizonDb client library for Java. -This package contains Microsoft Azure SDK for HorizonDb Management SDK. Azure Resource Provider API for managing HorizonDB clusters, pools, replicas, and firewall rules. Package api-version 2026-05-01-preview. 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 HorizonDb Management SDK. Azure Resource Provider API for managing HorizonDB clusters, pools, endpoints, nodes, and firewall rules. Package api-version 2026-10-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 @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-horizondb - 1.0.0-beta.2 + 1.0.0-beta.3 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/SAMPLE.md b/sdk/horizondb/azure-resourcemanager-horizondb/SAMPLE.md index f5f648dcefc84..0bd7b07f0147a 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/SAMPLE.md +++ b/sdk/horizondb/azure-resourcemanager-horizondb/SAMPLE.md @@ -1,551 +1,789 @@ # Code snippets and samples -## HorizonDbAdministrators +## Authentications -- [CreateOrUpdate](#horizondbadministrators_createorupdate) -- [Delete](#horizondbadministrators_delete) -- [Get](#horizondbadministrators_get) -- [List](#horizondbadministrators_list) +- [List](#authentications_list) -## HorizonDbClusters +## Capabilities -- [CreateOrUpdate](#horizondbclusters_createorupdate) -- [Delete](#horizondbclusters_delete) -- [GetByResourceGroup](#horizondbclusters_getbyresourcegroup) -- [List](#horizondbclusters_list) -- [ListByResourceGroup](#horizondbclusters_listbyresourcegroup) -- [Restart](#horizondbclusters_restart) -- [Start](#horizondbclusters_start) -- [Stop](#horizondbclusters_stop) -- [Update](#horizondbclusters_update) +- [Get](#capabilities_get) +- [List](#capabilities_list) -## HorizonDbFirewallRules +## ChangeDataCaptureCapabilities -- [CreateOrUpdate](#horizondbfirewallrules_createorupdate) -- [Delete](#horizondbfirewallrules_delete) -- [Get](#horizondbfirewallrules_get) -- [List](#horizondbfirewallrules_list) +- [CreateOrReplace](#changedatacapturecapabilities_createorreplace) +- [Delete](#changedatacapturecapabilities_delete) +- [Get](#changedatacapturecapabilities_get) +- [List](#changedatacapturecapabilities_list) +- [Update](#changedatacapturecapabilities_update) -## HorizonDbParameterGroups +## ChangeDataCaptureConfigurations -- [CreateOrUpdate](#horizondbparametergroups_createorupdate) -- [Delete](#horizondbparametergroups_delete) -- [GetByResourceGroup](#horizondbparametergroups_getbyresourcegroup) -- [List](#horizondbparametergroups_list) -- [ListByResourceGroup](#horizondbparametergroups_listbyresourcegroup) -- [ListConnections](#horizondbparametergroups_listconnections) -- [ListVersions](#horizondbparametergroups_listversions) -- [Update](#horizondbparametergroups_update) +- [CreateOrReplace](#changedatacaptureconfigurations_createorreplace) +- [Delete](#changedatacaptureconfigurations_delete) +- [Get](#changedatacaptureconfigurations_get) +- [List](#changedatacaptureconfigurations_list) +- [Update](#changedatacaptureconfigurations_update) -## HorizonDbPools +## ChangeDataCaptureDestinations -- [Get](#horizondbpools_get) -- [List](#horizondbpools_list) +- [ActivateIdentity](#changedatacapturedestinations_activateidentity) +- [CreateOrReplace](#changedatacapturedestinations_createorreplace) +- [Delete](#changedatacapturedestinations_delete) +- [Get](#changedatacapturedestinations_get) +- [List](#changedatacapturedestinations_list) +- [Update](#changedatacapturedestinations_update) -## HorizonDbPrivateEndpointConnections +## Clusters -- [Delete](#horizondbprivateendpointconnections_delete) -- [Get](#horizondbprivateendpointconnections_get) -- [List](#horizondbprivateendpointconnections_list) -- [UpdateStatus](#horizondbprivateendpointconnections_updatestatus) +- [CreateOrReplace](#clusters_createorreplace) +- [Delete](#clusters_delete) +- [Failover](#clusters_failover) +- [GetByResourceGroup](#clusters_getbyresourcegroup) +- [List](#clusters_list) +- [ListByResourceGroup](#clusters_listbyresourcegroup) +- [Update](#clusters_update) -## HorizonDbPrivateLinkResources +## DefaultParameterGroups -- [Get](#horizondbprivatelinkresources_get) -- [List](#horizondbprivatelinkresources_list) +- [Get](#defaultparametergroups_get) +- [ListBySubscriptionAndRegion](#defaultparametergroups_listbysubscriptionandregion) -## HorizonDbReplicas +## Endpoints -- [CreateOrUpdate](#horizondbreplicas_createorupdate) -- [Delete](#horizondbreplicas_delete) -- [Get](#horizondbreplicas_get) -- [List](#horizondbreplicas_list) -- [Update](#horizondbreplicas_update) +- [Get](#endpoints_get) +- [List](#endpoints_list) + +## FirewallRules + +- [CreateOrReplace](#firewallrules_createorreplace) +- [Delete](#firewallrules_delete) +- [Get](#firewallrules_get) +- [List](#firewallrules_list) + +## IdentityAssignments + +- [CreateOrReplace](#identityassignments_createorreplace) +- [Delete](#identityassignments_delete) +- [Get](#identityassignments_get) +- [List](#identityassignments_list) + +## LogCaptureConfigurations + +- [Get](#logcaptureconfigurations_get) +- [List](#logcaptureconfigurations_list) +- [Update](#logcaptureconfigurations_update) + +## LogFiles + +- [Get](#logfiles_get) +- [List](#logfiles_list) +- [ListDownloadUrls](#logfiles_listdownloadurls) + +## MaintenanceEvents + +- [ApplyNow](#maintenanceevents_applynow) +- [Get](#maintenanceevents_get) +- [List](#maintenanceevents_list) +- [Reschedule](#maintenanceevents_reschedule) + +## MicrosoftEntraAdministrators + +- [CreateOrReplace](#microsoftentraadministrators_createorreplace) +- [Delete](#microsoftentraadministrators_delete) +- [Get](#microsoftentraadministrators_get) +- [List](#microsoftentraadministrators_list) + +## MicrosoftEntraAuthentications + +- [CreateOrReplace](#microsoftentraauthentications_createorreplace) +- [Get](#microsoftentraauthentications_get) +- [Update](#microsoftentraauthentications_update) + +## Nodes + +- [Get](#nodes_get) +- [List](#nodes_list) ## Operations - [List](#operations_list) -### HorizonDbAdministrators_CreateOrUpdate -```java -import com.azure.resourcemanager.horizondb.models.HorizonDbAdministratorPropertiesForAdd; -import com.azure.resourcemanager.horizondb.models.PrincipalTypes; +## ParameterGroups + +- [CreateOrReplace](#parametergroups_createorreplace) +- [Delete](#parametergroups_delete) +- [GetByResourceGroup](#parametergroups_getbyresourcegroup) +- [List](#parametergroups_list) +- [ListByResourceGroup](#parametergroups_listbyresourcegroup) +- [ListConnections](#parametergroups_listconnections) +- [Update](#parametergroups_update) + +## PasswordAuthentications + +- [CreateOrReplace](#passwordauthentications_createorreplace) +- [Get](#passwordauthentications_get) +- [Update](#passwordauthentications_update) + +## Pools + +- [CreateOrReplace](#pools_createorreplace) +- [Delete](#pools_delete) +- [Get](#pools_get) +- [List](#pools_list) +- [Restart](#pools_restart) +- [Start](#pools_start) +- [Stop](#pools_stop) +- [Update](#pools_update) + +## PrivateEndpointConnections +- [ApproveOrReject](#privateendpointconnections_approveorreject) +- [Delete](#privateendpointconnections_delete) +- [Get](#privateendpointconnections_get) +- [List](#privateendpointconnections_list) + +## PrivateLinkResources + +- [Get](#privatelinkresources_get) +- [List](#privatelinkresources_list) +### Authentications_List + +```java /** - * Samples for HorizonDbAdministrators CreateOrUpdate. + * Samples for Authentications List. */ -public final class HorizonDbAdministratorsCreateOrUpdateSamples { +public final class AuthenticationsListSamples { /* - * x-ms-original-file: 2026-05-01-preview/Administrators_CreateOrUpdate.json + * x-ms-original-file: 2026-10-01-preview/Authentications_List.json */ /** - * Sample code: Create or update a HorizonDB administrator. + * Sample code: List the service-created authentication methods. * * @param manager Entry point to HorizonDbManager. */ public static void - createOrUpdateAHorizonDBAdministrator(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbAdministrators() - .define("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee") - .withExistingCluster("exampleresourcegroup", "examplecluster") - .withProperties(new HorizonDbAdministratorPropertiesForAdd().withPrincipalName("admin@contoso.com") - .withPrincipalType(PrincipalTypes.USER) - .withTenantId("11111111-2222-3333-4444-555555555555")) - .create(); + listTheServiceCreatedAuthenticationMethods(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.authentications().list("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); } } ``` -### HorizonDbAdministrators_Delete +### Capabilities_Get ```java /** - * Samples for HorizonDbAdministrators Delete. + * Samples for Capabilities Get. */ -public final class HorizonDbAdministratorsDeleteSamples { +public final class CapabilitiesGetSamples { /* - * x-ms-original-file: 2026-05-01-preview/Administrators_Delete.json + * x-ms-original-file: 2026-10-01-preview/Capabilities_Get.json */ /** - * Sample code: Delete a HorizonDB administrator. + * Sample code: Get HorizonDB capabilities by subscription and region. * * @param manager Entry point to HorizonDbManager. */ - public static void deleteAHorizonDBAdministrator(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbAdministrators() - .delete("exampleresourcegroup", "examplecluster", "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", - com.azure.core.util.Context.NONE); + public static void + getHorizonDBCapabilitiesBySubscriptionAndRegion(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.capabilities().getWithResponse("eastus2", com.azure.core.util.Context.NONE); } } ``` -### HorizonDbAdministrators_Get +### Capabilities_List ```java /** - * Samples for HorizonDbAdministrators Get. + * Samples for Capabilities List. */ -public final class HorizonDbAdministratorsGetSamples { +public final class CapabilitiesListSamples { /* - * x-ms-original-file: 2026-05-01-preview/Administrators_Get.json + * x-ms-original-file: 2026-10-01-preview/Capabilities_List.json */ /** - * Sample code: Get a HorizonDB administrator. + * Sample code: List HorizonDB capabilities by subscription and region. * * @param manager Entry point to HorizonDbManager. */ - public static void getAHorizonDBAdministrator(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbAdministrators() - .getWithResponse("exampleresourcegroup", "examplecluster", "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", - com.azure.core.util.Context.NONE); + public static void + listHorizonDBCapabilitiesBySubscriptionAndRegion(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.capabilities().list("eastus2", com.azure.core.util.Context.NONE); } } ``` -### HorizonDbAdministrators_List +### ChangeDataCaptureCapabilities_CreateOrReplace ```java +import com.azure.resourcemanager.horizondb.fluent.models.ChangeDataCaptureCapabilityInner; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureCapabilityProperties; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDesiredState; + /** - * Samples for HorizonDbAdministrators List. + * Samples for ChangeDataCaptureCapabilities CreateOrReplace. */ -public final class HorizonDbAdministratorsListSamples { +public final class ChangeDataCaptureCapabilitiesCreateOrReplaceSamples { /* - * x-ms-original-file: 2026-05-01-preview/Administrators_List.json + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureCapabilities_CreateOrReplace.json */ /** - * Sample code: List HorizonDB administrators in a cluster. + * Sample code: Enable the cluster change data capture capability. * * @param manager Entry point to HorizonDbManager. */ public static void - listHorizonDBAdministratorsInACluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbAdministrators() - .list("exampleresourcegroup", "examplecluster", com.azure.core.util.Context.NONE); + enableTheClusterChangeDataCaptureCapability(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.changeDataCaptureCapabilities() + .createOrReplace("example-resource-group", "example-cluster", + new ChangeDataCaptureCapabilityInner().withProperties( + new ChangeDataCaptureCapabilityProperties().withDesiredState(ChangeDataCaptureDesiredState.ENABLED) + .withAutoUpgradeExtension(true)), + com.azure.core.util.Context.NONE); } } ``` -### HorizonDbClusters_CreateOrUpdate +### ChangeDataCaptureCapabilities_Delete ```java -import com.azure.resourcemanager.horizondb.models.CreateModeCluster; -import com.azure.resourcemanager.horizondb.models.HorizonDbClusterProperties; -import com.azure.resourcemanager.horizondb.models.ZonePlacementPolicy; -import java.util.HashMap; -import java.util.Map; - /** - * Samples for HorizonDbClusters CreateOrUpdate. + * Samples for ChangeDataCaptureCapabilities Delete. */ -public final class HorizonDbClustersCreateOrUpdateSamples { +public final class ChangeDataCaptureCapabilitiesDeleteSamples { /* - * x-ms-original-file: 2026-05-01-preview/Clusters_CreateOrUpdate.json + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureCapabilities_Delete.json */ /** - * Sample code: Create or update a HorizonDB cluster. + * Sample code: Delete the cluster change data capture capability. * * @param manager Entry point to HorizonDbManager. */ - public static void createOrUpdateAHorizonDBCluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbClusters() - .define("examplecluster") - .withRegion("westus2") - .withExistingResourceGroup("exampleresourcegroup") - .withTags(mapOf("env", "dev")) - .withProperties(new HorizonDbClusterProperties().withAdministratorLogin("exampleadministratorlogin") - .withAdministratorLoginPassword("fakeTokenPlaceholder") - .withVersion("17") - .withCreateMode(CreateModeCluster.CREATE) - .withReplicaCount(2) - .withVCores(4) - .withZonePlacementPolicy(ZonePlacementPolicy.BEST_EFFORT)) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + public static void + deleteTheClusterChangeDataCaptureCapability(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.changeDataCaptureCapabilities() + .delete("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); } } ``` -### HorizonDbClusters_Delete +### ChangeDataCaptureCapabilities_Get ```java /** - * Samples for HorizonDbClusters Delete. + * Samples for ChangeDataCaptureCapabilities Get. */ -public final class HorizonDbClustersDeleteSamples { +public final class ChangeDataCaptureCapabilitiesGetSamples { /* - * x-ms-original-file: 2026-05-01-preview/Clusters_Delete.json + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureCapabilities_Get.json */ /** - * Sample code: Delete a HorizonDB cluster. + * Sample code: Get the cluster change data capture capability. * * @param manager Entry point to HorizonDbManager. */ - public static void deleteAHorizonDBCluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbClusters().delete("exampleresourcegroup", "examplecluster", com.azure.core.util.Context.NONE); + public static void + getTheClusterChangeDataCaptureCapability(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.changeDataCaptureCapabilities() + .getWithResponse("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); } } ``` -### HorizonDbClusters_GetByResourceGroup +### ChangeDataCaptureCapabilities_List ```java /** - * Samples for HorizonDbClusters GetByResourceGroup. + * Samples for ChangeDataCaptureCapabilities List. */ -public final class HorizonDbClustersGetByResourceGroupSamples { +public final class ChangeDataCaptureCapabilitiesListSamples { /* - * x-ms-original-file: 2026-05-01-preview/Clusters_Get.json + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureCapabilities_List.json */ /** - * Sample code: Get a HorizonDB cluster. + * Sample code: List the optional cluster change data capture capability. * * @param manager Entry point to HorizonDbManager. */ - public static void getAHorizonDBCluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbClusters() - .getByResourceGroupWithResponse("exampleresourcegroup", "examplecluster", com.azure.core.util.Context.NONE); + public static void listTheOptionalClusterChangeDataCaptureCapability( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.changeDataCaptureCapabilities() + .list("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); } } ``` -### HorizonDbClusters_List +### ChangeDataCaptureCapabilities_Update ```java +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureCapabilityForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureCapabilityPropertiesForPatchUpdate; + /** - * Samples for HorizonDbClusters List. + * Samples for ChangeDataCaptureCapabilities Update. */ -public final class HorizonDbClustersListSamples { +public final class ChangeDataCaptureCapabilitiesUpdateSamples { /* - * x-ms-original-file: 2026-05-01-preview/Clusters_ListBySubscription.json + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureCapabilities_Update.json */ /** - * Sample code: List HorizonDB clusters by subscription. + * Sample code: Update the cluster change data capture capability. * * @param manager Entry point to HorizonDbManager. */ public static void - listHorizonDBClustersBySubscription(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbClusters().list(com.azure.core.util.Context.NONE); + updateTheClusterChangeDataCaptureCapability(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.changeDataCaptureCapabilities() + .update("example-resource-group", "example-cluster", + new ChangeDataCaptureCapabilityForPatchUpdate().withProperties( + new ChangeDataCaptureCapabilityPropertiesForPatchUpdate().withAutoUpgradeExtension(false)), + com.azure.core.util.Context.NONE); } } ``` -### HorizonDbClusters_ListByResourceGroup +### ChangeDataCaptureConfigurations_CreateOrReplace ```java +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureConfigurationProperties; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDesiredState; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureUsageProfile; + /** - * Samples for HorizonDbClusters ListByResourceGroup. + * Samples for ChangeDataCaptureConfigurations CreateOrReplace. */ -public final class HorizonDbClustersListByResourceGroupSamples { +public final class ChangeDataCaptureConfigurationsCreateOrReplaceSamples { /* - * x-ms-original-file: 2026-05-01-preview/Clusters_ListByResourceGroup.json + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureConfigurations_CreateOrReplace.json */ /** - * Sample code: List HorizonDB clusters in a resource group. + * Sample code: Enroll a database for Microsoft Fabric Mirroring. * * @param manager Entry point to HorizonDbManager. */ public static void - listHorizonDBClustersInAResourceGroup(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbClusters().listByResourceGroup("exampleresourcegroup", com.azure.core.util.Context.NONE); + enrollADatabaseForMicrosoftFabricMirroring(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.changeDataCaptureConfigurations() + .define("sales-database") + .withExistingCluster("example-resource-group", "example-cluster") + .withProperties(new ChangeDataCaptureConfigurationProperties().withDatabaseName("sales") + .withUsageProfile(ChangeDataCaptureUsageProfile.MIRRORING) + .withDestinationResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/example-cluster/changeDataCaptureDestinations/fabric-mirroring") + .withDesiredState(ChangeDataCaptureDesiredState.ENABLED)) + .create(); } } ``` -### HorizonDbClusters_Restart +### ChangeDataCaptureConfigurations_Delete ```java /** - * Samples for HorizonDbClusters Restart. + * Samples for ChangeDataCaptureConfigurations Delete. */ -public final class HorizonDbClustersRestartSamples { +public final class ChangeDataCaptureConfigurationsDeleteSamples { /* - * x-ms-original-file: 2026-05-01-preview/Clusters_Restart.json + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureConfigurations_Delete.json */ /** - * Sample code: Restart a HorizonDB cluster. + * Sample code: Delete a Microsoft Fabric Mirroring configuration. * * @param manager Entry point to HorizonDbManager. */ - public static void restartAHorizonDBCluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbClusters().restart("exampleresourcegroup", "examplecluster", com.azure.core.util.Context.NONE); + public static void + deleteAMicrosoftFabricMirroringConfiguration(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.changeDataCaptureConfigurations() + .delete("example-resource-group", "example-cluster", "sales-database", com.azure.core.util.Context.NONE); } } ``` -### HorizonDbClusters_Start +### ChangeDataCaptureConfigurations_Get ```java /** - * Samples for HorizonDbClusters Start. + * Samples for ChangeDataCaptureConfigurations Get. */ -public final class HorizonDbClustersStartSamples { +public final class ChangeDataCaptureConfigurationsGetSamples { /* - * x-ms-original-file: 2026-05-01-preview/Clusters_Start.json + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureConfigurations_Get.json */ /** - * Sample code: Start a HorizonDB cluster. + * Sample code: Get a Microsoft Fabric Mirroring configuration. * * @param manager Entry point to HorizonDbManager. */ - public static void startAHorizonDBCluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbClusters().start("exampleresourcegroup", "examplecluster", com.azure.core.util.Context.NONE); + public static void + getAMicrosoftFabricMirroringConfiguration(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.changeDataCaptureConfigurations() + .getWithResponse("example-resource-group", "example-cluster", "sales-database", + com.azure.core.util.Context.NONE); } } ``` -### HorizonDbClusters_Stop +### ChangeDataCaptureConfigurations_List ```java /** - * Samples for HorizonDbClusters Stop. + * Samples for ChangeDataCaptureConfigurations List. */ -public final class HorizonDbClustersStopSamples { +public final class ChangeDataCaptureConfigurationsListSamples { /* - * x-ms-original-file: 2026-05-01-preview/Clusters_Stop.json + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureConfigurations_List.json */ /** - * Sample code: Stop a HorizonDB cluster. + * Sample code: List Microsoft Fabric Mirroring configurations. * * @param manager Entry point to HorizonDbManager. */ - public static void stopAHorizonDBCluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbClusters().stop("exampleresourcegroup", "examplecluster", com.azure.core.util.Context.NONE); + public static void + listMicrosoftFabricMirroringConfigurations(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.changeDataCaptureConfigurations() + .list("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); } } ``` -### HorizonDbClusters_Update +### ChangeDataCaptureConfigurations_Update ```java -import com.azure.resourcemanager.horizondb.models.HorizonDbCluster; -import com.azure.resourcemanager.horizondb.models.HorizonDbClusterPropertiesForPatchUpdate; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureConfiguration; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureConfigurationPropertiesForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDesiredState; /** - * Samples for HorizonDbClusters Update. + * Samples for ChangeDataCaptureConfigurations Update. */ -public final class HorizonDbClustersUpdateSamples { +public final class ChangeDataCaptureConfigurationsUpdateSamples { /* - * x-ms-original-file: 2026-05-01-preview/Clusters_Update.json + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureConfigurations_Update.json */ /** - * Sample code: Update a HorizonDB cluster. + * Sample code: Disable a Microsoft Fabric Mirroring configuration. * * @param manager Entry point to HorizonDbManager. */ - public static void updateAHorizonDBCluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - HorizonDbCluster resource = manager.horizonDbClusters() - .getByResourceGroupWithResponse("exampleresourcegroup", "examplecluster", com.azure.core.util.Context.NONE) + public static void + disableAMicrosoftFabricMirroringConfiguration(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + ChangeDataCaptureConfiguration resource = manager.changeDataCaptureConfigurations() + .getWithResponse("example-resource-group", "example-cluster", "sales-database", + com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("team", "updated-data-platform")) - .withProperties( - new HorizonDbClusterPropertiesForPatchUpdate().withAdministratorLoginPassword("fakeTokenPlaceholder") - .withVCores(8)) + .withProperties(new ChangeDataCaptureConfigurationPropertiesForPatchUpdate() + .withDesiredState(ChangeDataCaptureDesiredState.DISABLED)) .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; +### ChangeDataCaptureDestinations_ActivateIdentity + +```java +import com.azure.resourcemanager.horizondb.models.ActivateChangeDataCaptureIdentityRequest; + +/** + * Samples for ChangeDataCaptureDestinations ActivateIdentity. + */ +public final class ChangeDataCaptureDestinationsActivateIdentitySamples { + /* + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureDestinations_ActivateIdentity.json + */ + /** + * Sample code: Activate a validated identity assignment for a change data capture destination. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void activateAValidatedIdentityAssignmentForAChangeDataCaptureDestination( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.changeDataCaptureDestinations() + .activateIdentity("example-resource-group", "*", "example-cluster", "fabric-mirroring", + new ActivateChangeDataCaptureIdentityRequest().withIdentityAssignmentResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/example-cluster/changeDataCaptureDestinations/fabric-mirroring/identityAssignments/fabric-writer") + .withDrainExistingSessions(true), + com.azure.core.util.Context.NONE); } } ``` -### HorizonDbFirewallRules_CreateOrUpdate +### ChangeDataCaptureDestinations_CreateOrReplace ```java -import com.azure.resourcemanager.horizondb.models.HorizonDbFirewallRuleProperties; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDesiredState; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDestinationProperties; +import com.azure.resourcemanager.horizondb.models.FabricDestinationDetails; /** - * Samples for HorizonDbFirewallRules CreateOrUpdate. + * Samples for ChangeDataCaptureDestinations CreateOrReplace. */ -public final class HorizonDbFirewallRulesCreateOrUpdateSamples { +public final class ChangeDataCaptureDestinationsCreateOrReplaceSamples { /* - * x-ms-original-file: 2026-05-01-preview/FirewallRules_CreateOrUpdate.json + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureDestinations_CreateOrReplace.json */ /** - * Sample code: Create or update a HorizonDB firewall rule. + * Sample code: Create a Microsoft Fabric change data capture destination. * * @param manager Entry point to HorizonDbManager. */ - public static void - createOrUpdateAHorizonDBFirewallRule(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbFirewallRules() - .define("examplefirewallrule") - .withExistingPool("exampleresourcegroup", "examplecluster", "examplepool") - .withProperties(new HorizonDbFirewallRuleProperties().withStartIpAddress("10.0.0.1") - .withEndIpAddress("10.0.0.10") - .withDescription("Allow access from corporate network")) + public static void createAMicrosoftFabricChangeDataCaptureDestination( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.changeDataCaptureDestinations() + .define("fabric-mirroring") + .withExistingCluster("example-resource-group", "example-cluster") + .withProperties(new ChangeDataCaptureDestinationProperties() + .withDestination(new FabricDestinationDetails().withWorkspaceId("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")) + .withDesiredState(ChangeDataCaptureDesiredState.ENABLED)) .create(); } } ``` -### HorizonDbFirewallRules_Delete +### ChangeDataCaptureDestinations_Delete ```java /** - * Samples for HorizonDbFirewallRules Delete. + * Samples for ChangeDataCaptureDestinations Delete. */ -public final class HorizonDbFirewallRulesDeleteSamples { +public final class ChangeDataCaptureDestinationsDeleteSamples { /* - * x-ms-original-file: 2026-05-01-preview/FirewallRules_Delete.json + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureDestinations_Delete.json */ /** - * Sample code: Delete a HorizonDB firewall rule. + * Sample code: Delete a Microsoft Fabric change data capture destination. * * @param manager Entry point to HorizonDbManager. */ - public static void deleteAHorizonDBFirewallRule(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbFirewallRules() - .delete("exampleresourcegroup", "examplecluster", "examplepool", "examplefirewallrule", - com.azure.core.util.Context.NONE); + public static void deleteAMicrosoftFabricChangeDataCaptureDestination( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.changeDataCaptureDestinations() + .delete("example-resource-group", "example-cluster", "fabric-mirroring", com.azure.core.util.Context.NONE); } } ``` -### HorizonDbFirewallRules_Get +### ChangeDataCaptureDestinations_Get ```java /** - * Samples for HorizonDbFirewallRules Get. + * Samples for ChangeDataCaptureDestinations Get. */ -public final class HorizonDbFirewallRulesGetSamples { +public final class ChangeDataCaptureDestinationsGetSamples { /* - * x-ms-original-file: 2026-05-01-preview/FirewallRules_Get.json + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureDestinations_Get.json */ /** - * Sample code: Get a HorizonDB firewall rule. + * Sample code: Get a Microsoft Fabric change data capture destination. * * @param manager Entry point to HorizonDbManager. */ - public static void getAHorizonDBFirewallRule(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbFirewallRules() - .getWithResponse("exampleresourcegroup", "examplecluster", "examplepool", "examplefirewallrule", + public static void + getAMicrosoftFabricChangeDataCaptureDestination(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.changeDataCaptureDestinations() + .getWithResponse("example-resource-group", "example-cluster", "fabric-mirroring", com.azure.core.util.Context.NONE); } } ``` -### HorizonDbFirewallRules_List +### ChangeDataCaptureDestinations_List ```java /** - * Samples for HorizonDbFirewallRules List. + * Samples for ChangeDataCaptureDestinations List. */ -public final class HorizonDbFirewallRulesListSamples { +public final class ChangeDataCaptureDestinationsListSamples { /* - * x-ms-original-file: 2026-05-01-preview/FirewallRules_List.json + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureDestinations_List.json */ /** - * Sample code: List HorizonDB firewall rules in a pool. + * Sample code: List Microsoft Fabric change data capture destinations. * * @param manager Entry point to HorizonDbManager. */ - public static void listHorizonDBFirewallRulesInAPool(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbFirewallRules() - .list("exampleresourcegroup", "examplecluster", "examplepool", com.azure.core.util.Context.NONE); + public static void + listMicrosoftFabricChangeDataCaptureDestinations(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.changeDataCaptureDestinations() + .list("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); } } ``` -### HorizonDbParameterGroups_CreateOrUpdate +### ChangeDataCaptureDestinations_Update ```java -import com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroupProperties; -import com.azure.resourcemanager.horizondb.models.ParameterProperties; -import java.util.Arrays; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDesiredState; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDestination; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDestinationPropertiesForPatchUpdate; + +/** + * Samples for ChangeDataCaptureDestinations Update. + */ +public final class ChangeDataCaptureDestinationsUpdateSamples { + /* + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureDestinations_Update.json + */ + /** + * Sample code: Disable a Microsoft Fabric change data capture destination. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void disableAMicrosoftFabricChangeDataCaptureDestination( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + ChangeDataCaptureDestination resource = manager.changeDataCaptureDestinations() + .getWithResponse("example-resource-group", "example-cluster", "fabric-mirroring", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new ChangeDataCaptureDestinationPropertiesForPatchUpdate() + .withDesiredState(ChangeDataCaptureDesiredState.DISABLED)) + .apply(); + } +} +``` + +### Clusters_CreateOrReplace + +```java +import com.azure.resourcemanager.horizondb.models.BackupProperties; +import com.azure.resourcemanager.horizondb.models.ClusterCreateMode; +import com.azure.resourcemanager.horizondb.models.ClusterProperties; +import com.azure.resourcemanager.horizondb.models.GeoRedundancyState; +import com.azure.resourcemanager.horizondb.models.HorizonDbClusterDataEncryption; +import com.azure.resourcemanager.horizondb.models.HorizonDbClusterDataEncryptionType; +import com.azure.resourcemanager.horizondb.models.HorizonDbClusterIdentityType; +import com.azure.resourcemanager.horizondb.models.HorizonDbClusterManagedServiceIdentity; +import com.azure.resourcemanager.horizondb.models.Network; +import com.azure.resourcemanager.horizondb.models.PostgreSqlVersion; +import com.azure.resourcemanager.horizondb.models.PublicNetworkAccessState; +import com.azure.resourcemanager.horizondb.models.UserAssignedIdentity; +import java.time.OffsetDateTime; import java.util.HashMap; import java.util.Map; /** - * Samples for HorizonDbParameterGroups CreateOrUpdate. + * Samples for Clusters CreateOrReplace. */ -public final class HorizonDbParameterGroupsCreateOrUpdateSamples { +public final class ClustersCreateOrReplaceSamples { + /* + * x-ms-original-file: 2026-10-01-preview/Clusters_CreateOrReplace.json + */ + /** + * Sample code: Create or replace a HorizonDB cluster. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void createOrReplaceAHorizonDBCluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.clusters() + .define("example-cluster") + .withRegion("eastus2") + .withExistingResourceGroup("example-resource-group") + .withTags(mapOf("environment", "production")) + .withProperties(new ClusterProperties().withPostgreSqlVersion(PostgreSqlVersion.V17) + .withNetwork(new Network().withPublicAccess(PublicNetworkAccessState.ENABLED)) + .withBackup(new BackupProperties().withGeoRedundancy(GeoRedundancyState.ENABLED).withRetentionDays(14))) + .withIdentity(new HorizonDbClusterManagedServiceIdentity() + .withType(HorizonDbClusterIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fabric-writer", + new UserAssignedIdentity()))) + .create(); + } + + /* + * x-ms-original-file: 2026-10-01-preview/Clusters_CreateOrReplaceMinimumDefaults.json + */ + /** + * Sample code: Create a PostgreSQL 18 HorizonDB cluster with minimum configuration and service defaults. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void createAPostgreSQL18HorizonDBClusterWithMinimumConfigurationAndServiceDefaults( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.clusters() + .define("minimum-defaults") + .withRegion("eastus2") + .withExistingResourceGroup("example-resource-group") + .withProperties(new ClusterProperties().withPostgreSqlVersion(PostgreSqlVersion.V18) + .withBackup(new BackupProperties().withGeoRedundancy(GeoRedundancyState.DISABLED))) + .create(); + } + + /* + * x-ms-original-file: 2026-10-01-preview/Clusters_CreateOrReplaceWithDataEncryption.json + */ + /** + * Sample code: Create a HorizonDB cluster with customer-managed key data encryption. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void createAHorizonDBClusterWithCustomerManagedKeyDataEncryption( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.clusters() + .define("example-cluster") + .withRegion("eastus2") + .withExistingResourceGroup("example-resource-group") + .withProperties(new ClusterProperties().withPostgreSqlVersion(PostgreSqlVersion.V17) + .withBackup(new BackupProperties().withGeoRedundancy(GeoRedundancyState.DISABLED).withRetentionDays(14)) + .withDataEncryption(new HorizonDbClusterDataEncryption() + .withType(HorizonDbClusterDataEncryptionType.AZURE_KEY_VAULT) + .withPrimaryKeyUri("fakeTokenPlaceholder") + .withPrimaryUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/primary-encryption-identity"))) + .withIdentity(new HorizonDbClusterManagedServiceIdentity() + .withType(HorizonDbClusterIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/primary-encryption-identity", + new UserAssignedIdentity()))) + .create(); + } + /* - * x-ms-original-file: 2026-05-01-preview/ParameterGroups_CreateOrUpdate.json + * x-ms-original-file: 2026-10-01-preview/Clusters_CreateOrReplacePointInTimeRestore.json */ /** - * Sample code: Create or update a HorizonDB parameter group. + * Sample code: Restore a HorizonDB cluster to a point in time. * * @param manager Entry point to HorizonDbManager. */ public static void - createOrUpdateAHorizonDBParameterGroup(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbParameterGroups() - .define("exampleparametergroup") + restoreAHorizonDBClusterToAPointInTime(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.clusters() + .define("restored-cluster") + .withRegion("eastus2") + .withExistingResourceGroup("example-resource-group") + .withProperties(new ClusterProperties().withCreationMode(ClusterCreateMode.POINT_IN_TIME_RESTORE) + .withPointInTimeUtc(OffsetDateTime.parse("2026-07-27T12:00:00Z")) + .withCreationSourceClusterResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/source-cluster") + .withNetwork(new Network().withPublicAccess(PublicNetworkAccessState.DISABLED)) + .withBackup(new BackupProperties().withGeoRedundancy(GeoRedundancyState.ENABLED).withRetentionDays(14))) + .create(); + } + + /* + * x-ms-original-file: 2026-10-01-preview/Clusters_CreateOrReplaceCrossRegionPointInTimeRestore.json + */ + /** + * Sample code: Restore a HorizonDB cluster across Azure regions from the latest available backup. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void restoreAHorizonDBClusterAcrossAzureRegionsFromTheLatestAvailableBackup( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.clusters() + .define("cross-region-restored-cluster") .withRegion("westus2") - .withExistingResourceGroup("exampleresourcegroup") - .withTags(mapOf("env", "dev", "team", "data-platform")) - .withProperties(new HorizonDbParameterGroupProperties() - .withParameters(Arrays.asList(new ParameterProperties().withName("max_connections").withValue("200"), - new ParameterProperties().withName("log_min_error_statement").withValue("error"), - new ParameterProperties().withName("shared_buffers").withValue("2000"))) - .withDescription("Parameter group for high-throughput workloads") - .withPgVersion(17) - .withApplyImmediately(true)) + .withExistingResourceGroup("example-resource-group") + .withProperties(new ClusterProperties().withCreationMode(ClusterCreateMode.POINT_IN_TIME_RESTORE) + .withPointInTimeUtc(OffsetDateTime.parse("2026-07-27T12:00:00Z")) + .withCreationSourceClusterResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/source-cluster") + .withCreationSourceClusterLocation("eastus2") + .withNetwork(new Network().withPublicAccess(PublicNetworkAccessState.DISABLED)) + .withBackup(new BackupProperties().withGeoRedundancy(GeoRedundancyState.ENABLED).withRetentionDays(14))) .create(); } @@ -563,176 +801,200 @@ public final class HorizonDbParameterGroupsCreateOrUpdateSamples { } ``` -### HorizonDbParameterGroups_Delete +### Clusters_Delete ```java /** - * Samples for HorizonDbParameterGroups Delete. + * Samples for Clusters Delete. */ -public final class HorizonDbParameterGroupsDeleteSamples { +public final class ClustersDeleteSamples { /* - * x-ms-original-file: 2026-05-01-preview/ParameterGroups_Delete.json + * x-ms-original-file: 2026-10-01-preview/Clusters_Delete.json */ /** - * Sample code: Delete a HorizonDB parameter group. + * Sample code: Delete a HorizonDB cluster. * * @param manager Entry point to HorizonDbManager. */ - public static void deleteAHorizonDBParameterGroup(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbParameterGroups() - .delete("exampleresourcegroup", "exampleparametergroup", com.azure.core.util.Context.NONE); + public static void deleteAHorizonDBCluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.clusters().delete("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); } } ``` -### HorizonDbParameterGroups_GetByResourceGroup +### Clusters_Failover ```java /** - * Samples for HorizonDbParameterGroups GetByResourceGroup. + * Samples for Clusters Failover. */ -public final class HorizonDbParameterGroupsGetByResourceGroupSamples { +public final class ClustersFailoverSamples { /* - * x-ms-original-file: 2026-05-01-preview/ParameterGroups_Get.json + * x-ms-original-file: 2026-10-01-preview/Clusters_Failover.json */ /** - * Sample code: Get a HorizonDB parameter group. + * Sample code: Trigger failover within a HorizonDB cluster. * * @param manager Entry point to HorizonDbManager. */ - public static void getAHorizonDBParameterGroup(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbParameterGroups() - .getByResourceGroupWithResponse("exampleresourcegroup", "exampleparametergroup", - com.azure.core.util.Context.NONE); + public static void + triggerFailoverWithinAHorizonDBCluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.clusters().failover("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); } } ``` -### HorizonDbParameterGroups_List +### Clusters_GetByResourceGroup ```java /** - * Samples for HorizonDbParameterGroups List. + * Samples for Clusters GetByResourceGroup. */ -public final class HorizonDbParameterGroupsListSamples { +public final class ClustersGetByResourceGroupSamples { /* - * x-ms-original-file: 2026-05-01-preview/ParameterGroups_ListBySubscription.json + * x-ms-original-file: 2026-10-01-preview/Clusters_GetMinimumDefaults.json */ /** - * Sample code: List HorizonDB parameter groups in a subscription. + * Sample code: Get a minimum HorizonDB cluster with materialized service defaults. * * @param manager Entry point to HorizonDbManager. */ - public static void - listHorizonDBParameterGroupsInASubscription(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbParameterGroups().list(com.azure.core.util.Context.NONE); + public static void getAMinimumHorizonDBClusterWithMaterializedServiceDefaults( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.clusters() + .getByResourceGroupWithResponse("example-resource-group", "minimum-defaults", + com.azure.core.util.Context.NONE); } -} -``` -### HorizonDbParameterGroups_ListByResourceGroup + /* + * x-ms-original-file: 2026-10-01-preview/Clusters_Get.json + */ + /** + * Sample code: Get a HorizonDB cluster. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void getAHorizonDBCluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.clusters() + .getByResourceGroupWithResponse("example-resource-group", "example-cluster", + com.azure.core.util.Context.NONE); + } -```java -/** - * Samples for HorizonDbParameterGroups ListByResourceGroup. - */ -public final class HorizonDbParameterGroupsListByResourceGroupSamples { /* - * x-ms-original-file: 2026-05-01-preview/ParameterGroups_ListByResourceGroup.json + * x-ms-original-file: 2026-10-01-preview/Clusters_GetAfterPoolCreationOnEmptyCluster.json */ /** - * Sample code: List HorizonDB parameter groups in a resource group. + * Sample code: Get a cluster after pool creation while it had no existing pools. * * @param manager Entry point to HorizonDbManager. */ - public static void - listHorizonDBParameterGroupsInAResourceGroup(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbParameterGroups() - .listByResourceGroup("exampleresourcegroup", com.azure.core.util.Context.NONE); + public static void getAClusterAfterPoolCreationWhileItHadNoExistingPools( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.clusters() + .getByResourceGroupWithResponse("example-resource-group", "example-cluster", + com.azure.core.util.Context.NONE); } } ``` -### HorizonDbParameterGroups_ListConnections +### Clusters_List ```java /** - * Samples for HorizonDbParameterGroups ListConnections. + * Samples for Clusters List. */ -public final class HorizonDbParameterGroupsListConnectionsSamples { +public final class ClustersListSamples { /* - * x-ms-original-file: 2026-05-01-preview/ParameterGroups_ListConnections.json + * x-ms-original-file: 2026-10-01-preview/Clusters_ListBySubscription.json */ /** - * Sample code: List connections for a HorizonDB parameter group. + * Sample code: List HorizonDB clusters in a subscription. * * @param manager Entry point to HorizonDbManager. */ public static void - listConnectionsForAHorizonDBParameterGroup(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbParameterGroups() - .listConnections("exampleresourcegroup", "exampleparametergroup", com.azure.core.util.Context.NONE); + listHorizonDBClustersInASubscription(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.clusters().list(com.azure.core.util.Context.NONE); } } ``` -### HorizonDbParameterGroups_ListVersions +### Clusters_ListByResourceGroup ```java /** - * Samples for HorizonDbParameterGroups ListVersions. + * Samples for Clusters ListByResourceGroup. */ -public final class HorizonDbParameterGroupsListVersionsSamples { +public final class ClustersListByResourceGroupSamples { /* - * x-ms-original-file: 2026-05-01-preview/ParameterGroups_ListVersions.json + * x-ms-original-file: 2026-10-01-preview/Clusters_ListByResourceGroup.json */ /** - * Sample code: List parameter groups filtered by version. + * Sample code: List HorizonDB clusters in a resource group. * * @param manager Entry point to HorizonDbManager. */ public static void - listParameterGroupsFilteredByVersion(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbParameterGroups() - .listVersions("exampleresourcegroup", "exampleparametergroup", 22, com.azure.core.util.Context.NONE); + listHorizonDBClustersInAResourceGroup(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.clusters().listByResourceGroup("example-resource-group", com.azure.core.util.Context.NONE); } } ``` -### HorizonDbParameterGroups_Update +### Clusters_Update ```java -import com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroup; -import com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroupPropertiesForPatchUpdate; -import com.azure.resourcemanager.horizondb.models.ParameterProperties; -import java.util.Arrays; +import com.azure.resourcemanager.horizondb.models.BackupPropertiesForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.Cluster; +import com.azure.resourcemanager.horizondb.models.ClusterPropertiesForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.HorizonDbClusterDataEncryptionForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.NetworkForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.PublicNetworkAccessState; import java.util.HashMap; import java.util.Map; /** - * Samples for HorizonDbParameterGroups Update. + * Samples for Clusters Update. */ -public final class HorizonDbParameterGroupsUpdateSamples { +public final class ClustersUpdateSamples { /* - * x-ms-original-file: 2026-05-01-preview/ParameterGroups_Update.json + * x-ms-original-file: 2026-10-01-preview/Clusters_Update.json */ /** - * Sample code: Update a HorizonDB parameter group. + * Sample code: Update a HorizonDB cluster. * * @param manager Entry point to HorizonDbManager. */ - public static void updateAHorizonDBParameterGroup(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - HorizonDbParameterGroup resource = manager.horizonDbParameterGroups() - .getByResourceGroupWithResponse("exampleresourcegroup", "exampleparametergroup", + public static void updateAHorizonDBCluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + Cluster resource = manager.clusters() + .getByResourceGroupWithResponse("example-resource-group", "example-cluster", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("environment", "production", "team", "data-platform")) + .withProperties(new ClusterPropertiesForPatchUpdate() + .withNetwork(new NetworkForPatchUpdate().withPublicAccess(PublicNetworkAccessState.DISABLED)) + .withBackup(new BackupPropertiesForPatchUpdate().withRetentionDays(21))) + .apply(); + } + + /* + * x-ms-original-file: 2026-10-01-preview/Clusters_UpdateDataEncryption.json + */ + /** + * Sample code: Rotate the customer-managed key used by a HorizonDB cluster. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void rotateTheCustomerManagedKeyUsedByAHorizonDBCluster( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + Cluster resource = manager.clusters() + .getByResourceGroupWithResponse("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withTags(mapOf("team", "updated-data-platform")) - .withProperties(new HorizonDbParameterGroupPropertiesForPatchUpdate() - .withParameters(Arrays.asList(new ParameterProperties().withName("max_connections").withValue("300"), - new ParameterProperties().withName("log_min_error_statement").withValue("warning"))) - .withDescription("Updated parameter group for high-throughput workloads") - .withApplyImmediately(true)) + .withProperties(new ClusterPropertiesForPatchUpdate().withDataEncryption( + new HorizonDbClusterDataEncryptionForPatchUpdate().withPrimaryKeyUri("fakeTokenPlaceholder"))) .apply(); } @@ -750,345 +1012,1663 @@ public final class HorizonDbParameterGroupsUpdateSamples { } ``` -### HorizonDbPools_Get +### DefaultParameterGroups_Get ```java /** - * Samples for HorizonDbPools Get. + * Samples for DefaultParameterGroups Get. */ -public final class HorizonDbPoolsGetSamples { +public final class DefaultParameterGroupsGetSamples { /* - * x-ms-original-file: 2026-05-01-preview/Pools_Get.json + * x-ms-original-file: 2026-10-01-preview/DefaultParameterGroups_Get.json */ /** - * Sample code: Get a HorizonDB pool. + * Sample code: Get a default HorizonDB parameter group by subscription, location, and name. * * @param manager Entry point to HorizonDbManager. */ - public static void getAHorizonDBPool(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbPools() - .getWithResponse("exampleresourcegroup", "examplecluster", "examplepool", com.azure.core.util.Context.NONE); + public static void getADefaultHorizonDBParameterGroupBySubscriptionLocationAndName( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.defaultParameterGroups() + .getWithResponse("eastus2", "default-postgresql-17-provisioned", com.azure.core.util.Context.NONE); } } ``` -### HorizonDbPools_List +### DefaultParameterGroups_ListBySubscriptionAndRegion ```java /** - * Samples for HorizonDbPools List. + * Samples for DefaultParameterGroups ListBySubscriptionAndRegion. */ -public final class HorizonDbPoolsListSamples { +public final class DefaultParameterGroupsListBySubscriptionAndRegionSamples { /* - * x-ms-original-file: 2026-05-01-preview/Pools_List.json + * x-ms-original-file: 2026-10-01-preview/DefaultParameterGroups_List.json */ /** - * Sample code: List HorizonDB pools in a cluster. + * Sample code: List default HorizonDB parameter groups by subscription and region. * * @param manager Entry point to HorizonDbManager. */ - public static void listHorizonDBPoolsInACluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbPools().list("exampleresourcegroup", "examplecluster", com.azure.core.util.Context.NONE); + public static void listDefaultHorizonDBParameterGroupsBySubscriptionAndRegion( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.defaultParameterGroups().listBySubscriptionAndRegion("eastus2", com.azure.core.util.Context.NONE); } } ``` -### HorizonDbPrivateEndpointConnections_Delete +### Endpoints_Get ```java /** - * Samples for HorizonDbPrivateEndpointConnections Delete. + * Samples for Endpoints Get. */ -public final class HorizonDbPrivateEndpointConnectionsDeleteSamples { +public final class EndpointsGetSamples { /* - * x-ms-original-file: 2026-05-01-preview/PrivateEndpointConnections_Delete.json + * x-ms-original-file: 2026-10-01-preview/Endpoints_GetReadOnly.json */ /** - * Sample code: Delete a private endpoint connection. + * Sample code: Get a read-only HorizonDB pool endpoint. * * @param manager Entry point to HorizonDbManager. */ - public static void deleteAPrivateEndpointConnection(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbPrivateEndpointConnections() - .delete("exampleresourcegroup", "examplecluster", - "exampleprivateendpointconnection.1fa229cd-bf3f-47f0-8c49-afb36723997e", + public static void getAReadOnlyHorizonDBPoolEndpoint(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.endpoints() + .getWithResponse("example-resource-group", "example-cluster", "example-pool-01", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-10-01-preview/Endpoints_Get.json + */ + /** + * Sample code: Get a HorizonDB endpoint. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void getAHorizonDBEndpoint(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.endpoints() + .getWithResponse("example-resource-group", "example-cluster", "example-cluster", com.azure.core.util.Context.NONE); } } ``` -### HorizonDbPrivateEndpointConnections_Get +### Endpoints_List ```java /** - * Samples for HorizonDbPrivateEndpointConnections Get. + * Samples for Endpoints List. */ -public final class HorizonDbPrivateEndpointConnectionsGetSamples { +public final class EndpointsListSamples { /* - * x-ms-original-file: 2026-05-01-preview/PrivateEndpointConnections_Get.json + * x-ms-original-file: 2026-10-01-preview/Endpoints_List.json */ /** - * Sample code: Get a private endpoint connection. + * Sample code: List HorizonDB endpoints in a cluster. * * @param manager Entry point to HorizonDbManager. */ - public static void getAPrivateEndpointConnection(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbPrivateEndpointConnections() - .getWithResponse("exampleresourcegroup", "examplecluster", - "exampleprivateendpointconnection.1fa229cd-bf3f-47f0-8c49-afb36723997e", - com.azure.core.util.Context.NONE); + public static void listHorizonDBEndpointsInACluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.endpoints().list("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); } } ``` -### HorizonDbPrivateEndpointConnections_List +### FirewallRules_CreateOrReplace ```java +import com.azure.resourcemanager.horizondb.models.FirewallRuleProperties; + /** - * Samples for HorizonDbPrivateEndpointConnections List. + * Samples for FirewallRules CreateOrReplace. */ -public final class HorizonDbPrivateEndpointConnectionsListSamples { +public final class FirewallRulesCreateOrReplaceSamples { /* - * x-ms-original-file: 2026-05-01-preview/PrivateEndpointConnections_List.json + * x-ms-original-file: 2026-10-01-preview/FirewallRules_CreateOrReplace.json */ /** - * Sample code: List all private endpoint connections on a cluster. + * Sample code: Create or replace a firewall rule on a HorizonDB pool. * * @param manager Entry point to HorizonDbManager. */ public static void - listAllPrivateEndpointConnectionsOnACluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbPrivateEndpointConnections() - .list("exampleresourcegroup", "examplecluster", com.azure.core.util.Context.NONE); + createOrReplaceAFirewallRuleOnAHorizonDBPool(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.firewallRules() + .define("example-firewall-rule-01") + .withExistingPool("example-resource-group", "example-cluster", "example-pool-01") + .withProperties(new FirewallRuleProperties().withStartIpAddress("10.0.0.1") + .withEndIpAddress("10.0.0.254") + .withDescription("Allow access from the corporate network")) + .create(); } } ``` -### HorizonDbPrivateEndpointConnections_UpdateStatus +### FirewallRules_Delete ```java -import com.azure.resourcemanager.horizondb.fluent.models.PrivateEndpointConnectionResourceInner; -import com.azure.resourcemanager.horizondb.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.horizondb.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.horizondb.models.PrivateLinkServiceConnectionState; - /** - * Samples for HorizonDbPrivateEndpointConnections UpdateStatus. + * Samples for FirewallRules Delete. */ -public final class HorizonDbPrivateEndpointConnectionsUpdateStatusSamples { +public final class FirewallRulesDeleteSamples { /* - * x-ms-original-file: 2026-05-01-preview/PrivateEndpointConnections_UpdateStatus.json + * x-ms-original-file: 2026-10-01-preview/FirewallRules_Delete.json */ /** - * Sample code: Approve or reject a private endpoint connection. + * Sample code: Delete a firewall rule from a HorizonDB pool. * * @param manager Entry point to HorizonDbManager. */ public static void - approveOrRejectAPrivateEndpointConnection(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbPrivateEndpointConnections() - .updateStatusWithResponse("exampleresourcegroup", "examplecluster", - "exampleprivateendpointconnection.1fa229cd-bf3f-47f0-8c49-afb36723997e", - new PrivateEndpointConnectionResourceInner().withProperties(new PrivateEndpointConnectionProperties() - .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("Approved by johndoe@contoso.com"))), + deleteAFirewallRuleFromAHorizonDBPool(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.firewallRules() + .delete("example-resource-group", "example-cluster", "example-pool-01", "example-firewall-rule-01", com.azure.core.util.Context.NONE); } } ``` -### HorizonDbPrivateLinkResources_Get +### FirewallRules_Get ```java /** - * Samples for HorizonDbPrivateLinkResources Get. + * Samples for FirewallRules Get. */ -public final class HorizonDbPrivateLinkResourcesGetSamples { +public final class FirewallRulesGetSamples { /* - * x-ms-original-file: 2026-05-01-preview/PrivateLinkResources_Get.json + * x-ms-original-file: 2026-10-01-preview/FirewallRules_Get.json */ /** - * Sample code: Gets a private link resource for HorizonDB. + * Sample code: Get a firewall rule on a HorizonDB pool. * * @param manager Entry point to HorizonDbManager. */ - public static void - getsAPrivateLinkResourceForHorizonDB(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbPrivateLinkResources() - .getWithResponse("exampleresourcegroup", "examplecluster", "default", com.azure.core.util.Context.NONE); + public static void getAFirewallRuleOnAHorizonDBPool(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.firewallRules() + .getWithResponse("example-resource-group", "example-cluster", "example-pool-01", "example-firewall-rule-01", + com.azure.core.util.Context.NONE); } } ``` -### HorizonDbPrivateLinkResources_List +### FirewallRules_List ```java /** - * Samples for HorizonDbPrivateLinkResources List. + * Samples for FirewallRules List. */ -public final class HorizonDbPrivateLinkResourcesListSamples { +public final class FirewallRulesListSamples { /* - * x-ms-original-file: 2026-05-01-preview/PrivateLinkResources_List.json + * x-ms-original-file: 2026-10-01-preview/FirewallRules_List.json */ /** - * Sample code: Gets private link resources for HorizonDB. + * Sample code: List firewall rules in a HorizonDB pool. * * @param manager Entry point to HorizonDbManager. */ - public static void - getsPrivateLinkResourcesForHorizonDB(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbPrivateLinkResources() - .list("exampleresourcegroup", "examplecluster", com.azure.core.util.Context.NONE); + public static void listFirewallRulesInAHorizonDBPool(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.firewallRules() + .list("example-resource-group", "example-cluster", "example-pool-01", com.azure.core.util.Context.NONE); } } ``` -### HorizonDbReplicas_CreateOrUpdate +### IdentityAssignments_CreateOrReplace ```java -import com.azure.resourcemanager.horizondb.models.HorizonDbReplicaProperties; -import com.azure.resourcemanager.horizondb.models.ReplicaRole; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureIdentityAssignmentProperties; /** - * Samples for HorizonDbReplicas CreateOrUpdate. + * Samples for IdentityAssignments CreateOrReplace. */ -public final class HorizonDbReplicasCreateOrUpdateSamples { +public final class IdentityAssignmentsCreateOrReplaceSamples { /* - * x-ms-original-file: 2026-05-01-preview/Replicas_CreateOrUpdate.json + * x-ms-original-file: 2026-10-01-preview/IdentityAssignments_CreateOrReplace.json */ /** - * Sample code: Create or update a HorizonDB replica. + * Sample code: Create a change data capture identity assignment for a UAMI attached to the parent cluster. * * @param manager Entry point to HorizonDbManager. */ - public static void createOrUpdateAHorizonDBReplica(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbReplicas() - .define("examplereplica") - .withExistingPool("exampleresourcegroup", "examplecluster", "examplepool") - .withProperties(new HorizonDbReplicaProperties().withRole(ReplicaRole.READ).withAvailabilityZone("1")) + public static void createAChangeDataCaptureIdentityAssignmentForAUAMIAttachedToTheParentCluster( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.identityAssignments() + .define("fabric-writer") + .withExistingChangeDataCaptureDestination("example-resource-group", "example-cluster", "fabric-mirroring") + .withProperties(new ChangeDataCaptureIdentityAssignmentProperties().withIdentityResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fabric-writer")) .create(); } } ``` -### HorizonDbReplicas_Delete +### IdentityAssignments_Delete ```java /** - * Samples for HorizonDbReplicas Delete. + * Samples for IdentityAssignments Delete. */ -public final class HorizonDbReplicasDeleteSamples { +public final class IdentityAssignmentsDeleteSamples { /* - * x-ms-original-file: 2026-05-01-preview/Replicas_Delete.json + * x-ms-original-file: 2026-10-01-preview/IdentityAssignments_Delete.json */ /** - * Sample code: Delete a HorizonDB replica. + * Sample code: Delete an inactive change data capture identity assignment. * * @param manager Entry point to HorizonDbManager. */ - public static void deleteAHorizonDBReplica(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbReplicas() - .delete("exampleresourcegroup", "examplecluster", "examplepool", "examplereplica", + public static void deleteAnInactiveChangeDataCaptureIdentityAssignment( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.identityAssignments() + .delete("example-resource-group", "example-cluster", "fabric-mirroring", "fabric-writer", com.azure.core.util.Context.NONE); } } ``` -### HorizonDbReplicas_Get +### IdentityAssignments_Get ```java /** - * Samples for HorizonDbReplicas Get. + * Samples for IdentityAssignments Get. */ -public final class HorizonDbReplicasGetSamples { +public final class IdentityAssignmentsGetSamples { /* - * x-ms-original-file: 2026-05-01-preview/Replicas_Get.json + * x-ms-original-file: 2026-10-01-preview/IdentityAssignments_Get.json */ /** - * Sample code: Get a HorizonDB replica. + * Sample code: Get a change data capture identity assignment. * * @param manager Entry point to HorizonDbManager. */ - public static void getAHorizonDBReplica(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbReplicas() - .getWithResponse("exampleresourcegroup", "examplecluster", "examplepool", "examplereplica", + public static void + getAChangeDataCaptureIdentityAssignment(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.identityAssignments() + .getWithResponse("example-resource-group", "example-cluster", "fabric-mirroring", "fabric-writer", com.azure.core.util.Context.NONE); } } ``` -### HorizonDbReplicas_List +### IdentityAssignments_List ```java /** - * Samples for HorizonDbReplicas List. + * Samples for IdentityAssignments List. */ -public final class HorizonDbReplicasListSamples { +public final class IdentityAssignmentsListSamples { /* - * x-ms-original-file: 2026-05-01-preview/Replicas_List.json + * x-ms-original-file: 2026-10-01-preview/IdentityAssignments_List.json */ /** - * Sample code: List HorizonDB replicas in a pool. + * Sample code: List change data capture identity assignments. * * @param manager Entry point to HorizonDbManager. */ - public static void listHorizonDBReplicasInAPool(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbReplicas() - .list("exampleresourcegroup", "examplecluster", "examplepool", com.azure.core.util.Context.NONE); + public static void + listChangeDataCaptureIdentityAssignments(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.identityAssignments() + .list("example-resource-group", "example-cluster", "fabric-mirroring", com.azure.core.util.Context.NONE); } } ``` -### HorizonDbReplicas_Update +### LogCaptureConfigurations_Get ```java -import com.azure.resourcemanager.horizondb.models.HorizonDbReplica; -import com.azure.resourcemanager.horizondb.models.HorizonDbReplicaPropertiesForPatchUpdate; -import com.azure.resourcemanager.horizondb.models.ReplicaRole; - /** - * Samples for HorizonDbReplicas Update. + * Samples for LogCaptureConfigurations Get. */ -public final class HorizonDbReplicasUpdateSamples { +public final class LogCaptureConfigurationsGetSamples { /* - * x-ms-original-file: 2026-05-01-preview/Replicas_Update.json + * x-ms-original-file: 2026-10-01-preview/LogCaptureConfigurations_Get.json */ /** - * Sample code: Update a HorizonDB replica. + * Sample code: Get the PostgreSQL server log capture configuration. * * @param manager Entry point to HorizonDbManager. */ - public static void updateAHorizonDBReplica(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - HorizonDbReplica resource = manager.horizonDbReplicas() - .getWithResponse("exampleresourcegroup", "examplecluster", "examplepool", "examplereplica", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new HorizonDbReplicaPropertiesForPatchUpdate().withRole(ReplicaRole.READ_WRITE)) - .apply(); + public static void + getThePostgreSQLServerLogCaptureConfiguration(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.logCaptureConfigurations() + .getWithResponse("example-resource-group", "example-cluster", "PostgreSqlServer", + com.azure.core.util.Context.NONE); } } ``` -### Operations_List +### LogCaptureConfigurations_List ```java /** - * Samples for Operations List. + * Samples for LogCaptureConfigurations List. */ -public final class OperationsListSamples { +public final class LogCaptureConfigurationsListSamples { /* - * x-ms-original-file: 2026-05-01-preview/Operations_List.json + * x-ms-original-file: 2026-10-01-preview/LogCaptureConfigurations_List.json */ /** - * Sample code: List operations for Microsoft.HorizonDB. + * Sample code: List log capture configurations. * * @param manager Entry point to HorizonDbManager. */ - public static void - listOperationsForMicrosoftHorizonDB(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); + public static void listLogCaptureConfigurations(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.logCaptureConfigurations() + .list("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); + } +} +``` + +### LogCaptureConfigurations_Update + +```java +import com.azure.resourcemanager.horizondb.models.LogCaptureConfigurationForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.LogCaptureConfigurationPropertiesForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.LogCaptureState; + +/** + * Samples for LogCaptureConfigurations Update. + */ +public final class LogCaptureConfigurationsUpdateSamples { + /* + * x-ms-original-file: 2026-10-01-preview/LogCaptureConfigurations_Update.json + */ + /** + * Sample code: Disable PostgreSQL server log capture. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void disablePostgreSQLServerLogCapture(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.logCaptureConfigurations() + .update("example-resource-group", "example-cluster", "PostgreSqlServer", + new LogCaptureConfigurationForPatchUpdate().withProperties( + new LogCaptureConfigurationPropertiesForPatchUpdate().withState(LogCaptureState.DISABLED)), + com.azure.core.util.Context.NONE); + } +} +``` + +### LogFiles_Get + +```java +/** + * Samples for LogFiles Get. + */ +public final class LogFilesGetSamples { + /* + * x-ms-original-file: 2026-10-01-preview/LogFiles_Get.json + */ + /** + * Sample code: Get captured log file metadata. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void getCapturedLogFileMetadata(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.logFiles() + .getWithResponse("example-resource-group", "example-cluster", "11111111-1111-1111-1111-111111111111", + com.azure.core.util.Context.NONE); + } +} +``` + +### LogFiles_List + +```java +/** + * Samples for LogFiles List. + */ +public final class LogFilesListSamples { + /* + * x-ms-original-file: 2026-10-01-preview/LogFiles_List.json + */ + /** + * Sample code: List captured log files. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void listCapturedLogFiles(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.logFiles().list("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); + } +} +``` + +### LogFiles_ListDownloadUrls + +```java +/** + * Samples for LogFiles ListDownloadUrls. + */ +public final class LogFilesListDownloadUrlsSamples { + /* + * x-ms-original-file: 2026-10-01-preview/LogFiles_ListDownloadUrls.json + */ + /** + * Sample code: List a signed URL for downloading a captured log file. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + listASignedURLForDownloadingACapturedLogFile(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.logFiles() + .listDownloadUrlsWithResponse("example-resource-group", "example-cluster", + "22222222-2222-2222-2222-222222222222", com.azure.core.util.Context.NONE); + } +} +``` + +### MaintenanceEvents_ApplyNow + +```java +/** + * Samples for MaintenanceEvents ApplyNow. + */ +public final class MaintenanceEventsApplyNowSamples { + /* + * x-ms-original-file: 2026-10-01-preview/MaintenanceEvents_ApplyNow.json + */ + /** + * Sample code: Apply a maintenance event immediately for a HorizonDB pool. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void applyAMaintenanceEventImmediatelyForAHorizonDBPool( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.maintenanceEvents() + .applyNow("example-resource-group", "example-cluster", "example-pool-01", "ABCD-123", + com.azure.core.util.Context.NONE); + } +} +``` + +### MaintenanceEvents_Get + +```java +/** + * Samples for MaintenanceEvents Get. + */ +public final class MaintenanceEventsGetSamples { + /* + * x-ms-original-file: 2026-10-01-preview/MaintenanceEvents_Get.json + */ + /** + * Sample code: Get information about a maintenance event for a HorizonDB pool. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void getInformationAboutAMaintenanceEventForAHorizonDBPool( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.maintenanceEvents() + .getWithResponse("example-resource-group", "example-cluster", "example-pool-01", "ABCD-123", + com.azure.core.util.Context.NONE); + } +} +``` + +### MaintenanceEvents_List + +```java +/** + * Samples for MaintenanceEvents List. + */ +public final class MaintenanceEventsListSamples { + /* + * x-ms-original-file: 2026-10-01-preview/MaintenanceEvents_ListWithFilter.json + */ + /** + * Sample code: List upcoming maintenance events for a HorizonDB pool. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + listUpcomingMaintenanceEventsForAHorizonDBPool(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.maintenanceEvents() + .list("example-resource-group", "example-cluster", "example-pool-01", + "properties/status eq 'Planned' or properties/status eq 'InProgress'", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-10-01-preview/MaintenanceEvents_List.json + */ + /** + * Sample code: List maintenance events for a HorizonDB pool. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + listMaintenanceEventsForAHorizonDBPool(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.maintenanceEvents() + .list("example-resource-group", "example-cluster", "example-pool-01", null, + com.azure.core.util.Context.NONE); + } +} +``` + +### MaintenanceEvents_Reschedule + +```java +import com.azure.resourcemanager.horizondb.models.MaintenanceEventRescheduleRequest; +import java.time.OffsetDateTime; + +/** + * Samples for MaintenanceEvents Reschedule. + */ +public final class MaintenanceEventsRescheduleSamples { + /* + * x-ms-original-file: 2026-10-01-preview/MaintenanceEvents_Reschedule.json + */ + /** + * Sample code: Reschedule a maintenance event for a HorizonDB pool. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + rescheduleAMaintenanceEventForAHorizonDBPool(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.maintenanceEvents() + .reschedule("example-resource-group", "example-cluster", "example-pool-01", "ABCD-123", + new MaintenanceEventRescheduleRequest().withPostponeToDateTimeUtc( + OffsetDateTime.parse("2026-08-20T10:00:00Z")), + com.azure.core.util.Context.NONE); + } +} +``` + +### MicrosoftEntraAdministrators_CreateOrReplace + +```java +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAdministratorPropertiesForAdd; +import com.azure.resourcemanager.horizondb.models.PrincipalTypes; + +/** + * Samples for MicrosoftEntraAdministrators CreateOrReplace. + */ +public final class MicrosoftEntraAdministratorsCreateOrReplaceSamples { + /* + * x-ms-original-file: 2026-10-01-preview/MicrosoftEntraAdministrators_CreateOrReplace.json + */ + /** + * Sample code: Create or replace a Microsoft Entra administrator for a HorizonDB cluster. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void createOrReplaceAMicrosoftEntraAdministratorForAHorizonDBCluster( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.microsoftEntraAdministrators() + .define("11111111-1111-1111-1111-111111111111") + .withExistingCluster("example-resource-group", "example-cluster") + .withProperties(new MicrosoftEntraAdministratorPropertiesForAdd() + .withPrincipalName("database.administrators@contoso.com") + .withPrincipalType(PrincipalTypes.GROUP) + .withTenantId("22222222-2222-2222-2222-222222222222")) + .create(); + } +} +``` + +### MicrosoftEntraAdministrators_Delete + +```java +/** + * Samples for MicrosoftEntraAdministrators Delete. + */ +public final class MicrosoftEntraAdministratorsDeleteSamples { + /* + * x-ms-original-file: 2026-10-01-preview/MicrosoftEntraAdministrators_Delete.json + */ + /** + * Sample code: Delete a Microsoft Entra administrator from a HorizonDB cluster. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void deleteAMicrosoftEntraAdministratorFromAHorizonDBCluster( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.microsoftEntraAdministrators() + .delete("example-resource-group", "example-cluster", "11111111-1111-1111-1111-111111111111", + com.azure.core.util.Context.NONE); + } +} +``` + +### MicrosoftEntraAdministrators_Get + +```java +/** + * Samples for MicrosoftEntraAdministrators Get. + */ +public final class MicrosoftEntraAdministratorsGetSamples { + /* + * x-ms-original-file: 2026-10-01-preview/MicrosoftEntraAdministrators_Get.json + */ + /** + * Sample code: Get a Microsoft Entra administrator for a HorizonDB cluster. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void getAMicrosoftEntraAdministratorForAHorizonDBCluster( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.microsoftEntraAdministrators() + .getWithResponse("example-resource-group", "example-cluster", "11111111-1111-1111-1111-111111111111", + com.azure.core.util.Context.NONE); + } +} +``` + +### MicrosoftEntraAdministrators_List + +```java +/** + * Samples for MicrosoftEntraAdministrators List. + */ +public final class MicrosoftEntraAdministratorsListSamples { + /* + * x-ms-original-file: 2026-10-01-preview/MicrosoftEntraAdministrators_List.json + */ + /** + * Sample code: List Microsoft Entra administrators for a HorizonDB cluster. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void listMicrosoftEntraAdministratorsForAHorizonDBCluster( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.microsoftEntraAdministrators() + .list("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); + } +} +``` + +### MicrosoftEntraAuthentications_CreateOrReplace + +```java +import com.azure.resourcemanager.horizondb.fluent.models.MicrosoftEntraAuthenticationInner; +import com.azure.resourcemanager.horizondb.models.AuthenticationState; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAuthenticationProperties; + +/** + * Samples for MicrosoftEntraAuthentications CreateOrReplace. + */ +public final class MicrosoftEntraAuthenticationsCreateOrReplaceSamples { + /* + * x-ms-original-file: 2026-10-01-preview/MicrosoftEntraAuthentications_CreateOrReplaceDisabled.json + */ + /** + * Sample code: Disable Microsoft Entra authentication declaratively. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + disableMicrosoftEntraAuthenticationDeclaratively(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.microsoftEntraAuthentications() + .createOrReplace("example-resource-group", "example-cluster", + new MicrosoftEntraAuthenticationInner().withProperties( + new MicrosoftEntraAuthenticationProperties().withState(AuthenticationState.DISABLED)), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-10-01-preview/MicrosoftEntraAuthentications_CreateOrReplaceEnabled.json + */ + /** + * Sample code: Enable Microsoft Entra authentication declaratively. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + enableMicrosoftEntraAuthenticationDeclaratively(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.microsoftEntraAuthentications() + .createOrReplace("example-resource-group", "example-cluster", + new MicrosoftEntraAuthenticationInner().withProperties( + new MicrosoftEntraAuthenticationProperties().withState(AuthenticationState.ENABLED)), + com.azure.core.util.Context.NONE); + } +} +``` + +### MicrosoftEntraAuthentications_Get + +```java +/** + * Samples for MicrosoftEntraAuthentications Get. + */ +public final class MicrosoftEntraAuthenticationsGetSamples { + /* + * x-ms-original-file: 2026-10-01-preview/MicrosoftEntraAuthentications_Get.json + */ + /** + * Sample code: Get the Microsoft Entra authentication method. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + getTheMicrosoftEntraAuthenticationMethod(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.microsoftEntraAuthentications() + .getWithResponse("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); + } +} +``` + +### MicrosoftEntraAuthentications_Update + +```java +import com.azure.resourcemanager.horizondb.models.AuthenticationState; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAuthenticationForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAuthenticationPropertiesForPatchUpdate; + +/** + * Samples for MicrosoftEntraAuthentications Update. + */ +public final class MicrosoftEntraAuthenticationsUpdateSamples { + /* + * x-ms-original-file: 2026-10-01-preview/MicrosoftEntraAuthentications_Disable.json + */ + /** + * Sample code: Disable Microsoft Entra authentication without modifying existing database roles. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void disableMicrosoftEntraAuthenticationWithoutModifyingExistingDatabaseRoles( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.microsoftEntraAuthentications() + .update("example-resource-group", "example-cluster", + new MicrosoftEntraAuthenticationForPatchUpdate().withProperties( + new MicrosoftEntraAuthenticationPropertiesForPatchUpdate().withState(AuthenticationState.DISABLED)), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-10-01-preview/MicrosoftEntraAuthentications_Enable.json + */ + /** + * Sample code: Start enabling Microsoft Entra authentication. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + startEnablingMicrosoftEntraAuthentication(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.microsoftEntraAuthentications() + .update("example-resource-group", "example-cluster", + new MicrosoftEntraAuthenticationForPatchUpdate().withProperties( + new MicrosoftEntraAuthenticationPropertiesForPatchUpdate().withState(AuthenticationState.ENABLED)), + com.azure.core.util.Context.NONE); + } +} +``` + +### Nodes_Get + +```java +/** + * Samples for Nodes Get. + */ +public final class NodesGetSamples { + /* + * x-ms-original-file: 2026-10-01-preview/Nodes_Get.json + */ + /** + * Sample code: Get a HorizonDB node. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void getAHorizonDBNode(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.nodes() + .getWithResponse("example-resource-group", "example-cluster", "example-pool-01", "node-01", + com.azure.core.util.Context.NONE); + } +} +``` + +### Nodes_List + +```java +/** + * Samples for Nodes List. + */ +public final class NodesListSamples { + /* + * x-ms-original-file: 2026-10-01-preview/Nodes_List.json + */ + /** + * Sample code: List the nodes allocated to a HorizonDB pool. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + listTheNodesAllocatedToAHorizonDBPool(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.nodes() + .list("example-resource-group", "example-cluster", "example-pool-01", com.azure.core.util.Context.NONE); + } +} +``` + +### Operations_List + +```java +/** + * Samples for Operations List. + */ +public final class OperationsListSamples { + /* + * x-ms-original-file: 2026-10-01-preview/Operations_List.json + */ + /** + * Sample code: List operations for Microsoft.HorizonDb. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + listOperationsForMicrosoftHorizonDb(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} +``` + +### ParameterGroups_CreateOrReplace + +```java +import com.azure.resourcemanager.horizondb.models.ParameterGroupProperties; +import com.azure.resourcemanager.horizondb.models.ParameterProperties; +import com.azure.resourcemanager.horizondb.models.PostgreSqlVersion; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ParameterGroups CreateOrReplace. + */ +public final class ParameterGroupsCreateOrReplaceSamples { + /* + * x-ms-original-file: 2026-10-01-preview/ParameterGroups_CreateOrReplace.json + */ + /** + * Sample code: Create or replace a HorizonDB parameter group for a PostgreSQL version. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void createOrReplaceAHorizonDBParameterGroupForAPostgreSQLVersion( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.parameterGroups() + .define("production-parameters") + .withRegion("eastus2") + .withExistingResourceGroup("example-resource-group") + .withTags(mapOf("environment", "production")) + .withProperties(new ParameterGroupProperties() + .withParameters(Arrays.asList( + new ParameterProperties().withName("application_name").withValue("horizondb-production"), + new ParameterProperties().withName("autovacuum").withValue("off"), + new ParameterProperties().withName("wal_receiver_timeout").withValue("45000"), + new ParameterProperties().withName("work_mem").withValue("8192"), + new ParameterProperties().withName("xmlbinary").withValue("base64"))) + .withDescription("Parameters for production transactional workloads") + .withPostgreSqlVersion(PostgreSqlVersion.V17)) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### ParameterGroups_Delete + +```java +/** + * Samples for ParameterGroups Delete. + */ +public final class ParameterGroupsDeleteSamples { + /* + * x-ms-original-file: 2026-10-01-preview/ParameterGroups_Delete.json + */ + /** + * Sample code: Delete a HorizonDB parameter group. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void deleteAHorizonDBParameterGroup(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.parameterGroups() + .delete("example-resource-group", "production-parameters", com.azure.core.util.Context.NONE); + } +} +``` + +### ParameterGroups_GetByResourceGroup + +```java +/** + * Samples for ParameterGroups GetByResourceGroup. + */ +public final class ParameterGroupsGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-10-01-preview/ParameterGroups_Get.json + */ + /** + * Sample code: Get a HorizonDB parameter group. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void getAHorizonDBParameterGroup(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.parameterGroups() + .getByResourceGroupWithResponse("example-resource-group", "production-parameters", + com.azure.core.util.Context.NONE); + } +} +``` + +### ParameterGroups_List + +```java +/** + * Samples for ParameterGroups List. + */ +public final class ParameterGroupsListSamples { + /* + * x-ms-original-file: 2026-10-01-preview/ParameterGroups_ListBySubscription.json + */ + /** + * Sample code: List HorizonDB parameter groups in a subscription. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + listHorizonDBParameterGroupsInASubscription(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.parameterGroups().list(com.azure.core.util.Context.NONE); + } +} +``` + +### ParameterGroups_ListByResourceGroup + +```java +/** + * Samples for ParameterGroups ListByResourceGroup. + */ +public final class ParameterGroupsListByResourceGroupSamples { + /* + * x-ms-original-file: 2026-10-01-preview/ParameterGroups_ListByResourceGroup.json + */ + /** + * Sample code: List HorizonDB parameter groups in a resource group. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + listHorizonDBParameterGroupsInAResourceGroup(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.parameterGroups().listByResourceGroup("example-resource-group", com.azure.core.util.Context.NONE); + } +} +``` + +### ParameterGroups_ListConnections + +```java +/** + * Samples for ParameterGroups ListConnections. + */ +public final class ParameterGroupsListConnectionsSamples { + /* + * x-ms-original-file: 2026-10-01-preview/ParameterGroups_ListConnections.json + */ + /** + * Sample code: List HorizonDB pools connected to a parameter group. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + listHorizonDBPoolsConnectedToAParameterGroup(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.parameterGroups() + .listConnections("example-resource-group", "production-parameters", com.azure.core.util.Context.NONE); + } +} +``` + +### ParameterGroups_Update + +```java +import com.azure.resourcemanager.horizondb.models.ParameterGroup; +import com.azure.resourcemanager.horizondb.models.ParameterGroupPropertiesForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.ParameterProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ParameterGroups Update. + */ +public final class ParameterGroupsUpdateSamples { + /* + * x-ms-original-file: 2026-10-01-preview/ParameterGroups_Update.json + */ + /** + * Sample code: Update a HorizonDB parameter group. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void updateAHorizonDBParameterGroup(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + ParameterGroup resource = manager.parameterGroups() + .getByResourceGroupWithResponse("example-resource-group", "production-parameters", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("environment", "production", "team", "data-platform")) + .withProperties(new ParameterGroupPropertiesForPatchUpdate() + .withParameters(Arrays.asList( + new ParameterProperties().withName("application_name").withValue("horizondb-production"), + new ParameterProperties().withName("autovacuum").withValue("off"), + new ParameterProperties().withName("wal_receiver_timeout").withValue("45000"), + new ParameterProperties().withName("work_mem").withValue("8192"), + new ParameterProperties().withName("xmlbinary").withValue("base64"))) + .withDescription("Updated parameters for production transactional workloads")) + .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; + } +} +``` + +### PasswordAuthentications_CreateOrReplace + +```java +import com.azure.resourcemanager.horizondb.fluent.models.PasswordAuthenticationInner; +import com.azure.resourcemanager.horizondb.models.AuthenticationState; +import com.azure.resourcemanager.horizondb.models.PasswordAuthenticationProperties; + +/** + * Samples for PasswordAuthentications CreateOrReplace. + */ +public final class PasswordAuthenticationsCreateOrReplaceSamples { + /* + * x-ms-original-file: 2026-10-01-preview/PasswordAuthentications_CreateOrReplace.json + */ + /** + * Sample code: Enable password authentication and set the administrator login and password during initial setup. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void enablePasswordAuthenticationAndSetTheAdministratorLoginAndPasswordDuringInitialSetup( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.passwordAuthentications() + .createOrReplace("example-resource-group", "example-cluster", + new PasswordAuthenticationInner() + .withProperties(new PasswordAuthenticationProperties().withState(AuthenticationState.ENABLED) + .withAdministratorLogin("adminlogin1") + .withAdministratorLoginPassword("fakeTokenPlaceholder")), + com.azure.core.util.Context.NONE); + } +} +``` + +### PasswordAuthentications_Get + +```java +/** + * Samples for PasswordAuthentications Get. + */ +public final class PasswordAuthenticationsGetSamples { + /* + * x-ms-original-file: 2026-10-01-preview/PasswordAuthentications_Get.json + */ + /** + * Sample code: Get the password authentication method. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + getThePasswordAuthenticationMethod(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.passwordAuthentications() + .getWithResponse("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); + } +} +``` + +### PasswordAuthentications_Update + +```java +import com.azure.resourcemanager.horizondb.models.AuthenticationState; +import com.azure.resourcemanager.horizondb.models.PasswordAuthenticationForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.PasswordAuthenticationPropertiesForPatchUpdate; + +/** + * Samples for PasswordAuthentications Update. + */ +public final class PasswordAuthenticationsUpdateSamples { + /* + * x-ms-original-file: 2026-10-01-preview/PasswordAuthentications_ResetPassword.json + */ + /** + * Sample code: Reset the sole PostgreSQL administrator role password. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + resetTheSolePostgreSQLAdministratorRolePassword(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.passwordAuthentications() + .update("example-resource-group", "example-cluster", + new PasswordAuthenticationForPatchUpdate() + .withProperties(new PasswordAuthenticationPropertiesForPatchUpdate() + .withAdministratorLoginPassword("fakeTokenPlaceholder")), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-10-01-preview/PasswordAuthentications_Enable.json + */ + /** + * Sample code: Enable password authentication and reset the existing administrator password. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void enablePasswordAuthenticationAndResetTheExistingAdministratorPassword( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.passwordAuthentications() + .update("example-resource-group", "example-cluster", + new PasswordAuthenticationForPatchUpdate().withProperties( + new PasswordAuthenticationPropertiesForPatchUpdate().withState(AuthenticationState.ENABLED) + .withAdministratorLoginPassword("fakeTokenPlaceholder")), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-10-01-preview/PasswordAuthentications_Disable.json + */ + /** + * Sample code: Disable password authentication. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void disablePasswordAuthentication(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.passwordAuthentications() + .update("example-resource-group", "example-cluster", + new PasswordAuthenticationForPatchUpdate().withProperties( + new PasswordAuthenticationPropertiesForPatchUpdate().withState(AuthenticationState.DISABLED)), + com.azure.core.util.Context.NONE); + } +} +``` + +### Pools_CreateOrReplace + +```java +import com.azure.resourcemanager.horizondb.models.ComputeProcessorType; +import com.azure.resourcemanager.horizondb.models.ParameterApplyMethod; +import com.azure.resourcemanager.horizondb.models.PoolComputeModel; +import com.azure.resourcemanager.horizondb.models.PoolComputeModelType; +import com.azure.resourcemanager.horizondb.models.PoolHighAvailability; +import com.azure.resourcemanager.horizondb.models.PoolHighAvailabilityMode; +import com.azure.resourcemanager.horizondb.models.PoolParameterGroupReference; +import com.azure.resourcemanager.horizondb.models.PoolProperties; +import com.azure.resourcemanager.horizondb.models.SystemScheduledMaintenanceProperties; + +/** + * Samples for Pools CreateOrReplace. + */ +public final class PoolsCreateOrReplaceSamples { + /* + * x-ms-original-file: 2026-10-01-preview/Pools_CreateOrReplace.json + */ + /** + * Sample code: Create a minimum provisioned HorizonDB pool. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + createAMinimumProvisionedHorizonDBPool(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.pools() + .define("example-pool-01") + .withExistingCluster("example-resource-group", "example-cluster") + .withProperties(new PoolProperties() + .withComputeModel(new PoolComputeModel().withType(PoolComputeModelType.PROVISIONED) + .withComputeProcessor(ComputeProcessorType.AMD) + .withComputeGeneration(3) + .withVCores(2)) + .withNodeCount(1) + .withHighAvailability(new PoolHighAvailability().withMode(PoolHighAvailabilityMode.DISABLED)) + .withParameterGroup(new PoolParameterGroupReference().withParameterGroupResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.HorizonDb/locations/eastus2/parameterGroups/default-postgresql-17-provisioned") + .withApplyMethod(ParameterApplyMethod.IMMEDIATE)) + .withScheduledMaintenance(new SystemScheduledMaintenanceProperties())) + .create(); + } +} +``` + +### Pools_Delete + +```java +/** + * Samples for Pools Delete. + */ +public final class PoolsDeleteSamples { + /* + * x-ms-original-file: 2026-10-01-preview/Pools_Delete.json + */ + /** + * Sample code: Delete the last HorizonDB pool and disconnect private endpoint connections. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void deleteTheLastHorizonDBPoolAndDisconnectPrivateEndpointConnections( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.pools() + .delete("example-resource-group", "example-cluster", "example-pool-01", com.azure.core.util.Context.NONE); + } +} +``` + +### Pools_Get + +```java +/** + * Samples for Pools Get. + */ +public final class PoolsGetSamples { + /* + * x-ms-original-file: 2026-10-01-preview/Pools_Get.json + */ + /** + * Sample code: Get a HorizonDB pool. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void getAHorizonDBPool(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.pools() + .getWithResponse("example-resource-group", "example-cluster", "example-pool-01", + com.azure.core.util.Context.NONE); + } +} +``` + +### Pools_List + +```java +/** + * Samples for Pools List. + */ +public final class PoolsListSamples { + /* + * x-ms-original-file: 2026-10-01-preview/Pools_List.json + */ + /** + * Sample code: List HorizonDB pools in a cluster. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void listHorizonDBPoolsInACluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.pools().list("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); + } +} +``` + +### Pools_Restart + +```java +/** + * Samples for Pools Restart. + */ +public final class PoolsRestartSamples { + /* + * x-ms-original-file: 2026-10-01-preview/Pools_Restart.json + */ + /** + * Sample code: Restart a HorizonDB pool and apply pending parameter changes. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void restartAHorizonDBPoolAndApplyPendingParameterChanges( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.pools() + .restart("exampleresourcegroup", "examplecluster", "example-pool-01", com.azure.core.util.Context.NONE); + } +} +``` + +### Pools_Start + +```java +/** + * Samples for Pools Start. + */ +public final class PoolsStartSamples { + /* + * x-ms-original-file: 2026-10-01-preview/Pools_Start.json + */ + /** + * Sample code: Start a HorizonDB pool without applying pending parameter changes. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void startAHorizonDBPoolWithoutApplyingPendingParameterChanges( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.pools() + .start("exampleresourcegroup", "examplecluster", "example-pool-01", com.azure.core.util.Context.NONE); + } +} +``` + +### Pools_Stop + +```java +/** + * Samples for Pools Stop. + */ +public final class PoolsStopSamples { + /* + * x-ms-original-file: 2026-10-01-preview/Pools_Stop.json + */ + /** + * Sample code: Stop and deallocate a HorizonDB pool without applying pending parameter changes. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void stopAndDeallocateAHorizonDBPoolWithoutApplyingPendingParameterChanges( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.pools() + .stop("exampleresourcegroup", "examplecluster", "example-pool-01", com.azure.core.util.Context.NONE); + } +} +``` + +### Pools_Update + +```java +import com.azure.resourcemanager.horizondb.models.ParameterApplyMethod; +import com.azure.resourcemanager.horizondb.models.Pool; +import com.azure.resourcemanager.horizondb.models.PoolComputeModelForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.PoolHighAvailabilityMode; +import com.azure.resourcemanager.horizondb.models.PoolHighAvailabilityPatch; +import com.azure.resourcemanager.horizondb.models.PoolParameterGroupReferenceForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.PoolPropertiesForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.ScheduledMaintenanceManagementType; +import com.azure.resourcemanager.horizondb.models.ScheduledMaintenancePropertiesForPatchUpdate; + +/** + * Samples for Pools Update. + */ +public final class PoolsUpdateSamples { + /* + * x-ms-original-file: 2026-10-01-preview/Pools_Update.json + */ + /** + * Sample code: Update a single HorizonDB pool compute property. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + updateASingleHorizonDBPoolComputeProperty(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + Pool resource = manager.pools() + .getWithResponse("example-resource-group", "example-cluster", "example-pool-01", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties( + new PoolPropertiesForPatchUpdate().withComputeModel(new PoolComputeModelForPatchUpdate().withVCores(16)) + .withScheduledMaintenance(new ScheduledMaintenancePropertiesForPatchUpdate() + .withMaintenanceManagementType(ScheduledMaintenanceManagementType.SYSTEM))) + .apply(); + } + + /* + * x-ms-original-file: 2026-10-01-preview/Pools_UpdateParameterGroupDefault.json + */ + /** + * Sample code: Switch a HorizonDB pool back to its corresponding default parameter group. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void switchAHorizonDBPoolBackToItsCorrespondingDefaultParameterGroup( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + Pool resource = manager.pools() + .getWithResponse("example-resource-group", "example-cluster", "example-pool-01", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new PoolPropertiesForPatchUpdate() + .withParameterGroup(new PoolParameterGroupReferenceForPatchUpdate().withParameterGroupResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.HorizonDb/locations/eastus2/parameterGroups/default-postgresql-17-provisioned") + .withApplyMethod(ParameterApplyMethod.IMMEDIATE))) + .apply(); + } + + /* + * x-ms-original-file: 2026-10-01-preview/Pools_UpdateParameterGroupImmediate.json + */ + /** + * Sample code: Associate a HorizonDB pool with a parameter group immediately. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void associateAHorizonDBPoolWithAParameterGroupImmediately( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + Pool resource = manager.pools() + .getWithResponse("example-resource-group", "example-cluster", "example-pool-01", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new PoolPropertiesForPatchUpdate() + .withParameterGroup(new PoolParameterGroupReferenceForPatchUpdate().withParameterGroupResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/parameterGroups/production-parameters") + .withApplyMethod(ParameterApplyMethod.IMMEDIATE))) + .apply(); + } + + /* + * x-ms-original-file: 2026-10-01-preview/Pools_UpdateParameterGroupPendingReboot.json + */ + /** + * Sample code: Associate a HorizonDB pool with a parameter group pending reboot. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void associateAHorizonDBPoolWithAParameterGroupPendingReboot( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + Pool resource = manager.pools() + .getWithResponse("example-resource-group", "example-cluster", "example-pool-01", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new PoolPropertiesForPatchUpdate() + .withParameterGroup(new PoolParameterGroupReferenceForPatchUpdate().withParameterGroupResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/parameterGroups/maintenance-window-parameters") + .withApplyMethod(ParameterApplyMethod.PENDING_REBOOT))) + .apply(); + } + + /* + * x-ms-original-file: 2026-10-01-preview/Pools_UpdateHighAvailabilityMode.json + */ + /** + * Sample code: Require zone-redundant placement for a HorizonDB pool. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + requireZoneRedundantPlacementForAHorizonDBPool(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + Pool resource = manager.pools() + .getWithResponse("example-resource-group", "example-cluster", "example-pool-01", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new PoolPropertiesForPatchUpdate().withHighAvailability( + new PoolHighAvailabilityPatch().withMode(PoolHighAvailabilityMode.ZONE_REDUNDANT))) + .apply(); + } +} +``` + +### PrivateEndpointConnections_ApproveOrReject + +```java +import com.azure.resourcemanager.horizondb.models.PrivateEndpointConnectionProperties; +import com.azure.resourcemanager.horizondb.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.horizondb.models.PrivateLinkServiceConnectionState; + +/** + * Samples for PrivateEndpointConnections ApproveOrReject. + */ +public final class PrivateEndpointConnectionsApproveOrRejectSamples { + /* + * x-ms-original-file: 2026-10-01-preview/PrivateEndpointConnections_ApproveOrReject.json + */ + /** + * Sample code: Approve or reject a private endpoint connection. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + approveOrRejectAPrivateEndpointConnection(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.privateEndpointConnections() + .define("example-private-endpoint-connection") + .withExistingCluster("example-resource-group", "example-cluster") + .withProperties(new PrivateEndpointConnectionProperties().withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withDescription("Approved for the production database network"))) + .create(); + } +} +``` + +### PrivateEndpointConnections_Delete + +```java +/** + * Samples for PrivateEndpointConnections Delete. + */ +public final class PrivateEndpointConnectionsDeleteSamples { + /* + * x-ms-original-file: 2026-10-01-preview/PrivateEndpointConnections_Delete.json + */ + /** + * Sample code: Delete a private endpoint connection. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void deleteAPrivateEndpointConnection(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.privateEndpointConnections() + .delete("example-resource-group", "example-cluster", "example-private-endpoint-connection", + com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateEndpointConnections_Get + +```java +/** + * Samples for PrivateEndpointConnections Get. + */ +public final class PrivateEndpointConnectionsGetSamples { + /* + * x-ms-original-file: 2026-10-01-preview/PrivateEndpointConnections_GetDisconnectedAfterLastPoolDeletion.json + */ + /** + * Sample code: Get a private endpoint connection disconnected after the last pool was deleted. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void getAPrivateEndpointConnectionDisconnectedAfterTheLastPoolWasDeleted( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.privateEndpointConnections() + .getWithResponse("example-resource-group", "example-cluster", "example-private-endpoint-connection", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-10-01-preview/PrivateEndpointConnections_Get.json + */ + /** + * Sample code: Get a private endpoint connection. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void getAPrivateEndpointConnection(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.privateEndpointConnections() + .getWithResponse("example-resource-group", "example-cluster", "example-private-endpoint-connection", + com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateEndpointConnections_List + +```java +/** + * Samples for PrivateEndpointConnections List. + */ +public final class PrivateEndpointConnectionsListSamples { + /* + * x-ms-original-file: 2026-10-01-preview/PrivateEndpointConnections_List.json + */ + /** + * Sample code: List private endpoint connections on a HorizonDB cluster. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void listPrivateEndpointConnectionsOnAHorizonDBCluster( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.privateEndpointConnections() + .list("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateLinkResources_Get + +```java +/** + * Samples for PrivateLinkResources Get. + */ +public final class PrivateLinkResourcesGetSamples { + /* + * x-ms-original-file: 2026-10-01-preview/PrivateLinkResources_Get.json + */ + /** + * Sample code: Get a HorizonDB private link resource. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void getAHorizonDBPrivateLinkResource(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.privateLinkResources() + .getWithResponse("example-resource-group", "example-cluster", "example-cluster", + com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateLinkResources_List + +```java +/** + * Samples for PrivateLinkResources List. + */ +public final class PrivateLinkResourcesListSamples { + /* + * x-ms-original-file: 2026-10-01-preview/PrivateLinkResources_List.json + */ + /** + * Sample code: List HorizonDB private link resources. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void listHorizonDBPrivateLinkResources(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.privateLinkResources() + .list("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); } } ``` diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/pom.xml b/sdk/horizondb/azure-resourcemanager-horizondb/pom.xml index 365cb80bca103..480c45f012b16 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/pom.xml +++ b/sdk/horizondb/azure-resourcemanager-horizondb/pom.xml @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for HorizonDb Management - This package contains Microsoft Azure SDK for HorizonDb Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Resource Provider API for managing HorizonDB clusters, pools, replicas, and firewall rules. Package api-version 2026-05-01-preview. + This package contains Microsoft Azure SDK for HorizonDb Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Resource Provider API for managing HorizonDB clusters, pools, endpoints, nodes, and firewall rules. Package api-version 2026-10-01-preview. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/HorizonDbManager.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/HorizonDbManager.java index b83b18c91fb42..23e06f5892696 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/HorizonDbManager.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/HorizonDbManager.java @@ -25,25 +25,51 @@ import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.horizondb.fluent.HorizonDbManagementClient; -import com.azure.resourcemanager.horizondb.implementation.HorizonDbAdministratorsImpl; -import com.azure.resourcemanager.horizondb.implementation.HorizonDbClustersImpl; -import com.azure.resourcemanager.horizondb.implementation.HorizonDbFirewallRulesImpl; +import com.azure.resourcemanager.horizondb.implementation.AuthenticationsImpl; +import com.azure.resourcemanager.horizondb.implementation.CapabilitiesImpl; +import com.azure.resourcemanager.horizondb.implementation.ChangeDataCaptureCapabilitiesImpl; +import com.azure.resourcemanager.horizondb.implementation.ChangeDataCaptureConfigurationsImpl; +import com.azure.resourcemanager.horizondb.implementation.ChangeDataCaptureDestinationsImpl; +import com.azure.resourcemanager.horizondb.implementation.ClustersImpl; +import com.azure.resourcemanager.horizondb.implementation.DefaultParameterGroupsImpl; +import com.azure.resourcemanager.horizondb.implementation.EndpointsImpl; +import com.azure.resourcemanager.horizondb.implementation.FirewallRulesImpl; import com.azure.resourcemanager.horizondb.implementation.HorizonDbManagementClientBuilder; -import com.azure.resourcemanager.horizondb.implementation.HorizonDbParameterGroupsImpl; -import com.azure.resourcemanager.horizondb.implementation.HorizonDbPoolsImpl; -import com.azure.resourcemanager.horizondb.implementation.HorizonDbPrivateEndpointConnectionsImpl; -import com.azure.resourcemanager.horizondb.implementation.HorizonDbPrivateLinkResourcesImpl; -import com.azure.resourcemanager.horizondb.implementation.HorizonDbReplicasImpl; +import com.azure.resourcemanager.horizondb.implementation.IdentityAssignmentsImpl; +import com.azure.resourcemanager.horizondb.implementation.LogCaptureConfigurationsImpl; +import com.azure.resourcemanager.horizondb.implementation.LogFilesImpl; +import com.azure.resourcemanager.horizondb.implementation.MaintenanceEventsImpl; +import com.azure.resourcemanager.horizondb.implementation.MicrosoftEntraAdministratorsImpl; +import com.azure.resourcemanager.horizondb.implementation.MicrosoftEntraAuthenticationsImpl; +import com.azure.resourcemanager.horizondb.implementation.NodesImpl; import com.azure.resourcemanager.horizondb.implementation.OperationsImpl; -import com.azure.resourcemanager.horizondb.models.HorizonDbAdministrators; -import com.azure.resourcemanager.horizondb.models.HorizonDbClusters; -import com.azure.resourcemanager.horizondb.models.HorizonDbFirewallRules; -import com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroups; -import com.azure.resourcemanager.horizondb.models.HorizonDbPools; -import com.azure.resourcemanager.horizondb.models.HorizonDbPrivateEndpointConnections; -import com.azure.resourcemanager.horizondb.models.HorizonDbPrivateLinkResources; -import com.azure.resourcemanager.horizondb.models.HorizonDbReplicas; +import com.azure.resourcemanager.horizondb.implementation.ParameterGroupsImpl; +import com.azure.resourcemanager.horizondb.implementation.PasswordAuthenticationsImpl; +import com.azure.resourcemanager.horizondb.implementation.PoolsImpl; +import com.azure.resourcemanager.horizondb.implementation.PrivateEndpointConnectionsImpl; +import com.azure.resourcemanager.horizondb.implementation.PrivateLinkResourcesImpl; +import com.azure.resourcemanager.horizondb.models.Authentications; +import com.azure.resourcemanager.horizondb.models.Capabilities; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureCapabilities; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureConfigurations; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDestinations; +import com.azure.resourcemanager.horizondb.models.Clusters; +import com.azure.resourcemanager.horizondb.models.DefaultParameterGroups; +import com.azure.resourcemanager.horizondb.models.Endpoints; +import com.azure.resourcemanager.horizondb.models.FirewallRules; +import com.azure.resourcemanager.horizondb.models.IdentityAssignments; +import com.azure.resourcemanager.horizondb.models.LogCaptureConfigurations; +import com.azure.resourcemanager.horizondb.models.LogFiles; +import com.azure.resourcemanager.horizondb.models.MaintenanceEvents; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAdministrators; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAuthentications; +import com.azure.resourcemanager.horizondb.models.Nodes; import com.azure.resourcemanager.horizondb.models.Operations; +import com.azure.resourcemanager.horizondb.models.ParameterGroups; +import com.azure.resourcemanager.horizondb.models.PasswordAuthentications; +import com.azure.resourcemanager.horizondb.models.Pools; +import com.azure.resourcemanager.horizondb.models.PrivateEndpointConnections; +import com.azure.resourcemanager.horizondb.models.PrivateLinkResources; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.ArrayList; @@ -54,26 +80,52 @@ /** * Entry point to HorizonDbManager. - * Azure Resource Provider API for managing HorizonDB clusters, pools, replicas, and firewall rules. + * Azure Resource Provider API for managing HorizonDB clusters, pools, endpoints, nodes, and firewall rules. */ public final class HorizonDbManager { private Operations operations; - private HorizonDbClusters horizonDbClusters; + private Capabilities capabilities; - private HorizonDbPools horizonDbPools; + private Clusters clusters; - private HorizonDbReplicas horizonDbReplicas; + private Pools pools; - private HorizonDbFirewallRules horizonDbFirewallRules; + private FirewallRules firewallRules; - private HorizonDbPrivateEndpointConnections horizonDbPrivateEndpointConnections; + private PrivateEndpointConnections privateEndpointConnections; - private HorizonDbPrivateLinkResources horizonDbPrivateLinkResources; + private PrivateLinkResources privateLinkResources; - private HorizonDbParameterGroups horizonDbParameterGroups; + private ParameterGroups parameterGroups; - private HorizonDbAdministrators horizonDbAdministrators; + private DefaultParameterGroups defaultParameterGroups; + + private MicrosoftEntraAdministrators microsoftEntraAdministrators; + + private Authentications authentications; + + private PasswordAuthentications passwordAuthentications; + + private MicrosoftEntraAuthentications microsoftEntraAuthentications; + + private ChangeDataCaptureCapabilities changeDataCaptureCapabilities; + + private ChangeDataCaptureDestinations changeDataCaptureDestinations; + + private IdentityAssignments identityAssignments; + + private ChangeDataCaptureConfigurations changeDataCaptureConfigurations; + + private Endpoints endpoints; + + private MaintenanceEvents maintenanceEvents; + + private Nodes nodes; + + private LogCaptureConfigurations logCaptureConfigurations; + + private LogFiles logFiles; private final HorizonDbManagementClient clientObject; @@ -303,104 +355,264 @@ public Operations operations() { } /** - * Gets the resource collection API of HorizonDbClusters. It manages HorizonDbCluster. + * Gets the resource collection API of Capabilities. + * + * @return Resource collection API of Capabilities. + */ + public Capabilities capabilities() { + if (this.capabilities == null) { + this.capabilities = new CapabilitiesImpl(clientObject.getCapabilities(), this); + } + return capabilities; + } + + /** + * Gets the resource collection API of Clusters. It manages Cluster. + * + * @return Resource collection API of Clusters. + */ + public Clusters clusters() { + if (this.clusters == null) { + this.clusters = new ClustersImpl(clientObject.getClusters(), this); + } + return clusters; + } + + /** + * Gets the resource collection API of Pools. It manages Pool. + * + * @return Resource collection API of Pools. + */ + public Pools pools() { + if (this.pools == null) { + this.pools = new PoolsImpl(clientObject.getPools(), this); + } + return pools; + } + + /** + * Gets the resource collection API of FirewallRules. It manages FirewallRule. + * + * @return Resource collection API of FirewallRules. + */ + public FirewallRules firewallRules() { + if (this.firewallRules == null) { + this.firewallRules = new FirewallRulesImpl(clientObject.getFirewallRules(), this); + } + return firewallRules; + } + + /** + * Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnectionResource. + * + * @return Resource collection API of PrivateEndpointConnections. + */ + public PrivateEndpointConnections privateEndpointConnections() { + if (this.privateEndpointConnections == null) { + this.privateEndpointConnections + = new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this); + } + return privateEndpointConnections; + } + + /** + * Gets the resource collection API of PrivateLinkResources. + * + * @return Resource collection API of PrivateLinkResources. + */ + public PrivateLinkResources privateLinkResources() { + if (this.privateLinkResources == null) { + this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this); + } + return privateLinkResources; + } + + /** + * Gets the resource collection API of ParameterGroups. It manages ParameterGroup. + * + * @return Resource collection API of ParameterGroups. + */ + public ParameterGroups parameterGroups() { + if (this.parameterGroups == null) { + this.parameterGroups = new ParameterGroupsImpl(clientObject.getParameterGroups(), this); + } + return parameterGroups; + } + + /** + * Gets the resource collection API of DefaultParameterGroups. + * + * @return Resource collection API of DefaultParameterGroups. + */ + public DefaultParameterGroups defaultParameterGroups() { + if (this.defaultParameterGroups == null) { + this.defaultParameterGroups + = new DefaultParameterGroupsImpl(clientObject.getDefaultParameterGroups(), this); + } + return defaultParameterGroups; + } + + /** + * Gets the resource collection API of MicrosoftEntraAdministrators. It manages MicrosoftEntraAdministrator. + * + * @return Resource collection API of MicrosoftEntraAdministrators. + */ + public MicrosoftEntraAdministrators microsoftEntraAdministrators() { + if (this.microsoftEntraAdministrators == null) { + this.microsoftEntraAdministrators + = new MicrosoftEntraAdministratorsImpl(clientObject.getMicrosoftEntraAdministrators(), this); + } + return microsoftEntraAdministrators; + } + + /** + * Gets the resource collection API of Authentications. + * + * @return Resource collection API of Authentications. + */ + public Authentications authentications() { + if (this.authentications == null) { + this.authentications = new AuthenticationsImpl(clientObject.getAuthentications(), this); + } + return authentications; + } + + /** + * Gets the resource collection API of PasswordAuthentications. + * + * @return Resource collection API of PasswordAuthentications. + */ + public PasswordAuthentications passwordAuthentications() { + if (this.passwordAuthentications == null) { + this.passwordAuthentications + = new PasswordAuthenticationsImpl(clientObject.getPasswordAuthentications(), this); + } + return passwordAuthentications; + } + + /** + * Gets the resource collection API of MicrosoftEntraAuthentications. + * + * @return Resource collection API of MicrosoftEntraAuthentications. + */ + public MicrosoftEntraAuthentications microsoftEntraAuthentications() { + if (this.microsoftEntraAuthentications == null) { + this.microsoftEntraAuthentications + = new MicrosoftEntraAuthenticationsImpl(clientObject.getMicrosoftEntraAuthentications(), this); + } + return microsoftEntraAuthentications; + } + + /** + * Gets the resource collection API of ChangeDataCaptureCapabilities. + * + * @return Resource collection API of ChangeDataCaptureCapabilities. + */ + public ChangeDataCaptureCapabilities changeDataCaptureCapabilities() { + if (this.changeDataCaptureCapabilities == null) { + this.changeDataCaptureCapabilities + = new ChangeDataCaptureCapabilitiesImpl(clientObject.getChangeDataCaptureCapabilities(), this); + } + return changeDataCaptureCapabilities; + } + + /** + * Gets the resource collection API of ChangeDataCaptureDestinations. It manages ChangeDataCaptureDestination. * - * @return Resource collection API of HorizonDbClusters. + * @return Resource collection API of ChangeDataCaptureDestinations. */ - public HorizonDbClusters horizonDbClusters() { - if (this.horizonDbClusters == null) { - this.horizonDbClusters = new HorizonDbClustersImpl(clientObject.getHorizonDbClusters(), this); + public ChangeDataCaptureDestinations changeDataCaptureDestinations() { + if (this.changeDataCaptureDestinations == null) { + this.changeDataCaptureDestinations + = new ChangeDataCaptureDestinationsImpl(clientObject.getChangeDataCaptureDestinations(), this); } - return horizonDbClusters; + return changeDataCaptureDestinations; } /** - * Gets the resource collection API of HorizonDbPools. + * Gets the resource collection API of IdentityAssignments. It manages IdentityAssignment. * - * @return Resource collection API of HorizonDbPools. + * @return Resource collection API of IdentityAssignments. */ - public HorizonDbPools horizonDbPools() { - if (this.horizonDbPools == null) { - this.horizonDbPools = new HorizonDbPoolsImpl(clientObject.getHorizonDbPools(), this); + public IdentityAssignments identityAssignments() { + if (this.identityAssignments == null) { + this.identityAssignments = new IdentityAssignmentsImpl(clientObject.getIdentityAssignments(), this); } - return horizonDbPools; + return identityAssignments; } /** - * Gets the resource collection API of HorizonDbReplicas. It manages HorizonDbReplica. + * Gets the resource collection API of ChangeDataCaptureConfigurations. It manages ChangeDataCaptureConfiguration. * - * @return Resource collection API of HorizonDbReplicas. + * @return Resource collection API of ChangeDataCaptureConfigurations. */ - public HorizonDbReplicas horizonDbReplicas() { - if (this.horizonDbReplicas == null) { - this.horizonDbReplicas = new HorizonDbReplicasImpl(clientObject.getHorizonDbReplicas(), this); + public ChangeDataCaptureConfigurations changeDataCaptureConfigurations() { + if (this.changeDataCaptureConfigurations == null) { + this.changeDataCaptureConfigurations + = new ChangeDataCaptureConfigurationsImpl(clientObject.getChangeDataCaptureConfigurations(), this); } - return horizonDbReplicas; + return changeDataCaptureConfigurations; } /** - * Gets the resource collection API of HorizonDbFirewallRules. It manages HorizonDbFirewallRule. + * Gets the resource collection API of Endpoints. * - * @return Resource collection API of HorizonDbFirewallRules. + * @return Resource collection API of Endpoints. */ - public HorizonDbFirewallRules horizonDbFirewallRules() { - if (this.horizonDbFirewallRules == null) { - this.horizonDbFirewallRules - = new HorizonDbFirewallRulesImpl(clientObject.getHorizonDbFirewallRules(), this); + public Endpoints endpoints() { + if (this.endpoints == null) { + this.endpoints = new EndpointsImpl(clientObject.getEndpoints(), this); } - return horizonDbFirewallRules; + return endpoints; } /** - * Gets the resource collection API of HorizonDbPrivateEndpointConnections. + * Gets the resource collection API of MaintenanceEvents. * - * @return Resource collection API of HorizonDbPrivateEndpointConnections. + * @return Resource collection API of MaintenanceEvents. */ - public HorizonDbPrivateEndpointConnections horizonDbPrivateEndpointConnections() { - if (this.horizonDbPrivateEndpointConnections == null) { - this.horizonDbPrivateEndpointConnections = new HorizonDbPrivateEndpointConnectionsImpl( - clientObject.getHorizonDbPrivateEndpointConnections(), this); + public MaintenanceEvents maintenanceEvents() { + if (this.maintenanceEvents == null) { + this.maintenanceEvents = new MaintenanceEventsImpl(clientObject.getMaintenanceEvents(), this); } - return horizonDbPrivateEndpointConnections; + return maintenanceEvents; } /** - * Gets the resource collection API of HorizonDbPrivateLinkResources. + * Gets the resource collection API of Nodes. * - * @return Resource collection API of HorizonDbPrivateLinkResources. + * @return Resource collection API of Nodes. */ - public HorizonDbPrivateLinkResources horizonDbPrivateLinkResources() { - if (this.horizonDbPrivateLinkResources == null) { - this.horizonDbPrivateLinkResources - = new HorizonDbPrivateLinkResourcesImpl(clientObject.getHorizonDbPrivateLinkResources(), this); + public Nodes nodes() { + if (this.nodes == null) { + this.nodes = new NodesImpl(clientObject.getNodes(), this); } - return horizonDbPrivateLinkResources; + return nodes; } /** - * Gets the resource collection API of HorizonDbParameterGroups. It manages HorizonDbParameterGroup. + * Gets the resource collection API of LogCaptureConfigurations. * - * @return Resource collection API of HorizonDbParameterGroups. + * @return Resource collection API of LogCaptureConfigurations. */ - public HorizonDbParameterGroups horizonDbParameterGroups() { - if (this.horizonDbParameterGroups == null) { - this.horizonDbParameterGroups - = new HorizonDbParameterGroupsImpl(clientObject.getHorizonDbParameterGroups(), this); + public LogCaptureConfigurations logCaptureConfigurations() { + if (this.logCaptureConfigurations == null) { + this.logCaptureConfigurations + = new LogCaptureConfigurationsImpl(clientObject.getLogCaptureConfigurations(), this); } - return horizonDbParameterGroups; + return logCaptureConfigurations; } /** - * Gets the resource collection API of HorizonDbAdministrators. It manages HorizonDbAdministrator. + * Gets the resource collection API of LogFiles. * - * @return Resource collection API of HorizonDbAdministrators. + * @return Resource collection API of LogFiles. */ - public HorizonDbAdministrators horizonDbAdministrators() { - if (this.horizonDbAdministrators == null) { - this.horizonDbAdministrators - = new HorizonDbAdministratorsImpl(clientObject.getHorizonDbAdministrators(), this); + public LogFiles logFiles() { + if (this.logFiles == null) { + this.logFiles = new LogFilesImpl(clientObject.getLogFiles(), this); } - return horizonDbAdministrators; + return logFiles; } /** diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/AuthenticationsClient.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/AuthenticationsClient.java new file mode 100644 index 0000000000000..08724b3f3dd57 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/AuthenticationsClient.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.horizondb.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.horizondb.fluent.models.AuthenticationInner; + +/** + * An instance of this class provides access to all the operations defined in AuthenticationsClient. + */ +public interface AuthenticationsClient { + /** + * Lists the two service-created authentication configurations for the cluster: passwordMethod and microsoftEntra. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Authentication list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String clusterName); + + /** + * Lists the two service-created authentication configurations for the cluster: passwordMethod and microsoftEntra. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Authentication list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName); + + /** + * Lists the two service-created authentication configurations for the cluster: passwordMethod and microsoftEntra. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Authentication list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName, Context context); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/CapabilitiesClient.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/CapabilitiesClient.java new file mode 100644 index 0000000000000..5a4795e3f75fa --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/CapabilitiesClient.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.horizondb.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.horizondb.fluent.models.CapabilityInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in CapabilitiesClient. + */ +public interface CapabilitiesClient { + /** + * Gets the singleton HorizonDB capability catalog entry available to a subscription in a specific region. + * + * @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 singleton HorizonDB capability catalog entry available to a subscription in a specific region along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String location); + + /** + * Gets the singleton HorizonDB capability catalog entry available to a subscription in a specific region. + * + * @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 singleton HorizonDB capability catalog entry available to a subscription in a specific region on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String location); + + /** + * Gets the singleton HorizonDB capability catalog entry available to a subscription in a specific region. + * + * @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 singleton HorizonDB capability catalog entry available to a subscription in a specific region along + * with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String location, Context context); + + /** + * Gets the singleton HorizonDB capability catalog entry available to a subscription in a specific region. + * + * @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 singleton HorizonDB capability catalog entry available to a subscription in a specific region. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CapabilityInner get(String location); + + /** + * Lists the singleton HorizonDB capability catalog entry available to a subscription in a specific region. The + * result contains one item. + * + * @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 Capability list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String location); + + /** + * Lists the singleton HorizonDB capability catalog entry available to a subscription in a specific region. The + * result contains one item. + * + * @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 Capability list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location); + + /** + * Lists the singleton HorizonDB capability catalog entry available to a subscription in a specific region. The + * result contains one item. + * + * @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 Capability list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location, Context context); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbReplicasClient.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/ChangeDataCaptureCapabilitiesClient.java similarity index 62% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbReplicasClient.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/ChangeDataCaptureCapabilitiesClient.java index 400f300b23774..7f91bfe5e033f 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbReplicasClient.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/ChangeDataCaptureCapabilitiesClient.java @@ -13,424 +13,346 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbReplicaInner; -import com.azure.resourcemanager.horizondb.models.HorizonDbReplicaForPatchUpdate; +import com.azure.resourcemanager.horizondb.fluent.models.ChangeDataCaptureCapabilityInner; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureCapabilityForPatchUpdate; 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 HorizonDbReplicasClient. + * An instance of this class provides access to all the operations defined in ChangeDataCaptureCapabilitiesClient. */ -public interface HorizonDbReplicasClient { +public interface ChangeDataCaptureCapabilitiesClient { /** - * Gets information about a HorizonDB replica. + * Gets the singleton change data capture capability for a HorizonDB cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB replica along with {@link Response} on successful completion of - * {@link Mono}. + * @return the singleton change data capture capability for a HorizonDB cluster along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String clusterName, - String poolName, String replicaName); + Mono> getWithResponseAsync(String resourceGroupName, String clusterName); /** - * Gets information about a HorizonDB replica. + * Gets the singleton change data capture capability for a HorizonDB cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB replica on successful completion of {@link Mono}. + * @return the singleton change data capture capability for a HorizonDB cluster on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String clusterName, String poolName, - String replicaName); + Mono getAsync(String resourceGroupName, String clusterName); /** - * Gets information about a HorizonDB replica. + * Gets the singleton change data capture capability for a HorizonDB cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB replica along with {@link Response}. + * @return the singleton change data capture capability for a HorizonDB cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String clusterName, String poolName, - String replicaName, Context context); + Response getWithResponse(String resourceGroupName, String clusterName, + Context context); /** - * Gets information about a HorizonDB replica. + * Gets the singleton change data capture capability for a HorizonDB cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB replica. + * @return the singleton change data capture capability for a HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - HorizonDbReplicaInner get(String resourceGroupName, String clusterName, String poolName, String replicaName); - - /** - * Lists all HorizonDB replicas in a pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbReplica list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String clusterName, String poolName); - - /** - * Lists all HorizonDB replicas in a pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbReplica list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String clusterName, String poolName); - - /** - * Lists all HorizonDB replicas in a pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbReplica list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String clusterName, String poolName, - Context context); + ChangeDataCaptureCapabilityInner get(String resourceGroupName, String clusterName); /** - * Creates a new HorizonDB replica or updates an existing replica. + * Creates or replaces the singleton change data capture capability and reconciles shared engine prerequisites. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 represents the HorizonDB replica along with {@link Response} on successful completion of {@link Mono}. + * @return the singleton change data capture capability for a HorizonDB cluster along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String clusterName, - String poolName, String replicaName, HorizonDbReplicaInner resource); + Mono>> createOrReplaceWithResponseAsync(String resourceGroupName, String clusterName, + ChangeDataCaptureCapabilityInner resource); /** - * Creates a new HorizonDB replica or updates an existing replica. + * Creates or replaces the singleton change data capture capability and reconciles shared engine prerequisites. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 PollerFlux} for polling of represents the HorizonDB replica. + * @return the {@link PollerFlux} for polling of the singleton change data capture capability for a HorizonDB + * cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, HorizonDbReplicaInner> beginCreateOrUpdateAsync( - String resourceGroupName, String clusterName, String poolName, String replicaName, - HorizonDbReplicaInner resource); + PollerFlux, ChangeDataCaptureCapabilityInner> + beginCreateOrReplaceAsync(String resourceGroupName, String clusterName, + ChangeDataCaptureCapabilityInner resource); /** - * Creates a new HorizonDB replica or updates an existing replica. + * Creates or replaces the singleton change data capture capability and reconciles shared engine prerequisites. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 represents the HorizonDB replica. + * @return the {@link SyncPoller} for polling of the singleton change data capture capability for a HorizonDB + * cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, HorizonDbReplicaInner> beginCreateOrUpdate(String resourceGroupName, - String clusterName, String poolName, String replicaName, HorizonDbReplicaInner resource); + SyncPoller, ChangeDataCaptureCapabilityInner> + beginCreateOrReplace(String resourceGroupName, String clusterName, ChangeDataCaptureCapabilityInner resource); /** - * Creates a new HorizonDB replica or updates an existing replica. + * Creates or replaces the singleton change data capture capability and reconciles shared engine prerequisites. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 represents the HorizonDB replica. + * @return the {@link SyncPoller} for polling of the singleton change data capture capability for a HorizonDB + * cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, HorizonDbReplicaInner> beginCreateOrUpdate(String resourceGroupName, - String clusterName, String poolName, String replicaName, HorizonDbReplicaInner resource, Context context); + SyncPoller, ChangeDataCaptureCapabilityInner> beginCreateOrReplace( + String resourceGroupName, String clusterName, ChangeDataCaptureCapabilityInner resource, Context context); /** - * Creates a new HorizonDB replica or updates an existing replica. + * Creates or replaces the singleton change data capture capability and reconciles shared engine prerequisites. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 represents the HorizonDB replica on successful completion of {@link Mono}. + * @return the singleton change data capture capability for a HorizonDB cluster on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String clusterName, String poolName, - String replicaName, HorizonDbReplicaInner resource); + Mono createOrReplaceAsync(String resourceGroupName, String clusterName, + ChangeDataCaptureCapabilityInner resource); /** - * Creates a new HorizonDB replica or updates an existing replica. + * Creates or replaces the singleton change data capture capability and reconciles shared engine prerequisites. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 represents the HorizonDB replica. + * @return the singleton change data capture capability for a HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - HorizonDbReplicaInner createOrUpdate(String resourceGroupName, String clusterName, String poolName, - String replicaName, HorizonDbReplicaInner resource); + ChangeDataCaptureCapabilityInner createOrReplace(String resourceGroupName, String clusterName, + ChangeDataCaptureCapabilityInner resource); /** - * Creates a new HorizonDB replica or updates an existing replica. + * Creates or replaces the singleton change data capture capability and reconciles shared engine prerequisites. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 represents the HorizonDB replica. + * @return the singleton change data capture capability for a HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - HorizonDbReplicaInner createOrUpdate(String resourceGroupName, String clusterName, String poolName, - String replicaName, HorizonDbReplicaInner resource, Context context); + ChangeDataCaptureCapabilityInner createOrReplace(String resourceGroupName, String clusterName, + ChangeDataCaptureCapabilityInner resource, Context context); /** - * Updates an existing HorizonDB replica (e.g., role). + * Updates mutable change data capture capability properties. Omitted properties preserve their current values. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 represents the HorizonDB replica along with {@link Response} on successful completion of {@link Mono}. + * @return the singleton change data capture capability for a HorizonDB cluster along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, - String poolName, String replicaName, HorizonDbReplicaForPatchUpdate properties); + ChangeDataCaptureCapabilityForPatchUpdate properties); /** - * Updates an existing HorizonDB replica (e.g., role). + * Updates mutable change data capture capability properties. Omitted properties preserve their current values. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 PollerFlux} for polling of represents the HorizonDB replica. + * @return the {@link PollerFlux} for polling of the singleton change data capture capability for a HorizonDB + * cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, HorizonDbReplicaInner> beginUpdateAsync(String resourceGroupName, - String clusterName, String poolName, String replicaName, HorizonDbReplicaForPatchUpdate properties); + PollerFlux, ChangeDataCaptureCapabilityInner> beginUpdateAsync( + String resourceGroupName, String clusterName, ChangeDataCaptureCapabilityForPatchUpdate properties); /** - * Updates an existing HorizonDB replica (e.g., role). + * Updates mutable change data capture capability properties. Omitted properties preserve their current values. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 represents the HorizonDB replica. + * @return the {@link SyncPoller} for polling of the singleton change data capture capability for a HorizonDB + * cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, HorizonDbReplicaInner> beginUpdate(String resourceGroupName, - String clusterName, String poolName, String replicaName, HorizonDbReplicaForPatchUpdate properties); + SyncPoller, ChangeDataCaptureCapabilityInner> + beginUpdate(String resourceGroupName, String clusterName, ChangeDataCaptureCapabilityForPatchUpdate properties); /** - * Updates an existing HorizonDB replica (e.g., role). + * Updates mutable change data capture capability properties. Omitted properties preserve their current values. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 represents the HorizonDB replica. + * @return the {@link SyncPoller} for polling of the singleton change data capture capability for a HorizonDB + * cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, HorizonDbReplicaInner> beginUpdate(String resourceGroupName, - String clusterName, String poolName, String replicaName, HorizonDbReplicaForPatchUpdate properties, + SyncPoller, ChangeDataCaptureCapabilityInner> beginUpdate( + String resourceGroupName, String clusterName, ChangeDataCaptureCapabilityForPatchUpdate properties, Context context); /** - * Updates an existing HorizonDB replica (e.g., role). + * Updates mutable change data capture capability properties. Omitted properties preserve their current values. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 represents the HorizonDB replica on successful completion of {@link Mono}. + * @return the singleton change data capture capability for a HorizonDB cluster on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String clusterName, String poolName, - String replicaName, HorizonDbReplicaForPatchUpdate properties); + Mono updateAsync(String resourceGroupName, String clusterName, + ChangeDataCaptureCapabilityForPatchUpdate properties); /** - * Updates an existing HorizonDB replica (e.g., role). + * Updates mutable change data capture capability properties. Omitted properties preserve their current values. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 represents the HorizonDB replica. + * @return the singleton change data capture capability for a HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - HorizonDbReplicaInner update(String resourceGroupName, String clusterName, String poolName, String replicaName, - HorizonDbReplicaForPatchUpdate properties); + ChangeDataCaptureCapabilityInner update(String resourceGroupName, String clusterName, + ChangeDataCaptureCapabilityForPatchUpdate properties); /** - * Updates an existing HorizonDB replica (e.g., role). + * Updates mutable change data capture capability properties. Omitted properties preserve their current values. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 represents the HorizonDB replica. + * @return the singleton change data capture capability for a HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - HorizonDbReplicaInner update(String resourceGroupName, String clusterName, String poolName, String replicaName, - HorizonDbReplicaForPatchUpdate properties, Context context); + ChangeDataCaptureCapabilityInner update(String resourceGroupName, String clusterName, + ChangeDataCaptureCapabilityForPatchUpdate properties, Context context); /** - * Deletes a HorizonDB replica. + * Deletes the change data capture capability after all change data capture destinations and configurations have + * been removed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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) - Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, - String poolName, String replicaName); + Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName); /** - * Deletes a HorizonDB replica. + * Deletes the change data capture capability after all change data capture destinations and configurations have + * been removed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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) - PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, String poolName, - String replicaName); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName); /** - * Deletes a HorizonDB replica. + * Deletes the change data capture capability after all change data capture destinations and configurations have + * been removed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 poolName, - String replicaName); + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName); /** - * Deletes a HorizonDB replica. + * Deletes the change data capture capability after all change data capture destinations and configurations have + * been removed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -438,50 +360,89 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String poolName, - String replicaName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, Context context); /** - * Deletes a HorizonDB replica. + * Deletes the change data capture capability after all change data capture destinations and configurations have + * been removed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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) - Mono deleteAsync(String resourceGroupName, String clusterName, String poolName, String replicaName); + Mono deleteAsync(String resourceGroupName, String clusterName); /** - * Deletes a HorizonDB replica. + * Deletes the change data capture capability after all change data capture destinations and configurations have + * been removed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 clusterName, String poolName, String replicaName); + void delete(String resourceGroupName, String clusterName); /** - * Deletes a HorizonDB replica. + * Deletes the change data capture capability after all change data capture destinations and configurations have + * been removed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 clusterName, String poolName, String replicaName, Context context); + void delete(String resourceGroupName, String clusterName, Context context); + + /** + * Lists the optional singleton change data capture capability for a cluster. The result contains zero or one item. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 ChangeDataCaptureCapability list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String clusterName); + + /** + * Lists the optional singleton change data capture capability for a cluster. The result contains zero or one item. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 ChangeDataCaptureCapability list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName); + + /** + * Lists the optional singleton change data capture capability for a cluster. The result contains zero or one item. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 ChangeDataCaptureCapability list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName, Context context); } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/ChangeDataCaptureConfigurationsClient.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/ChangeDataCaptureConfigurationsClient.java new file mode 100644 index 0000000000000..51e186eeac978 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/ChangeDataCaptureConfigurationsClient.java @@ -0,0 +1,506 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +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.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.horizondb.fluent.models.ChangeDataCaptureConfigurationInner; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureConfigurationForPatchUpdate; +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 ChangeDataCaptureConfigurationsClient. + */ +public interface ChangeDataCaptureConfigurationsClient { + /** + * Gets a change data capture configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a change data capture configuration along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, + String clusterName, String configurationName); + + /** + * Gets a change data capture configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a change data capture configuration on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String clusterName, + String configurationName); + + /** + * Gets a change data capture configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a change data capture configuration along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String clusterName, + String configurationName, Context context); + + /** + * Gets a change data capture configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a change data capture configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ChangeDataCaptureConfigurationInner get(String resourceGroupName, String clusterName, String configurationName); + + /** + * Creates or replaces a change data capture configuration that enrolls a PostgreSQL database for Microsoft Fabric + * Mirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a HorizonDB database enrollment for Microsoft Fabric Mirroring along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createOrReplaceWithResponseAsync(String resourceGroupName, String clusterName, + String configurationName, ChangeDataCaptureConfigurationInner resource); + + /** + * Creates or replaces a change data capture configuration that enrolls a PostgreSQL database for Microsoft Fabric + * Mirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @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 PollerFlux} for polling of a HorizonDB database enrollment for Microsoft Fabric Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, ChangeDataCaptureConfigurationInner> + beginCreateOrReplaceAsync(String resourceGroupName, String clusterName, String configurationName, + ChangeDataCaptureConfigurationInner resource); + + /** + * Creates or replaces a change data capture configuration that enrolls a PostgreSQL database for Microsoft Fabric + * Mirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a HorizonDB database enrollment for Microsoft Fabric Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ChangeDataCaptureConfigurationInner> + beginCreateOrReplace(String resourceGroupName, String clusterName, String configurationName, + ChangeDataCaptureConfigurationInner resource); + + /** + * Creates or replaces a change data capture configuration that enrolls a PostgreSQL database for Microsoft Fabric + * Mirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a HorizonDB database enrollment for Microsoft Fabric Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ChangeDataCaptureConfigurationInner> + beginCreateOrReplace(String resourceGroupName, String clusterName, String configurationName, + ChangeDataCaptureConfigurationInner resource, Context context); + + /** + * Creates or replaces a change data capture configuration that enrolls a PostgreSQL database for Microsoft Fabric + * Mirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a HorizonDB database enrollment for Microsoft Fabric Mirroring on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrReplaceAsync(String resourceGroupName, String clusterName, + String configurationName, ChangeDataCaptureConfigurationInner resource); + + /** + * Creates or replaces a change data capture configuration that enrolls a PostgreSQL database for Microsoft Fabric + * Mirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a HorizonDB database enrollment for Microsoft Fabric Mirroring. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ChangeDataCaptureConfigurationInner createOrReplace(String resourceGroupName, String clusterName, + String configurationName, ChangeDataCaptureConfigurationInner resource); + + /** + * Creates or replaces a change data capture configuration that enrolls a PostgreSQL database for Microsoft Fabric + * Mirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a HorizonDB database enrollment for Microsoft Fabric Mirroring. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ChangeDataCaptureConfigurationInner createOrReplace(String resourceGroupName, String clusterName, + String configurationName, ChangeDataCaptureConfigurationInner resource, Context context); + + /** + * Updates mutable change data capture configuration properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @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 a HorizonDB database enrollment for Microsoft Fabric Mirroring along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, + String configurationName, ChangeDataCaptureConfigurationForPatchUpdate properties); + + /** + * Updates mutable change data capture configuration properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @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 PollerFlux} for polling of a HorizonDB database enrollment for Microsoft Fabric Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, ChangeDataCaptureConfigurationInner> beginUpdateAsync( + String resourceGroupName, String clusterName, String configurationName, + ChangeDataCaptureConfigurationForPatchUpdate properties); + + /** + * Updates mutable change data capture configuration properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @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 a HorizonDB database enrollment for Microsoft Fabric Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ChangeDataCaptureConfigurationInner> beginUpdate( + String resourceGroupName, String clusterName, String configurationName, + ChangeDataCaptureConfigurationForPatchUpdate properties); + + /** + * Updates mutable change data capture configuration properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @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 a HorizonDB database enrollment for Microsoft Fabric Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ChangeDataCaptureConfigurationInner> beginUpdate( + String resourceGroupName, String clusterName, String configurationName, + ChangeDataCaptureConfigurationForPatchUpdate properties, Context context); + + /** + * Updates mutable change data capture configuration properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @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 a HorizonDB database enrollment for Microsoft Fabric Mirroring on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateAsync(String resourceGroupName, String clusterName, + String configurationName, ChangeDataCaptureConfigurationForPatchUpdate properties); + + /** + * Updates mutable change data capture configuration properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @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 a HorizonDB database enrollment for Microsoft Fabric Mirroring. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ChangeDataCaptureConfigurationInner update(String resourceGroupName, String clusterName, String configurationName, + ChangeDataCaptureConfigurationForPatchUpdate properties); + + /** + * Updates mutable change data capture configuration properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @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 a HorizonDB database enrollment for Microsoft Fabric Mirroring. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ChangeDataCaptureConfigurationInner update(String resourceGroupName, String clusterName, String configurationName, + ChangeDataCaptureConfigurationForPatchUpdate properties, Context context); + + /** + * Deletes a change data capture configuration after destination-side replication has been stopped or detached. This + * operation never deletes the Microsoft Fabric mirrored-database item. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String configurationName); + + /** + * Deletes a change data capture configuration after destination-side replication has been stopped or detached. This + * operation never deletes the Microsoft Fabric mirrored-database item. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String configurationName); + + /** + * Deletes a change data capture configuration after destination-side replication has been stopped or detached. This + * operation never deletes the Microsoft Fabric mirrored-database item. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 configurationName); + + /** + * Deletes a change data capture configuration after destination-side replication has been stopped or detached. This + * operation never deletes the Microsoft Fabric mirrored-database item. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 configurationName, Context context); + + /** + * Deletes a change data capture configuration after destination-side replication has been stopped or detached. This + * operation never deletes the Microsoft Fabric mirrored-database item. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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) + Mono deleteAsync(String resourceGroupName, String clusterName, String configurationName); + + /** + * Deletes a change data capture configuration after destination-side replication has been stopped or detached. This + * operation never deletes the Microsoft Fabric mirrored-database item. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 clusterName, String configurationName); + + /** + * Deletes a change data capture configuration after destination-side replication has been stopped or detached. This + * operation never deletes the Microsoft Fabric mirrored-database item. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 clusterName, String configurationName, Context context); + + /** + * Lists change data capture configurations in a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 ChangeDataCaptureConfiguration list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String clusterName); + + /** + * Lists change data capture configurations in a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 ChangeDataCaptureConfiguration list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName); + + /** + * Lists change data capture configurations in a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 ChangeDataCaptureConfiguration list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName, + Context context); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/ChangeDataCaptureDestinationsClient.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/ChangeDataCaptureDestinationsClient.java new file mode 100644 index 0000000000000..8976d6e6af3c4 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/ChangeDataCaptureDestinationsClient.java @@ -0,0 +1,627 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +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.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.horizondb.fluent.models.ActivateChangeDataCaptureIdentityResultInner; +import com.azure.resourcemanager.horizondb.fluent.models.ChangeDataCaptureDestinationInner; +import com.azure.resourcemanager.horizondb.models.ActivateChangeDataCaptureIdentityRequest; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDestinationForPatchUpdate; +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 ChangeDataCaptureDestinationsClient. + */ +public interface ChangeDataCaptureDestinationsClient { + /** + * Gets a change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a change data capture destination along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String destinationName); + + /** + * Gets a change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a change data capture destination on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String clusterName, + String destinationName); + + /** + * Gets a change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a change data capture destination along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String clusterName, + String destinationName, Context context); + + /** + * Gets a change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a change data capture destination. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ChangeDataCaptureDestinationInner get(String resourceGroupName, String clusterName, String destinationName); + + /** + * Creates or replaces a Microsoft Fabric change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a reusable Microsoft Fabric destination for HorizonDB change data capture configurations along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createOrReplaceWithResponseAsync(String resourceGroupName, String clusterName, + String destinationName, ChangeDataCaptureDestinationInner resource); + + /** + * Creates or replaces a Microsoft Fabric change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 PollerFlux} for polling of a reusable Microsoft Fabric destination for HorizonDB change data + * capture configurations. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, ChangeDataCaptureDestinationInner> + beginCreateOrReplaceAsync(String resourceGroupName, String clusterName, String destinationName, + ChangeDataCaptureDestinationInner resource); + + /** + * Creates or replaces a Microsoft Fabric change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a reusable Microsoft Fabric destination for HorizonDB change data + * capture configurations. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ChangeDataCaptureDestinationInner> beginCreateOrReplace( + String resourceGroupName, String clusterName, String destinationName, + ChangeDataCaptureDestinationInner resource); + + /** + * Creates or replaces a Microsoft Fabric change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a reusable Microsoft Fabric destination for HorizonDB change data + * capture configurations. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ChangeDataCaptureDestinationInner> beginCreateOrReplace( + String resourceGroupName, String clusterName, String destinationName, + ChangeDataCaptureDestinationInner resource, Context context); + + /** + * Creates or replaces a Microsoft Fabric change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a reusable Microsoft Fabric destination for HorizonDB change data capture configurations on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrReplaceAsync(String resourceGroupName, String clusterName, + String destinationName, ChangeDataCaptureDestinationInner resource); + + /** + * Creates or replaces a Microsoft Fabric change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a reusable Microsoft Fabric destination for HorizonDB change data capture configurations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ChangeDataCaptureDestinationInner createOrReplace(String resourceGroupName, String clusterName, + String destinationName, ChangeDataCaptureDestinationInner resource); + + /** + * Creates or replaces a Microsoft Fabric change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a reusable Microsoft Fabric destination for HorizonDB change data capture configurations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ChangeDataCaptureDestinationInner createOrReplace(String resourceGroupName, String clusterName, + String destinationName, ChangeDataCaptureDestinationInner resource, Context context); + + /** + * Updates mutable change data capture destination properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 a reusable Microsoft Fabric destination for HorizonDB change data capture configurations along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, + String destinationName, ChangeDataCaptureDestinationForPatchUpdate properties); + + /** + * Updates mutable change data capture destination properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 PollerFlux} for polling of a reusable Microsoft Fabric destination for HorizonDB change data + * capture configurations. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, ChangeDataCaptureDestinationInner> beginUpdateAsync( + String resourceGroupName, String clusterName, String destinationName, + ChangeDataCaptureDestinationForPatchUpdate properties); + + /** + * Updates mutable change data capture destination properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 a reusable Microsoft Fabric destination for HorizonDB change data + * capture configurations. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ChangeDataCaptureDestinationInner> beginUpdate( + String resourceGroupName, String clusterName, String destinationName, + ChangeDataCaptureDestinationForPatchUpdate properties); + + /** + * Updates mutable change data capture destination properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 a reusable Microsoft Fabric destination for HorizonDB change data + * capture configurations. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ChangeDataCaptureDestinationInner> beginUpdate( + String resourceGroupName, String clusterName, String destinationName, + ChangeDataCaptureDestinationForPatchUpdate properties, Context context); + + /** + * Updates mutable change data capture destination properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 a reusable Microsoft Fabric destination for HorizonDB change data capture configurations on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateAsync(String resourceGroupName, String clusterName, + String destinationName, ChangeDataCaptureDestinationForPatchUpdate properties); + + /** + * Updates mutable change data capture destination properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 a reusable Microsoft Fabric destination for HorizonDB change data capture configurations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ChangeDataCaptureDestinationInner update(String resourceGroupName, String clusterName, String destinationName, + ChangeDataCaptureDestinationForPatchUpdate properties); + + /** + * Updates mutable change data capture destination properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 a reusable Microsoft Fabric destination for HorizonDB change data capture configurations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ChangeDataCaptureDestinationInner update(String resourceGroupName, String clusterName, String destinationName, + ChangeDataCaptureDestinationForPatchUpdate properties, Context context); + + /** + * Deletes a change data capture destination after all referencing configurations and identity assignments have been + * removed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String destinationName); + + /** + * Deletes a change data capture destination after all referencing configurations and identity assignments have been + * removed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String destinationName); + + /** + * Deletes a change data capture destination after all referencing configurations and identity assignments have been + * removed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 destinationName); + + /** + * Deletes a change data capture destination after all referencing configurations and identity assignments have been + * removed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 destinationName, + Context context); + + /** + * Deletes a change data capture destination after all referencing configurations and identity assignments have been + * removed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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) + Mono deleteAsync(String resourceGroupName, String clusterName, String destinationName); + + /** + * Deletes a change data capture destination after all referencing configurations and identity assignments have been + * removed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 clusterName, String destinationName); + + /** + * Deletes a change data capture destination after all referencing configurations and identity assignments have been + * removed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 clusterName, String destinationName, Context context); + + /** + * Lists change data capture destinations in a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 ChangeDataCaptureDestination list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String clusterName); + + /** + * Lists change data capture destinations in a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 ChangeDataCaptureDestination list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName); + + /** + * Lists change data capture destinations in a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 ChangeDataCaptureDestination list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName, + Context context); + + /** + * Atomically activates a validated identity assignment for this destination. If-Match is evaluated against the + * destination entity tag. Activating the already-active assignment succeeds idempotently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ifMatch The destination entity tag. The action proceeds only when this value matches the destination's + * current entity tag. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 completed result of activating a change data capture destination identity along with {@link Response} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> activateIdentityWithResponseAsync(String resourceGroupName, String ifMatch, + String clusterName, String destinationName, ActivateChangeDataCaptureIdentityRequest body); + + /** + * Atomically activates a validated identity assignment for this destination. If-Match is evaluated against the + * destination entity tag. Activating the already-active assignment succeeds idempotently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ifMatch The destination entity tag. The action proceeds only when this value matches the destination's + * current entity tag. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 PollerFlux} for polling of the completed result of activating a change data capture + * destination identity. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, ActivateChangeDataCaptureIdentityResultInner> + beginActivateIdentityAsync(String resourceGroupName, String ifMatch, String clusterName, String destinationName, + ActivateChangeDataCaptureIdentityRequest body); + + /** + * Atomically activates a validated identity assignment for this destination. If-Match is evaluated against the + * destination entity tag. Activating the already-active assignment succeeds idempotently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ifMatch The destination entity tag. The action proceeds only when this value matches the destination's + * current entity tag. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 the completed result of activating a change data capture + * destination identity. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ActivateChangeDataCaptureIdentityResultInner> + beginActivateIdentity(String resourceGroupName, String ifMatch, String clusterName, String destinationName, + ActivateChangeDataCaptureIdentityRequest body); + + /** + * Atomically activates a validated identity assignment for this destination. If-Match is evaluated against the + * destination entity tag. Activating the already-active assignment succeeds idempotently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ifMatch The destination entity tag. The action proceeds only when this value matches the destination's + * current entity tag. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 the completed result of activating a change data capture + * destination identity. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ActivateChangeDataCaptureIdentityResultInner> + beginActivateIdentity(String resourceGroupName, String ifMatch, String clusterName, String destinationName, + ActivateChangeDataCaptureIdentityRequest body, Context context); + + /** + * Atomically activates a validated identity assignment for this destination. If-Match is evaluated against the + * destination entity tag. Activating the already-active assignment succeeds idempotently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ifMatch The destination entity tag. The action proceeds only when this value matches the destination's + * current entity tag. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 completed result of activating a change data capture destination identity on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono activateIdentityAsync(String resourceGroupName, String ifMatch, + String clusterName, String destinationName, ActivateChangeDataCaptureIdentityRequest body); + + /** + * Atomically activates a validated identity assignment for this destination. If-Match is evaluated against the + * destination entity tag. Activating the already-active assignment succeeds idempotently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ifMatch The destination entity tag. The action proceeds only when this value matches the destination's + * current entity tag. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 completed result of activating a change data capture destination identity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ActivateChangeDataCaptureIdentityResultInner activateIdentity(String resourceGroupName, String ifMatch, + String clusterName, String destinationName, ActivateChangeDataCaptureIdentityRequest body); + + /** + * Atomically activates a validated identity assignment for this destination. If-Match is evaluated against the + * destination entity tag. Activating the already-active assignment succeeds idempotently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ifMatch The destination entity tag. The action proceeds only when this value matches the destination's + * current entity tag. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 completed result of activating a change data capture destination identity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ActivateChangeDataCaptureIdentityResultInner activateIdentity(String resourceGroupName, String ifMatch, + String clusterName, String destinationName, ActivateChangeDataCaptureIdentityRequest body, Context context); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbClustersClient.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/ClustersClient.java similarity index 60% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbClustersClient.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/ClustersClient.java index dc0f0af681a21..2975e46ab2f45 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbClustersClient.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/ClustersClient.java @@ -13,16 +13,16 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbClusterInner; -import com.azure.resourcemanager.horizondb.models.HorizonDbClusterForPatchUpdate; +import com.azure.resourcemanager.horizondb.fluent.models.ClusterInner; +import com.azure.resourcemanager.horizondb.models.ClusterForPatchUpdate; 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 HorizonDbClustersClient. + * An instance of this class provides access to all the operations defined in ClustersClient. */ -public interface HorizonDbClustersClient { +public interface ClustersClient { /** * Gets information about a HorizonDB cluster. * @@ -35,8 +35,7 @@ public interface HorizonDbClustersClient { * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String clusterName); + Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String clusterName); /** * Gets information about a HorizonDB cluster. @@ -49,7 +48,7 @@ Mono> getByResourceGroupWithResponseAsync(String * @return information about a HorizonDB cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByResourceGroupAsync(String resourceGroupName, String clusterName); + Mono getByResourceGroupAsync(String resourceGroupName, String clusterName); /** * Gets information about a HorizonDB cluster. @@ -63,7 +62,7 @@ Mono> getByResourceGroupWithResponseAsync(String * @return information about a HorizonDB cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, + Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, Context context); /** @@ -77,10 +76,18 @@ Response getByResourceGroupWithResponse(String resourceGr * @return information about a HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - HorizonDbClusterInner getByResourceGroup(String resourceGroupName, String clusterName); + ClusterInner getByResourceGroup(String resourceGroupName, String clusterName); /** - * Creates a new HorizonDB cluster or updates an existing cluster. + * Creates a new HorizonDB cluster or replaces an existing cluster. PointInTimeRestore creates the new Cluster + * resource and hydrates its service-owned database storage from an available source backup. It does not clone + * source pools, Pool-scoped endpoints, firewall rules, parameter-group associations, or other child resources. The + * new Cluster receives its service-generated Cluster-scoped Endpoint named cluster. For restore, postgreSqlVersion + * must be omitted because the service obtains it from backup metadata; all other new-cluster configuration comes + * from the request or service defaults. Same-location restore requires and honors pointInTimeUtc and allows + * creationSourceClusterLocation to be omitted. Cross-location restore requires creationSourceClusterLocation to + * identify the source cluster's Azure location and requires pointInTimeUtc, but ignores the supplied timestamp and + * restores the latest available backup. Cross-location responses omit pointInTimeUtc. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -91,11 +98,19 @@ Response getByResourceGroupWithResponse(String resourceGr * @return represents the HorizonDB cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String clusterName, - HorizonDbClusterInner resource); + Mono>> createOrReplaceWithResponseAsync(String resourceGroupName, String clusterName, + ClusterInner resource); /** - * Creates a new HorizonDB cluster or updates an existing cluster. + * Creates a new HorizonDB cluster or replaces an existing cluster. PointInTimeRestore creates the new Cluster + * resource and hydrates its service-owned database storage from an available source backup. It does not clone + * source pools, Pool-scoped endpoints, firewall rules, parameter-group associations, or other child resources. The + * new Cluster receives its service-generated Cluster-scoped Endpoint named cluster. For restore, postgreSqlVersion + * must be omitted because the service obtains it from backup metadata; all other new-cluster configuration comes + * from the request or service defaults. Same-location restore requires and honors pointInTimeUtc and allows + * creationSourceClusterLocation to be omitted. Cross-location restore requires creationSourceClusterLocation to + * identify the source cluster's Azure location and requires pointInTimeUtc, but ignores the supplied timestamp and + * restores the latest available backup. Cross-location responses omit pointInTimeUtc. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -106,11 +121,19 @@ Mono>> createOrUpdateWithResponseAsync(String resource * @return the {@link PollerFlux} for polling of represents the HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, HorizonDbClusterInner> - beginCreateOrUpdateAsync(String resourceGroupName, String clusterName, HorizonDbClusterInner resource); + PollerFlux, ClusterInner> beginCreateOrReplaceAsync(String resourceGroupName, + String clusterName, ClusterInner resource); /** - * Creates a new HorizonDB cluster or updates an existing cluster. + * Creates a new HorizonDB cluster or replaces an existing cluster. PointInTimeRestore creates the new Cluster + * resource and hydrates its service-owned database storage from an available source backup. It does not clone + * source pools, Pool-scoped endpoints, firewall rules, parameter-group associations, or other child resources. The + * new Cluster receives its service-generated Cluster-scoped Endpoint named cluster. For restore, postgreSqlVersion + * must be omitted because the service obtains it from backup metadata; all other new-cluster configuration comes + * from the request or service defaults. Same-location restore requires and honors pointInTimeUtc and allows + * creationSourceClusterLocation to be omitted. Cross-location restore requires creationSourceClusterLocation to + * identify the source cluster's Azure location and requires pointInTimeUtc, but ignores the supplied timestamp and + * restores the latest available backup. Cross-location responses omit pointInTimeUtc. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -121,11 +144,19 @@ Mono>> createOrUpdateWithResponseAsync(String resource * @return the {@link SyncPoller} for polling of represents the HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, HorizonDbClusterInner> beginCreateOrUpdate(String resourceGroupName, - String clusterName, HorizonDbClusterInner resource); + SyncPoller, ClusterInner> beginCreateOrReplace(String resourceGroupName, + String clusterName, ClusterInner resource); /** - * Creates a new HorizonDB cluster or updates an existing cluster. + * Creates a new HorizonDB cluster or replaces an existing cluster. PointInTimeRestore creates the new Cluster + * resource and hydrates its service-owned database storage from an available source backup. It does not clone + * source pools, Pool-scoped endpoints, firewall rules, parameter-group associations, or other child resources. The + * new Cluster receives its service-generated Cluster-scoped Endpoint named cluster. For restore, postgreSqlVersion + * must be omitted because the service obtains it from backup metadata; all other new-cluster configuration comes + * from the request or service defaults. Same-location restore requires and honors pointInTimeUtc and allows + * creationSourceClusterLocation to be omitted. Cross-location restore requires creationSourceClusterLocation to + * identify the source cluster's Azure location and requires pointInTimeUtc, but ignores the supplied timestamp and + * restores the latest available backup. Cross-location responses omit pointInTimeUtc. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -137,11 +168,19 @@ SyncPoller, HorizonDbClusterInner> beginCreate * @return the {@link SyncPoller} for polling of represents the HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, HorizonDbClusterInner> beginCreateOrUpdate(String resourceGroupName, - String clusterName, HorizonDbClusterInner resource, Context context); + SyncPoller, ClusterInner> beginCreateOrReplace(String resourceGroupName, + String clusterName, ClusterInner resource, Context context); /** - * Creates a new HorizonDB cluster or updates an existing cluster. + * Creates a new HorizonDB cluster or replaces an existing cluster. PointInTimeRestore creates the new Cluster + * resource and hydrates its service-owned database storage from an available source backup. It does not clone + * source pools, Pool-scoped endpoints, firewall rules, parameter-group associations, or other child resources. The + * new Cluster receives its service-generated Cluster-scoped Endpoint named cluster. For restore, postgreSqlVersion + * must be omitted because the service obtains it from backup metadata; all other new-cluster configuration comes + * from the request or service defaults. Same-location restore requires and honors pointInTimeUtc and allows + * creationSourceClusterLocation to be omitted. Cross-location restore requires creationSourceClusterLocation to + * identify the source cluster's Azure location and requires pointInTimeUtc, but ignores the supplied timestamp and + * restores the latest available backup. Cross-location responses omit pointInTimeUtc. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -152,11 +191,18 @@ SyncPoller, HorizonDbClusterInner> beginCreate * @return represents the HorizonDB cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String clusterName, - HorizonDbClusterInner resource); + Mono createOrReplaceAsync(String resourceGroupName, String clusterName, ClusterInner resource); /** - * Creates a new HorizonDB cluster or updates an existing cluster. + * Creates a new HorizonDB cluster or replaces an existing cluster. PointInTimeRestore creates the new Cluster + * resource and hydrates its service-owned database storage from an available source backup. It does not clone + * source pools, Pool-scoped endpoints, firewall rules, parameter-group associations, or other child resources. The + * new Cluster receives its service-generated Cluster-scoped Endpoint named cluster. For restore, postgreSqlVersion + * must be omitted because the service obtains it from backup metadata; all other new-cluster configuration comes + * from the request or service defaults. Same-location restore requires and honors pointInTimeUtc and allows + * creationSourceClusterLocation to be omitted. Cross-location restore requires creationSourceClusterLocation to + * identify the source cluster's Azure location and requires pointInTimeUtc, but ignores the supplied timestamp and + * restores the latest available backup. Cross-location responses omit pointInTimeUtc. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -167,10 +213,18 @@ Mono createOrUpdateAsync(String resourceGroupName, String * @return represents the HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - HorizonDbClusterInner createOrUpdate(String resourceGroupName, String clusterName, HorizonDbClusterInner resource); + ClusterInner createOrReplace(String resourceGroupName, String clusterName, ClusterInner resource); /** - * Creates a new HorizonDB cluster or updates an existing cluster. + * Creates a new HorizonDB cluster or replaces an existing cluster. PointInTimeRestore creates the new Cluster + * resource and hydrates its service-owned database storage from an available source backup. It does not clone + * source pools, Pool-scoped endpoints, firewall rules, parameter-group associations, or other child resources. The + * new Cluster receives its service-generated Cluster-scoped Endpoint named cluster. For restore, postgreSqlVersion + * must be omitted because the service obtains it from backup metadata; all other new-cluster configuration comes + * from the request or service defaults. Same-location restore requires and honors pointInTimeUtc and allows + * creationSourceClusterLocation to be omitted. Cross-location restore requires creationSourceClusterLocation to + * identify the source cluster's Azure location and requires pointInTimeUtc, but ignores the supplied timestamp and + * restores the latest available backup. Cross-location responses omit pointInTimeUtc. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -182,11 +236,10 @@ Mono createOrUpdateAsync(String resourceGroupName, String * @return represents the HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - HorizonDbClusterInner createOrUpdate(String resourceGroupName, String clusterName, HorizonDbClusterInner resource, - Context context); + ClusterInner createOrReplace(String resourceGroupName, String clusterName, ClusterInner resource, Context context); /** - * Updates an existing HorizonDB cluster (e.g., tags, virtual cores, replica count). + * Updates an existing HorizonDB cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -198,10 +251,10 @@ HorizonDbClusterInner createOrUpdate(String resourceGroupName, String clusterNam */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, - HorizonDbClusterForPatchUpdate properties); + ClusterForPatchUpdate properties); /** - * Updates an existing HorizonDB cluster (e.g., tags, virtual cores, replica count). + * Updates an existing HorizonDB cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -212,11 +265,11 @@ Mono>> updateWithResponseAsync(String resourceGroupNam * @return the {@link PollerFlux} for polling of represents the HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, HorizonDbClusterInner> beginUpdateAsync(String resourceGroupName, - String clusterName, HorizonDbClusterForPatchUpdate properties); + PollerFlux, ClusterInner> beginUpdateAsync(String resourceGroupName, String clusterName, + ClusterForPatchUpdate properties); /** - * Updates an existing HorizonDB cluster (e.g., tags, virtual cores, replica count). + * Updates an existing HorizonDB cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -227,11 +280,11 @@ PollerFlux, HorizonDbClusterInner> beginUpdate * @return the {@link SyncPoller} for polling of represents the HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, HorizonDbClusterInner> beginUpdate(String resourceGroupName, - String clusterName, HorizonDbClusterForPatchUpdate properties); + SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, String clusterName, + ClusterForPatchUpdate properties); /** - * Updates an existing HorizonDB cluster (e.g., tags, virtual cores, replica count). + * Updates an existing HorizonDB cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -243,11 +296,11 @@ SyncPoller, HorizonDbClusterInner> beginUpdate * @return the {@link SyncPoller} for polling of represents the HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, HorizonDbClusterInner> beginUpdate(String resourceGroupName, - String clusterName, HorizonDbClusterForPatchUpdate properties, Context context); + SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, String clusterName, + ClusterForPatchUpdate properties, Context context); /** - * Updates an existing HorizonDB cluster (e.g., tags, virtual cores, replica count). + * Updates an existing HorizonDB cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -258,11 +311,10 @@ SyncPoller, HorizonDbClusterInner> beginUpdate * @return represents the HorizonDB cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String clusterName, - HorizonDbClusterForPatchUpdate properties); + Mono updateAsync(String resourceGroupName, String clusterName, ClusterForPatchUpdate properties); /** - * Updates an existing HorizonDB cluster (e.g., tags, virtual cores, replica count). + * Updates an existing HorizonDB cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -273,11 +325,10 @@ Mono updateAsync(String resourceGroupName, String cluster * @return represents the HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - HorizonDbClusterInner update(String resourceGroupName, String clusterName, - HorizonDbClusterForPatchUpdate properties); + ClusterInner update(String resourceGroupName, String clusterName, ClusterForPatchUpdate properties); /** - * Updates an existing HorizonDB cluster (e.g., tags, virtual cores, replica count). + * Updates an existing HorizonDB cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -289,11 +340,13 @@ HorizonDbClusterInner update(String resourceGroupName, String clusterName, * @return represents the HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - HorizonDbClusterInner update(String resourceGroupName, String clusterName, - HorizonDbClusterForPatchUpdate properties, Context context); + ClusterInner update(String resourceGroupName, String clusterName, ClusterForPatchUpdate properties, + Context context); /** - * Deletes a HorizonDB cluster. + * Deletes a HorizonDB cluster, its Cluster-scoped Endpoint, and all remaining child resources. For an accepted + * deletion, the long-running operation remains nonterminal until physical deletion completes and point GET returns + * 404 Not Found. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -306,7 +359,9 @@ HorizonDbClusterInner update(String resourceGroupName, String clusterName, Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName); /** - * Deletes a HorizonDB cluster. + * Deletes a HorizonDB cluster, its Cluster-scoped Endpoint, and all remaining child resources. For an accepted + * deletion, the long-running operation remains nonterminal until physical deletion completes and point GET returns + * 404 Not Found. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -319,7 +374,9 @@ HorizonDbClusterInner update(String resourceGroupName, String clusterName, PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName); /** - * Deletes a HorizonDB cluster. + * Deletes a HorizonDB cluster, its Cluster-scoped Endpoint, and all remaining child resources. For an accepted + * deletion, the long-running operation remains nonterminal until physical deletion completes and point GET returns + * 404 Not Found. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -332,7 +389,9 @@ HorizonDbClusterInner update(String resourceGroupName, String clusterName, SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName); /** - * Deletes a HorizonDB cluster. + * Deletes a HorizonDB cluster, its Cluster-scoped Endpoint, and all remaining child resources. For an accepted + * deletion, the long-running operation remains nonterminal until physical deletion completes and point GET returns + * 404 Not Found. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -346,7 +405,9 @@ HorizonDbClusterInner update(String resourceGroupName, String clusterName, SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, Context context); /** - * Deletes a HorizonDB cluster. + * Deletes a HorizonDB cluster, its Cluster-scoped Endpoint, and all remaining child resources. For an accepted + * deletion, the long-running operation remains nonterminal until physical deletion completes and point GET returns + * 404 Not Found. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -359,7 +420,9 @@ HorizonDbClusterInner update(String resourceGroupName, String clusterName, Mono deleteAsync(String resourceGroupName, String clusterName); /** - * Deletes a HorizonDB cluster. + * Deletes a HorizonDB cluster, its Cluster-scoped Endpoint, and all remaining child resources. For an accepted + * deletion, the long-running operation remains nonterminal until physical deletion completes and point GET returns + * 404 Not Found. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -371,7 +434,9 @@ HorizonDbClusterInner update(String resourceGroupName, String clusterName, void delete(String resourceGroupName, String clusterName); /** - * Deletes a HorizonDB cluster. + * Deletes a HorizonDB cluster, its Cluster-scoped Endpoint, and all remaining child resources. For an accepted + * deletion, the long-running operation remains nonterminal until physical deletion completes and point GET returns + * 404 Not Found. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -390,10 +455,10 @@ HorizonDbClusterInner update(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 response of a HorizonDbCluster list operation as paginated response with {@link PagedFlux}. + * @return the response of a Cluster list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName); + PagedFlux listByResourceGroupAsync(String resourceGroupName); /** * Lists all HorizonDB clusters in a resource group. @@ -402,10 +467,10 @@ HorizonDbClusterInner update(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 response of a HorizonDbCluster list operation as paginated response with {@link PagedIterable}. + * @return the response of a Cluster list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); + PagedIterable listByResourceGroup(String resourceGroupName); /** * Lists all HorizonDB clusters in a resource group. @@ -415,30 +480,30 @@ HorizonDbClusterInner update(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 response of a HorizonDbCluster list operation as paginated response with {@link PagedIterable}. + * @return the response of a Cluster list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** * Lists all HorizonDB 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 the response of a HorizonDbCluster list operation as paginated response with {@link PagedFlux}. + * @return the response of a Cluster list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(); + PagedFlux listAsync(); /** * Lists all HorizonDB 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 the response of a HorizonDbCluster list operation as paginated response with {@link PagedIterable}. + * @return the response of a Cluster list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + PagedIterable list(); /** * Lists all HorizonDB clusters in a subscription. @@ -447,104 +512,15 @@ HorizonDbClusterInner update(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 response of a HorizonDbCluster list operation as paginated response with {@link PagedIterable}. + * @return the response of a Cluster list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Starts a stopped HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB 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 body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> startWithResponseAsync(String resourceGroupName, String clusterName); - - /** - * Starts a stopped HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginStartAsync(String resourceGroupName, String clusterName); - - /** - * Starts a stopped HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStart(String resourceGroupName, String clusterName); - - /** - * Starts a stopped HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB 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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStart(String resourceGroupName, String clusterName, Context context); - - /** - * Starts a stopped HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono startAsync(String resourceGroupName, String clusterName); - - /** - * Starts a stopped HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void start(String resourceGroupName, String clusterName); - - /** - * Starts a stopped HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void start(String resourceGroupName, String clusterName, Context context); + PagedIterable list(Context context); /** - * Stops a running HorizonDB cluster. + * Triggers failover within the cluster's designated read-write pool. HorizonDB selects the replacement node using + * the same eligibility and node-selection rules as automatic failover. The request fails with 409 Conflict when the + * designated pool is not eligible for failover or another conflicting operation is in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -554,10 +530,12 @@ HorizonDbClusterInner update(String resourceGroupName, String clusterName, * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> stopWithResponseAsync(String resourceGroupName, String clusterName); + Mono>> failoverWithResponseAsync(String resourceGroupName, String clusterName); /** - * Stops a running HorizonDB cluster. + * Triggers failover within the cluster's designated read-write pool. HorizonDB selects the replacement node using + * the same eligibility and node-selection rules as automatic failover. The request fails with 409 Conflict when the + * designated pool is not eligible for failover or another conflicting operation is in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -567,10 +545,12 @@ HorizonDbClusterInner update(String resourceGroupName, String clusterName, * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginStopAsync(String resourceGroupName, String clusterName); + PollerFlux, ClusterInner> beginFailoverAsync(String resourceGroupName, String clusterName); /** - * Stops a running HorizonDB cluster. + * Triggers failover within the cluster's designated read-write pool. HorizonDB selects the replacement node using + * the same eligibility and node-selection rules as automatic failover. The request fails with 409 Conflict when the + * designated pool is not eligible for failover or another conflicting operation is in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -580,10 +560,12 @@ HorizonDbClusterInner update(String resourceGroupName, String clusterName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStop(String resourceGroupName, String clusterName); + SyncPoller, ClusterInner> beginFailover(String resourceGroupName, String clusterName); /** - * Stops a running HorizonDB cluster. + * Triggers failover within the cluster's designated read-write pool. HorizonDB selects the replacement node using + * the same eligibility and node-selection rules as automatic failover. The request fails with 409 Conflict when the + * designated pool is not eligible for failover or another conflicting operation is in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -594,126 +576,43 @@ HorizonDbClusterInner update(String resourceGroupName, String clusterName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStop(String resourceGroupName, String clusterName, Context context); - - /** - * Stops a running HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono stopAsync(String resourceGroupName, String clusterName); - - /** - * Stops a running HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void stop(String resourceGroupName, String clusterName); - - /** - * Stops a running HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void stop(String resourceGroupName, String clusterName, Context context); - - /** - * Restarts a HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB 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 body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> restartWithResponseAsync(String resourceGroupName, String clusterName); - - /** - * Restarts a HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginRestartAsync(String resourceGroupName, String clusterName); - - /** - * Restarts a HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRestart(String resourceGroupName, String clusterName); - - /** - * Restarts a HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB 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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRestart(String resourceGroupName, String clusterName, Context context); + SyncPoller, ClusterInner> beginFailover(String resourceGroupName, String clusterName, + Context context); /** - * Restarts a HorizonDB cluster. + * Triggers failover within the cluster's designated read-write pool. HorizonDB selects the replacement node using + * the same eligibility and node-selection rules as automatic failover. The request fails with 409 Conflict when the + * designated pool is not eligible for failover or another conflicting operation is in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono restartAsync(String resourceGroupName, String clusterName); + Mono failoverAsync(String resourceGroupName, String clusterName); /** - * Restarts a HorizonDB cluster. + * Triggers failover within the cluster's designated read-write pool. HorizonDB selects the replacement node using + * the same eligibility and node-selection rules as automatic failover. The request fails with 409 Conflict when the + * designated pool is not eligible for failover or another conflicting operation is in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - void restart(String resourceGroupName, String clusterName); + ClusterInner failover(String resourceGroupName, String clusterName); /** - * Restarts a HorizonDB cluster. + * Triggers failover within the cluster's designated read-write pool. HorizonDB selects the replacement node using + * the same eligibility and node-selection rules as automatic failover. The request fails with 409 Conflict when the + * designated pool is not eligible for failover or another conflicting operation is in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -721,7 +620,8 @@ HorizonDbClusterInner update(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 response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void restart(String resourceGroupName, String clusterName, Context context); + ClusterInner failover(String resourceGroupName, String clusterName, Context context); } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/DefaultParameterGroupsClient.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/DefaultParameterGroupsClient.java new file mode 100644 index 0000000000000..3e122fb9e00e3 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/DefaultParameterGroupsClient.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.horizondb.fluent.models.DefaultParameterGroupInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in DefaultParameterGroupsClient. + */ +public interface DefaultParameterGroupsClient { + /** + * Lists default parameter groups available for a subscription in a specific region. The response contains at most + * one default parameter group for each PostgreSQL version. + * + * @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 DefaultParameterGroup list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listBySubscriptionAndRegionAsync(String location); + + /** + * Lists default parameter groups available for a subscription in a specific region. The response contains at most + * one default parameter group for each PostgreSQL version. + * + * @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 DefaultParameterGroup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBySubscriptionAndRegion(String location); + + /** + * Lists default parameter groups available for a subscription in a specific region. The response contains at most + * one default parameter group for each PostgreSQL version. + * + * @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 DefaultParameterGroup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBySubscriptionAndRegion(String location, Context context); + + /** + * Gets a default parameter group available for a subscription in a specific region. Each PostgreSQL version has at + * most one default parameter group in a location. + * + * @param location The name of the Azure region. + * @param name The name of the DefaultParameterGroup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a default parameter group available for a subscription in a specific region along with {@link Response} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String location, String name); + + /** + * Gets a default parameter group available for a subscription in a specific region. Each PostgreSQL version has at + * most one default parameter group in a location. + * + * @param location The name of the Azure region. + * @param name The name of the DefaultParameterGroup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a default parameter group available for a subscription in a specific region on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String location, String name); + + /** + * Gets a default parameter group available for a subscription in a specific region. Each PostgreSQL version has at + * most one default parameter group in a location. + * + * @param location The name of the Azure region. + * @param name The name of the DefaultParameterGroup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a default parameter group available for a subscription in a specific region along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String location, String name, Context context); + + /** + * Gets a default parameter group available for a subscription in a specific region. Each PostgreSQL version has at + * most one default parameter group in a location. + * + * @param location The name of the Azure region. + * @param name The name of the DefaultParameterGroup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a default parameter group available for a subscription in a specific region. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DefaultParameterGroupInner get(String location, String name); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/EndpointsClient.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/EndpointsClient.java new file mode 100644 index 0000000000000..03b3614169af8 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/EndpointsClient.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.horizondb.fluent.models.EndpointInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in EndpointsClient. + */ +public interface EndpointsClient { + /** + * Gets information about a service-generated HorizonDB Cluster- or Pool-scoped Endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param endpointName The platform-assigned name of the HorizonDB endpoint. A Cluster-scoped ReadWrite Endpoint has + * exactly the same name as its associated Cluster. A Pool-scoped Endpoint has exactly the same name as its + * associated Pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a service-generated HorizonDB Cluster- or Pool-scoped Endpoint along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String endpointName); + + /** + * Gets information about a service-generated HorizonDB Cluster- or Pool-scoped Endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param endpointName The platform-assigned name of the HorizonDB endpoint. A Cluster-scoped ReadWrite Endpoint has + * exactly the same name as its associated Cluster. A Pool-scoped Endpoint has exactly the same name as its + * associated Pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a service-generated HorizonDB Cluster- or Pool-scoped Endpoint on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String clusterName, String endpointName); + + /** + * Gets information about a service-generated HorizonDB Cluster- or Pool-scoped Endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param endpointName The platform-assigned name of the HorizonDB endpoint. A Cluster-scoped ReadWrite Endpoint has + * exactly the same name as its associated Cluster. A Pool-scoped Endpoint has exactly the same name as its + * associated Pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a service-generated HorizonDB Cluster- or Pool-scoped Endpoint along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String clusterName, String endpointName, + Context context); + + /** + * Gets information about a service-generated HorizonDB Cluster- or Pool-scoped Endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param endpointName The platform-assigned name of the HorizonDB endpoint. A Cluster-scoped ReadWrite Endpoint has + * exactly the same name as its associated Cluster. A Pool-scoped Endpoint has exactly the same name as its + * associated Pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a service-generated HorizonDB Cluster- or Pool-scoped Endpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EndpointInner get(String resourceGroupName, String clusterName, String endpointName); + + /** + * Lists the service-generated Endpoints in a cluster. The collection contains the Cluster-scoped Endpoint named + * cluster and one Pool-scoped Endpoint for each pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Endpoint list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String clusterName); + + /** + * Lists the service-generated Endpoints in a cluster. The collection contains the Cluster-scoped Endpoint named + * cluster and one Pool-scoped Endpoint for each pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Endpoint list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName); + + /** + * Lists the service-generated Endpoints in a cluster. The collection contains the Cluster-scoped Endpoint named + * cluster and one Pool-scoped Endpoint for each pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Endpoint list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName, Context context); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbFirewallRulesClient.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/FirewallRulesClient.java similarity index 72% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbFirewallRulesClient.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/FirewallRulesClient.java index e68e2fd670c4b..ff8ede6a68273 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbFirewallRulesClient.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/FirewallRulesClient.java @@ -13,80 +13,79 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbFirewallRuleInner; +import com.azure.resourcemanager.horizondb.fluent.models.FirewallRuleInner; 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 HorizonDbFirewallRulesClient. + * An instance of this class provides access to all the operations defined in FirewallRulesClient. */ -public interface HorizonDbFirewallRulesClient { +public interface FirewallRulesClient { /** - * Gets information about a HorizonDB firewall rule. + * Gets information about a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB firewall rule along with {@link Response} on successful completion of + * @return information about a HorizonDB pool firewall rule along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + Mono> getWithResponseAsync(String resourceGroupName, String clusterName, String poolName, String firewallRuleName); /** - * Gets information about a HorizonDB firewall rule. + * Gets information about a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB firewall rule on successful completion of {@link Mono}. + * @return information about a HorizonDB pool firewall rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String clusterName, String poolName, + Mono getAsync(String resourceGroupName, String clusterName, String poolName, String firewallRuleName); /** - * Gets information about a HorizonDB firewall rule. + * Gets information about a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB firewall rule along with {@link Response}. + * @return information about a HorizonDB pool firewall rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String clusterName, String poolName, + Response getWithResponse(String resourceGroupName, String clusterName, String poolName, String firewallRuleName, Context context); /** - * Gets information about a HorizonDB firewall rule. + * Gets information about a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB firewall rule. + * @return information about a HorizonDB pool firewall rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - HorizonDbFirewallRuleInner get(String resourceGroupName, String clusterName, String poolName, - String firewallRuleName); + FirewallRuleInner get(String resourceGroupName, String clusterName, String poolName, String firewallRuleName); /** * Lists all HorizonDB firewall rules in a pool. @@ -97,10 +96,10 @@ HorizonDbFirewallRuleInner get(String resourceGroupName, String clusterName, 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 response of a HorizonDbFirewallRule list operation as paginated response with {@link PagedFlux}. + * @return the response of a FirewallRule list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String clusterName, String poolName); + PagedFlux listAsync(String resourceGroupName, String clusterName, String poolName); /** * Lists all HorizonDB firewall rules in a pool. @@ -111,10 +110,10 @@ HorizonDbFirewallRuleInner get(String resourceGroupName, String clusterName, 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 response of a HorizonDbFirewallRule list operation as paginated response with {@link PagedIterable}. + * @return the response of a FirewallRule list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String clusterName, String poolName); + PagedIterable list(String resourceGroupName, String clusterName, String poolName); /** * Lists all HorizonDB firewall rules in a pool. @@ -126,144 +125,142 @@ HorizonDbFirewallRuleInner get(String resourceGroupName, String clusterName, 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 response of a HorizonDbFirewallRule list operation as paginated response with {@link PagedIterable}. + * @return the response of a FirewallRule list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String clusterName, String poolName, + PagedIterable list(String resourceGroupName, String clusterName, String poolName, Context context); /** - * Creates a new HorizonDB firewall rule or updates an existing rule. + * Creates or replaces a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @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 represents the HorizonDB firewall rule along with {@link Response} on successful completion of - * {@link Mono}. + * @return represents a customer-managed firewall rule for a HorizonDB pool along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String clusterName, - String poolName, String firewallRuleName, HorizonDbFirewallRuleInner resource); + Mono>> createOrReplaceWithResponseAsync(String resourceGroupName, String clusterName, + String poolName, String firewallRuleName, FirewallRuleInner resource); /** - * Creates a new HorizonDB firewall rule or updates an existing rule. + * Creates or replaces a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @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 PollerFlux} for polling of represents the HorizonDB firewall rule. + * @return the {@link PollerFlux} for polling of represents a customer-managed firewall rule for a HorizonDB pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, HorizonDbFirewallRuleInner> beginCreateOrUpdateAsync( - String resourceGroupName, String clusterName, String poolName, String firewallRuleName, - HorizonDbFirewallRuleInner resource); + PollerFlux, FirewallRuleInner> beginCreateOrReplaceAsync(String resourceGroupName, + String clusterName, String poolName, String firewallRuleName, FirewallRuleInner resource); /** - * Creates a new HorizonDB firewall rule or updates an existing rule. + * Creates or replaces a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @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 represents the HorizonDB firewall rule. + * @return the {@link SyncPoller} for polling of represents a customer-managed firewall rule for a HorizonDB pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, HorizonDbFirewallRuleInner> beginCreateOrUpdate( - String resourceGroupName, String clusterName, String poolName, String firewallRuleName, - HorizonDbFirewallRuleInner resource); + SyncPoller, FirewallRuleInner> beginCreateOrReplace(String resourceGroupName, + String clusterName, String poolName, String firewallRuleName, FirewallRuleInner resource); /** - * Creates a new HorizonDB firewall rule or updates an existing rule. + * Creates or replaces a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @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 represents the HorizonDB firewall rule. + * @return the {@link SyncPoller} for polling of represents a customer-managed firewall rule for a HorizonDB pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, HorizonDbFirewallRuleInner> beginCreateOrUpdate( - String resourceGroupName, String clusterName, String poolName, String firewallRuleName, - HorizonDbFirewallRuleInner resource, Context context); + SyncPoller, FirewallRuleInner> beginCreateOrReplace(String resourceGroupName, + String clusterName, String poolName, String firewallRuleName, FirewallRuleInner resource, Context context); /** - * Creates a new HorizonDB firewall rule or updates an existing rule. + * Creates or replaces a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @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 represents the HorizonDB firewall rule on successful completion of {@link Mono}. + * @return represents a customer-managed firewall rule for a HorizonDB pool on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String clusterName, String poolName, - String firewallRuleName, HorizonDbFirewallRuleInner resource); + Mono createOrReplaceAsync(String resourceGroupName, String clusterName, String poolName, + String firewallRuleName, FirewallRuleInner resource); /** - * Creates a new HorizonDB firewall rule or updates an existing rule. + * Creates or replaces a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @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 represents the HorizonDB firewall rule. + * @return represents a customer-managed firewall rule for a HorizonDB pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - HorizonDbFirewallRuleInner createOrUpdate(String resourceGroupName, String clusterName, String poolName, - String firewallRuleName, HorizonDbFirewallRuleInner resource); + FirewallRuleInner createOrReplace(String resourceGroupName, String clusterName, String poolName, + String firewallRuleName, FirewallRuleInner resource); /** - * Creates a new HorizonDB firewall rule or updates an existing rule. + * Creates or replaces a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @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 represents the HorizonDB firewall rule. + * @return represents a customer-managed firewall rule for a HorizonDB pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - HorizonDbFirewallRuleInner createOrUpdate(String resourceGroupName, String clusterName, String poolName, - String firewallRuleName, HorizonDbFirewallRuleInner resource, Context context); + FirewallRuleInner createOrReplace(String resourceGroupName, String clusterName, String poolName, + String firewallRuleName, FirewallRuleInner resource, Context context); /** - * Deletes a HorizonDB firewall rule. + * Deletes a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -274,12 +271,12 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam String poolName, String firewallRuleName); /** - * Deletes a HorizonDB firewall rule. + * Deletes a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -290,12 +287,12 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St String firewallRuleName); /** - * Deletes a HorizonDB firewall rule. + * Deletes a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -306,12 +303,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String firewallRuleName); /** - * Deletes a HorizonDB firewall rule. + * Deletes a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -323,12 +320,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String firewallRuleName, Context context); /** - * Deletes a HorizonDB firewall rule. + * Deletes a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -338,12 +335,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Mono deleteAsync(String resourceGroupName, String clusterName, String poolName, String firewallRuleName); /** - * Deletes a HorizonDB firewall rule. + * Deletes a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -352,12 +349,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String clusterName, String poolName, String firewallRuleName); /** - * Deletes a HorizonDB firewall rule. + * Deletes a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbManagementClient.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbManagementClient.java index d1dbaa75d6a4e..1dfe709712e70 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbManagementClient.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbManagementClient.java @@ -54,58 +54,149 @@ public interface HorizonDbManagementClient { OperationsClient getOperations(); /** - * Gets the HorizonDbClustersClient object to access its operations. + * Gets the CapabilitiesClient object to access its operations. * - * @return the HorizonDbClustersClient object. + * @return the CapabilitiesClient object. */ - HorizonDbClustersClient getHorizonDbClusters(); + CapabilitiesClient getCapabilities(); /** - * Gets the HorizonDbPoolsClient object to access its operations. + * Gets the ClustersClient object to access its operations. * - * @return the HorizonDbPoolsClient object. + * @return the ClustersClient object. */ - HorizonDbPoolsClient getHorizonDbPools(); + ClustersClient getClusters(); /** - * Gets the HorizonDbReplicasClient object to access its operations. + * Gets the PoolsClient object to access its operations. * - * @return the HorizonDbReplicasClient object. + * @return the PoolsClient object. */ - HorizonDbReplicasClient getHorizonDbReplicas(); + PoolsClient getPools(); /** - * Gets the HorizonDbFirewallRulesClient object to access its operations. + * Gets the FirewallRulesClient object to access its operations. * - * @return the HorizonDbFirewallRulesClient object. + * @return the FirewallRulesClient object. */ - HorizonDbFirewallRulesClient getHorizonDbFirewallRules(); + FirewallRulesClient getFirewallRules(); /** - * Gets the HorizonDbPrivateEndpointConnectionsClient object to access its operations. + * Gets the PrivateEndpointConnectionsClient object to access its operations. * - * @return the HorizonDbPrivateEndpointConnectionsClient object. + * @return the PrivateEndpointConnectionsClient object. */ - HorizonDbPrivateEndpointConnectionsClient getHorizonDbPrivateEndpointConnections(); + PrivateEndpointConnectionsClient getPrivateEndpointConnections(); /** - * Gets the HorizonDbPrivateLinkResourcesClient object to access its operations. + * Gets the PrivateLinkResourcesClient object to access its operations. * - * @return the HorizonDbPrivateLinkResourcesClient object. + * @return the PrivateLinkResourcesClient object. */ - HorizonDbPrivateLinkResourcesClient getHorizonDbPrivateLinkResources(); + PrivateLinkResourcesClient getPrivateLinkResources(); /** - * Gets the HorizonDbParameterGroupsClient object to access its operations. + * Gets the ParameterGroupsClient object to access its operations. * - * @return the HorizonDbParameterGroupsClient object. + * @return the ParameterGroupsClient object. */ - HorizonDbParameterGroupsClient getHorizonDbParameterGroups(); + ParameterGroupsClient getParameterGroups(); /** - * Gets the HorizonDbAdministratorsClient object to access its operations. + * Gets the DefaultParameterGroupsClient object to access its operations. * - * @return the HorizonDbAdministratorsClient object. + * @return the DefaultParameterGroupsClient object. */ - HorizonDbAdministratorsClient getHorizonDbAdministrators(); + DefaultParameterGroupsClient getDefaultParameterGroups(); + + /** + * Gets the MicrosoftEntraAdministratorsClient object to access its operations. + * + * @return the MicrosoftEntraAdministratorsClient object. + */ + MicrosoftEntraAdministratorsClient getMicrosoftEntraAdministrators(); + + /** + * Gets the AuthenticationsClient object to access its operations. + * + * @return the AuthenticationsClient object. + */ + AuthenticationsClient getAuthentications(); + + /** + * Gets the PasswordAuthenticationsClient object to access its operations. + * + * @return the PasswordAuthenticationsClient object. + */ + PasswordAuthenticationsClient getPasswordAuthentications(); + + /** + * Gets the MicrosoftEntraAuthenticationsClient object to access its operations. + * + * @return the MicrosoftEntraAuthenticationsClient object. + */ + MicrosoftEntraAuthenticationsClient getMicrosoftEntraAuthentications(); + + /** + * Gets the ChangeDataCaptureCapabilitiesClient object to access its operations. + * + * @return the ChangeDataCaptureCapabilitiesClient object. + */ + ChangeDataCaptureCapabilitiesClient getChangeDataCaptureCapabilities(); + + /** + * Gets the ChangeDataCaptureDestinationsClient object to access its operations. + * + * @return the ChangeDataCaptureDestinationsClient object. + */ + ChangeDataCaptureDestinationsClient getChangeDataCaptureDestinations(); + + /** + * Gets the IdentityAssignmentsClient object to access its operations. + * + * @return the IdentityAssignmentsClient object. + */ + IdentityAssignmentsClient getIdentityAssignments(); + + /** + * Gets the ChangeDataCaptureConfigurationsClient object to access its operations. + * + * @return the ChangeDataCaptureConfigurationsClient object. + */ + ChangeDataCaptureConfigurationsClient getChangeDataCaptureConfigurations(); + + /** + * Gets the EndpointsClient object to access its operations. + * + * @return the EndpointsClient object. + */ + EndpointsClient getEndpoints(); + + /** + * Gets the MaintenanceEventsClient object to access its operations. + * + * @return the MaintenanceEventsClient object. + */ + MaintenanceEventsClient getMaintenanceEvents(); + + /** + * Gets the NodesClient object to access its operations. + * + * @return the NodesClient object. + */ + NodesClient getNodes(); + + /** + * Gets the LogCaptureConfigurationsClient object to access its operations. + * + * @return the LogCaptureConfigurationsClient object. + */ + LogCaptureConfigurationsClient getLogCaptureConfigurations(); + + /** + * Gets the LogFilesClient object to access its operations. + * + * @return the LogFilesClient object. + */ + LogFilesClient getLogFiles(); } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/IdentityAssignmentsClient.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/IdentityAssignmentsClient.java new file mode 100644 index 0000000000000..ce44017223bfc --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/IdentityAssignmentsClient.java @@ -0,0 +1,387 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +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.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.horizondb.fluent.models.IdentityAssignmentInner; +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 IdentityAssignmentsClient. + */ +public interface IdentityAssignmentsClient { + /** + * Gets a change data capture identity assignment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a change data capture identity assignment along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String destinationName, String assignmentName); + + /** + * Gets a change data capture identity assignment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a change data capture identity assignment on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String clusterName, String destinationName, + String assignmentName); + + /** + * Gets a change data capture identity assignment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a change data capture identity assignment along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String clusterName, + String destinationName, String assignmentName, Context context); + + /** + * Gets a change data capture identity assignment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a change data capture identity assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + IdentityAssignmentInner get(String resourceGroupName, String clusterName, String destinationName, + String assignmentName); + + /** + * Creates or idempotently replaces a change data capture identity assignment. The identity resource ID is immutable + * and must reference a user-assigned managed identity already attached to the parent cluster. The service also + * validates destination permissions, which are not granted by attaching the identity to the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user-assigned managed identity authorized for a HorizonDB change data capture destination along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createOrReplaceWithResponseAsync(String resourceGroupName, String clusterName, + String destinationName, String assignmentName, IdentityAssignmentInner resource); + + /** + * Creates or idempotently replaces a change data capture identity assignment. The identity resource ID is immutable + * and must reference a user-assigned managed identity already attached to the parent cluster. The service also + * validates destination permissions, which are not granted by attaching the identity to the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @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 PollerFlux} for polling of a user-assigned managed identity authorized for a HorizonDB change + * data capture destination. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, IdentityAssignmentInner> beginCreateOrReplaceAsync( + String resourceGroupName, String clusterName, String destinationName, String assignmentName, + IdentityAssignmentInner resource); + + /** + * Creates or idempotently replaces a change data capture identity assignment. The identity resource ID is immutable + * and must reference a user-assigned managed identity already attached to the parent cluster. The service also + * validates destination permissions, which are not granted by attaching the identity to the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a user-assigned managed identity authorized for a HorizonDB change + * data capture destination. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, IdentityAssignmentInner> beginCreateOrReplace( + String resourceGroupName, String clusterName, String destinationName, String assignmentName, + IdentityAssignmentInner resource); + + /** + * Creates or idempotently replaces a change data capture identity assignment. The identity resource ID is immutable + * and must reference a user-assigned managed identity already attached to the parent cluster. The service also + * validates destination permissions, which are not granted by attaching the identity to the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a user-assigned managed identity authorized for a HorizonDB change + * data capture destination. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, IdentityAssignmentInner> beginCreateOrReplace( + String resourceGroupName, String clusterName, String destinationName, String assignmentName, + IdentityAssignmentInner resource, Context context); + + /** + * Creates or idempotently replaces a change data capture identity assignment. The identity resource ID is immutable + * and must reference a user-assigned managed identity already attached to the parent cluster. The service also + * validates destination permissions, which are not granted by attaching the identity to the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user-assigned managed identity authorized for a HorizonDB change data capture destination on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrReplaceAsync(String resourceGroupName, String clusterName, + String destinationName, String assignmentName, IdentityAssignmentInner resource); + + /** + * Creates or idempotently replaces a change data capture identity assignment. The identity resource ID is immutable + * and must reference a user-assigned managed identity already attached to the parent cluster. The service also + * validates destination permissions, which are not granted by attaching the identity to the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user-assigned managed identity authorized for a HorizonDB change data capture destination. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + IdentityAssignmentInner createOrReplace(String resourceGroupName, String clusterName, String destinationName, + String assignmentName, IdentityAssignmentInner resource); + + /** + * Creates or idempotently replaces a change data capture identity assignment. The identity resource ID is immutable + * and must reference a user-assigned managed identity already attached to the parent cluster. The service also + * validates destination permissions, which are not granted by attaching the identity to the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user-assigned managed identity authorized for a HorizonDB change data capture destination. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + IdentityAssignmentInner createOrReplace(String resourceGroupName, String clusterName, String destinationName, + String assignmentName, IdentityAssignmentInner resource, Context context); + + /** + * Deletes an inactive change data capture identity assignment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String destinationName, String assignmentName); + + /** + * Deletes an inactive change data capture identity assignment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String destinationName, String assignmentName); + + /** + * Deletes an inactive change data capture identity assignment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 destinationName, + String assignmentName); + + /** + * Deletes an inactive change data capture identity assignment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 destinationName, + String assignmentName, Context context); + + /** + * Deletes an inactive change data capture identity assignment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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) + Mono deleteAsync(String resourceGroupName, String clusterName, String destinationName, String assignmentName); + + /** + * Deletes an inactive change data capture identity assignment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 clusterName, String destinationName, String assignmentName); + + /** + * Deletes an inactive change data capture identity assignment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 clusterName, String destinationName, String assignmentName, + Context context); + + /** + * Lists identity assignments for a change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a IdentityAssignment list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String clusterName, String destinationName); + + /** + * Lists identity assignments for a change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a IdentityAssignment list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName, String destinationName); + + /** + * Lists identity assignments for a change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a IdentityAssignment list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName, String destinationName, + Context context); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/LogCaptureConfigurationsClient.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/LogCaptureConfigurationsClient.java new file mode 100644 index 0000000000000..d6af22848a3b3 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/LogCaptureConfigurationsClient.java @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +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.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.horizondb.fluent.models.LogCaptureConfigurationInner; +import com.azure.resourcemanager.horizondb.models.LogCaptureConfigurationForPatchUpdate; +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 LogCaptureConfigurationsClient. + */ +public interface LogCaptureConfigurationsClient { + /** + * Gets a log capture configuration for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logCaptureConfigurationName The name of the LogCaptureConfiguration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a log capture configuration for a HorizonDB cluster along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String logCaptureConfigurationName); + + /** + * Gets a log capture configuration for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logCaptureConfigurationName The name of the LogCaptureConfiguration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a log capture configuration for a HorizonDB cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String clusterName, + String logCaptureConfigurationName); + + /** + * Gets a log capture configuration for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logCaptureConfigurationName The name of the LogCaptureConfiguration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a log capture configuration for a HorizonDB cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String clusterName, + String logCaptureConfigurationName, Context context); + + /** + * Gets a log capture configuration for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logCaptureConfigurationName The name of the LogCaptureConfiguration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a log capture configuration for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LogCaptureConfigurationInner get(String resourceGroupName, String clusterName, String logCaptureConfigurationName); + + /** + * Updates a log capture configuration. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logCaptureConfigurationName The name of the LogCaptureConfiguration. + * @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 a predefined log capture configuration created by the service for a HorizonDB cluster along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, + String logCaptureConfigurationName, LogCaptureConfigurationForPatchUpdate properties); + + /** + * Updates a log capture configuration. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logCaptureConfigurationName The name of the LogCaptureConfiguration. + * @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 PollerFlux} for polling of a predefined log capture configuration created by the service for a + * HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, LogCaptureConfigurationInner> beginUpdateAsync( + String resourceGroupName, String clusterName, String logCaptureConfigurationName, + LogCaptureConfigurationForPatchUpdate properties); + + /** + * Updates a log capture configuration. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logCaptureConfigurationName The name of the LogCaptureConfiguration. + * @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 a predefined log capture configuration created by the service for a + * HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, LogCaptureConfigurationInner> beginUpdate( + String resourceGroupName, String clusterName, String logCaptureConfigurationName, + LogCaptureConfigurationForPatchUpdate properties); + + /** + * Updates a log capture configuration. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logCaptureConfigurationName The name of the LogCaptureConfiguration. + * @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 a predefined log capture configuration created by the service for a + * HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, LogCaptureConfigurationInner> beginUpdate( + String resourceGroupName, String clusterName, String logCaptureConfigurationName, + LogCaptureConfigurationForPatchUpdate properties, Context context); + + /** + * Updates a log capture configuration. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logCaptureConfigurationName The name of the LogCaptureConfiguration. + * @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 a predefined log capture configuration created by the service for a HorizonDB cluster on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateAsync(String resourceGroupName, String clusterName, + String logCaptureConfigurationName, LogCaptureConfigurationForPatchUpdate properties); + + /** + * Updates a log capture configuration. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logCaptureConfigurationName The name of the LogCaptureConfiguration. + * @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 a predefined log capture configuration created by the service for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LogCaptureConfigurationInner update(String resourceGroupName, String clusterName, + String logCaptureConfigurationName, LogCaptureConfigurationForPatchUpdate properties); + + /** + * Updates a log capture configuration. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logCaptureConfigurationName The name of the LogCaptureConfiguration. + * @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 a predefined log capture configuration created by the service for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LogCaptureConfigurationInner update(String resourceGroupName, String clusterName, + String logCaptureConfigurationName, LogCaptureConfigurationForPatchUpdate properties, Context context); + + /** + * Lists the log capture configurations for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 LogCaptureConfiguration list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String clusterName); + + /** + * Lists the log capture configurations for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 LogCaptureConfiguration list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName); + + /** + * Lists the log capture configurations for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 LogCaptureConfiguration list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName, Context context); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/LogFilesClient.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/LogFilesClient.java new file mode 100644 index 0000000000000..347923ab351bd --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/LogFilesClient.java @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.horizondb.fluent.models.LogFileDownloadUrlInner; +import com.azure.resourcemanager.horizondb.fluent.models.LogFileInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in LogFilesClient. + */ +public interface LogFilesClient { + /** + * Gets metadata for a captured HorizonDB log file. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logFileName The name of the LogFile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return metadata for a captured HorizonDB log file along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String clusterName, String logFileName); + + /** + * Gets metadata for a captured HorizonDB log file. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logFileName The name of the LogFile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return metadata for a captured HorizonDB log file on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String clusterName, String logFileName); + + /** + * Gets metadata for a captured HorizonDB log file. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logFileName The name of the LogFile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return metadata for a captured HorizonDB log file along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String clusterName, String logFileName, + Context context); + + /** + * Gets metadata for a captured HorizonDB log file. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logFileName The name of the LogFile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return metadata for a captured HorizonDB log file. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LogFileInner get(String resourceGroupName, String clusterName, String logFileName); + + /** + * Lists captured log files for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 LogFile list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String clusterName); + + /** + * Lists captured log files for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 LogFile list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName); + + /** + * Lists captured log files for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 LogFile list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName, Context context); + + /** + * Gets a short-lived signed URL for downloading a captured log file. The signed URL is returned only by this action + * so routine resource GET and LIST responses do not expose bearer credentials. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logFileName The name of the LogFile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a short-lived signed URL for downloading a captured log file along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> listDownloadUrlsWithResponseAsync(String resourceGroupName, + String clusterName, String logFileName); + + /** + * Gets a short-lived signed URL for downloading a captured log file. The signed URL is returned only by this action + * so routine resource GET and LIST responses do not expose bearer credentials. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logFileName The name of the LogFile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a short-lived signed URL for downloading a captured log file on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono listDownloadUrlsAsync(String resourceGroupName, String clusterName, + String logFileName); + + /** + * Gets a short-lived signed URL for downloading a captured log file. The signed URL is returned only by this action + * so routine resource GET and LIST responses do not expose bearer credentials. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logFileName The name of the LogFile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a short-lived signed URL for downloading a captured log file along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listDownloadUrlsWithResponse(String resourceGroupName, String clusterName, + String logFileName, Context context); + + /** + * Gets a short-lived signed URL for downloading a captured log file. The signed URL is returned only by this action + * so routine resource GET and LIST responses do not expose bearer credentials. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logFileName The name of the LogFile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a short-lived signed URL for downloading a captured log file. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LogFileDownloadUrlInner listDownloadUrls(String resourceGroupName, String clusterName, String logFileName); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/MaintenanceEventsClient.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/MaintenanceEventsClient.java new file mode 100644 index 0000000000000..385d20ccc7e3c --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/MaintenanceEventsClient.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.horizondb.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +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.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.horizondb.fluent.models.MaintenanceEventActionResponseInner; +import com.azure.resourcemanager.horizondb.fluent.models.MaintenanceEventInner; +import com.azure.resourcemanager.horizondb.models.MaintenanceEventRescheduleRequest; +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 MaintenanceEventsClient. + */ +public interface MaintenanceEventsClient { + /** + * Gets information about a maintenance event for a HorizonDB pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a maintenance event for a HorizonDB pool along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String poolName, String maintenanceEventId); + + /** + * Gets information about a maintenance event for a HorizonDB pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a maintenance event for a HorizonDB pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String clusterName, String poolName, + String maintenanceEventId); + + /** + * Gets information about a maintenance event for a HorizonDB pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a maintenance event for a HorizonDB pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String clusterName, String poolName, + String maintenanceEventId, Context context); + + /** + * Gets information about a maintenance event for a HorizonDB pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a maintenance event for a HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MaintenanceEventInner get(String resourceGroupName, String clusterName, String poolName, String maintenanceEventId); + + /** + * Lists maintenance events for a HorizonDB pool. Use the OData $filter query parameter to filter by + * properties/status with the eq and or operators. For example, properties/status eq 'Planned' or properties/status + * eq 'InProgress' returns upcoming events. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param filter The OData filter expression to apply to the list operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceEvent list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String clusterName, String poolName, + String filter); + + /** + * Lists maintenance events for a HorizonDB pool. Use the OData $filter query parameter to filter by + * properties/status with the eq and or operators. For example, properties/status eq 'Planned' or properties/status + * eq 'InProgress' returns upcoming events. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceEvent list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String clusterName, String poolName); + + /** + * Lists maintenance events for a HorizonDB pool. Use the OData $filter query parameter to filter by + * properties/status with the eq and or operators. For example, properties/status eq 'Planned' or properties/status + * eq 'InProgress' returns upcoming events. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceEvent list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName, String poolName); + + /** + * Lists maintenance events for a HorizonDB pool. Use the OData $filter query parameter to filter by + * properties/status with the eq and or operators. For example, properties/status eq 'Planned' or properties/status + * eq 'InProgress' returns upcoming events. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param filter The OData filter expression to apply to the list operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceEvent list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName, String poolName, + String filter, Context context); + + /** + * Reschedules a maintenance event to a new date and time. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @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 from a maintenance event reschedule or apply-now action along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> rescheduleWithResponseAsync(String resourceGroupName, String clusterName, + String poolName, String maintenanceEventId, MaintenanceEventRescheduleRequest body); + + /** + * Reschedules a maintenance event to a new date and time. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @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 PollerFlux} for polling of the response from a maintenance event reschedule or apply-now + * action. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, MaintenanceEventActionResponseInner> + beginRescheduleAsync(String resourceGroupName, String clusterName, String poolName, String maintenanceEventId, + MaintenanceEventRescheduleRequest body); + + /** + * Reschedules a maintenance event to a new date and time. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @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 the response from a maintenance event reschedule or apply-now + * action. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MaintenanceEventActionResponseInner> beginReschedule( + String resourceGroupName, String clusterName, String poolName, String maintenanceEventId, + MaintenanceEventRescheduleRequest body); + + /** + * Reschedules a maintenance event to a new date and time. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @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 the response from a maintenance event reschedule or apply-now + * action. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MaintenanceEventActionResponseInner> beginReschedule( + String resourceGroupName, String clusterName, String poolName, String maintenanceEventId, + MaintenanceEventRescheduleRequest body, Context context); + + /** + * Reschedules a maintenance event to a new date and time. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @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 from a maintenance event reschedule or apply-now action on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono rescheduleAsync(String resourceGroupName, String clusterName, + String poolName, String maintenanceEventId, MaintenanceEventRescheduleRequest body); + + /** + * Reschedules a maintenance event to a new date and time. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @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 from a maintenance event reschedule or apply-now action. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MaintenanceEventActionResponseInner reschedule(String resourceGroupName, String clusterName, String poolName, + String maintenanceEventId, MaintenanceEventRescheduleRequest body); + + /** + * Reschedules a maintenance event to a new date and time. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @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 from a maintenance event reschedule or apply-now action. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MaintenanceEventActionResponseInner reschedule(String resourceGroupName, String clusterName, String poolName, + String maintenanceEventId, MaintenanceEventRescheduleRequest body, Context context); + + /** + * Applies the maintenance event immediately. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from a maintenance event reschedule or apply-now action along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> applyNowWithResponseAsync(String resourceGroupName, String clusterName, + String poolName, String maintenanceEventId); + + /** + * Applies the maintenance event immediately. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the response from a maintenance event reschedule or apply-now + * action. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, MaintenanceEventActionResponseInner> + beginApplyNowAsync(String resourceGroupName, String clusterName, String poolName, String maintenanceEventId); + + /** + * Applies the maintenance event immediately. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the response from a maintenance event reschedule or apply-now + * action. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MaintenanceEventActionResponseInner> + beginApplyNow(String resourceGroupName, String clusterName, String poolName, String maintenanceEventId); + + /** + * Applies the maintenance event immediately. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the response from a maintenance event reschedule or apply-now + * action. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MaintenanceEventActionResponseInner> beginApplyNow( + String resourceGroupName, String clusterName, String poolName, String maintenanceEventId, Context context); + + /** + * Applies the maintenance event immediately. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from a maintenance event reschedule or apply-now action on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono applyNowAsync(String resourceGroupName, String clusterName, + String poolName, String maintenanceEventId); + + /** + * Applies the maintenance event immediately. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from a maintenance event reschedule or apply-now action. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MaintenanceEventActionResponseInner applyNow(String resourceGroupName, String clusterName, String poolName, + String maintenanceEventId); + + /** + * Applies the maintenance event immediately. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from a maintenance event reschedule or apply-now action. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MaintenanceEventActionResponseInner applyNow(String resourceGroupName, String clusterName, String poolName, + String maintenanceEventId, Context context); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbAdministratorsClient.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/MicrosoftEntraAdministratorsClient.java similarity index 59% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbAdministratorsClient.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/MicrosoftEntraAdministratorsClient.java index 89820c0540d30..8070a064f47f4 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbAdministratorsClient.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/MicrosoftEntraAdministratorsClient.java @@ -13,202 +13,231 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbAdministratorInner; -import com.azure.resourcemanager.horizondb.models.HorizonDbAdministratorAdd; +import com.azure.resourcemanager.horizondb.fluent.models.MicrosoftEntraAdministratorInner; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAdministratorAdd; 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 HorizonDbAdministratorsClient. + * An instance of this class provides access to all the operations defined in MicrosoftEntraAdministratorsClient. */ -public interface HorizonDbAdministratorsClient { +public interface MicrosoftEntraAdministratorsClient { /** - * Gets information about a HorizonDB administrator. + * Gets information about a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB administrator along with {@link Response} on successful completion of - * {@link Mono}. + * @return information about a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + Mono> getWithResponseAsync(String resourceGroupName, String clusterName, String objectId); /** - * Gets information about a HorizonDB administrator. + * Gets information about a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB administrator on successful completion of {@link Mono}. + * @return information about a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String clusterName, String objectId); + Mono getAsync(String resourceGroupName, String clusterName, String objectId); /** - * Gets information about a HorizonDB administrator. + * Gets information about a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB administrator along with {@link Response}. + * @return information about a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String clusterName, String objectId, - Context context); + Response getWithResponse(String resourceGroupName, String clusterName, + String objectId, Context context); /** - * Gets information about a HorizonDB administrator. + * Gets information about a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB administrator. + * @return information about a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. */ @ServiceMethod(returns = ReturnType.SINGLE) - HorizonDbAdministratorInner get(String resourceGroupName, String clusterName, String objectId); + MicrosoftEntraAdministratorInner get(String resourceGroupName, String clusterName, String objectId); /** - * Creates a new HorizonDB administrator or updates an existing administrator. + * Creates or replaces a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @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 represents an Entra ID administrator configured on a HorizonDB cluster along with {@link Response} on - * successful completion of {@link Mono}. + * @return represents a PostgreSQL role that is a member of the azure_pg_admin role and is mapped to a Microsoft + * Entra principal along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String clusterName, - String objectId, HorizonDbAdministratorAdd resource); + Mono>> createOrReplaceWithResponseAsync(String resourceGroupName, String clusterName, + String objectId, MicrosoftEntraAdministratorAdd resource); /** - * Creates a new HorizonDB administrator or updates an existing administrator. + * Creates or replaces a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @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 PollerFlux} for polling of represents an Entra ID administrator configured on a HorizonDB - * cluster. + * @return the {@link PollerFlux} for polling of represents a PostgreSQL role that is a member of the azure_pg_admin + * role and is mapped to a Microsoft Entra principal. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, HorizonDbAdministratorInner> beginCreateOrUpdateAsync( - String resourceGroupName, String clusterName, String objectId, HorizonDbAdministratorAdd resource); + PollerFlux, MicrosoftEntraAdministratorInner> + beginCreateOrReplaceAsync(String resourceGroupName, String clusterName, String objectId, + MicrosoftEntraAdministratorAdd resource); /** - * Creates a new HorizonDB administrator or updates an existing administrator. + * Creates or replaces a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @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 represents an Entra ID administrator configured on a HorizonDB - * cluster. + * @return the {@link SyncPoller} for polling of represents a PostgreSQL role that is a member of the azure_pg_admin + * role and is mapped to a Microsoft Entra principal. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, HorizonDbAdministratorInner> beginCreateOrUpdate( - String resourceGroupName, String clusterName, String objectId, HorizonDbAdministratorAdd resource); + SyncPoller, MicrosoftEntraAdministratorInner> beginCreateOrReplace( + String resourceGroupName, String clusterName, String objectId, MicrosoftEntraAdministratorAdd resource); /** - * Creates a new HorizonDB administrator or updates an existing administrator. + * Creates or replaces a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @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 represents an Entra ID administrator configured on a HorizonDB - * cluster. + * @return the {@link SyncPoller} for polling of represents a PostgreSQL role that is a member of the azure_pg_admin + * role and is mapped to a Microsoft Entra principal. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, HorizonDbAdministratorInner> beginCreateOrUpdate( - String resourceGroupName, String clusterName, String objectId, HorizonDbAdministratorAdd resource, + SyncPoller, MicrosoftEntraAdministratorInner> beginCreateOrReplace( + String resourceGroupName, String clusterName, String objectId, MicrosoftEntraAdministratorAdd resource, Context context); /** - * Creates a new HorizonDB administrator or updates an existing administrator. + * Creates or replaces a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @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 represents an Entra ID administrator configured on a HorizonDB cluster on successful completion of - * {@link Mono}. + * @return represents a PostgreSQL role that is a member of the azure_pg_admin role and is mapped to a Microsoft + * Entra principal on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String clusterName, String objectId, - HorizonDbAdministratorAdd resource); + Mono createOrReplaceAsync(String resourceGroupName, String clusterName, + String objectId, MicrosoftEntraAdministratorAdd resource); /** - * Creates a new HorizonDB administrator or updates an existing administrator. + * Creates or replaces a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @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 represents an Entra ID administrator configured on a HorizonDB cluster. + * @return represents a PostgreSQL role that is a member of the azure_pg_admin role and is mapped to a Microsoft + * Entra principal. */ @ServiceMethod(returns = ReturnType.SINGLE) - HorizonDbAdministratorInner createOrUpdate(String resourceGroupName, String clusterName, String objectId, - HorizonDbAdministratorAdd resource); + MicrosoftEntraAdministratorInner createOrReplace(String resourceGroupName, String clusterName, String objectId, + MicrosoftEntraAdministratorAdd resource); /** - * Creates a new HorizonDB administrator or updates an existing administrator. + * Creates or replaces a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @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 represents an Entra ID administrator configured on a HorizonDB cluster. + * @return represents a PostgreSQL role that is a member of the azure_pg_admin role and is mapped to a Microsoft + * Entra principal. */ @ServiceMethod(returns = ReturnType.SINGLE) - HorizonDbAdministratorInner createOrUpdate(String resourceGroupName, String clusterName, String objectId, - HorizonDbAdministratorAdd resource, Context context); + MicrosoftEntraAdministratorInner createOrReplace(String resourceGroupName, String clusterName, String objectId, + MicrosoftEntraAdministratorAdd resource, Context context); /** - * Deletes a HorizonDB administrator. + * Deletes a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -219,11 +248,12 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam String objectId); /** - * Deletes a HorizonDB administrator. + * Deletes a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -233,11 +263,12 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, String objectId); /** - * Deletes a HorizonDB administrator. + * Deletes a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -247,11 +278,12 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String objectId); /** - * Deletes a HorizonDB administrator. + * Deletes a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -263,11 +295,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Context context); /** - * Deletes a HorizonDB administrator. + * Deletes a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -277,11 +310,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Mono deleteAsync(String resourceGroupName, String clusterName, String objectId); /** - * Deletes a HorizonDB administrator. + * Deletes a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -290,11 +324,12 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String clusterName, String objectId); /** - * Deletes a HorizonDB administrator. + * Deletes a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -304,33 +339,38 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String clusterName, String objectId, Context context); /** - * Lists all HorizonDB administrators in a cluster. + * Lists the PostgreSQL roles in a cluster that are members of azure_pg_admin and mapped to Microsoft Entra + * principals. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB 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 HorizonDbAdministrator list operation as paginated response with {@link PagedFlux}. + * @return the response of a MicrosoftEntraAdministrator list operation as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String clusterName); + PagedFlux listAsync(String resourceGroupName, String clusterName); /** - * Lists all HorizonDB administrators in a cluster. + * Lists the PostgreSQL roles in a cluster that are members of azure_pg_admin and mapped to Microsoft Entra + * principals. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB 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 HorizonDbAdministrator list operation as paginated response with {@link PagedIterable}. + * @return the response of a MicrosoftEntraAdministrator list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String clusterName); + PagedIterable list(String resourceGroupName, String clusterName); /** - * Lists all HorizonDB administrators in a cluster. + * Lists the PostgreSQL roles in a cluster that are members of azure_pg_admin and mapped to Microsoft Entra + * principals. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -338,8 +378,9 @@ 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 response of a HorizonDbAdministrator list operation as paginated response with {@link PagedIterable}. + * @return the response of a MicrosoftEntraAdministrator list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String clusterName, Context context); + PagedIterable list(String resourceGroupName, String clusterName, Context context); } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/MicrosoftEntraAuthenticationsClient.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/MicrosoftEntraAuthenticationsClient.java new file mode 100644 index 0000000000000..8ea6e2379ba85 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/MicrosoftEntraAuthenticationsClient.java @@ -0,0 +1,347 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +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.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.horizondb.fluent.models.MicrosoftEntraAuthenticationInner; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAuthenticationForPatchUpdate; +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 MicrosoftEntraAuthenticationsClient. + */ +public interface MicrosoftEntraAuthenticationsClient { + /** + * Gets the service-created Microsoft Entra authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 service-created Microsoft Entra authentication method along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, + String clusterName); + + /** + * Gets the service-created Microsoft Entra authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 service-created Microsoft Entra authentication method on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String clusterName); + + /** + * Gets the service-created Microsoft Entra authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 service-created Microsoft Entra authentication method along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String clusterName, + Context context); + + /** + * Gets the service-created Microsoft Entra authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 service-created Microsoft Entra authentication method. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MicrosoftEntraAuthenticationInner get(String resourceGroupName, String clusterName); + + /** + * Creates or replaces the service-created Microsoft Entra authentication method. State Enabled enables the feature + * and State Disabled disables it; no additional properties are required. Repeating the same request is idempotent. + * Disabling the feature does not remove or modify database roles or users previously created through the + * MicrosoftEntraAdministrators control-plane API or directly through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created Microsoft Entra authentication method for a HorizonDB cluster along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createOrReplaceWithResponseAsync(String resourceGroupName, String clusterName, + MicrosoftEntraAuthenticationInner resource); + + /** + * Creates or replaces the service-created Microsoft Entra authentication method. State Enabled enables the feature + * and State Disabled disables it; no additional properties are required. Repeating the same request is idempotent. + * Disabling the feature does not remove or modify database roles or users previously created through the + * MicrosoftEntraAdministrators control-plane API or directly through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 PollerFlux} for polling of the service-created Microsoft Entra authentication method for a + * HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, MicrosoftEntraAuthenticationInner> + beginCreateOrReplaceAsync(String resourceGroupName, String clusterName, + MicrosoftEntraAuthenticationInner resource); + + /** + * Creates or replaces the service-created Microsoft Entra authentication method. State Enabled enables the feature + * and State Disabled disables it; no additional properties are required. Repeating the same request is idempotent. + * Disabling the feature does not remove or modify database roles or users previously created through the + * MicrosoftEntraAdministrators control-plane API or directly through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 the service-created Microsoft Entra authentication method for a + * HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MicrosoftEntraAuthenticationInner> + beginCreateOrReplace(String resourceGroupName, String clusterName, MicrosoftEntraAuthenticationInner resource); + + /** + * Creates or replaces the service-created Microsoft Entra authentication method. State Enabled enables the feature + * and State Disabled disables it; no additional properties are required. Repeating the same request is idempotent. + * Disabling the feature does not remove or modify database roles or users previously created through the + * MicrosoftEntraAdministrators control-plane API or directly through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 the service-created Microsoft Entra authentication method for a + * HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MicrosoftEntraAuthenticationInner> beginCreateOrReplace( + String resourceGroupName, String clusterName, MicrosoftEntraAuthenticationInner resource, Context context); + + /** + * Creates or replaces the service-created Microsoft Entra authentication method. State Enabled enables the feature + * and State Disabled disables it; no additional properties are required. Repeating the same request is idempotent. + * Disabling the feature does not remove or modify database roles or users previously created through the + * MicrosoftEntraAdministrators control-plane API or directly through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created Microsoft Entra authentication method for a HorizonDB cluster on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrReplaceAsync(String resourceGroupName, String clusterName, + MicrosoftEntraAuthenticationInner resource); + + /** + * Creates or replaces the service-created Microsoft Entra authentication method. State Enabled enables the feature + * and State Disabled disables it; no additional properties are required. Repeating the same request is idempotent. + * Disabling the feature does not remove or modify database roles or users previously created through the + * MicrosoftEntraAdministrators control-plane API or directly through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created Microsoft Entra authentication method for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MicrosoftEntraAuthenticationInner createOrReplace(String resourceGroupName, String clusterName, + MicrosoftEntraAuthenticationInner resource); + + /** + * Creates or replaces the service-created Microsoft Entra authentication method. State Enabled enables the feature + * and State Disabled disables it; no additional properties are required. Repeating the same request is idempotent. + * Disabling the feature does not remove or modify database roles or users previously created through the + * MicrosoftEntraAdministrators control-plane API or directly through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created Microsoft Entra authentication method for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MicrosoftEntraAuthenticationInner createOrReplace(String resourceGroupName, String clusterName, + MicrosoftEntraAuthenticationInner resource, Context context); + + /** + * Updates the service-created Microsoft Entra authentication method. State Enabled enables the feature and State + * Disabled disables it; no additional properties are required. Disabling the feature does not remove or modify + * database roles or users previously created through the MicrosoftEntraAdministrators control-plane API or directly + * through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created Microsoft Entra authentication method for a HorizonDB cluster along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, + MicrosoftEntraAuthenticationForPatchUpdate properties); + + /** + * Updates the service-created Microsoft Entra authentication method. State Enabled enables the feature and State + * Disabled disables it; no additional properties are required. Disabling the feature does not remove or modify + * database roles or users previously created through the MicrosoftEntraAdministrators control-plane API or directly + * through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 PollerFlux} for polling of the service-created Microsoft Entra authentication method for a + * HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, MicrosoftEntraAuthenticationInner> beginUpdateAsync( + String resourceGroupName, String clusterName, MicrosoftEntraAuthenticationForPatchUpdate properties); + + /** + * Updates the service-created Microsoft Entra authentication method. State Enabled enables the feature and State + * Disabled disables it; no additional properties are required. Disabling the feature does not remove or modify + * database roles or users previously created through the MicrosoftEntraAdministrators control-plane API or directly + * through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 the service-created Microsoft Entra authentication method for a + * HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MicrosoftEntraAuthenticationInner> beginUpdate( + String resourceGroupName, String clusterName, MicrosoftEntraAuthenticationForPatchUpdate properties); + + /** + * Updates the service-created Microsoft Entra authentication method. State Enabled enables the feature and State + * Disabled disables it; no additional properties are required. Disabling the feature does not remove or modify + * database roles or users previously created through the MicrosoftEntraAdministrators control-plane API or directly + * through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 the service-created Microsoft Entra authentication method for a + * HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MicrosoftEntraAuthenticationInner> beginUpdate( + String resourceGroupName, String clusterName, MicrosoftEntraAuthenticationForPatchUpdate properties, + Context context); + + /** + * Updates the service-created Microsoft Entra authentication method. State Enabled enables the feature and State + * Disabled disables it; no additional properties are required. Disabling the feature does not remove or modify + * database roles or users previously created through the MicrosoftEntraAdministrators control-plane API or directly + * through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created Microsoft Entra authentication method for a HorizonDB cluster on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateAsync(String resourceGroupName, String clusterName, + MicrosoftEntraAuthenticationForPatchUpdate properties); + + /** + * Updates the service-created Microsoft Entra authentication method. State Enabled enables the feature and State + * Disabled disables it; no additional properties are required. Disabling the feature does not remove or modify + * database roles or users previously created through the MicrosoftEntraAdministrators control-plane API or directly + * through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created Microsoft Entra authentication method for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MicrosoftEntraAuthenticationInner update(String resourceGroupName, String clusterName, + MicrosoftEntraAuthenticationForPatchUpdate properties); + + /** + * Updates the service-created Microsoft Entra authentication method. State Enabled enables the feature and State + * Disabled disables it; no additional properties are required. Disabling the feature does not remove or modify + * database roles or users previously created through the MicrosoftEntraAdministrators control-plane API or directly + * through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created Microsoft Entra authentication method for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MicrosoftEntraAuthenticationInner update(String resourceGroupName, String clusterName, + MicrosoftEntraAuthenticationForPatchUpdate properties, Context context); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbPoolsClient.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/NodesClient.java similarity index 67% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbPoolsClient.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/NodesClient.java index bc780ad10e252..311ef8cc7d6e7 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbPoolsClient.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/NodesClient.java @@ -10,109 +10,117 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbPoolInner; +import com.azure.resourcemanager.horizondb.fluent.models.NodeInner; import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in HorizonDbPoolsClient. + * An instance of this class provides access to all the operations defined in NodesClient. */ -public interface HorizonDbPoolsClient { +public interface NodesClient { /** - * Gets information about a HorizonDB pool. + * Gets a node allocated to a HorizonDB pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. + * @param nodeName The name of the Node. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB pool along with {@link Response} on successful completion of {@link Mono}. + * @return a node allocated to a HorizonDB pool along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String clusterName, - String poolName); + Mono> getWithResponseAsync(String resourceGroupName, String clusterName, String poolName, + String nodeName); /** - * Gets information about a HorizonDB pool. + * Gets a node allocated to a HorizonDB pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. + * @param nodeName The name of the Node. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB pool on successful completion of {@link Mono}. + * @return a node allocated to a HorizonDB pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String clusterName, String poolName); + Mono getAsync(String resourceGroupName, String clusterName, String poolName, String nodeName); /** - * Gets information about a HorizonDB pool. + * Gets a node allocated to a HorizonDB pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. + * @param nodeName The name of the Node. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB pool along with {@link Response}. + * @return a node allocated to a HorizonDB pool along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String clusterName, String poolName, + Response getWithResponse(String resourceGroupName, String clusterName, String poolName, String nodeName, Context context); /** - * Gets information about a HorizonDB pool. + * Gets a node allocated to a HorizonDB pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. + * @param nodeName The name of the Node. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB pool. + * @return a node allocated to a HorizonDB pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - HorizonDbPoolInner get(String resourceGroupName, String clusterName, String poolName); + NodeInner get(String resourceGroupName, String clusterName, String poolName, String nodeName); /** - * Lists all HorizonDB pools in a cluster. + * Lists the nodes allocated to a HorizonDB pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbPool list operation as paginated response with {@link PagedFlux}. + * @return the response of a Node list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String clusterName); + PagedFlux listAsync(String resourceGroupName, String clusterName, String poolName); /** - * Lists all HorizonDB pools in a cluster. + * Lists the nodes allocated to a HorizonDB pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbPool list operation as paginated response with {@link PagedIterable}. + * @return the response of a Node list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String clusterName); + PagedIterable list(String resourceGroupName, String clusterName, String poolName); /** - * Lists all HorizonDB pools in a cluster. + * Lists the nodes allocated to a HorizonDB pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbPool list operation as paginated response with {@link PagedIterable}. + * @return the response of a Node list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String clusterName, Context context); + PagedIterable list(String resourceGroupName, String clusterName, String poolName, Context context); } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbParameterGroupsClient.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/ParameterGroupsClient.java similarity index 71% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbParameterGroupsClient.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/ParameterGroupsClient.java index dbc815e5c8b8e..c780cbc604023 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbParameterGroupsClient.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/ParameterGroupsClient.java @@ -13,17 +13,17 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbParameterGroupConnectionPropertiesInner; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbParameterGroupInner; -import com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroupForPatchUpdate; +import com.azure.resourcemanager.horizondb.fluent.models.ParameterGroupConnectionPropertiesInner; +import com.azure.resourcemanager.horizondb.fluent.models.ParameterGroupInner; +import com.azure.resourcemanager.horizondb.models.ParameterGroupForPatchUpdate; 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 HorizonDbParameterGroupsClient. + * An instance of this class provides access to all the operations defined in ParameterGroupsClient. */ -public interface HorizonDbParameterGroupsClient { +public interface ParameterGroupsClient { /** * Gets information about a HorizonDB parameter group. * @@ -36,7 +36,7 @@ public interface HorizonDbParameterGroupsClient { * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String parameterGroupName); /** @@ -50,7 +50,7 @@ Mono> getByResourceGroupWithResponseAsync * @return information about a HorizonDB parameter group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByResourceGroupAsync(String resourceGroupName, String parameterGroupName); + Mono getByResourceGroupAsync(String resourceGroupName, String parameterGroupName); /** * Gets information about a HorizonDB parameter group. @@ -64,8 +64,8 @@ Mono> getByResourceGroupWithResponseAsync * @return information about a HorizonDB parameter group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, - String parameterGroupName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String parameterGroupName, + Context context); /** * Gets information about a HorizonDB parameter group. @@ -78,10 +78,10 @@ Response getByResourceGroupWithResponse(String res * @return information about a HorizonDB parameter group. */ @ServiceMethod(returns = ReturnType.SINGLE) - HorizonDbParameterGroupInner getByResourceGroup(String resourceGroupName, String parameterGroupName); + ParameterGroupInner getByResourceGroup(String resourceGroupName, String parameterGroupName); /** - * Creates a new HorizonDB parameter group or updates an existing parameter group. + * Creates a new HorizonDB parameter group or replaces an existing parameter group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -93,11 +93,11 @@ Response getByResourceGroupWithResponse(String res * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String parameterGroupName, HorizonDbParameterGroupInner resource); + Mono>> createOrReplaceWithResponseAsync(String resourceGroupName, + String parameterGroupName, ParameterGroupInner resource); /** - * Creates a new HorizonDB parameter group or updates an existing parameter group. + * Creates a new HorizonDB parameter group or replaces an existing parameter group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -108,11 +108,11 @@ Mono>> createOrUpdateWithResponseAsync(String resource * @return the {@link PollerFlux} for polling of represents the HorizonDB parameter group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, HorizonDbParameterGroupInner> beginCreateOrUpdateAsync( - String resourceGroupName, String parameterGroupName, HorizonDbParameterGroupInner resource); + PollerFlux, ParameterGroupInner> beginCreateOrReplaceAsync(String resourceGroupName, + String parameterGroupName, ParameterGroupInner resource); /** - * Creates a new HorizonDB parameter group or updates an existing parameter group. + * Creates a new HorizonDB parameter group or replaces an existing parameter group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -123,11 +123,11 @@ PollerFlux, HorizonDbParameterGroupInne * @return the {@link SyncPoller} for polling of represents the HorizonDB parameter group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, HorizonDbParameterGroupInner> - beginCreateOrUpdate(String resourceGroupName, String parameterGroupName, HorizonDbParameterGroupInner resource); + SyncPoller, ParameterGroupInner> beginCreateOrReplace(String resourceGroupName, + String parameterGroupName, ParameterGroupInner resource); /** - * Creates a new HorizonDB parameter group or updates an existing parameter group. + * Creates a new HorizonDB parameter group or replaces an existing parameter group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -139,11 +139,11 @@ PollerFlux, HorizonDbParameterGroupInne * @return the {@link SyncPoller} for polling of represents the HorizonDB parameter group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, HorizonDbParameterGroupInner> beginCreateOrUpdate( - String resourceGroupName, String parameterGroupName, HorizonDbParameterGroupInner resource, Context context); + SyncPoller, ParameterGroupInner> beginCreateOrReplace(String resourceGroupName, + String parameterGroupName, ParameterGroupInner resource, Context context); /** - * Creates a new HorizonDB parameter group or updates an existing parameter group. + * Creates a new HorizonDB parameter group or replaces an existing parameter group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -154,11 +154,11 @@ SyncPoller, HorizonDbParameterGroupInne * @return represents the HorizonDB parameter group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String parameterGroupName, - HorizonDbParameterGroupInner resource); + Mono createOrReplaceAsync(String resourceGroupName, String parameterGroupName, + ParameterGroupInner resource); /** - * Creates a new HorizonDB parameter group or updates an existing parameter group. + * Creates a new HorizonDB parameter group or replaces an existing parameter group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -169,11 +169,11 @@ Mono createOrUpdateAsync(String resourceGroupName, * @return represents the HorizonDB parameter group. */ @ServiceMethod(returns = ReturnType.SINGLE) - HorizonDbParameterGroupInner createOrUpdate(String resourceGroupName, String parameterGroupName, - HorizonDbParameterGroupInner resource); + ParameterGroupInner createOrReplace(String resourceGroupName, String parameterGroupName, + ParameterGroupInner resource); /** - * Creates a new HorizonDB parameter group or updates an existing parameter group. + * Creates a new HorizonDB parameter group or replaces an existing parameter group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -185,11 +185,15 @@ HorizonDbParameterGroupInner createOrUpdate(String resourceGroupName, String par * @return represents the HorizonDB parameter group. */ @ServiceMethod(returns = ReturnType.SINGLE) - HorizonDbParameterGroupInner createOrUpdate(String resourceGroupName, String parameterGroupName, - HorizonDbParameterGroupInner resource, Context context); + ParameterGroupInner createOrReplace(String resourceGroupName, String parameterGroupName, + ParameterGroupInner resource, Context context); /** - * Updates an existing HorizonDB parameter group. + * Updates an existing HorizonDB parameter group. Each connected pool's applyMethod setting controls whether dynamic + * parameter changes become effective immediately or remain pending until a customer-initiated pool Restart. Static + * parameter changes always remain pending until a customer-initiated pool Restart. Stop followed by Start and + * scheduled maintenance do not apply pending changes. The operation fails with a conflict while a previous update + * to this parameter group is still being processed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -202,10 +206,14 @@ HorizonDbParameterGroupInner createOrUpdate(String resourceGroupName, String par */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> updateWithResponseAsync(String resourceGroupName, String parameterGroupName, - HorizonDbParameterGroupForPatchUpdate properties); + ParameterGroupForPatchUpdate properties); /** - * Updates an existing HorizonDB parameter group. + * Updates an existing HorizonDB parameter group. Each connected pool's applyMethod setting controls whether dynamic + * parameter changes become effective immediately or remain pending until a customer-initiated pool Restart. Static + * parameter changes always remain pending until a customer-initiated pool Restart. Stop followed by Start and + * scheduled maintenance do not apply pending changes. The operation fails with a conflict while a previous update + * to this parameter group is still being processed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -216,11 +224,15 @@ Mono>> updateWithResponseAsync(String resourceGroupNam * @return the {@link PollerFlux} for polling of represents the HorizonDB parameter group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, HorizonDbParameterGroupInner> beginUpdateAsync( - String resourceGroupName, String parameterGroupName, HorizonDbParameterGroupForPatchUpdate properties); + PollerFlux, ParameterGroupInner> beginUpdateAsync(String resourceGroupName, + String parameterGroupName, ParameterGroupForPatchUpdate properties); /** - * Updates an existing HorizonDB parameter group. + * Updates an existing HorizonDB parameter group. Each connected pool's applyMethod setting controls whether dynamic + * parameter changes become effective immediately or remain pending until a customer-initiated pool Restart. Static + * parameter changes always remain pending until a customer-initiated pool Restart. Stop followed by Start and + * scheduled maintenance do not apply pending changes. The operation fails with a conflict while a previous update + * to this parameter group is still being processed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -231,11 +243,15 @@ PollerFlux, HorizonDbParameterGroupInne * @return the {@link SyncPoller} for polling of represents the HorizonDB parameter group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, HorizonDbParameterGroupInner> beginUpdate( - String resourceGroupName, String parameterGroupName, HorizonDbParameterGroupForPatchUpdate properties); + SyncPoller, ParameterGroupInner> beginUpdate(String resourceGroupName, + String parameterGroupName, ParameterGroupForPatchUpdate properties); /** - * Updates an existing HorizonDB parameter group. + * Updates an existing HorizonDB parameter group. Each connected pool's applyMethod setting controls whether dynamic + * parameter changes become effective immediately or remain pending until a customer-initiated pool Restart. Static + * parameter changes always remain pending until a customer-initiated pool Restart. Stop followed by Start and + * scheduled maintenance do not apply pending changes. The operation fails with a conflict while a previous update + * to this parameter group is still being processed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -247,12 +263,15 @@ SyncPoller, HorizonDbParameterGroupInne * @return the {@link SyncPoller} for polling of represents the HorizonDB parameter group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, HorizonDbParameterGroupInner> beginUpdate( - String resourceGroupName, String parameterGroupName, HorizonDbParameterGroupForPatchUpdate properties, - Context context); + SyncPoller, ParameterGroupInner> beginUpdate(String resourceGroupName, + String parameterGroupName, ParameterGroupForPatchUpdate properties, Context context); /** - * Updates an existing HorizonDB parameter group. + * Updates an existing HorizonDB parameter group. Each connected pool's applyMethod setting controls whether dynamic + * parameter changes become effective immediately or remain pending until a customer-initiated pool Restart. Static + * parameter changes always remain pending until a customer-initiated pool Restart. Stop followed by Start and + * scheduled maintenance do not apply pending changes. The operation fails with a conflict while a previous update + * to this parameter group is still being processed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -263,11 +282,15 @@ SyncPoller, HorizonDbParameterGroupInne * @return represents the HorizonDB parameter group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String parameterGroupName, - HorizonDbParameterGroupForPatchUpdate properties); + Mono updateAsync(String resourceGroupName, String parameterGroupName, + ParameterGroupForPatchUpdate properties); /** - * Updates an existing HorizonDB parameter group. + * Updates an existing HorizonDB parameter group. Each connected pool's applyMethod setting controls whether dynamic + * parameter changes become effective immediately or remain pending until a customer-initiated pool Restart. Static + * parameter changes always remain pending until a customer-initiated pool Restart. Stop followed by Start and + * scheduled maintenance do not apply pending changes. The operation fails with a conflict while a previous update + * to this parameter group is still being processed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -278,11 +301,15 @@ Mono updateAsync(String resourceGroupName, String * @return represents the HorizonDB parameter group. */ @ServiceMethod(returns = ReturnType.SINGLE) - HorizonDbParameterGroupInner update(String resourceGroupName, String parameterGroupName, - HorizonDbParameterGroupForPatchUpdate properties); + ParameterGroupInner update(String resourceGroupName, String parameterGroupName, + ParameterGroupForPatchUpdate properties); /** - * Updates an existing HorizonDB parameter group. + * Updates an existing HorizonDB parameter group. Each connected pool's applyMethod setting controls whether dynamic + * parameter changes become effective immediately or remain pending until a customer-initiated pool Restart. Static + * parameter changes always remain pending until a customer-initiated pool Restart. Stop followed by Start and + * scheduled maintenance do not apply pending changes. The operation fails with a conflict while a previous update + * to this parameter group is still being processed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -294,11 +321,12 @@ HorizonDbParameterGroupInner update(String resourceGroupName, String parameterGr * @return represents the HorizonDB parameter group. */ @ServiceMethod(returns = ReturnType.SINGLE) - HorizonDbParameterGroupInner update(String resourceGroupName, String parameterGroupName, - HorizonDbParameterGroupForPatchUpdate properties, Context context); + ParameterGroupInner update(String resourceGroupName, String parameterGroupName, + ParameterGroupForPatchUpdate properties, Context context); /** - * Deletes a HorizonDB parameter group. + * Deletes a HorizonDB parameter group. Deletion fails with a conflict when the parameter group is associated with + * one or more pools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -311,7 +339,8 @@ HorizonDbParameterGroupInner update(String resourceGroupName, String parameterGr Mono>> deleteWithResponseAsync(String resourceGroupName, String parameterGroupName); /** - * Deletes a HorizonDB parameter group. + * Deletes a HorizonDB parameter group. Deletion fails with a conflict when the parameter group is associated with + * one or more pools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -324,7 +353,8 @@ HorizonDbParameterGroupInner update(String resourceGroupName, String parameterGr PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String parameterGroupName); /** - * Deletes a HorizonDB parameter group. + * Deletes a HorizonDB parameter group. Deletion fails with a conflict when the parameter group is associated with + * one or more pools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -337,7 +367,8 @@ HorizonDbParameterGroupInner update(String resourceGroupName, String parameterGr SyncPoller, Void> beginDelete(String resourceGroupName, String parameterGroupName); /** - * Deletes a HorizonDB parameter group. + * Deletes a HorizonDB parameter group. Deletion fails with a conflict when the parameter group is associated with + * one or more pools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -352,7 +383,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Context context); /** - * Deletes a HorizonDB parameter group. + * Deletes a HorizonDB parameter group. Deletion fails with a conflict when the parameter group is associated with + * one or more pools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -365,7 +397,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Mono deleteAsync(String resourceGroupName, String parameterGroupName); /** - * Deletes a HorizonDB parameter group. + * Deletes a HorizonDB parameter group. Deletion fails with a conflict when the parameter group is associated with + * one or more pools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -377,7 +410,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String parameterGroupName); /** - * Deletes a HorizonDB parameter group. + * Deletes a HorizonDB parameter group. Deletion fails with a conflict when the parameter group is associated with + * one or more pools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -396,10 +430,10 @@ 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 response of a HorizonDbParameterGroup list operation as paginated response with {@link PagedFlux}. + * @return the response of a ParameterGroup list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName); + PagedFlux listByResourceGroupAsync(String resourceGroupName); /** * Lists all HorizonDB parameter groups in a resource group. @@ -408,11 +442,10 @@ 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 response of a HorizonDbParameterGroup list operation as paginated response with - * {@link PagedIterable}. + * @return the response of a ParameterGroup list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); + PagedIterable listByResourceGroup(String resourceGroupName); /** * Lists all HorizonDB parameter groups in a resource group. @@ -422,32 +455,30 @@ 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 response of a HorizonDbParameterGroup list operation as paginated response with - * {@link PagedIterable}. + * @return the response of a ParameterGroup list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** * Lists all HorizonDB parameter groups 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 HorizonDbParameterGroup list operation as paginated response with {@link PagedFlux}. + * @return the response of a ParameterGroup list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(); + PagedFlux listAsync(); /** * Lists all HorizonDB parameter groups 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 HorizonDbParameterGroup list operation as paginated response with - * {@link PagedIterable}. + * @return the response of a ParameterGroup list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + PagedIterable list(); /** * Lists all HorizonDB parameter groups in a subscription. @@ -456,11 +487,10 @@ 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 response of a HorizonDbParameterGroup list operation as paginated response with - * {@link PagedIterable}. + * @return the response of a ParameterGroup list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); + PagedIterable list(Context context); /** * Gets all connections to a parameter group. @@ -473,7 +503,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @return all connections to a parameter group as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listConnectionsAsync(String resourceGroupName, + PagedFlux listConnectionsAsync(String resourceGroupName, String parameterGroupName); /** @@ -487,7 +517,7 @@ PagedFlux listConnectionsAsync * @return all connections to a parameter group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listConnections(String resourceGroupName, + PagedIterable listConnections(String resourceGroupName, String parameterGroupName); /** @@ -502,65 +532,6 @@ PagedIterable listConnections( * @return all connections to a parameter group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listConnections(String resourceGroupName, + PagedIterable listConnections(String resourceGroupName, String parameterGroupName, Context context); - - /** - * Lists parameter groups filtered by version number. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param parameterGroupName The name of the HorizonDB parameter group. - * @param version The version number to filter by. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbParameterGroup list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listVersionsAsync(String resourceGroupName, String parameterGroupName, - Integer version); - - /** - * Lists parameter groups filtered by version number. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param parameterGroupName The name of the HorizonDB parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbParameterGroup list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listVersionsAsync(String resourceGroupName, String parameterGroupName); - - /** - * Lists parameter groups filtered by version number. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param parameterGroupName The name of the HorizonDB parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbParameterGroup list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listVersions(String resourceGroupName, String parameterGroupName); - - /** - * Lists parameter groups filtered by version number. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param parameterGroupName The name of the HorizonDB parameter group. - * @param version The version number to filter by. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbParameterGroup list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listVersions(String resourceGroupName, String parameterGroupName, - Integer version, Context context); } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/PasswordAuthenticationsClient.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/PasswordAuthenticationsClient.java new file mode 100644 index 0000000000000..f03f0e1ac350d --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/PasswordAuthenticationsClient.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.horizondb.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +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.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.horizondb.fluent.models.PasswordAuthenticationInner; +import com.azure.resourcemanager.horizondb.models.PasswordAuthenticationForPatchUpdate; +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 PasswordAuthenticationsClient. + */ +public interface PasswordAuthenticationsClient { + /** + * Gets the service-created PostgreSQL username-and-password authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 service-created PostgreSQL username-and-password authentication method along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String clusterName); + + /** + * Gets the service-created PostgreSQL username-and-password authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 service-created PostgreSQL username-and-password authentication method on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String clusterName); + + /** + * Gets the service-created PostgreSQL username-and-password authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 service-created PostgreSQL username-and-password authentication method along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String clusterName, + Context context); + + /** + * Gets the service-created PostgreSQL username-and-password authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 service-created PostgreSQL username-and-password authentication method. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PasswordAuthenticationInner get(String resourceGroupName, String clusterName); + + /** + * Creates or replaces the service-created PostgreSQL username-and-password authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created PostgreSQL username-and-password authentication method for a HorizonDB cluster along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createOrReplaceWithResponseAsync(String resourceGroupName, String clusterName, + PasswordAuthenticationInner resource); + + /** + * Creates or replaces the service-created PostgreSQL username-and-password authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 PollerFlux} for polling of the service-created PostgreSQL username-and-password authentication + * method for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, PasswordAuthenticationInner> + beginCreateOrReplaceAsync(String resourceGroupName, String clusterName, PasswordAuthenticationInner resource); + + /** + * Creates or replaces the service-created PostgreSQL username-and-password authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 the service-created PostgreSQL username-and-password authentication + * method for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PasswordAuthenticationInner> + beginCreateOrReplace(String resourceGroupName, String clusterName, PasswordAuthenticationInner resource); + + /** + * Creates or replaces the service-created PostgreSQL username-and-password authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 the service-created PostgreSQL username-and-password authentication + * method for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PasswordAuthenticationInner> beginCreateOrReplace( + String resourceGroupName, String clusterName, PasswordAuthenticationInner resource, Context context); + + /** + * Creates or replaces the service-created PostgreSQL username-and-password authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created PostgreSQL username-and-password authentication method for a HorizonDB cluster on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrReplaceAsync(String resourceGroupName, String clusterName, + PasswordAuthenticationInner resource); + + /** + * Creates or replaces the service-created PostgreSQL username-and-password authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created PostgreSQL username-and-password authentication method for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PasswordAuthenticationInner createOrReplace(String resourceGroupName, String clusterName, + PasswordAuthenticationInner resource); + + /** + * Creates or replaces the service-created PostgreSQL username-and-password authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created PostgreSQL username-and-password authentication method for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PasswordAuthenticationInner createOrReplace(String resourceGroupName, String clusterName, + PasswordAuthenticationInner resource, Context context); + + /** + * Updates the service-created PostgreSQL username-and-password authentication method. The request is sparse and + * omitted properties preserve their current values. This API version supports enabling the method, disabling the + * method, and resetting its password. For a cluster that already has an administrator but currently has password + * authentication disabled, state Enabled and administratorLoginPassword can be supplied together to re-enable + * password authentication and reset the password. Disabling cannot include credentials and does not remove or + * modify existing database users or roles. Administrator rename is not supported in this API version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created PostgreSQL username-and-password authentication method for a HorizonDB cluster along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, + PasswordAuthenticationForPatchUpdate properties); + + /** + * Updates the service-created PostgreSQL username-and-password authentication method. The request is sparse and + * omitted properties preserve their current values. This API version supports enabling the method, disabling the + * method, and resetting its password. For a cluster that already has an administrator but currently has password + * authentication disabled, state Enabled and administratorLoginPassword can be supplied together to re-enable + * password authentication and reset the password. Disabling cannot include credentials and does not remove or + * modify existing database users or roles. Administrator rename is not supported in this API version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 PollerFlux} for polling of the service-created PostgreSQL username-and-password authentication + * method for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, PasswordAuthenticationInner> + beginUpdateAsync(String resourceGroupName, String clusterName, PasswordAuthenticationForPatchUpdate properties); + + /** + * Updates the service-created PostgreSQL username-and-password authentication method. The request is sparse and + * omitted properties preserve their current values. This API version supports enabling the method, disabling the + * method, and resetting its password. For a cluster that already has an administrator but currently has password + * authentication disabled, state Enabled and administratorLoginPassword can be supplied together to re-enable + * password authentication and reset the password. Disabling cannot include credentials and does not remove or + * modify existing database users or roles. Administrator rename is not supported in this API version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 the service-created PostgreSQL username-and-password authentication + * method for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PasswordAuthenticationInner> + beginUpdate(String resourceGroupName, String clusterName, PasswordAuthenticationForPatchUpdate properties); + + /** + * Updates the service-created PostgreSQL username-and-password authentication method. The request is sparse and + * omitted properties preserve their current values. This API version supports enabling the method, disabling the + * method, and resetting its password. For a cluster that already has an administrator but currently has password + * authentication disabled, state Enabled and administratorLoginPassword can be supplied together to re-enable + * password authentication and reset the password. Disabling cannot include credentials and does not remove or + * modify existing database users or roles. Administrator rename is not supported in this API version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 the service-created PostgreSQL username-and-password authentication + * method for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PasswordAuthenticationInner> beginUpdate( + String resourceGroupName, String clusterName, PasswordAuthenticationForPatchUpdate properties, Context context); + + /** + * Updates the service-created PostgreSQL username-and-password authentication method. The request is sparse and + * omitted properties preserve their current values. This API version supports enabling the method, disabling the + * method, and resetting its password. For a cluster that already has an administrator but currently has password + * authentication disabled, state Enabled and administratorLoginPassword can be supplied together to re-enable + * password authentication and reset the password. Disabling cannot include credentials and does not remove or + * modify existing database users or roles. Administrator rename is not supported in this API version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created PostgreSQL username-and-password authentication method for a HorizonDB cluster on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateAsync(String resourceGroupName, String clusterName, + PasswordAuthenticationForPatchUpdate properties); + + /** + * Updates the service-created PostgreSQL username-and-password authentication method. The request is sparse and + * omitted properties preserve their current values. This API version supports enabling the method, disabling the + * method, and resetting its password. For a cluster that already has an administrator but currently has password + * authentication disabled, state Enabled and administratorLoginPassword can be supplied together to re-enable + * password authentication and reset the password. Disabling cannot include credentials and does not remove or + * modify existing database users or roles. Administrator rename is not supported in this API version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created PostgreSQL username-and-password authentication method for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PasswordAuthenticationInner update(String resourceGroupName, String clusterName, + PasswordAuthenticationForPatchUpdate properties); + + /** + * Updates the service-created PostgreSQL username-and-password authentication method. The request is sparse and + * omitted properties preserve their current values. This API version supports enabling the method, disabling the + * method, and resetting its password. For a cluster that already has an administrator but currently has password + * authentication disabled, state Enabled and administratorLoginPassword can be supplied together to re-enable + * password authentication and reset the password. Disabling cannot include credentials and does not remove or + * modify existing database users or roles. Administrator rename is not supported in this API version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created PostgreSQL username-and-password authentication method for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PasswordAuthenticationInner update(String resourceGroupName, String clusterName, + PasswordAuthenticationForPatchUpdate properties, Context context); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/PoolsClient.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/PoolsClient.java new file mode 100644 index 0000000000000..1e83b47fcaead --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/PoolsClient.java @@ -0,0 +1,1201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +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.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.horizondb.fluent.models.PoolInner; +import com.azure.resourcemanager.horizondb.models.PoolForPatchUpdate; +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 PoolsClient. + */ +public interface PoolsClient { + /** + * Gets information about a HorizonDB pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a HorizonDB pool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String clusterName, String poolName); + + /** + * Gets information about a HorizonDB pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a HorizonDB pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String clusterName, String poolName); + + /** + * Gets information about a HorizonDB pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a HorizonDB pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String clusterName, String poolName, Context context); + + /** + * Gets information about a HorizonDB pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PoolInner get(String resourceGroupName, String clusterName, String poolName); + + /** + * Creates a new HorizonDB pool or replaces an existing pool, including its node allocation, compute model, + * high-availability configuration, or associated parameter group. nodeCount and highAvailability.mode are required + * and have no service defaults. nodeCount must be 1 through 16. Disabled is valid only when nodeCount is 1. AnyZone + * and ZoneRedundant are valid only when nodeCount is 2 through 16. AnyZone permits same-zone or cross-zone + * placement, while ZoneRedundant requires nodes to be allocated across availability zones. Node allocation and + * high-availability reconfiguration are atomic: if all requested nodes or the required zonal topology cannot be + * provisioned, the long-running operation fails and the previous resource state is preserved. A pool name must + * differ from its parent cluster name because the Cluster-scoped ReadWrite Endpoint is named after the Cluster and + * the Pool-scoped ReadOnly Endpoint is named after the Pool; the service rejects a request whose names would + * collide. Creating a pool also creates exactly one service-managed Pool-scoped ReadOnly Endpoint representing that + * Pool and its network boundary. The Endpoint's associatedResourceId identifies the Pool, and the Endpoint cannot + * outlive or be deleted independently from it. When the first pool is created, the service automatically designates + * it to host the cluster's read-write node when an eligible node is available. A Cluster must contain at least one + * Pool before a private endpoint connection can be created or approved. This API version supports at most one pool + * per cluster; an attempt to create another pool is rejected with 409 Conflict. parameterGroup, + * parameterGroupResourceId, and applyMethod are required. When creating a new pool in this API version, + * parameterGroupResourceId must identify the corresponding default parameter group; a customer-created parameter + * group is rejected. When replacing an existing pool, the request can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated before the resource is changed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 represents the HorizonDB pool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createOrReplaceWithResponseAsync(String resourceGroupName, String clusterName, + String poolName, PoolInner resource); + + /** + * Creates a new HorizonDB pool or replaces an existing pool, including its node allocation, compute model, + * high-availability configuration, or associated parameter group. nodeCount and highAvailability.mode are required + * and have no service defaults. nodeCount must be 1 through 16. Disabled is valid only when nodeCount is 1. AnyZone + * and ZoneRedundant are valid only when nodeCount is 2 through 16. AnyZone permits same-zone or cross-zone + * placement, while ZoneRedundant requires nodes to be allocated across availability zones. Node allocation and + * high-availability reconfiguration are atomic: if all requested nodes or the required zonal topology cannot be + * provisioned, the long-running operation fails and the previous resource state is preserved. A pool name must + * differ from its parent cluster name because the Cluster-scoped ReadWrite Endpoint is named after the Cluster and + * the Pool-scoped ReadOnly Endpoint is named after the Pool; the service rejects a request whose names would + * collide. Creating a pool also creates exactly one service-managed Pool-scoped ReadOnly Endpoint representing that + * Pool and its network boundary. The Endpoint's associatedResourceId identifies the Pool, and the Endpoint cannot + * outlive or be deleted independently from it. When the first pool is created, the service automatically designates + * it to host the cluster's read-write node when an eligible node is available. A Cluster must contain at least one + * Pool before a private endpoint connection can be created or approved. This API version supports at most one pool + * per cluster; an attempt to create another pool is rejected with 409 Conflict. parameterGroup, + * parameterGroupResourceId, and applyMethod are required. When creating a new pool in this API version, + * parameterGroupResourceId must identify the corresponding default parameter group; a customer-created parameter + * group is rejected. When replacing an existing pool, the request can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated before the resource is changed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 PollerFlux} for polling of represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, PoolInner> beginCreateOrReplaceAsync(String resourceGroupName, String clusterName, + String poolName, PoolInner resource); + + /** + * Creates a new HorizonDB pool or replaces an existing pool, including its node allocation, compute model, + * high-availability configuration, or associated parameter group. nodeCount and highAvailability.mode are required + * and have no service defaults. nodeCount must be 1 through 16. Disabled is valid only when nodeCount is 1. AnyZone + * and ZoneRedundant are valid only when nodeCount is 2 through 16. AnyZone permits same-zone or cross-zone + * placement, while ZoneRedundant requires nodes to be allocated across availability zones. Node allocation and + * high-availability reconfiguration are atomic: if all requested nodes or the required zonal topology cannot be + * provisioned, the long-running operation fails and the previous resource state is preserved. A pool name must + * differ from its parent cluster name because the Cluster-scoped ReadWrite Endpoint is named after the Cluster and + * the Pool-scoped ReadOnly Endpoint is named after the Pool; the service rejects a request whose names would + * collide. Creating a pool also creates exactly one service-managed Pool-scoped ReadOnly Endpoint representing that + * Pool and its network boundary. The Endpoint's associatedResourceId identifies the Pool, and the Endpoint cannot + * outlive or be deleted independently from it. When the first pool is created, the service automatically designates + * it to host the cluster's read-write node when an eligible node is available. A Cluster must contain at least one + * Pool before a private endpoint connection can be created or approved. This API version supports at most one pool + * per cluster; an attempt to create another pool is rejected with 409 Conflict. parameterGroup, + * parameterGroupResourceId, and applyMethod are required. When creating a new pool in this API version, + * parameterGroupResourceId must identify the corresponding default parameter group; a customer-created parameter + * group is rejected. When replacing an existing pool, the request can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated before the resource is changed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PoolInner> beginCreateOrReplace(String resourceGroupName, String clusterName, + String poolName, PoolInner resource); + + /** + * Creates a new HorizonDB pool or replaces an existing pool, including its node allocation, compute model, + * high-availability configuration, or associated parameter group. nodeCount and highAvailability.mode are required + * and have no service defaults. nodeCount must be 1 through 16. Disabled is valid only when nodeCount is 1. AnyZone + * and ZoneRedundant are valid only when nodeCount is 2 through 16. AnyZone permits same-zone or cross-zone + * placement, while ZoneRedundant requires nodes to be allocated across availability zones. Node allocation and + * high-availability reconfiguration are atomic: if all requested nodes or the required zonal topology cannot be + * provisioned, the long-running operation fails and the previous resource state is preserved. A pool name must + * differ from its parent cluster name because the Cluster-scoped ReadWrite Endpoint is named after the Cluster and + * the Pool-scoped ReadOnly Endpoint is named after the Pool; the service rejects a request whose names would + * collide. Creating a pool also creates exactly one service-managed Pool-scoped ReadOnly Endpoint representing that + * Pool and its network boundary. The Endpoint's associatedResourceId identifies the Pool, and the Endpoint cannot + * outlive or be deleted independently from it. When the first pool is created, the service automatically designates + * it to host the cluster's read-write node when an eligible node is available. A Cluster must contain at least one + * Pool before a private endpoint connection can be created or approved. This API version supports at most one pool + * per cluster; an attempt to create another pool is rejected with 409 Conflict. parameterGroup, + * parameterGroupResourceId, and applyMethod are required. When creating a new pool in this API version, + * parameterGroupResourceId must identify the corresponding default parameter group; a customer-created parameter + * group is rejected. When replacing an existing pool, the request can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated before the resource is changed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PoolInner> beginCreateOrReplace(String resourceGroupName, String clusterName, + String poolName, PoolInner resource, Context context); + + /** + * Creates a new HorizonDB pool or replaces an existing pool, including its node allocation, compute model, + * high-availability configuration, or associated parameter group. nodeCount and highAvailability.mode are required + * and have no service defaults. nodeCount must be 1 through 16. Disabled is valid only when nodeCount is 1. AnyZone + * and ZoneRedundant are valid only when nodeCount is 2 through 16. AnyZone permits same-zone or cross-zone + * placement, while ZoneRedundant requires nodes to be allocated across availability zones. Node allocation and + * high-availability reconfiguration are atomic: if all requested nodes or the required zonal topology cannot be + * provisioned, the long-running operation fails and the previous resource state is preserved. A pool name must + * differ from its parent cluster name because the Cluster-scoped ReadWrite Endpoint is named after the Cluster and + * the Pool-scoped ReadOnly Endpoint is named after the Pool; the service rejects a request whose names would + * collide. Creating a pool also creates exactly one service-managed Pool-scoped ReadOnly Endpoint representing that + * Pool and its network boundary. The Endpoint's associatedResourceId identifies the Pool, and the Endpoint cannot + * outlive or be deleted independently from it. When the first pool is created, the service automatically designates + * it to host the cluster's read-write node when an eligible node is available. A Cluster must contain at least one + * Pool before a private endpoint connection can be created or approved. This API version supports at most one pool + * per cluster; an attempt to create another pool is rejected with 409 Conflict. parameterGroup, + * parameterGroupResourceId, and applyMethod are required. When creating a new pool in this API version, + * parameterGroupResourceId must identify the corresponding default parameter group; a customer-created parameter + * group is rejected. When replacing an existing pool, the request can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated before the resource is changed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 represents the HorizonDB pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrReplaceAsync(String resourceGroupName, String clusterName, String poolName, + PoolInner resource); + + /** + * Creates a new HorizonDB pool or replaces an existing pool, including its node allocation, compute model, + * high-availability configuration, or associated parameter group. nodeCount and highAvailability.mode are required + * and have no service defaults. nodeCount must be 1 through 16. Disabled is valid only when nodeCount is 1. AnyZone + * and ZoneRedundant are valid only when nodeCount is 2 through 16. AnyZone permits same-zone or cross-zone + * placement, while ZoneRedundant requires nodes to be allocated across availability zones. Node allocation and + * high-availability reconfiguration are atomic: if all requested nodes or the required zonal topology cannot be + * provisioned, the long-running operation fails and the previous resource state is preserved. A pool name must + * differ from its parent cluster name because the Cluster-scoped ReadWrite Endpoint is named after the Cluster and + * the Pool-scoped ReadOnly Endpoint is named after the Pool; the service rejects a request whose names would + * collide. Creating a pool also creates exactly one service-managed Pool-scoped ReadOnly Endpoint representing that + * Pool and its network boundary. The Endpoint's associatedResourceId identifies the Pool, and the Endpoint cannot + * outlive or be deleted independently from it. When the first pool is created, the service automatically designates + * it to host the cluster's read-write node when an eligible node is available. A Cluster must contain at least one + * Pool before a private endpoint connection can be created or approved. This API version supports at most one pool + * per cluster; an attempt to create another pool is rejected with 409 Conflict. parameterGroup, + * parameterGroupResourceId, and applyMethod are required. When creating a new pool in this API version, + * parameterGroupResourceId must identify the corresponding default parameter group; a customer-created parameter + * group is rejected. When replacing an existing pool, the request can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated before the resource is changed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PoolInner createOrReplace(String resourceGroupName, String clusterName, String poolName, PoolInner resource); + + /** + * Creates a new HorizonDB pool or replaces an existing pool, including its node allocation, compute model, + * high-availability configuration, or associated parameter group. nodeCount and highAvailability.mode are required + * and have no service defaults. nodeCount must be 1 through 16. Disabled is valid only when nodeCount is 1. AnyZone + * and ZoneRedundant are valid only when nodeCount is 2 through 16. AnyZone permits same-zone or cross-zone + * placement, while ZoneRedundant requires nodes to be allocated across availability zones. Node allocation and + * high-availability reconfiguration are atomic: if all requested nodes or the required zonal topology cannot be + * provisioned, the long-running operation fails and the previous resource state is preserved. A pool name must + * differ from its parent cluster name because the Cluster-scoped ReadWrite Endpoint is named after the Cluster and + * the Pool-scoped ReadOnly Endpoint is named after the Pool; the service rejects a request whose names would + * collide. Creating a pool also creates exactly one service-managed Pool-scoped ReadOnly Endpoint representing that + * Pool and its network boundary. The Endpoint's associatedResourceId identifies the Pool, and the Endpoint cannot + * outlive or be deleted independently from it. When the first pool is created, the service automatically designates + * it to host the cluster's read-write node when an eligible node is available. A Cluster must contain at least one + * Pool before a private endpoint connection can be created or approved. This API version supports at most one pool + * per cluster; an attempt to create another pool is rejected with 409 Conflict. parameterGroup, + * parameterGroupResourceId, and applyMethod are required. When creating a new pool in this API version, + * parameterGroupResourceId must identify the corresponding default parameter group; a customer-created parameter + * group is rejected. When replacing an existing pool, the request can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated before the resource is changed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PoolInner createOrReplace(String resourceGroupName, String clusterName, String poolName, PoolInner resource, + Context context); + + /** + * Updates an existing HorizonDB pool, including its node allocation, selected compute model properties, compute + * model type, high-availability configuration, or associated parameter group. Omitted nodeCount and + * highAvailability.mode values preserve their existing values; the service recursively merges the PATCH before + * atomically validating the effective tuple. nodeCount, when supplied, must be 1 through 16. Disabled is valid only + * when the effective nodeCount is 1. AnyZone and ZoneRedundant are valid only when the effective nodeCount is 2 + * through 16. Therefore, crossing between those node-count ranges requires nodeCount and highAvailability.mode to + * be changed together. AnyZone permits same-zone or cross-zone placement. Changing from AnyZone to ZoneRedundant + * may allocate a replacement node in another availability zone and replace a read-only node, disconnecting + * connections to the replaced node. If all requested nodes or the required zonal topology cannot be provisioned, + * the long-running operation fails and the previous resource state is preserved. To deallocate runtime compute + * without changing the configured nodeCount, use the Pool stop action. When parameterGroup is supplied, both + * parameterGroupResourceId and applyMethod are required. The pool can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated against the recursively merged configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 represents the HorizonDB pool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, + String poolName, PoolForPatchUpdate properties); + + /** + * Updates an existing HorizonDB pool, including its node allocation, selected compute model properties, compute + * model type, high-availability configuration, or associated parameter group. Omitted nodeCount and + * highAvailability.mode values preserve their existing values; the service recursively merges the PATCH before + * atomically validating the effective tuple. nodeCount, when supplied, must be 1 through 16. Disabled is valid only + * when the effective nodeCount is 1. AnyZone and ZoneRedundant are valid only when the effective nodeCount is 2 + * through 16. Therefore, crossing between those node-count ranges requires nodeCount and highAvailability.mode to + * be changed together. AnyZone permits same-zone or cross-zone placement. Changing from AnyZone to ZoneRedundant + * may allocate a replacement node in another availability zone and replace a read-only node, disconnecting + * connections to the replaced node. If all requested nodes or the required zonal topology cannot be provisioned, + * the long-running operation fails and the previous resource state is preserved. To deallocate runtime compute + * without changing the configured nodeCount, use the Pool stop action. When parameterGroup is supplied, both + * parameterGroupResourceId and applyMethod are required. The pool can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated against the recursively merged configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 PollerFlux} for polling of represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, PoolInner> beginUpdateAsync(String resourceGroupName, String clusterName, + String poolName, PoolForPatchUpdate properties); + + /** + * Updates an existing HorizonDB pool, including its node allocation, selected compute model properties, compute + * model type, high-availability configuration, or associated parameter group. Omitted nodeCount and + * highAvailability.mode values preserve their existing values; the service recursively merges the PATCH before + * atomically validating the effective tuple. nodeCount, when supplied, must be 1 through 16. Disabled is valid only + * when the effective nodeCount is 1. AnyZone and ZoneRedundant are valid only when the effective nodeCount is 2 + * through 16. Therefore, crossing between those node-count ranges requires nodeCount and highAvailability.mode to + * be changed together. AnyZone permits same-zone or cross-zone placement. Changing from AnyZone to ZoneRedundant + * may allocate a replacement node in another availability zone and replace a read-only node, disconnecting + * connections to the replaced node. If all requested nodes or the required zonal topology cannot be provisioned, + * the long-running operation fails and the previous resource state is preserved. To deallocate runtime compute + * without changing the configured nodeCount, use the Pool stop action. When parameterGroup is supplied, both + * parameterGroupResourceId and applyMethod are required. The pool can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated against the recursively merged configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PoolInner> beginUpdate(String resourceGroupName, String clusterName, + String poolName, PoolForPatchUpdate properties); + + /** + * Updates an existing HorizonDB pool, including its node allocation, selected compute model properties, compute + * model type, high-availability configuration, or associated parameter group. Omitted nodeCount and + * highAvailability.mode values preserve their existing values; the service recursively merges the PATCH before + * atomically validating the effective tuple. nodeCount, when supplied, must be 1 through 16. Disabled is valid only + * when the effective nodeCount is 1. AnyZone and ZoneRedundant are valid only when the effective nodeCount is 2 + * through 16. Therefore, crossing between those node-count ranges requires nodeCount and highAvailability.mode to + * be changed together. AnyZone permits same-zone or cross-zone placement. Changing from AnyZone to ZoneRedundant + * may allocate a replacement node in another availability zone and replace a read-only node, disconnecting + * connections to the replaced node. If all requested nodes or the required zonal topology cannot be provisioned, + * the long-running operation fails and the previous resource state is preserved. To deallocate runtime compute + * without changing the configured nodeCount, use the Pool stop action. When parameterGroup is supplied, both + * parameterGroupResourceId and applyMethod are required. The pool can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated against the recursively merged configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PoolInner> beginUpdate(String resourceGroupName, String clusterName, + String poolName, PoolForPatchUpdate properties, Context context); + + /** + * Updates an existing HorizonDB pool, including its node allocation, selected compute model properties, compute + * model type, high-availability configuration, or associated parameter group. Omitted nodeCount and + * highAvailability.mode values preserve their existing values; the service recursively merges the PATCH before + * atomically validating the effective tuple. nodeCount, when supplied, must be 1 through 16. Disabled is valid only + * when the effective nodeCount is 1. AnyZone and ZoneRedundant are valid only when the effective nodeCount is 2 + * through 16. Therefore, crossing between those node-count ranges requires nodeCount and highAvailability.mode to + * be changed together. AnyZone permits same-zone or cross-zone placement. Changing from AnyZone to ZoneRedundant + * may allocate a replacement node in another availability zone and replace a read-only node, disconnecting + * connections to the replaced node. If all requested nodes or the required zonal topology cannot be provisioned, + * the long-running operation fails and the previous resource state is preserved. To deallocate runtime compute + * without changing the configured nodeCount, use the Pool stop action. When parameterGroup is supplied, both + * parameterGroupResourceId and applyMethod are required. The pool can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated against the recursively merged configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 represents the HorizonDB pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateAsync(String resourceGroupName, String clusterName, String poolName, + PoolForPatchUpdate properties); + + /** + * Updates an existing HorizonDB pool, including its node allocation, selected compute model properties, compute + * model type, high-availability configuration, or associated parameter group. Omitted nodeCount and + * highAvailability.mode values preserve their existing values; the service recursively merges the PATCH before + * atomically validating the effective tuple. nodeCount, when supplied, must be 1 through 16. Disabled is valid only + * when the effective nodeCount is 1. AnyZone and ZoneRedundant are valid only when the effective nodeCount is 2 + * through 16. Therefore, crossing between those node-count ranges requires nodeCount and highAvailability.mode to + * be changed together. AnyZone permits same-zone or cross-zone placement. Changing from AnyZone to ZoneRedundant + * may allocate a replacement node in another availability zone and replace a read-only node, disconnecting + * connections to the replaced node. If all requested nodes or the required zonal topology cannot be provisioned, + * the long-running operation fails and the previous resource state is preserved. To deallocate runtime compute + * without changing the configured nodeCount, use the Pool stop action. When parameterGroup is supplied, both + * parameterGroupResourceId and applyMethod are required. The pool can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated against the recursively merged configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PoolInner update(String resourceGroupName, String clusterName, String poolName, PoolForPatchUpdate properties); + + /** + * Updates an existing HorizonDB pool, including its node allocation, selected compute model properties, compute + * model type, high-availability configuration, or associated parameter group. Omitted nodeCount and + * highAvailability.mode values preserve their existing values; the service recursively merges the PATCH before + * atomically validating the effective tuple. nodeCount, when supplied, must be 1 through 16. Disabled is valid only + * when the effective nodeCount is 1. AnyZone and ZoneRedundant are valid only when the effective nodeCount is 2 + * through 16. Therefore, crossing between those node-count ranges requires nodeCount and highAvailability.mode to + * be changed together. AnyZone permits same-zone or cross-zone placement. Changing from AnyZone to ZoneRedundant + * may allocate a replacement node in another availability zone and replace a read-only node, disconnecting + * connections to the replaced node. If all requested nodes or the required zonal topology cannot be provisioned, + * the long-running operation fails and the previous resource state is preserved. To deallocate runtime compute + * without changing the configured nodeCount, use the Pool stop action. When parameterGroup is supplied, both + * parameterGroupResourceId and applyMethod are required. The pool can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated against the recursively merged configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PoolInner update(String resourceGroupName, String clusterName, String poolName, PoolForPatchUpdate properties, + Context context); + + /** + * Deletes a HorizonDB pool together with the Pool-scoped Endpoint whose associatedResourceId identifies that Pool + * and all FirewallRule children of that Endpoint. The Endpoint cannot outlive or be deleted independently from its + * Pool. When this is the Cluster's last surviving Pool, the service also disconnects every existing private + * endpoint connection associated with the Cluster by setting its privateLinkServiceConnectionState.status to + * Rejected and providing a description that the last Pool was deleted. The HorizonDB private endpoint connection + * resources remain available for inspection and cleanup, and customer-owned Microsoft.Network/privateEndpoints + * resources are not deleted. The delete long-running operation completes only after all required private endpoint + * disconnections have completed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String poolName); + + /** + * Deletes a HorizonDB pool together with the Pool-scoped Endpoint whose associatedResourceId identifies that Pool + * and all FirewallRule children of that Endpoint. The Endpoint cannot outlive or be deleted independently from its + * Pool. When this is the Cluster's last surviving Pool, the service also disconnects every existing private + * endpoint connection associated with the Cluster by setting its privateLinkServiceConnectionState.status to + * Rejected and providing a description that the last Pool was deleted. The HorizonDB private endpoint connection + * resources remain available for inspection and cleanup, and customer-owned Microsoft.Network/privateEndpoints + * resources are not deleted. The delete long-running operation completes only after all required private endpoint + * disconnections have completed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, String poolName); + + /** + * Deletes a HorizonDB pool together with the Pool-scoped Endpoint whose associatedResourceId identifies that Pool + * and all FirewallRule children of that Endpoint. The Endpoint cannot outlive or be deleted independently from its + * Pool. When this is the Cluster's last surviving Pool, the service also disconnects every existing private + * endpoint connection associated with the Cluster by setting its privateLinkServiceConnectionState.status to + * Rejected and providing a description that the last Pool was deleted. The HorizonDB private endpoint connection + * resources remain available for inspection and cleanup, and customer-owned Microsoft.Network/privateEndpoints + * resources are not deleted. The delete long-running operation completes only after all required private endpoint + * disconnections have completed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 poolName); + + /** + * Deletes a HorizonDB pool together with the Pool-scoped Endpoint whose associatedResourceId identifies that Pool + * and all FirewallRule children of that Endpoint. The Endpoint cannot outlive or be deleted independently from its + * Pool. When this is the Cluster's last surviving Pool, the service also disconnects every existing private + * endpoint connection associated with the Cluster by setting its privateLinkServiceConnectionState.status to + * Rejected and providing a description that the last Pool was deleted. The HorizonDB private endpoint connection + * resources remain available for inspection and cleanup, and customer-owned Microsoft.Network/privateEndpoints + * resources are not deleted. The delete long-running operation completes only after all required private endpoint + * disconnections have completed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 poolName, + Context context); + + /** + * Deletes a HorizonDB pool together with the Pool-scoped Endpoint whose associatedResourceId identifies that Pool + * and all FirewallRule children of that Endpoint. The Endpoint cannot outlive or be deleted independently from its + * Pool. When this is the Cluster's last surviving Pool, the service also disconnects every existing private + * endpoint connection associated with the Cluster by setting its privateLinkServiceConnectionState.status to + * Rejected and providing a description that the last Pool was deleted. The HorizonDB private endpoint connection + * resources remain available for inspection and cleanup, and customer-owned Microsoft.Network/privateEndpoints + * resources are not deleted. The delete long-running operation completes only after all required private endpoint + * disconnections have completed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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) + Mono deleteAsync(String resourceGroupName, String clusterName, String poolName); + + /** + * Deletes a HorizonDB pool together with the Pool-scoped Endpoint whose associatedResourceId identifies that Pool + * and all FirewallRule children of that Endpoint. The Endpoint cannot outlive or be deleted independently from its + * Pool. When this is the Cluster's last surviving Pool, the service also disconnects every existing private + * endpoint connection associated with the Cluster by setting its privateLinkServiceConnectionState.status to + * Rejected and providing a description that the last Pool was deleted. The HorizonDB private endpoint connection + * resources remain available for inspection and cleanup, and customer-owned Microsoft.Network/privateEndpoints + * resources are not deleted. The delete long-running operation completes only after all required private endpoint + * disconnections have completed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 clusterName, String poolName); + + /** + * Deletes a HorizonDB pool together with the Pool-scoped Endpoint whose associatedResourceId identifies that Pool + * and all FirewallRule children of that Endpoint. The Endpoint cannot outlive or be deleted independently from its + * Pool. When this is the Cluster's last surviving Pool, the service also disconnects every existing private + * endpoint connection associated with the Cluster by setting its privateLinkServiceConnectionState.status to + * Rejected and providing a description that the last Pool was deleted. The HorizonDB private endpoint connection + * resources remain available for inspection and cleanup, and customer-owned Microsoft.Network/privateEndpoints + * resources are not deleted. The delete long-running operation completes only after all required private endpoint + * disconnections have completed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 clusterName, String poolName, Context context); + + /** + * Lists all HorizonDB pools in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Pool list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String clusterName); + + /** + * Lists all HorizonDB pools in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Pool list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName); + + /** + * Lists all HorizonDB pools in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Pool list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName, Context context); + + /** + * Starts a stopped HorizonDB pool. Power operations are supported only at pool scope in this API version; there is + * no cluster-level start action. Start does not apply pending dynamic or static parameter changes; + * parameterGroup.syncStatus remains PendingReboot until a customer-initiated Restart. When the pool is already + * Ready, the operation succeeds as a true idempotent no-op and likewise leaves pending parameter changes pending. + * The operation is allowed when the pool has no allocated nodes. After the Pool is running, its Pool-scoped + * ReadOnly Endpoint routes only when at least one allocated node is not currently playing the read-write role. The + * request fails with 409 Conflict when another operation is in progress or the pool is in any other incompatible + * state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> startWithResponseAsync(String resourceGroupName, String clusterName, + String poolName); + + /** + * Starts a stopped HorizonDB pool. Power operations are supported only at pool scope in this API version; there is + * no cluster-level start action. Start does not apply pending dynamic or static parameter changes; + * parameterGroup.syncStatus remains PendingReboot until a customer-initiated Restart. When the pool is already + * Ready, the operation succeeds as a true idempotent no-op and likewise leaves pending parameter changes pending. + * The operation is allowed when the pool has no allocated nodes. After the Pool is running, its Pool-scoped + * ReadOnly Endpoint routes only when at least one allocated node is not currently playing the read-write role. The + * request fails with 409 Conflict when another operation is in progress or the pool is in any other incompatible + * state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, PoolInner> beginStartAsync(String resourceGroupName, String clusterName, + String poolName); + + /** + * Starts a stopped HorizonDB pool. Power operations are supported only at pool scope in this API version; there is + * no cluster-level start action. Start does not apply pending dynamic or static parameter changes; + * parameterGroup.syncStatus remains PendingReboot until a customer-initiated Restart. When the pool is already + * Ready, the operation succeeds as a true idempotent no-op and likewise leaves pending parameter changes pending. + * The operation is allowed when the pool has no allocated nodes. After the Pool is running, its Pool-scoped + * ReadOnly Endpoint routes only when at least one allocated node is not currently playing the read-write role. The + * request fails with 409 Conflict when another operation is in progress or the pool is in any other incompatible + * state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PoolInner> beginStart(String resourceGroupName, String clusterName, + String poolName); + + /** + * Starts a stopped HorizonDB pool. Power operations are supported only at pool scope in this API version; there is + * no cluster-level start action. Start does not apply pending dynamic or static parameter changes; + * parameterGroup.syncStatus remains PendingReboot until a customer-initiated Restart. When the pool is already + * Ready, the operation succeeds as a true idempotent no-op and likewise leaves pending parameter changes pending. + * The operation is allowed when the pool has no allocated nodes. After the Pool is running, its Pool-scoped + * ReadOnly Endpoint routes only when at least one allocated node is not currently playing the read-write role. The + * request fails with 409 Conflict when another operation is in progress or the pool is in any other incompatible + * state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PoolInner> beginStart(String resourceGroupName, String clusterName, + String poolName, Context context); + + /** + * Starts a stopped HorizonDB pool. Power operations are supported only at pool scope in this API version; there is + * no cluster-level start action. Start does not apply pending dynamic or static parameter changes; + * parameterGroup.syncStatus remains PendingReboot until a customer-initiated Restart. When the pool is already + * Ready, the operation succeeds as a true idempotent no-op and likewise leaves pending parameter changes pending. + * The operation is allowed when the pool has no allocated nodes. After the Pool is running, its Pool-scoped + * ReadOnly Endpoint routes only when at least one allocated node is not currently playing the read-write role. The + * request fails with 409 Conflict when another operation is in progress or the pool is in any other incompatible + * state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono startAsync(String resourceGroupName, String clusterName, String poolName); + + /** + * Starts a stopped HorizonDB pool. Power operations are supported only at pool scope in this API version; there is + * no cluster-level start action. Start does not apply pending dynamic or static parameter changes; + * parameterGroup.syncStatus remains PendingReboot until a customer-initiated Restart. When the pool is already + * Ready, the operation succeeds as a true idempotent no-op and likewise leaves pending parameter changes pending. + * The operation is allowed when the pool has no allocated nodes. After the Pool is running, its Pool-scoped + * ReadOnly Endpoint routes only when at least one allocated node is not currently playing the read-write role. The + * request fails with 409 Conflict when another operation is in progress or the pool is in any other incompatible + * state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PoolInner start(String resourceGroupName, String clusterName, String poolName); + + /** + * Starts a stopped HorizonDB pool. Power operations are supported only at pool scope in this API version; there is + * no cluster-level start action. Start does not apply pending dynamic or static parameter changes; + * parameterGroup.syncStatus remains PendingReboot until a customer-initiated Restart. When the pool is already + * Ready, the operation succeeds as a true idempotent no-op and likewise leaves pending parameter changes pending. + * The operation is allowed when the pool has no allocated nodes. After the Pool is running, its Pool-scoped + * ReadOnly Endpoint routes only when at least one allocated node is not currently playing the read-write role. The + * request fails with 409 Conflict when another operation is in progress or the pool is in any other incompatible + * state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PoolInner start(String resourceGroupName, String clusterName, String poolName, Context context); + + /** + * Stops a running HorizonDB pool and deallocates compute. Power operations are supported only at pool scope in this + * API version; there is no cluster-level stop action. Stop does not apply pending dynamic or static parameter + * changes; parameterGroup.syncStatus remains PendingReboot. A subsequent Start also preserves those pending + * changes. The operation succeeds as an idempotent no-op when the pool is already Stopped. It is allowed when the + * pool has no allocated nodes. The Pool-scoped ReadOnly Endpoint remains discoverable but has no routing + * destination while the Pool is Stopped. The request fails with 409 Conflict when another operation is in progress + * or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> stopWithResponseAsync(String resourceGroupName, String clusterName, + String poolName); + + /** + * Stops a running HorizonDB pool and deallocates compute. Power operations are supported only at pool scope in this + * API version; there is no cluster-level stop action. Stop does not apply pending dynamic or static parameter + * changes; parameterGroup.syncStatus remains PendingReboot. A subsequent Start also preserves those pending + * changes. The operation succeeds as an idempotent no-op when the pool is already Stopped. It is allowed when the + * pool has no allocated nodes. The Pool-scoped ReadOnly Endpoint remains discoverable but has no routing + * destination while the Pool is Stopped. The request fails with 409 Conflict when another operation is in progress + * or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, PoolInner> beginStopAsync(String resourceGroupName, String clusterName, + String poolName); + + /** + * Stops a running HorizonDB pool and deallocates compute. Power operations are supported only at pool scope in this + * API version; there is no cluster-level stop action. Stop does not apply pending dynamic or static parameter + * changes; parameterGroup.syncStatus remains PendingReboot. A subsequent Start also preserves those pending + * changes. The operation succeeds as an idempotent no-op when the pool is already Stopped. It is allowed when the + * pool has no allocated nodes. The Pool-scoped ReadOnly Endpoint remains discoverable but has no routing + * destination while the Pool is Stopped. The request fails with 409 Conflict when another operation is in progress + * or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PoolInner> beginStop(String resourceGroupName, String clusterName, + String poolName); + + /** + * Stops a running HorizonDB pool and deallocates compute. Power operations are supported only at pool scope in this + * API version; there is no cluster-level stop action. Stop does not apply pending dynamic or static parameter + * changes; parameterGroup.syncStatus remains PendingReboot. A subsequent Start also preserves those pending + * changes. The operation succeeds as an idempotent no-op when the pool is already Stopped. It is allowed when the + * pool has no allocated nodes. The Pool-scoped ReadOnly Endpoint remains discoverable but has no routing + * destination while the Pool is Stopped. The request fails with 409 Conflict when another operation is in progress + * or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PoolInner> beginStop(String resourceGroupName, String clusterName, + String poolName, Context context); + + /** + * Stops a running HorizonDB pool and deallocates compute. Power operations are supported only at pool scope in this + * API version; there is no cluster-level stop action. Stop does not apply pending dynamic or static parameter + * changes; parameterGroup.syncStatus remains PendingReboot. A subsequent Start also preserves those pending + * changes. The operation succeeds as an idempotent no-op when the pool is already Stopped. It is allowed when the + * pool has no allocated nodes. The Pool-scoped ReadOnly Endpoint remains discoverable but has no routing + * destination while the Pool is Stopped. The request fails with 409 Conflict when another operation is in progress + * or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono stopAsync(String resourceGroupName, String clusterName, String poolName); + + /** + * Stops a running HorizonDB pool and deallocates compute. Power operations are supported only at pool scope in this + * API version; there is no cluster-level stop action. Stop does not apply pending dynamic or static parameter + * changes; parameterGroup.syncStatus remains PendingReboot. A subsequent Start also preserves those pending + * changes. The operation succeeds as an idempotent no-op when the pool is already Stopped. It is allowed when the + * pool has no allocated nodes. The Pool-scoped ReadOnly Endpoint remains discoverable but has no routing + * destination while the Pool is Stopped. The request fails with 409 Conflict when another operation is in progress + * or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PoolInner stop(String resourceGroupName, String clusterName, String poolName); + + /** + * Stops a running HorizonDB pool and deallocates compute. Power operations are supported only at pool scope in this + * API version; there is no cluster-level stop action. Stop does not apply pending dynamic or static parameter + * changes; parameterGroup.syncStatus remains PendingReboot. A subsequent Start also preserves those pending + * changes. The operation succeeds as an idempotent no-op when the pool is already Stopped. It is allowed when the + * pool has no allocated nodes. The Pool-scoped ReadOnly Endpoint remains discoverable but has no routing + * destination while the Pool is Stopped. The request fails with 409 Conflict when another operation is in progress + * or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PoolInner stop(String resourceGroupName, String clusterName, String poolName, Context context); + + /** + * Restarts the PostgreSQL container on all allocated nodes in a ready HorizonDB pool and applies pending dynamic + * and static parameter changes. This customer-initiated Restart is the only operation that applies static parameter + * changes or dynamic parameter changes requested with PendingReboot; Stop followed by Start and scheduled + * maintenance do not apply them. Power operations are supported only at pool scope in this API version; there is no + * cluster-level restart action. When the pool has no allocated nodes, the operation succeeds without restarting any + * nodes, pending changes are considered applied, parameterGroup.syncStatus becomes InSync, and the resulting + * configuration applies to nodes allocated later. The request fails with 409 Conflict when another operation is in + * progress or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> restartWithResponseAsync(String resourceGroupName, String clusterName, + String poolName); + + /** + * Restarts the PostgreSQL container on all allocated nodes in a ready HorizonDB pool and applies pending dynamic + * and static parameter changes. This customer-initiated Restart is the only operation that applies static parameter + * changes or dynamic parameter changes requested with PendingReboot; Stop followed by Start and scheduled + * maintenance do not apply them. Power operations are supported only at pool scope in this API version; there is no + * cluster-level restart action. When the pool has no allocated nodes, the operation succeeds without restarting any + * nodes, pending changes are considered applied, parameterGroup.syncStatus becomes InSync, and the resulting + * configuration applies to nodes allocated later. The request fails with 409 Conflict when another operation is in + * progress or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, PoolInner> beginRestartAsync(String resourceGroupName, String clusterName, + String poolName); + + /** + * Restarts the PostgreSQL container on all allocated nodes in a ready HorizonDB pool and applies pending dynamic + * and static parameter changes. This customer-initiated Restart is the only operation that applies static parameter + * changes or dynamic parameter changes requested with PendingReboot; Stop followed by Start and scheduled + * maintenance do not apply them. Power operations are supported only at pool scope in this API version; there is no + * cluster-level restart action. When the pool has no allocated nodes, the operation succeeds without restarting any + * nodes, pending changes are considered applied, parameterGroup.syncStatus becomes InSync, and the resulting + * configuration applies to nodes allocated later. The request fails with 409 Conflict when another operation is in + * progress or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PoolInner> beginRestart(String resourceGroupName, String clusterName, + String poolName); + + /** + * Restarts the PostgreSQL container on all allocated nodes in a ready HorizonDB pool and applies pending dynamic + * and static parameter changes. This customer-initiated Restart is the only operation that applies static parameter + * changes or dynamic parameter changes requested with PendingReboot; Stop followed by Start and scheduled + * maintenance do not apply them. Power operations are supported only at pool scope in this API version; there is no + * cluster-level restart action. When the pool has no allocated nodes, the operation succeeds without restarting any + * nodes, pending changes are considered applied, parameterGroup.syncStatus becomes InSync, and the resulting + * configuration applies to nodes allocated later. The request fails with 409 Conflict when another operation is in + * progress or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PoolInner> beginRestart(String resourceGroupName, String clusterName, + String poolName, Context context); + + /** + * Restarts the PostgreSQL container on all allocated nodes in a ready HorizonDB pool and applies pending dynamic + * and static parameter changes. This customer-initiated Restart is the only operation that applies static parameter + * changes or dynamic parameter changes requested with PendingReboot; Stop followed by Start and scheduled + * maintenance do not apply them. Power operations are supported only at pool scope in this API version; there is no + * cluster-level restart action. When the pool has no allocated nodes, the operation succeeds without restarting any + * nodes, pending changes are considered applied, parameterGroup.syncStatus becomes InSync, and the resulting + * configuration applies to nodes allocated later. The request fails with 409 Conflict when another operation is in + * progress or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono restartAsync(String resourceGroupName, String clusterName, String poolName); + + /** + * Restarts the PostgreSQL container on all allocated nodes in a ready HorizonDB pool and applies pending dynamic + * and static parameter changes. This customer-initiated Restart is the only operation that applies static parameter + * changes or dynamic parameter changes requested with PendingReboot; Stop followed by Start and scheduled + * maintenance do not apply them. Power operations are supported only at pool scope in this API version; there is no + * cluster-level restart action. When the pool has no allocated nodes, the operation succeeds without restarting any + * nodes, pending changes are considered applied, parameterGroup.syncStatus becomes InSync, and the resulting + * configuration applies to nodes allocated later. The request fails with 409 Conflict when another operation is in + * progress or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PoolInner restart(String resourceGroupName, String clusterName, String poolName); + + /** + * Restarts the PostgreSQL container on all allocated nodes in a ready HorizonDB pool and applies pending dynamic + * and static parameter changes. This customer-initiated Restart is the only operation that applies static parameter + * changes or dynamic parameter changes requested with PendingReboot; Stop followed by Start and scheduled + * maintenance do not apply them. Power operations are supported only at pool scope in this API version; there is no + * cluster-level restart action. When the pool has no allocated nodes, the operation succeeds without restarting any + * nodes, pending changes are considered applied, parameterGroup.syncStatus becomes InSync, and the resulting + * configuration applies to nodes allocated later. The request fails with 409 Conflict when another operation is in + * progress or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PoolInner restart(String resourceGroupName, String clusterName, String poolName, Context context); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbPrivateEndpointConnectionsClient.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/PrivateEndpointConnectionsClient.java similarity index 71% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbPrivateEndpointConnectionsClient.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/PrivateEndpointConnectionsClient.java index f42b97054cc97..2412b5cda5b2e 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbPrivateEndpointConnectionsClient.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/PrivateEndpointConnectionsClient.java @@ -19,9 +19,9 @@ import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in HorizonDbPrivateEndpointConnectionsClient. + * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ -public interface HorizonDbPrivateEndpointConnectionsClient { +public interface PrivateEndpointConnectionsClient { /** * Gets a private endpoint connection. * @@ -132,7 +132,10 @@ PagedIterable list(String resourceGroupN Context context); /** - * Approves or rejects a private endpoint connection. + * Approves or rejects an existing private endpoint connection. Approval requires the parent Cluster to contain at + * least one Pool. An approval attempt when the Cluster has no Pools fails with 409 Conflict and the stable error + * code PrivateEndpointRequiresPool. Rejection remains allowed when the Cluster has no Pools so that existing + * connections can be cleaned up. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -146,11 +149,78 @@ PagedIterable list(String resourceGroupN * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateStatusWithResponseAsync(String resourceGroupName, - String clusterName, String privateEndpointConnectionName, PrivateEndpointConnectionResourceInner resource); + Mono>> approveOrRejectWithResponseAsync(String resourceGroupName, String clusterName, + String privateEndpointConnectionName, PrivateEndpointConnectionResourceInner resource); + + /** + * Approves or rejects an existing private endpoint connection. Approval requires the parent Cluster to contain at + * least one Pool. An approval attempt when the Cluster has no Pools fails with 409 Conflict and the stable error + * code PrivateEndpointRequiresPool. Rejection remains allowed when the Cluster has no Pools so that existing + * connections can be cleaned up. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a private endpoint connection resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, PrivateEndpointConnectionResourceInner> + beginApproveOrRejectAsync(String resourceGroupName, String clusterName, String privateEndpointConnectionName, + PrivateEndpointConnectionResourceInner resource); /** - * Approves or rejects a private endpoint connection. + * Approves or rejects an existing private endpoint connection. Approval requires the parent Cluster to contain at + * least one Pool. An approval attempt when the Cluster has no Pools fails with 409 Conflict and the stable error + * code PrivateEndpointRequiresPool. Rejection remains allowed when the Cluster has no Pools so that existing + * connections can be cleaned up. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a private endpoint connection resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PrivateEndpointConnectionResourceInner> + beginApproveOrReject(String resourceGroupName, String clusterName, String privateEndpointConnectionName, + PrivateEndpointConnectionResourceInner resource); + + /** + * Approves or rejects an existing private endpoint connection. Approval requires the parent Cluster to contain at + * least one Pool. An approval attempt when the Cluster has no Pools fails with 409 Conflict and the stable error + * code PrivateEndpointRequiresPool. Rejection remains allowed when the Cluster has no Pools so that existing + * connections can be cleaned up. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a private endpoint connection resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PrivateEndpointConnectionResourceInner> + beginApproveOrReject(String resourceGroupName, String clusterName, String privateEndpointConnectionName, + PrivateEndpointConnectionResourceInner resource, Context context); + + /** + * Approves or rejects an existing private endpoint connection. Approval requires the parent Cluster to contain at + * least one Pool. An approval attempt when the Cluster has no Pools fails with 409 Conflict and the stable error + * code PrivateEndpointRequiresPool. Rejection remains allowed when the Cluster has no Pools so that existing + * connections can be cleaned up. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -163,44 +233,49 @@ Mono> updateStatusWithResponseA * @return a private endpoint connection resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateStatusAsync(String resourceGroupName, String clusterName, + Mono approveOrRejectAsync(String resourceGroupName, String clusterName, String privateEndpointConnectionName, PrivateEndpointConnectionResourceInner resource); /** - * Approves or rejects a private endpoint connection. + * Approves or rejects an existing private endpoint connection. Approval requires the parent Cluster to contain at + * least one Pool. An approval attempt when the Cluster has no Pools fails with 409 Conflict and the stable error + * code PrivateEndpointRequiresPool. Rejection remains allowed when the Cluster has no Pools so that existing + * connections can be cleaned up. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure * resource. * @param resource Resource create parameters. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection resource along with {@link Response}. + * @return a private endpoint connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateStatusWithResponse(String resourceGroupName, - String clusterName, String privateEndpointConnectionName, PrivateEndpointConnectionResourceInner resource, - Context context); + PrivateEndpointConnectionResourceInner approveOrReject(String resourceGroupName, String clusterName, + String privateEndpointConnectionName, PrivateEndpointConnectionResourceInner resource); /** - * Approves or rejects a private endpoint connection. + * Approves or rejects an existing private endpoint connection. Approval requires the parent Cluster to contain at + * least one Pool. An approval attempt when the Cluster has no Pools fails with 409 Conflict and the stable error + * code PrivateEndpointRequiresPool. Rejection remains allowed when the Cluster has no Pools so that existing + * connections can be cleaned up. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure * resource. * @param resource Resource create parameters. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private endpoint connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionResourceInner updateStatus(String resourceGroupName, String clusterName, - String privateEndpointConnectionName, PrivateEndpointConnectionResourceInner resource); + PrivateEndpointConnectionResourceInner approveOrReject(String resourceGroupName, String clusterName, + String privateEndpointConnectionName, PrivateEndpointConnectionResourceInner resource, Context context); /** * Deletes a private endpoint connection. diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbPrivateLinkResourcesClient.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/PrivateLinkResourcesClient.java similarity index 79% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbPrivateLinkResourcesClient.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/PrivateLinkResourcesClient.java index 4de77b5c4af16..da8775916c7d8 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbPrivateLinkResourcesClient.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/PrivateLinkResourcesClient.java @@ -10,13 +10,13 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbPrivateLinkResourceInner; +import com.azure.resourcemanager.horizondb.fluent.models.PrivateLinkResourceInner; import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in HorizonDbPrivateLinkResourcesClient. + * An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ -public interface HorizonDbPrivateLinkResourcesClient { +public interface PrivateLinkResourcesClient { /** * Gets a private link resource. * @@ -29,7 +29,7 @@ public interface HorizonDbPrivateLinkResourcesClient { * @return a private link resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + Mono> getWithResponseAsync(String resourceGroupName, String clusterName, String groupName); /** @@ -44,7 +44,7 @@ Mono> getWithResponseAsync(String re * @return a private link resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String clusterName, String groupName); + Mono getAsync(String resourceGroupName, String clusterName, String groupName); /** * Gets a private link resource. @@ -59,8 +59,8 @@ Mono> getWithResponseAsync(String re * @return a private link resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String clusterName, - String groupName, Context context); + Response getWithResponse(String resourceGroupName, String clusterName, String groupName, + Context context); /** * Gets a private link resource. @@ -74,7 +74,7 @@ Response getWithResponse(String resourceGroup * @return a private link resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - HorizonDbPrivateLinkResourceInner get(String resourceGroupName, String clusterName, String groupName); + PrivateLinkResourceInner get(String resourceGroupName, String clusterName, String groupName); /** * Lists private link resources in a HorizonDB cluster. @@ -84,11 +84,10 @@ Response getWithResponse(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbPrivateLinkResource list operation as paginated response with - * {@link PagedFlux}. + * @return the response of a PrivateLinkResource list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String clusterName); + PagedFlux listAsync(String resourceGroupName, String clusterName); /** * Lists private link resources in a HorizonDB cluster. @@ -98,11 +97,10 @@ Response getWithResponse(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbPrivateLinkResource list operation as paginated response with - * {@link PagedIterable}. + * @return the response of a PrivateLinkResource list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String clusterName); + PagedIterable list(String resourceGroupName, String clusterName); /** * Lists private link resources in a HorizonDB cluster. @@ -113,10 +111,8 @@ Response getWithResponse(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbPrivateLinkResource list operation as paginated response with - * {@link PagedIterable}. + * @return the response of a PrivateLinkResource list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String clusterName, - Context context); + PagedIterable list(String resourceGroupName, String clusterName, Context context); } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/ActivateChangeDataCaptureIdentityResultInner.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/ActivateChangeDataCaptureIdentityResultInner.java new file mode 100644 index 0000000000000..6d155e5b75401 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/ActivateChangeDataCaptureIdentityResultInner.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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 java.io.IOException; + +/** + * The completed result of activating a change data capture destination identity. + */ +@Immutable +public final class ActivateChangeDataCaptureIdentityResultInner + implements JsonSerializable { + /* + * The completed activation status. + */ + private final String status = "Succeeded"; + + /* + * The resource ID of the newly active identity assignment. + */ + private String targetIdentityAssignmentResourceId; + + /* + * The resource ID of the previously active identity assignment, when one existed. + */ + private String previousIdentityAssignmentResourceId; + + /** + * Creates an instance of ActivateChangeDataCaptureIdentityResultInner class. + */ + private ActivateChangeDataCaptureIdentityResultInner() { + } + + /** + * Get the status property: The completed activation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the targetIdentityAssignmentResourceId property: The resource ID of the newly active identity assignment. + * + * @return the targetIdentityAssignmentResourceId value. + */ + public String targetIdentityAssignmentResourceId() { + return this.targetIdentityAssignmentResourceId; + } + + /** + * Get the previousIdentityAssignmentResourceId property: The resource ID of the previously active identity + * assignment, when one existed. + * + * @return the previousIdentityAssignmentResourceId value. + */ + public String previousIdentityAssignmentResourceId() { + return this.previousIdentityAssignmentResourceId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActivateChangeDataCaptureIdentityResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActivateChangeDataCaptureIdentityResultInner 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 ActivateChangeDataCaptureIdentityResultInner. + */ + public static ActivateChangeDataCaptureIdentityResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActivateChangeDataCaptureIdentityResultInner deserializedActivateChangeDataCaptureIdentityResultInner + = new ActivateChangeDataCaptureIdentityResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("targetIdentityAssignmentResourceId".equals(fieldName)) { + deserializedActivateChangeDataCaptureIdentityResultInner.targetIdentityAssignmentResourceId + = reader.getString(); + } else if ("previousIdentityAssignmentResourceId".equals(fieldName)) { + deserializedActivateChangeDataCaptureIdentityResultInner.previousIdentityAssignmentResourceId + = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedActivateChangeDataCaptureIdentityResultInner; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/AuthenticationInner.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/AuthenticationInner.java new file mode 100644 index 0000000000000..4688f63113f58 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/AuthenticationInner.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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.horizondb.models.AuthenticationProperties; +import java.io.IOException; + +/** + * A service-created authentication configuration returned by the authentications collection. The resource name is + * passwordMethod or microsoftEntra. + */ +@Immutable +public final class AuthenticationInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private AuthenticationProperties 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 AuthenticationInner class. + */ + private AuthenticationInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public AuthenticationProperties 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 AuthenticationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AuthenticationInner 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 AuthenticationInner. + */ + public static AuthenticationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AuthenticationInner deserializedAuthenticationInner = new AuthenticationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedAuthenticationInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedAuthenticationInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedAuthenticationInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedAuthenticationInner.properties = AuthenticationProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedAuthenticationInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAuthenticationInner; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/CapabilityInner.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/CapabilityInner.java new file mode 100644 index 0000000000000..2fb75f7dc67bc --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/CapabilityInner.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.horizondb.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.horizondb.models.CapabilityProperties; +import java.io.IOException; + +/** + * The singleton HorizonDB capability catalog entry available to a subscription in a location. + */ +@Immutable +public final class CapabilityInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private CapabilityProperties 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 CapabilityInner class. + */ + private CapabilityInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public CapabilityProperties 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 CapabilityInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CapabilityInner 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 CapabilityInner. + */ + public static CapabilityInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CapabilityInner deserializedCapabilityInner = new CapabilityInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedCapabilityInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedCapabilityInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedCapabilityInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedCapabilityInner.properties = CapabilityProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedCapabilityInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedCapabilityInner; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/ChangeDataCaptureCapabilityInner.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/ChangeDataCaptureCapabilityInner.java new file mode 100644 index 0000000000000..216ec432ae49e --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/ChangeDataCaptureCapabilityInner.java @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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.horizondb.models.ChangeDataCaptureCapabilityProperties; +import java.io.IOException; + +/** + * The singleton change data capture capability for a HorizonDB cluster. + */ +@Fluent +public final class ChangeDataCaptureCapabilityInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private ChangeDataCaptureCapabilityProperties properties; + + /* + * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. + * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity + * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section + * 14.27) header fields. + */ + private String eTag; + + /* + * 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 ChangeDataCaptureCapabilityInner class. + */ + public ChangeDataCaptureCapabilityInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ChangeDataCaptureCapabilityProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ChangeDataCaptureCapabilityInner object itself. + */ + public ChangeDataCaptureCapabilityInner withProperties(ChangeDataCaptureCapabilityProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + public String eTag() { + return this.eTag; + } + + /** + * 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 ChangeDataCaptureCapabilityInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChangeDataCaptureCapabilityInner 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 ChangeDataCaptureCapabilityInner. + */ + public static ChangeDataCaptureCapabilityInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChangeDataCaptureCapabilityInner deserializedChangeDataCaptureCapabilityInner + = new ChangeDataCaptureCapabilityInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedChangeDataCaptureCapabilityInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedChangeDataCaptureCapabilityInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedChangeDataCaptureCapabilityInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedChangeDataCaptureCapabilityInner.properties + = ChangeDataCaptureCapabilityProperties.fromJson(reader); + } else if ("eTag".equals(fieldName)) { + deserializedChangeDataCaptureCapabilityInner.eTag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedChangeDataCaptureCapabilityInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedChangeDataCaptureCapabilityInner; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/ChangeDataCaptureConfigurationInner.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/ChangeDataCaptureConfigurationInner.java new file mode 100644 index 0000000000000..d7eb636e347c9 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/ChangeDataCaptureConfigurationInner.java @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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.horizondb.models.ChangeDataCaptureConfigurationProperties; +import java.io.IOException; + +/** + * A HorizonDB database enrollment for Microsoft Fabric Mirroring. + */ +@Fluent +public final class ChangeDataCaptureConfigurationInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private ChangeDataCaptureConfigurationProperties properties; + + /* + * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. + * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity + * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section + * 14.27) header fields. + */ + private String eTag; + + /* + * 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 ChangeDataCaptureConfigurationInner class. + */ + public ChangeDataCaptureConfigurationInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ChangeDataCaptureConfigurationProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ChangeDataCaptureConfigurationInner object itself. + */ + public ChangeDataCaptureConfigurationInner withProperties(ChangeDataCaptureConfigurationProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + public String eTag() { + return this.eTag; + } + + /** + * 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 ChangeDataCaptureConfigurationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChangeDataCaptureConfigurationInner 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 ChangeDataCaptureConfigurationInner. + */ + public static ChangeDataCaptureConfigurationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChangeDataCaptureConfigurationInner deserializedChangeDataCaptureConfigurationInner + = new ChangeDataCaptureConfigurationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedChangeDataCaptureConfigurationInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedChangeDataCaptureConfigurationInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedChangeDataCaptureConfigurationInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedChangeDataCaptureConfigurationInner.properties + = ChangeDataCaptureConfigurationProperties.fromJson(reader); + } else if ("eTag".equals(fieldName)) { + deserializedChangeDataCaptureConfigurationInner.eTag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedChangeDataCaptureConfigurationInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedChangeDataCaptureConfigurationInner; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/ChangeDataCaptureDestinationInner.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/ChangeDataCaptureDestinationInner.java new file mode 100644 index 0000000000000..2910e7a7186ad --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/ChangeDataCaptureDestinationInner.java @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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.horizondb.models.ChangeDataCaptureDestinationProperties; +import java.io.IOException; + +/** + * A reusable Microsoft Fabric destination for HorizonDB change data capture configurations. + */ +@Fluent +public final class ChangeDataCaptureDestinationInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private ChangeDataCaptureDestinationProperties properties; + + /* + * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. + * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity + * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section + * 14.27) header fields. + */ + private String eTag; + + /* + * 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 ChangeDataCaptureDestinationInner class. + */ + public ChangeDataCaptureDestinationInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ChangeDataCaptureDestinationProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ChangeDataCaptureDestinationInner object itself. + */ + public ChangeDataCaptureDestinationInner withProperties(ChangeDataCaptureDestinationProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + public String eTag() { + return this.eTag; + } + + /** + * 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 ChangeDataCaptureDestinationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChangeDataCaptureDestinationInner 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 ChangeDataCaptureDestinationInner. + */ + public static ChangeDataCaptureDestinationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChangeDataCaptureDestinationInner deserializedChangeDataCaptureDestinationInner + = new ChangeDataCaptureDestinationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedChangeDataCaptureDestinationInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedChangeDataCaptureDestinationInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedChangeDataCaptureDestinationInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedChangeDataCaptureDestinationInner.properties + = ChangeDataCaptureDestinationProperties.fromJson(reader); + } else if ("eTag".equals(fieldName)) { + deserializedChangeDataCaptureDestinationInner.eTag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedChangeDataCaptureDestinationInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedChangeDataCaptureDestinationInner; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbClusterInner.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/ClusterInner.java similarity index 62% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbClusterInner.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/ClusterInner.java index 60f27389e60ed..d730298ebedac 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbClusterInner.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/ClusterInner.java @@ -10,8 +10,8 @@ import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.horizondb.models.HorizonDbClusterProperties; -import com.azure.resourcemanager.horizondb.models.ManagedServiceIdentity; +import com.azure.resourcemanager.horizondb.models.ClusterProperties; +import com.azure.resourcemanager.horizondb.models.HorizonDbClusterManagedServiceIdentity; import java.io.IOException; import java.util.Map; @@ -19,16 +19,18 @@ * Represents the HorizonDB cluster. */ @Fluent -public final class HorizonDbClusterInner extends Resource { +public final class ClusterInner extends Resource { /* * The resource-specific properties for this resource. */ - private HorizonDbClusterProperties properties; + private ClusterProperties properties; /* - * The managed service identities assigned to this resource. + * The managed service identities assigned to this resource. Omitting the entire identity property from PUT or PATCH + * preserves all current assignments. When provided, PUT replaces the user-assigned identity set and PATCH merges + * it; null PATCH dictionary entries remove individual identities. Setting type to None clears all assignments. */ - private ManagedServiceIdentity identity; + private HorizonDbClusterManagedServiceIdentity identity; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -51,9 +53,9 @@ public final class HorizonDbClusterInner extends Resource { private String id; /** - * Creates an instance of HorizonDbClusterInner class. + * Creates an instance of ClusterInner class. */ - public HorizonDbClusterInner() { + public ClusterInner() { } /** @@ -61,7 +63,7 @@ public HorizonDbClusterInner() { * * @return the properties value. */ - public HorizonDbClusterProperties properties() { + public ClusterProperties properties() { return this.properties; } @@ -69,29 +71,35 @@ public HorizonDbClusterProperties properties() { * Set the properties property: The resource-specific properties for this resource. * * @param properties the properties value to set. - * @return the HorizonDbClusterInner object itself. + * @return the ClusterInner object itself. */ - public HorizonDbClusterInner withProperties(HorizonDbClusterProperties properties) { + public ClusterInner withProperties(ClusterProperties properties) { this.properties = properties; return this; } /** - * Get the identity property: The managed service identities assigned to this resource. + * Get the identity property: The managed service identities assigned to this resource. Omitting the entire identity + * property from PUT or PATCH preserves all current assignments. When provided, PUT replaces the user-assigned + * identity set and PATCH merges it; null PATCH dictionary entries remove individual identities. Setting type to + * None clears all assignments. * * @return the identity value. */ - public ManagedServiceIdentity identity() { + public HorizonDbClusterManagedServiceIdentity identity() { return this.identity; } /** - * Set the identity property: The managed service identities assigned to this resource. + * Set the identity property: The managed service identities assigned to this resource. Omitting the entire identity + * property from PUT or PATCH preserves all current assignments. When provided, PUT replaces the user-assigned + * identity set and PATCH merges it; null PATCH dictionary entries remove individual identities. Setting type to + * None clears all assignments. * * @param identity the identity value to set. - * @return the HorizonDbClusterInner object itself. + * @return the ClusterInner object itself. */ - public HorizonDbClusterInner withIdentity(ManagedServiceIdentity identity) { + public ClusterInner withIdentity(HorizonDbClusterManagedServiceIdentity identity) { this.identity = identity; return this; } @@ -139,7 +147,7 @@ public String id() { * {@inheritDoc} */ @Override - public HorizonDbClusterInner withLocation(String location) { + public ClusterInner withLocation(String location) { super.withLocation(location); return this; } @@ -148,7 +156,7 @@ public HorizonDbClusterInner withLocation(String location) { * {@inheritDoc} */ @Override - public HorizonDbClusterInner withTags(Map tags) { + public ClusterInner withTags(Map tags) { super.withTags(tags); return this; } @@ -167,44 +175,44 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of HorizonDbClusterInner from the JsonReader. + * Reads an instance of ClusterInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbClusterInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. + * @return An instance of ClusterInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the HorizonDbClusterInner. + * @throws IOException If an error occurs while reading the ClusterInner. */ - public static HorizonDbClusterInner fromJson(JsonReader jsonReader) throws IOException { + public static ClusterInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - HorizonDbClusterInner deserializedHorizonDbClusterInner = new HorizonDbClusterInner(); + ClusterInner deserializedClusterInner = new ClusterInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("id".equals(fieldName)) { - deserializedHorizonDbClusterInner.id = reader.getString(); + deserializedClusterInner.id = reader.getString(); } else if ("name".equals(fieldName)) { - deserializedHorizonDbClusterInner.name = reader.getString(); + deserializedClusterInner.name = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedHorizonDbClusterInner.type = reader.getString(); + deserializedClusterInner.type = reader.getString(); } else if ("location".equals(fieldName)) { - deserializedHorizonDbClusterInner.withLocation(reader.getString()); + deserializedClusterInner.withLocation(reader.getString()); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedHorizonDbClusterInner.withTags(tags); + deserializedClusterInner.withTags(tags); } else if ("properties".equals(fieldName)) { - deserializedHorizonDbClusterInner.properties = HorizonDbClusterProperties.fromJson(reader); + deserializedClusterInner.properties = ClusterProperties.fromJson(reader); } else if ("identity".equals(fieldName)) { - deserializedHorizonDbClusterInner.identity = ManagedServiceIdentity.fromJson(reader); + deserializedClusterInner.identity = HorizonDbClusterManagedServiceIdentity.fromJson(reader); } else if ("systemData".equals(fieldName)) { - deserializedHorizonDbClusterInner.systemData = SystemData.fromJson(reader); + deserializedClusterInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedHorizonDbClusterInner; + return deserializedClusterInner; }); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbFirewallRuleInner.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/DefaultParameterGroupInner.java similarity index 67% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbFirewallRuleInner.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/DefaultParameterGroupInner.java index f9d45648b858b..d61d6cd77b6ae 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbFirewallRuleInner.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/DefaultParameterGroupInner.java @@ -4,24 +4,26 @@ package com.azure.resourcemanager.horizondb.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; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.horizondb.models.HorizonDbFirewallRuleProperties; +import com.azure.resourcemanager.horizondb.models.DefaultParameterGroupProperties; import java.io.IOException; /** - * Represents the HorizonDB firewall rule. + * A default parameter group available in a specific region. It contains engine-defined parameters and excludes service + * and other non-engine entries. For each PostgreSQL version, the DefaultParameterGroups APIs return at most one default + * parameter group in a location. */ -@Fluent -public final class HorizonDbFirewallRuleInner extends ProxyResource { +@Immutable +public final class DefaultParameterGroupInner extends ProxyResource { /* * The resource-specific properties for this resource. */ - private HorizonDbFirewallRuleProperties properties; + private DefaultParameterGroupProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -44,9 +46,9 @@ public final class HorizonDbFirewallRuleInner extends ProxyResource { private String id; /** - * Creates an instance of HorizonDbFirewallRuleInner class. + * Creates an instance of DefaultParameterGroupInner class. */ - public HorizonDbFirewallRuleInner() { + private DefaultParameterGroupInner() { } /** @@ -54,21 +56,10 @@ public HorizonDbFirewallRuleInner() { * * @return the properties value. */ - public HorizonDbFirewallRuleProperties properties() { + public DefaultParameterGroupProperties properties() { return this.properties; } - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the HorizonDbFirewallRuleInner object itself. - */ - public HorizonDbFirewallRuleInner withProperties(HorizonDbFirewallRuleProperties properties) { - this.properties = properties; - return this; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -119,38 +110,38 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of HorizonDbFirewallRuleInner from the JsonReader. + * Reads an instance of DefaultParameterGroupInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbFirewallRuleInner if the JsonReader was pointing to an instance of it, or null if + * @return An instance of DefaultParameterGroupInner 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 HorizonDbFirewallRuleInner. + * @throws IOException If an error occurs while reading the DefaultParameterGroupInner. */ - public static HorizonDbFirewallRuleInner fromJson(JsonReader jsonReader) throws IOException { + public static DefaultParameterGroupInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - HorizonDbFirewallRuleInner deserializedHorizonDbFirewallRuleInner = new HorizonDbFirewallRuleInner(); + DefaultParameterGroupInner deserializedDefaultParameterGroupInner = new DefaultParameterGroupInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("id".equals(fieldName)) { - deserializedHorizonDbFirewallRuleInner.id = reader.getString(); + deserializedDefaultParameterGroupInner.id = reader.getString(); } else if ("name".equals(fieldName)) { - deserializedHorizonDbFirewallRuleInner.name = reader.getString(); + deserializedDefaultParameterGroupInner.name = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedHorizonDbFirewallRuleInner.type = reader.getString(); + deserializedDefaultParameterGroupInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedHorizonDbFirewallRuleInner.properties - = HorizonDbFirewallRuleProperties.fromJson(reader); + deserializedDefaultParameterGroupInner.properties + = DefaultParameterGroupProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { - deserializedHorizonDbFirewallRuleInner.systemData = SystemData.fromJson(reader); + deserializedDefaultParameterGroupInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedHorizonDbFirewallRuleInner; + return deserializedDefaultParameterGroupInner; }); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/EndpointInner.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/EndpointInner.java new file mode 100644 index 0000000000000..3ff99793f7be3 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/EndpointInner.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.horizondb.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.horizondb.models.EndpointProperties; +import java.io.IOException; + +/** + * Represents a service-generated, service-managed HorizonDB endpoint. The Cluster-scoped Endpoint is created and + * deleted with its parent Cluster. A Pool-scoped Endpoint is created and deleted with the Pool identified by + * associatedResourceId. Endpoints cannot be created or deleted independently from their lifecycle owner. + */ +@Immutable +public final class EndpointInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private EndpointProperties 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 EndpointInner class. + */ + private EndpointInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public EndpointProperties 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 EndpointInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointInner 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 EndpointInner. + */ + public static EndpointInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointInner deserializedEndpointInner = new EndpointInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedEndpointInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedEndpointInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedEndpointInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedEndpointInner.properties = EndpointProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedEndpointInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointInner; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbReplicaInner.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/FirewallRuleInner.java similarity index 69% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbReplicaInner.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/FirewallRuleInner.java index fb9a21a9b826c..058d682c80982 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbReplicaInner.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/FirewallRuleInner.java @@ -10,18 +10,18 @@ import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.horizondb.models.HorizonDbReplicaProperties; +import com.azure.resourcemanager.horizondb.models.FirewallRuleProperties; import java.io.IOException; /** - * Represents the HorizonDB replica. + * Represents a customer-managed firewall rule for a HorizonDB pool. */ @Fluent -public final class HorizonDbReplicaInner extends ProxyResource { +public final class FirewallRuleInner extends ProxyResource { /* * The resource-specific properties for this resource. */ - private HorizonDbReplicaProperties properties; + private FirewallRuleProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -44,9 +44,9 @@ public final class HorizonDbReplicaInner extends ProxyResource { private String id; /** - * Creates an instance of HorizonDbReplicaInner class. + * Creates an instance of FirewallRuleInner class. */ - public HorizonDbReplicaInner() { + public FirewallRuleInner() { } /** @@ -54,7 +54,7 @@ public HorizonDbReplicaInner() { * * @return the properties value. */ - public HorizonDbReplicaProperties properties() { + public FirewallRuleProperties properties() { return this.properties; } @@ -62,9 +62,9 @@ public HorizonDbReplicaProperties properties() { * Set the properties property: The resource-specific properties for this resource. * * @param properties the properties value to set. - * @return the HorizonDbReplicaInner object itself. + * @return the FirewallRuleInner object itself. */ - public HorizonDbReplicaInner withProperties(HorizonDbReplicaProperties properties) { + public FirewallRuleInner withProperties(FirewallRuleProperties properties) { this.properties = properties; return this; } @@ -119,37 +119,37 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of HorizonDbReplicaInner from the JsonReader. + * Reads an instance of FirewallRuleInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbReplicaInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. + * @return An instance of FirewallRuleInner 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 HorizonDbReplicaInner. + * @throws IOException If an error occurs while reading the FirewallRuleInner. */ - public static HorizonDbReplicaInner fromJson(JsonReader jsonReader) throws IOException { + public static FirewallRuleInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - HorizonDbReplicaInner deserializedHorizonDbReplicaInner = new HorizonDbReplicaInner(); + FirewallRuleInner deserializedFirewallRuleInner = new FirewallRuleInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("id".equals(fieldName)) { - deserializedHorizonDbReplicaInner.id = reader.getString(); + deserializedFirewallRuleInner.id = reader.getString(); } else if ("name".equals(fieldName)) { - deserializedHorizonDbReplicaInner.name = reader.getString(); + deserializedFirewallRuleInner.name = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedHorizonDbReplicaInner.type = reader.getString(); + deserializedFirewallRuleInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedHorizonDbReplicaInner.properties = HorizonDbReplicaProperties.fromJson(reader); + deserializedFirewallRuleInner.properties = FirewallRuleProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { - deserializedHorizonDbReplicaInner.systemData = SystemData.fromJson(reader); + deserializedFirewallRuleInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedHorizonDbReplicaInner; + return deserializedFirewallRuleInner; }); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbParameterGroupConnectionPropertiesInner.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbParameterGroupConnectionPropertiesInner.java deleted file mode 100644 index 5823b9ad55166..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbParameterGroupConnectionPropertiesInner.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.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 java.io.IOException; - -/** - * Connection information for HorizonDB parameter group. - */ -@Immutable -public final class HorizonDbParameterGroupConnectionPropertiesInner - implements JsonSerializable { - /* - * The name of the connected resource. - */ - private String name; - - /* - * The resource ID of the connected resource. - */ - private String id; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of HorizonDbParameterGroupConnectionPropertiesInner class. - */ - private HorizonDbParameterGroupConnectionPropertiesInner() { - } - - /** - * Get the name property: The name of the connected resource. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the id property: The resource ID of the connected resource. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HorizonDbParameterGroupConnectionPropertiesInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbParameterGroupConnectionPropertiesInner 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 HorizonDbParameterGroupConnectionPropertiesInner. - */ - public static HorizonDbParameterGroupConnectionPropertiesInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HorizonDbParameterGroupConnectionPropertiesInner deserializedHorizonDbParameterGroupConnectionPropertiesInner - = new HorizonDbParameterGroupConnectionPropertiesInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedHorizonDbParameterGroupConnectionPropertiesInner.name = reader.getString(); - } else if ("id".equals(fieldName)) { - deserializedHorizonDbParameterGroupConnectionPropertiesInner.id = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedHorizonDbParameterGroupConnectionPropertiesInner.type = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHorizonDbParameterGroupConnectionPropertiesInner; - }); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/IdentityAssignmentInner.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/IdentityAssignmentInner.java new file mode 100644 index 0000000000000..1e0d949f96f9a --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/IdentityAssignmentInner.java @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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.horizondb.models.ChangeDataCaptureIdentityAssignmentProperties; +import java.io.IOException; + +/** + * A user-assigned managed identity authorized for a HorizonDB change data capture destination. + */ +@Fluent +public final class IdentityAssignmentInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private ChangeDataCaptureIdentityAssignmentProperties properties; + + /* + * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. + * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity + * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section + * 14.27) header fields. + */ + private String eTag; + + /* + * 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 IdentityAssignmentInner class. + */ + public IdentityAssignmentInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ChangeDataCaptureIdentityAssignmentProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the IdentityAssignmentInner object itself. + */ + public IdentityAssignmentInner withProperties(ChangeDataCaptureIdentityAssignmentProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + public String eTag() { + return this.eTag; + } + + /** + * 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 IdentityAssignmentInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IdentityAssignmentInner 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 IdentityAssignmentInner. + */ + public static IdentityAssignmentInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IdentityAssignmentInner deserializedIdentityAssignmentInner = new IdentityAssignmentInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedIdentityAssignmentInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedIdentityAssignmentInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedIdentityAssignmentInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedIdentityAssignmentInner.properties + = ChangeDataCaptureIdentityAssignmentProperties.fromJson(reader); + } else if ("eTag".equals(fieldName)) { + deserializedIdentityAssignmentInner.eTag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedIdentityAssignmentInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedIdentityAssignmentInner; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbAdministratorInner.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/LogCaptureConfigurationInner.java similarity index 67% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbAdministratorInner.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/LogCaptureConfigurationInner.java index a5c4598688542..3ae0c37af9d54 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbAdministratorInner.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/LogCaptureConfigurationInner.java @@ -10,18 +10,18 @@ import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.horizondb.models.HorizonDbAdministratorProperties; +import com.azure.resourcemanager.horizondb.models.LogCaptureConfigurationProperties; import java.io.IOException; /** - * Represents an Entra ID administrator configured on a HorizonDB cluster. + * A predefined log capture configuration created by the service for a HorizonDB cluster. */ @Immutable -public final class HorizonDbAdministratorInner extends ProxyResource { +public final class LogCaptureConfigurationInner extends ProxyResource { /* * The resource-specific properties for this resource. */ - private HorizonDbAdministratorProperties properties; + private LogCaptureConfigurationProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -44,9 +44,9 @@ public final class HorizonDbAdministratorInner extends ProxyResource { private String id; /** - * Creates an instance of HorizonDbAdministratorInner class. + * Creates an instance of LogCaptureConfigurationInner class. */ - private HorizonDbAdministratorInner() { + private LogCaptureConfigurationInner() { } /** @@ -54,7 +54,7 @@ private HorizonDbAdministratorInner() { * * @return the properties value. */ - public HorizonDbAdministratorProperties properties() { + public LogCaptureConfigurationProperties properties() { return this.properties; } @@ -108,38 +108,38 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of HorizonDbAdministratorInner from the JsonReader. + * Reads an instance of LogCaptureConfigurationInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbAdministratorInner if the JsonReader was pointing to an instance of it, or null + * @return An instance of LogCaptureConfigurationInner 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 HorizonDbAdministratorInner. + * @throws IOException If an error occurs while reading the LogCaptureConfigurationInner. */ - public static HorizonDbAdministratorInner fromJson(JsonReader jsonReader) throws IOException { + public static LogCaptureConfigurationInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - HorizonDbAdministratorInner deserializedHorizonDbAdministratorInner = new HorizonDbAdministratorInner(); + LogCaptureConfigurationInner deserializedLogCaptureConfigurationInner = new LogCaptureConfigurationInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("id".equals(fieldName)) { - deserializedHorizonDbAdministratorInner.id = reader.getString(); + deserializedLogCaptureConfigurationInner.id = reader.getString(); } else if ("name".equals(fieldName)) { - deserializedHorizonDbAdministratorInner.name = reader.getString(); + deserializedLogCaptureConfigurationInner.name = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedHorizonDbAdministratorInner.type = reader.getString(); + deserializedLogCaptureConfigurationInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedHorizonDbAdministratorInner.properties - = HorizonDbAdministratorProperties.fromJson(reader); + deserializedLogCaptureConfigurationInner.properties + = LogCaptureConfigurationProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { - deserializedHorizonDbAdministratorInner.systemData = SystemData.fromJson(reader); + deserializedLogCaptureConfigurationInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedHorizonDbAdministratorInner; + return deserializedLogCaptureConfigurationInner; }); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/LogFileDownloadUrlInner.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/LogFileDownloadUrlInner.java new file mode 100644 index 0000000000000..2ef12620bc524 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/LogFileDownloadUrlInner.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.horizondb.fluent.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; +import java.time.format.DateTimeFormatter; + +/** + * A short-lived signed URL for downloading a captured log file. + */ +@Immutable +public final class LogFileDownloadUrlInner implements JsonSerializable { + /* + * A short-lived signed URL from which the original log file can be downloaded. + */ + private String downloadUri; + + /* + * The date and time when the signed download URL expires, in UTC. + */ + private OffsetDateTime expiresAtUtc; + + /** + * Creates an instance of LogFileDownloadUrlInner class. + */ + private LogFileDownloadUrlInner() { + } + + /** + * Get the downloadUri property: A short-lived signed URL from which the original log file can be downloaded. + * + * @return the downloadUri value. + */ + public String downloadUri() { + return this.downloadUri; + } + + /** + * Get the expiresAtUtc property: The date and time when the signed download URL expires, in UTC. + * + * @return the expiresAtUtc value. + */ + public OffsetDateTime expiresAtUtc() { + return this.expiresAtUtc; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("downloadUri", this.downloadUri); + jsonWriter.writeStringField("expiresAtUtc", + this.expiresAtUtc == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.expiresAtUtc)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LogFileDownloadUrlInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LogFileDownloadUrlInner 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 LogFileDownloadUrlInner. + */ + public static LogFileDownloadUrlInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LogFileDownloadUrlInner deserializedLogFileDownloadUrlInner = new LogFileDownloadUrlInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("downloadUri".equals(fieldName)) { + deserializedLogFileDownloadUrlInner.downloadUri = reader.getString(); + } else if ("expiresAtUtc".equals(fieldName)) { + deserializedLogFileDownloadUrlInner.expiresAtUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedLogFileDownloadUrlInner; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/LogFileInner.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/LogFileInner.java new file mode 100644 index 0000000000000..03c8fe1dcc33c --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/LogFileInner.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.horizondb.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.horizondb.models.LogFileProperties; +import java.io.IOException; + +/** + * A service-generated log file captured for a HorizonDB cluster. + */ +@Immutable +public final class LogFileInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private LogFileProperties 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 LogFileInner class. + */ + private LogFileInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public LogFileProperties 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 LogFileInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LogFileInner 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 LogFileInner. + */ + public static LogFileInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LogFileInner deserializedLogFileInner = new LogFileInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedLogFileInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedLogFileInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedLogFileInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedLogFileInner.properties = LogFileProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedLogFileInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedLogFileInner; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/MaintenanceEventActionResponseInner.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/MaintenanceEventActionResponseInner.java new file mode 100644 index 0000000000000..04e627eb8d725 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/MaintenanceEventActionResponseInner.java @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.fluent.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 com.azure.resourcemanager.horizondb.models.MaintenanceEventStatus; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * The response from a maintenance event reschedule or apply-now action. + */ +@Immutable +public final class MaintenanceEventActionResponseInner + implements JsonSerializable { + /* + * The maintenance event identifier. + */ + private String maintenanceEventId; + + /* + * The full Azure resource ID of the HorizonDB pool. + */ + private String poolResourceId; + + /* + * The status of the maintenance event. + */ + private MaintenanceEventStatus status; + + /* + * The planned start time of the maintenance event in UTC. + */ + private OffsetDateTime plannedStartTimeUtc; + + /* + * The planned end time of the maintenance event in UTC. + */ + private OffsetDateTime plannedEndTimeUtc; + + /* + * Indicates whether the maintenance event was requested to be applied immediately. The value is true for apply-now + * and false for reschedule. + */ + private Boolean appliedNow; + + /* + * The time when this maintenance event record was last updated, in UTC. + */ + private OffsetDateTime lastUpdatedTimeUtc; + + /** + * Creates an instance of MaintenanceEventActionResponseInner class. + */ + private MaintenanceEventActionResponseInner() { + } + + /** + * Get the maintenanceEventId property: The maintenance event identifier. + * + * @return the maintenanceEventId value. + */ + public String maintenanceEventId() { + return this.maintenanceEventId; + } + + /** + * Get the poolResourceId property: The full Azure resource ID of the HorizonDB pool. + * + * @return the poolResourceId value. + */ + public String poolResourceId() { + return this.poolResourceId; + } + + /** + * Get the status property: The status of the maintenance event. + * + * @return the status value. + */ + public MaintenanceEventStatus status() { + return this.status; + } + + /** + * Get the plannedStartTimeUtc property: The planned start time of the maintenance event in UTC. + * + * @return the plannedStartTimeUtc value. + */ + public OffsetDateTime plannedStartTimeUtc() { + return this.plannedStartTimeUtc; + } + + /** + * Get the plannedEndTimeUtc property: The planned end time of the maintenance event in UTC. + * + * @return the plannedEndTimeUtc value. + */ + public OffsetDateTime plannedEndTimeUtc() { + return this.plannedEndTimeUtc; + } + + /** + * Get the appliedNow property: Indicates whether the maintenance event was requested to be applied immediately. The + * value is true for apply-now and false for reschedule. + * + * @return the appliedNow value. + */ + public Boolean appliedNow() { + return this.appliedNow; + } + + /** + * Get the lastUpdatedTimeUtc property: The time when this maintenance event record was last updated, in UTC. + * + * @return the lastUpdatedTimeUtc value. + */ + public OffsetDateTime lastUpdatedTimeUtc() { + return this.lastUpdatedTimeUtc; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("maintenanceEventId", this.maintenanceEventId); + jsonWriter.writeStringField("poolResourceId", this.poolResourceId); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + jsonWriter.writeStringField("plannedStartTimeUtc", + this.plannedStartTimeUtc == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.plannedStartTimeUtc)); + jsonWriter.writeStringField("plannedEndTimeUtc", + this.plannedEndTimeUtc == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.plannedEndTimeUtc)); + jsonWriter.writeBooleanField("appliedNow", this.appliedNow); + jsonWriter.writeStringField("lastUpdatedTimeUtc", + this.lastUpdatedTimeUtc == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastUpdatedTimeUtc)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceEventActionResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceEventActionResponseInner 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 MaintenanceEventActionResponseInner. + */ + public static MaintenanceEventActionResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceEventActionResponseInner deserializedMaintenanceEventActionResponseInner + = new MaintenanceEventActionResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("maintenanceEventId".equals(fieldName)) { + deserializedMaintenanceEventActionResponseInner.maintenanceEventId = reader.getString(); + } else if ("poolResourceId".equals(fieldName)) { + deserializedMaintenanceEventActionResponseInner.poolResourceId = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedMaintenanceEventActionResponseInner.status + = MaintenanceEventStatus.fromString(reader.getString()); + } else if ("plannedStartTimeUtc".equals(fieldName)) { + deserializedMaintenanceEventActionResponseInner.plannedStartTimeUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("plannedEndTimeUtc".equals(fieldName)) { + deserializedMaintenanceEventActionResponseInner.plannedEndTimeUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("appliedNow".equals(fieldName)) { + deserializedMaintenanceEventActionResponseInner.appliedNow + = reader.getNullable(JsonReader::getBoolean); + } else if ("lastUpdatedTimeUtc".equals(fieldName)) { + deserializedMaintenanceEventActionResponseInner.lastUpdatedTimeUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceEventActionResponseInner; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/MaintenanceEventInner.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/MaintenanceEventInner.java new file mode 100644 index 0000000000000..acfbae193d262 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/MaintenanceEventInner.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.horizondb.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.horizondb.models.MaintenanceEventProperties; +import java.io.IOException; + +/** + * Represents a maintenance event for a HorizonDB pool. + */ +@Immutable +public final class MaintenanceEventInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private MaintenanceEventProperties 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 MaintenanceEventInner class. + */ + private MaintenanceEventInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public MaintenanceEventProperties 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 MaintenanceEventInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceEventInner 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 MaintenanceEventInner. + */ + public static MaintenanceEventInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceEventInner deserializedMaintenanceEventInner = new MaintenanceEventInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedMaintenanceEventInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedMaintenanceEventInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedMaintenanceEventInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedMaintenanceEventInner.properties = MaintenanceEventProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedMaintenanceEventInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceEventInner; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/MicrosoftEntraAdministratorInner.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/MicrosoftEntraAdministratorInner.java new file mode 100644 index 0000000000000..eac240ba1fc26 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/MicrosoftEntraAdministratorInner.java @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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.horizondb.models.MicrosoftEntraAdministratorProperties; +import java.io.IOException; + +/** + * Represents a PostgreSQL role that is a member of the azure_pg_admin role and is mapped to a Microsoft Entra + * principal. + */ +@Immutable +public final class MicrosoftEntraAdministratorInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private MicrosoftEntraAdministratorProperties 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 MicrosoftEntraAdministratorInner class. + */ + private MicrosoftEntraAdministratorInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public MicrosoftEntraAdministratorProperties 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 MicrosoftEntraAdministratorInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MicrosoftEntraAdministratorInner 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 MicrosoftEntraAdministratorInner. + */ + public static MicrosoftEntraAdministratorInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MicrosoftEntraAdministratorInner deserializedMicrosoftEntraAdministratorInner + = new MicrosoftEntraAdministratorInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedMicrosoftEntraAdministratorInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedMicrosoftEntraAdministratorInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedMicrosoftEntraAdministratorInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedMicrosoftEntraAdministratorInner.properties + = MicrosoftEntraAdministratorProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedMicrosoftEntraAdministratorInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMicrosoftEntraAdministratorInner; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/MicrosoftEntraAuthenticationInner.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/MicrosoftEntraAuthenticationInner.java new file mode 100644 index 0000000000000..23c7910d015f6 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/MicrosoftEntraAuthenticationInner.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.horizondb.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.horizondb.models.MicrosoftEntraAuthenticationProperties; +import java.io.IOException; + +/** + * The service-created Microsoft Entra authentication method for a HorizonDB cluster. + */ +@Fluent +public final class MicrosoftEntraAuthenticationInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private MicrosoftEntraAuthenticationProperties 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 MicrosoftEntraAuthenticationInner class. + */ + public MicrosoftEntraAuthenticationInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public MicrosoftEntraAuthenticationProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the MicrosoftEntraAuthenticationInner object itself. + */ + public MicrosoftEntraAuthenticationInner withProperties(MicrosoftEntraAuthenticationProperties 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 MicrosoftEntraAuthenticationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MicrosoftEntraAuthenticationInner 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 MicrosoftEntraAuthenticationInner. + */ + public static MicrosoftEntraAuthenticationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MicrosoftEntraAuthenticationInner deserializedMicrosoftEntraAuthenticationInner + = new MicrosoftEntraAuthenticationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedMicrosoftEntraAuthenticationInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedMicrosoftEntraAuthenticationInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedMicrosoftEntraAuthenticationInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedMicrosoftEntraAuthenticationInner.properties + = MicrosoftEntraAuthenticationProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedMicrosoftEntraAuthenticationInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMicrosoftEntraAuthenticationInner; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/NodeInner.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/NodeInner.java new file mode 100644 index 0000000000000..b034705c81023 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/NodeInner.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.horizondb.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.horizondb.models.NodeProperties; +import java.io.IOException; + +/** + * A service-managed node allocated to a HorizonDB pool. + */ +@Immutable +public final class NodeInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private NodeProperties 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 NodeInner class. + */ + private NodeInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public NodeProperties 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 NodeInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NodeInner 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 NodeInner. + */ + public static NodeInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NodeInner deserializedNodeInner = new NodeInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedNodeInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNodeInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedNodeInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedNodeInner.properties = NodeProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedNodeInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNodeInner; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/ParameterGroupConnectionPropertiesInner.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/ParameterGroupConnectionPropertiesInner.java new file mode 100644 index 0000000000000..872f490cb79d0 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/ParameterGroupConnectionPropertiesInner.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.horizondb.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 java.io.IOException; + +/** + * Connection information for HorizonDB parameter group. + */ +@Immutable +public final class ParameterGroupConnectionPropertiesInner + implements JsonSerializable { + /* + * The Azure resource ID of the connected HorizonDB pool. + */ + private String poolResourceId; + + /** + * Creates an instance of ParameterGroupConnectionPropertiesInner class. + */ + private ParameterGroupConnectionPropertiesInner() { + } + + /** + * Get the poolResourceId property: The Azure resource ID of the connected HorizonDB pool. + * + * @return the poolResourceId value. + */ + public String poolResourceId() { + return this.poolResourceId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ParameterGroupConnectionPropertiesInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ParameterGroupConnectionPropertiesInner 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 ParameterGroupConnectionPropertiesInner. + */ + public static ParameterGroupConnectionPropertiesInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ParameterGroupConnectionPropertiesInner deserializedParameterGroupConnectionPropertiesInner + = new ParameterGroupConnectionPropertiesInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("poolResourceId".equals(fieldName)) { + deserializedParameterGroupConnectionPropertiesInner.poolResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedParameterGroupConnectionPropertiesInner; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbParameterGroupInner.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/ParameterGroupInner.java similarity index 67% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbParameterGroupInner.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/ParameterGroupInner.java index 8dd6b0cdc2053..6bd6a9971dafc 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbParameterGroupInner.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/ParameterGroupInner.java @@ -10,7 +10,7 @@ import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroupProperties; +import com.azure.resourcemanager.horizondb.models.ParameterGroupProperties; import java.io.IOException; import java.util.Map; @@ -18,11 +18,11 @@ * Represents the HorizonDB parameter group. */ @Fluent -public final class HorizonDbParameterGroupInner extends Resource { +public final class ParameterGroupInner extends Resource { /* * The resource-specific properties for this resource. */ - private HorizonDbParameterGroupProperties properties; + private ParameterGroupProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -45,9 +45,9 @@ public final class HorizonDbParameterGroupInner extends Resource { private String id; /** - * Creates an instance of HorizonDbParameterGroupInner class. + * Creates an instance of ParameterGroupInner class. */ - public HorizonDbParameterGroupInner() { + public ParameterGroupInner() { } /** @@ -55,7 +55,7 @@ public HorizonDbParameterGroupInner() { * * @return the properties value. */ - public HorizonDbParameterGroupProperties properties() { + public ParameterGroupProperties properties() { return this.properties; } @@ -63,9 +63,9 @@ public HorizonDbParameterGroupProperties properties() { * Set the properties property: The resource-specific properties for this resource. * * @param properties the properties value to set. - * @return the HorizonDbParameterGroupInner object itself. + * @return the ParameterGroupInner object itself. */ - public HorizonDbParameterGroupInner withProperties(HorizonDbParameterGroupProperties properties) { + public ParameterGroupInner withProperties(ParameterGroupProperties properties) { this.properties = properties; return this; } @@ -113,7 +113,7 @@ public String id() { * {@inheritDoc} */ @Override - public HorizonDbParameterGroupInner withLocation(String location) { + public ParameterGroupInner withLocation(String location) { super.withLocation(location); return this; } @@ -122,7 +122,7 @@ public HorizonDbParameterGroupInner withLocation(String location) { * {@inheritDoc} */ @Override - public HorizonDbParameterGroupInner withTags(Map tags) { + public ParameterGroupInner withTags(Map tags) { super.withTags(tags); return this; } @@ -140,43 +140,42 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of HorizonDbParameterGroupInner from the JsonReader. + * Reads an instance of ParameterGroupInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbParameterGroupInner if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. + * @return An instance of ParameterGroupInner 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 HorizonDbParameterGroupInner. + * @throws IOException If an error occurs while reading the ParameterGroupInner. */ - public static HorizonDbParameterGroupInner fromJson(JsonReader jsonReader) throws IOException { + public static ParameterGroupInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - HorizonDbParameterGroupInner deserializedHorizonDbParameterGroupInner = new HorizonDbParameterGroupInner(); + ParameterGroupInner deserializedParameterGroupInner = new ParameterGroupInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("id".equals(fieldName)) { - deserializedHorizonDbParameterGroupInner.id = reader.getString(); + deserializedParameterGroupInner.id = reader.getString(); } else if ("name".equals(fieldName)) { - deserializedHorizonDbParameterGroupInner.name = reader.getString(); + deserializedParameterGroupInner.name = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedHorizonDbParameterGroupInner.type = reader.getString(); + deserializedParameterGroupInner.type = reader.getString(); } else if ("location".equals(fieldName)) { - deserializedHorizonDbParameterGroupInner.withLocation(reader.getString()); + deserializedParameterGroupInner.withLocation(reader.getString()); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedHorizonDbParameterGroupInner.withTags(tags); + deserializedParameterGroupInner.withTags(tags); } else if ("properties".equals(fieldName)) { - deserializedHorizonDbParameterGroupInner.properties - = HorizonDbParameterGroupProperties.fromJson(reader); + deserializedParameterGroupInner.properties = ParameterGroupProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { - deserializedHorizonDbParameterGroupInner.systemData = SystemData.fromJson(reader); + deserializedParameterGroupInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedHorizonDbParameterGroupInner; + return deserializedParameterGroupInner; }); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/PasswordAuthenticationInner.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/PasswordAuthenticationInner.java new file mode 100644 index 0000000000000..8e8936399ad49 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/PasswordAuthenticationInner.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.horizondb.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.horizondb.models.PasswordAuthenticationProperties; +import java.io.IOException; + +/** + * The service-created PostgreSQL username-and-password authentication method for a HorizonDB cluster. This resource + * configures the authentication mechanism, including its enabled state and administrator login credentials; it is not a + * password-only resource. + */ +@Fluent +public final class PasswordAuthenticationInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private PasswordAuthenticationProperties 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 PasswordAuthenticationInner class. + */ + public PasswordAuthenticationInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public PasswordAuthenticationProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the PasswordAuthenticationInner object itself. + */ + public PasswordAuthenticationInner withProperties(PasswordAuthenticationProperties 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 PasswordAuthenticationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PasswordAuthenticationInner 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 PasswordAuthenticationInner. + */ + public static PasswordAuthenticationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PasswordAuthenticationInner deserializedPasswordAuthenticationInner = new PasswordAuthenticationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPasswordAuthenticationInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPasswordAuthenticationInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPasswordAuthenticationInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPasswordAuthenticationInner.properties + = PasswordAuthenticationProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPasswordAuthenticationInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPasswordAuthenticationInner; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbPoolInner.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/PoolInner.java similarity index 67% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbPoolInner.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/PoolInner.java index b45cc6245712a..4b1c1d80f1dc2 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbPoolInner.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/PoolInner.java @@ -4,25 +4,25 @@ package com.azure.resourcemanager.horizondb.fluent.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.horizondb.models.HorizonDbPoolProperties; +import com.azure.resourcemanager.horizondb.models.PoolProperties; import java.io.IOException; import java.util.Map; /** * Represents the HorizonDB pool. */ -@Immutable -public final class HorizonDbPoolInner extends ProxyResource { +@Fluent +public final class PoolInner extends ProxyResource { /* * The resource-specific properties for this resource. */ - private HorizonDbPoolProperties properties; + private PoolProperties properties; /* * Resource tags. @@ -50,9 +50,9 @@ public final class HorizonDbPoolInner extends ProxyResource { private String id; /** - * Creates an instance of HorizonDbPoolInner class. + * Creates an instance of PoolInner class. */ - private HorizonDbPoolInner() { + public PoolInner() { } /** @@ -60,10 +60,21 @@ private HorizonDbPoolInner() { * * @return the properties value. */ - public HorizonDbPoolProperties properties() { + public PoolProperties properties() { return this.properties; } + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the PoolInner object itself. + */ + public PoolInner withProperties(PoolProperties properties) { + this.properties = properties; + return this; + } + /** * Get the tags property: Resource tags. * @@ -73,6 +84,17 @@ public Map tags() { return this.tags; } + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the PoolInner object itself. + */ + public PoolInner withTags(Map tags) { + this.tags = tags; + return this; + } + /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -124,40 +146,40 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of HorizonDbPoolInner from the JsonReader. + * Reads an instance of PoolInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbPoolInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. + * @return An instance of PoolInner 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 HorizonDbPoolInner. + * @throws IOException If an error occurs while reading the PoolInner. */ - public static HorizonDbPoolInner fromJson(JsonReader jsonReader) throws IOException { + public static PoolInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - HorizonDbPoolInner deserializedHorizonDbPoolInner = new HorizonDbPoolInner(); + PoolInner deserializedPoolInner = new PoolInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("id".equals(fieldName)) { - deserializedHorizonDbPoolInner.id = reader.getString(); + deserializedPoolInner.id = reader.getString(); } else if ("name".equals(fieldName)) { - deserializedHorizonDbPoolInner.name = reader.getString(); + deserializedPoolInner.name = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedHorizonDbPoolInner.type = reader.getString(); + deserializedPoolInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedHorizonDbPoolInner.properties = HorizonDbPoolProperties.fromJson(reader); + deserializedPoolInner.properties = PoolProperties.fromJson(reader); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedHorizonDbPoolInner.tags = tags; + deserializedPoolInner.tags = tags; } else if ("systemData".equals(fieldName)) { - deserializedHorizonDbPoolInner.systemData = SystemData.fromJson(reader); + deserializedPoolInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedHorizonDbPoolInner; + return deserializedPoolInner; }); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbPrivateLinkResourceInner.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/PrivateLinkResourceInner.java similarity index 71% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbPrivateLinkResourceInner.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/PrivateLinkResourceInner.java index f3ac562b1a574..331a1aed14bb3 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbPrivateLinkResourceInner.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/PrivateLinkResourceInner.java @@ -17,7 +17,7 @@ * Represents the HorizonDB private link resource. */ @Immutable -public final class HorizonDbPrivateLinkResourceInner extends ProxyResource { +public final class PrivateLinkResourceInner extends ProxyResource { /* * The resource-specific properties for this resource. */ @@ -44,9 +44,9 @@ public final class HorizonDbPrivateLinkResourceInner extends ProxyResource { private String id; /** - * Creates an instance of HorizonDbPrivateLinkResourceInner class. + * Creates an instance of PrivateLinkResourceInner class. */ - private HorizonDbPrivateLinkResourceInner() { + private PrivateLinkResourceInner() { } /** @@ -108,39 +108,37 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of HorizonDbPrivateLinkResourceInner from the JsonReader. + * Reads an instance of PrivateLinkResourceInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbPrivateLinkResourceInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. + * @return An instance of PrivateLinkResourceInner 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 HorizonDbPrivateLinkResourceInner. + * @throws IOException If an error occurs while reading the PrivateLinkResourceInner. */ - public static HorizonDbPrivateLinkResourceInner fromJson(JsonReader jsonReader) throws IOException { + public static PrivateLinkResourceInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - HorizonDbPrivateLinkResourceInner deserializedHorizonDbPrivateLinkResourceInner - = new HorizonDbPrivateLinkResourceInner(); + PrivateLinkResourceInner deserializedPrivateLinkResourceInner = new PrivateLinkResourceInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("id".equals(fieldName)) { - deserializedHorizonDbPrivateLinkResourceInner.id = reader.getString(); + deserializedPrivateLinkResourceInner.id = reader.getString(); } else if ("name".equals(fieldName)) { - deserializedHorizonDbPrivateLinkResourceInner.name = reader.getString(); + deserializedPrivateLinkResourceInner.name = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedHorizonDbPrivateLinkResourceInner.type = reader.getString(); + deserializedPrivateLinkResourceInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedHorizonDbPrivateLinkResourceInner.properties - = PrivateLinkResourceProperties.fromJson(reader); + deserializedPrivateLinkResourceInner.properties = PrivateLinkResourceProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { - deserializedHorizonDbPrivateLinkResourceInner.systemData = SystemData.fromJson(reader); + deserializedPrivateLinkResourceInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedHorizonDbPrivateLinkResourceInner; + return deserializedPrivateLinkResourceInner; }); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/package-info.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/package-info.java index 6f099e72bcfd8..ce83752f0c2f3 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/package-info.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/models/package-info.java @@ -4,6 +4,6 @@ /** * Package containing the inner data models for HorizonDb. - * Azure Resource Provider API for managing HorizonDB clusters, pools, replicas, and firewall rules. + * Azure Resource Provider API for managing HorizonDB clusters, pools, endpoints, nodes, and firewall rules. */ package com.azure.resourcemanager.horizondb.fluent.models; diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/package-info.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/package-info.java index 4fb9cb5774bb7..c4fca367bafca 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/package-info.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/fluent/package-info.java @@ -4,6 +4,6 @@ /** * Package containing the service clients for HorizonDb. - * Azure Resource Provider API for managing HorizonDB clusters, pools, replicas, and firewall rules. + * Azure Resource Provider API for managing HorizonDB clusters, pools, endpoints, nodes, and firewall rules. */ package com.azure.resourcemanager.horizondb.fluent; diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ActivateChangeDataCaptureIdentityResultImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ActivateChangeDataCaptureIdentityResultImpl.java new file mode 100644 index 0000000000000..5dda3b937d44a --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ActivateChangeDataCaptureIdentityResultImpl.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.horizondb.implementation; + +import com.azure.resourcemanager.horizondb.fluent.models.ActivateChangeDataCaptureIdentityResultInner; +import com.azure.resourcemanager.horizondb.models.ActivateChangeDataCaptureIdentityResult; + +public final class ActivateChangeDataCaptureIdentityResultImpl implements ActivateChangeDataCaptureIdentityResult { + private ActivateChangeDataCaptureIdentityResultInner innerObject; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + ActivateChangeDataCaptureIdentityResultImpl(ActivateChangeDataCaptureIdentityResultInner innerObject, + com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String status() { + return this.innerModel().status(); + } + + public String targetIdentityAssignmentResourceId() { + return this.innerModel().targetIdentityAssignmentResourceId(); + } + + public String previousIdentityAssignmentResourceId() { + return this.innerModel().previousIdentityAssignmentResourceId(); + } + + public ActivateChangeDataCaptureIdentityResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbParameterGroupConnectionPropertiesImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/AuthenticationImpl.java similarity index 56% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbParameterGroupConnectionPropertiesImpl.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/AuthenticationImpl.java index 8d7c1f847b25a..8fd1273522414 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbParameterGroupConnectionPropertiesImpl.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/AuthenticationImpl.java @@ -4,34 +4,43 @@ package com.azure.resourcemanager.horizondb.implementation; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbParameterGroupConnectionPropertiesInner; -import com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroupConnectionProperties; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.horizondb.fluent.models.AuthenticationInner; +import com.azure.resourcemanager.horizondb.models.Authentication; +import com.azure.resourcemanager.horizondb.models.AuthenticationProperties; -public final class HorizonDbParameterGroupConnectionPropertiesImpl - implements HorizonDbParameterGroupConnectionProperties { - private HorizonDbParameterGroupConnectionPropertiesInner innerObject; +public final class AuthenticationImpl implements Authentication { + private AuthenticationInner innerObject; private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; - HorizonDbParameterGroupConnectionPropertiesImpl(HorizonDbParameterGroupConnectionPropertiesInner innerObject, + AuthenticationImpl(AuthenticationInner innerObject, com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } - public String name() { - return this.innerModel().name(); - } - public String id() { return this.innerModel().id(); } + public String name() { + return this.innerModel().name(); + } + public String type() { return this.innerModel().type(); } - public HorizonDbParameterGroupConnectionPropertiesInner innerModel() { + public AuthenticationProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public AuthenticationInner innerModel() { return this.innerObject; } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/AuthenticationsClientImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/AuthenticationsClientImpl.java new file mode 100644 index 0000000000000..3df1c0387f9e2 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/AuthenticationsClientImpl.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.horizondb.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.horizondb.fluent.AuthenticationsClient; +import com.azure.resourcemanager.horizondb.fluent.models.AuthenticationInner; +import com.azure.resourcemanager.horizondb.implementation.models.AuthenticationListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in AuthenticationsClient. + */ +public final class AuthenticationsClientImpl implements AuthenticationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final AuthenticationsService service; + + /** + * The service client containing this operation class. + */ + private final HorizonDbManagementClientImpl client; + + /** + * Initializes an instance of AuthenticationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + AuthenticationsClientImpl(HorizonDbManagementClientImpl client) { + this.service + = RestProxy.create(AuthenticationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for HorizonDbManagementClientAuthentications to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "HorizonDbManagementClientAuthentications") + public interface AuthenticationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/authentications") + @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("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/authentications") + @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, + @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); + } + + /** + * Lists the two service-created authentication configurations for the cluster: passwordMethod and microsoftEntra. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Authentication list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @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())); + } + + /** + * Lists the two service-created authentication configurations for the cluster: passwordMethod and microsoftEntra. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Authentication list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String clusterName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists the two service-created authentication configurations for the cluster: passwordMethod and microsoftEntra. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Authentication list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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); + } + + /** + * Lists the two service-created authentication configurations for the cluster: passwordMethod and microsoftEntra. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Authentication list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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); + } + + /** + * Lists the two service-created authentication configurations for the cluster: passwordMethod and microsoftEntra. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Authentication list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * Lists the two service-created authentication configurations for the cluster: passwordMethod and microsoftEntra. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Authentication list operation as paginated response with {@link PagedIterable}. + */ + @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 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 Authentication 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 Authentication 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 Authentication 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/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/AuthenticationsImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/AuthenticationsImpl.java new file mode 100644 index 0000000000000..26ce3a35be656 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/AuthenticationsImpl.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.horizondb.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.horizondb.fluent.AuthenticationsClient; +import com.azure.resourcemanager.horizondb.fluent.models.AuthenticationInner; +import com.azure.resourcemanager.horizondb.models.Authentication; +import com.azure.resourcemanager.horizondb.models.Authentications; + +public final class AuthenticationsImpl implements Authentications { + private static final ClientLogger LOGGER = new ClientLogger(AuthenticationsImpl.class); + + private final AuthenticationsClient innerClient; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + public AuthenticationsImpl(AuthenticationsClient innerClient, + com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String clusterName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AuthenticationImpl(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 AuthenticationImpl(inner1, this.manager())); + } + + private AuthenticationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/CapabilitiesClientImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/CapabilitiesClientImpl.java new file mode 100644 index 0000000000000..b63bdf2025832 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/CapabilitiesClientImpl.java @@ -0,0 +1,340 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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.horizondb.fluent.CapabilitiesClient; +import com.azure.resourcemanager.horizondb.fluent.models.CapabilityInner; +import com.azure.resourcemanager.horizondb.implementation.models.CapabilityListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in CapabilitiesClient. + */ +public final class CapabilitiesClientImpl implements CapabilitiesClient { + /** + * The proxy service used to perform REST calls. + */ + private final CapabilitiesService service; + + /** + * The service client containing this operation class. + */ + private final HorizonDbManagementClientImpl client; + + /** + * Initializes an instance of CapabilitiesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + CapabilitiesClientImpl(HorizonDbManagementClientImpl client) { + this.service + = RestProxy.create(CapabilitiesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for HorizonDbManagementClientCapabilities to be used by the proxy service + * to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "HorizonDbManagementClientCapabilities") + public interface CapabilitiesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HorizonDb/locations/{location}/capabilities/default") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@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.HorizonDb/locations/{location}/capabilities/default") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@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.HorizonDb/locations/{location}/capabilities") + @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.HorizonDb/locations/{location}/capabilities") + @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 the singleton HorizonDB capability catalog entry available to a subscription in a specific region. + * + * @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 singleton HorizonDB capability catalog entry available to a subscription in a specific region along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String location) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the singleton HorizonDB capability catalog entry available to a subscription in a specific region. + * + * @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 singleton HorizonDB capability catalog entry available to a subscription in a specific region on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String location) { + return getWithResponseAsync(location).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the singleton HorizonDB capability catalog entry available to a subscription in a specific region. + * + * @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 singleton HorizonDB capability catalog entry available to a subscription in a specific region along + * with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String location, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, accept, context); + } + + /** + * Gets the singleton HorizonDB capability catalog entry available to a subscription in a specific region. + * + * @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 singleton HorizonDB capability catalog entry available to a subscription in a specific region. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CapabilityInner get(String location) { + return getWithResponse(location, Context.NONE).getValue(); + } + + /** + * Lists the singleton HorizonDB capability catalog entry available to a subscription in a specific region. The + * result contains one item. + * + * @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 Capability 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())); + } + + /** + * Lists the singleton HorizonDB capability catalog entry available to a subscription in a specific region. The + * result contains one item. + * + * @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 Capability list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String location) { + return new PagedFlux<>(() -> listSinglePageAsync(location), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists the singleton HorizonDB capability catalog entry available to a subscription in a specific region. The + * result contains one item. + * + * @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 Capability 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); + } + + /** + * Lists the singleton HorizonDB capability catalog entry available to a subscription in a specific region. The + * result contains one item. + * + * @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 Capability 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); + } + + /** + * Lists the singleton HorizonDB capability catalog entry available to a subscription in a specific region. The + * result contains one item. + * + * @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 Capability 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)); + } + + /** + * Lists the singleton HorizonDB capability catalog entry available to a subscription in a specific region. The + * result contains one item. + * + * @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 Capability 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 Capability 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 Capability 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 Capability 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/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/CapabilitiesImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/CapabilitiesImpl.java new file mode 100644 index 0000000000000..a10c66bf7a292 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/CapabilitiesImpl.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.horizondb.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.horizondb.fluent.CapabilitiesClient; +import com.azure.resourcemanager.horizondb.fluent.models.CapabilityInner; +import com.azure.resourcemanager.horizondb.models.Capabilities; +import com.azure.resourcemanager.horizondb.models.Capability; + +public final class CapabilitiesImpl implements Capabilities { + private static final ClientLogger LOGGER = new ClientLogger(CapabilitiesImpl.class); + + private final CapabilitiesClient innerClient; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + public CapabilitiesImpl(CapabilitiesClient innerClient, + com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String location, Context context) { + Response inner = this.serviceClient().getWithResponse(location, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new CapabilityImpl(inner.getValue(), this.manager())); + } + + public Capability get(String location) { + CapabilityInner inner = this.serviceClient().get(location); + if (inner != null) { + return new CapabilityImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list(String location) { + PagedIterable inner = this.serviceClient().list(location); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CapabilityImpl(inner1, this.manager())); + } + + public PagedIterable list(String location, Context context) { + PagedIterable inner = this.serviceClient().list(location, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CapabilityImpl(inner1, this.manager())); + } + + private CapabilitiesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/CapabilityImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/CapabilityImpl.java new file mode 100644 index 0000000000000..2ec6b2789ee61 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/CapabilityImpl.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.horizondb.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.horizondb.fluent.models.CapabilityInner; +import com.azure.resourcemanager.horizondb.models.Capability; +import com.azure.resourcemanager.horizondb.models.CapabilityProperties; + +public final class CapabilityImpl implements Capability { + private CapabilityInner innerObject; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + CapabilityImpl(CapabilityInner innerObject, com.azure.resourcemanager.horizondb.HorizonDbManager 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 CapabilityProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public CapabilityInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbReplicasClientImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureCapabilitiesClientImpl.java similarity index 61% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbReplicasClientImpl.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureCapabilitiesClientImpl.java index 85a1708664282..3b62b00a2d54c 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbReplicasClientImpl.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureCapabilitiesClientImpl.java @@ -33,22 +33,22 @@ import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.horizondb.fluent.HorizonDbReplicasClient; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbReplicaInner; -import com.azure.resourcemanager.horizondb.implementation.models.HorizonDbReplicaListResult; -import com.azure.resourcemanager.horizondb.models.HorizonDbReplicaForPatchUpdate; +import com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureCapabilitiesClient; +import com.azure.resourcemanager.horizondb.fluent.models.ChangeDataCaptureCapabilityInner; +import com.azure.resourcemanager.horizondb.implementation.models.ChangeDataCaptureCapabilityListResult; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureCapabilityForPatchUpdate; 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 HorizonDbReplicasClient. + * An instance of this class provides access to all the operations defined in ChangeDataCaptureCapabilitiesClient. */ -public final class HorizonDbReplicasClientImpl implements HorizonDbReplicasClient { +public final class ChangeDataCaptureCapabilitiesClientImpl implements ChangeDataCaptureCapabilitiesClient { /** * The proxy service used to perform REST calls. */ - private final HorizonDbReplicasService service; + private final ChangeDataCaptureCapabilitiesService service; /** * The service client containing this operation class. @@ -56,124 +56,118 @@ public final class HorizonDbReplicasClientImpl implements HorizonDbReplicasClien private final HorizonDbManagementClientImpl client; /** - * Initializes an instance of HorizonDbReplicasClientImpl. + * Initializes an instance of ChangeDataCaptureCapabilitiesClientImpl. * * @param client the instance of the service client containing this operation class. */ - HorizonDbReplicasClientImpl(HorizonDbManagementClientImpl client) { - this.service - = RestProxy.create(HorizonDbReplicasService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + ChangeDataCaptureCapabilitiesClientImpl(HorizonDbManagementClientImpl client) { + this.service = RestProxy.create(ChangeDataCaptureCapabilitiesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for HorizonDbManagementClientHorizonDbReplicas to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for HorizonDbManagementClientChangeDataCaptureCapabilities to be used by + * the proxy service to perform REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "HorizonDbManagementClientHorizonDbReplicas") - public interface HorizonDbReplicasService { + @ServiceInterface(name = "HorizonDbManagementClientChangeDataCaptureCapabilities") + public interface ChangeDataCaptureCapabilitiesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/replicas/{replicaName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCapture/default") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") 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, - @PathParam("poolName") String poolName, @PathParam("replicaName") String replicaName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/replicas/{replicaName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCapture/default") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") 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("poolName") String poolName, @PathParam("replicaName") String replicaName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/replicas") - @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("clusterName") String clusterName, - @PathParam("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/replicas") - @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("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); - - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/replicas/{replicaName}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCapture/default") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + Mono>> createOrReplace(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("poolName") String poolName, @PathParam("replicaName") String replicaName, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") HorizonDbReplicaInner resource, Context context); + @BodyParam("application/json") ChangeDataCaptureCapabilityInner resource, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/replicas/{replicaName}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCapture/default") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + Response createOrReplaceSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("poolName") String poolName, @PathParam("replicaName") String replicaName, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") HorizonDbReplicaInner resource, Context context); + @BodyParam("application/json") ChangeDataCaptureCapabilityInner resource, Context context); - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/replicas/{replicaName}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCapture/default") @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("clusterName") String clusterName, - @PathParam("poolName") String poolName, @PathParam("replicaName") String replicaName, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") HorizonDbReplicaForPatchUpdate properties, Context context); + @BodyParam("application/json") ChangeDataCaptureCapabilityForPatchUpdate properties, Context context); - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/replicas/{replicaName}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCapture/default") @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("poolName") String poolName, @PathParam("replicaName") String replicaName, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") HorizonDbReplicaForPatchUpdate properties, Context context); + @BodyParam("application/json") ChangeDataCaptureCapabilityForPatchUpdate properties, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/replicas/{replicaName}") + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCapture/default") @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("clusterName") String clusterName, - @PathParam("poolName") String poolName, @PathParam("replicaName") String replicaName, Context context); + Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/replicas/{replicaName}") + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCapture/default") @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("poolName") String poolName, @PathParam("replicaName") String replicaName, Context context); + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCapture") + @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("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCapture") + @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, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( + Mono> listNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -181,664 +175,490 @@ Mono> listNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync( + Response listNextSync( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets information about a HorizonDB replica. + * Gets the singleton change data capture capability for a HorizonDB cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB replica along with {@link Response} on successful completion of - * {@link Mono}. + * @return the singleton change data capture capability for a HorizonDB cluster along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String clusterName, - String poolName, String replicaName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String clusterName) { final String accept = "application/json"; - return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, replicaName, accept, context)) + return FluxUtil + .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())); } /** - * Gets information about a HorizonDB replica. + * Gets the singleton change data capture capability for a HorizonDB cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB replica on successful completion of {@link Mono}. + * @return the singleton change data capture capability for a HorizonDB cluster on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String clusterName, String poolName, - String replicaName) { - return getWithResponseAsync(resourceGroupName, clusterName, poolName, replicaName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono getAsync(String resourceGroupName, String clusterName) { + return getWithResponseAsync(resourceGroupName, clusterName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets information about a HorizonDB replica. + * Gets the singleton change data capture capability for a HorizonDB cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB replica along with {@link Response}. + * @return the singleton change data capture capability for a HorizonDB cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String clusterName, - String poolName, String replicaName, Context context) { + public Response getWithResponse(String resourceGroupName, String clusterName, + Context context) { final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, poolName, replicaName, accept, context); - } - - /** - * Gets information about a HorizonDB replica. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB replica. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public HorizonDbReplicaInner get(String resourceGroupName, String clusterName, String poolName, - String replicaName) { - return getWithResponse(resourceGroupName, clusterName, poolName, replicaName, Context.NONE).getValue(); + resourceGroupName, clusterName, accept, context); } /** - * Lists all HorizonDB replicas in a pool. + * Gets the singleton change data capture capability for a HorizonDB cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbReplica list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the singleton change data capture capability for a HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String clusterName, - String poolName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, 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())); + public ChangeDataCaptureCapabilityInner get(String resourceGroupName, String clusterName) { + return getWithResponse(resourceGroupName, clusterName, Context.NONE).getValue(); } /** - * Lists all HorizonDB replicas in a pool. + * Creates or replaces the singleton change data capture capability and reconciles shared engine prerequisites. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbReplica list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String clusterName, String poolName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName, poolName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all HorizonDB replicas in a pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbReplica list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String clusterName, - String poolName) { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, poolName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Lists all HorizonDB replicas in a pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbReplica list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String clusterName, - String poolName, Context context) { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, poolName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Lists all HorizonDB replicas in a pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbReplica list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String clusterName, String poolName) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName, poolName), - nextLink -> listNextSinglePage(nextLink)); - } - - /** - * Lists all HorizonDB replicas in a pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbReplica list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String clusterName, String poolName, - Context context) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName, poolName, context), - nextLink -> listNextSinglePage(nextLink, context)); - } - - /** - * Creates a new HorizonDB replica or updates an existing replica. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 represents the HorizonDB replica along with {@link Response} on successful completion of {@link Mono}. + * @return the singleton change data capture capability for a HorizonDB cluster along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String clusterName, String poolName, String replicaName, HorizonDbReplicaInner resource) { + public Mono>> createOrReplaceWithResponseAsync(String resourceGroupName, + String clusterName, ChangeDataCaptureCapabilityInner 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, clusterName, poolName, replicaName, contentType, - accept, resource, context)) + .withContext(context -> service.createOrReplace(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, resource, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates a new HorizonDB replica or updates an existing replica. + * Creates or replaces the singleton change data capture capability and reconciles shared engine prerequisites. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 represents the HorizonDB replica along with {@link Response}. + * @return the singleton change data capture capability for a HorizonDB cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String clusterName, - String poolName, String replicaName, HorizonDbReplicaInner resource) { + private Response createOrReplaceWithResponse(String resourceGroupName, String clusterName, + ChangeDataCaptureCapabilityInner resource) { final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, replicaName, contentType, accept, - resource, Context.NONE); + return service.createOrReplaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, resource, + Context.NONE); } /** - * Creates a new HorizonDB replica or updates an existing replica. + * Creates or replaces the singleton change data capture capability and reconciles shared engine prerequisites. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 represents the HorizonDB replica along with {@link Response}. + * @return the singleton change data capture capability for a HorizonDB cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String clusterName, - String poolName, String replicaName, HorizonDbReplicaInner resource, Context context) { + private Response createOrReplaceWithResponse(String resourceGroupName, String clusterName, + ChangeDataCaptureCapabilityInner 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, poolName, replicaName, contentType, accept, - resource, context); + return service.createOrReplaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, resource, context); } /** - * Creates a new HorizonDB replica or updates an existing replica. + * Creates or replaces the singleton change data capture capability and reconciles shared engine prerequisites. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 represents the HorizonDB replica. + * @return the {@link PollerFlux} for polling of the singleton change data capture capability for a HorizonDB + * cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, HorizonDbReplicaInner> beginCreateOrUpdateAsync( - String resourceGroupName, String clusterName, String poolName, String replicaName, - HorizonDbReplicaInner resource) { + public PollerFlux, ChangeDataCaptureCapabilityInner> + beginCreateOrReplaceAsync(String resourceGroupName, String clusterName, + ChangeDataCaptureCapabilityInner resource) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, poolName, replicaName, resource); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), HorizonDbReplicaInner.class, HorizonDbReplicaInner.class, - this.client.getContext()); + = createOrReplaceWithResponseAsync(resourceGroupName, clusterName, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ChangeDataCaptureCapabilityInner.class, + ChangeDataCaptureCapabilityInner.class, this.client.getContext()); } /** - * Creates a new HorizonDB replica or updates an existing replica. + * Creates or replaces the singleton change data capture capability and reconciles shared engine prerequisites. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 represents the HorizonDB replica. + * @return the {@link SyncPoller} for polling of the singleton change data capture capability for a HorizonDB + * cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, HorizonDbReplicaInner> beginCreateOrUpdate( - String resourceGroupName, String clusterName, String poolName, String replicaName, - HorizonDbReplicaInner resource) { - Response response - = createOrUpdateWithResponse(resourceGroupName, clusterName, poolName, replicaName, resource); - return this.client.getLroResult(response, - HorizonDbReplicaInner.class, HorizonDbReplicaInner.class, Context.NONE); + public SyncPoller, ChangeDataCaptureCapabilityInner> + beginCreateOrReplace(String resourceGroupName, String clusterName, ChangeDataCaptureCapabilityInner resource) { + Response response = createOrReplaceWithResponse(resourceGroupName, clusterName, resource); + return this.client.getLroResult(response, + ChangeDataCaptureCapabilityInner.class, ChangeDataCaptureCapabilityInner.class, Context.NONE); } /** - * Creates a new HorizonDB replica or updates an existing replica. + * Creates or replaces the singleton change data capture capability and reconciles shared engine prerequisites. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 represents the HorizonDB replica. + * @return the {@link SyncPoller} for polling of the singleton change data capture capability for a HorizonDB + * cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, HorizonDbReplicaInner> beginCreateOrUpdate( - String resourceGroupName, String clusterName, String poolName, String replicaName, - HorizonDbReplicaInner resource, Context context) { - Response response - = createOrUpdateWithResponse(resourceGroupName, clusterName, poolName, replicaName, resource, context); - return this.client.getLroResult(response, - HorizonDbReplicaInner.class, HorizonDbReplicaInner.class, context); + public SyncPoller, ChangeDataCaptureCapabilityInner> + beginCreateOrReplace(String resourceGroupName, String clusterName, ChangeDataCaptureCapabilityInner resource, + Context context) { + Response response = createOrReplaceWithResponse(resourceGroupName, clusterName, resource, context); + return this.client.getLroResult(response, + ChangeDataCaptureCapabilityInner.class, ChangeDataCaptureCapabilityInner.class, context); } /** - * Creates a new HorizonDB replica or updates an existing replica. + * Creates or replaces the singleton change data capture capability and reconciles shared engine prerequisites. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 represents the HorizonDB replica on successful completion of {@link Mono}. + * @return the singleton change data capture capability for a HorizonDB cluster on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String clusterName, - String poolName, String replicaName, HorizonDbReplicaInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, clusterName, poolName, replicaName, resource).last() + public Mono createOrReplaceAsync(String resourceGroupName, String clusterName, + ChangeDataCaptureCapabilityInner resource) { + return beginCreateOrReplaceAsync(resourceGroupName, clusterName, resource).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Creates a new HorizonDB replica or updates an existing replica. + * Creates or replaces the singleton change data capture capability and reconciles shared engine prerequisites. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 represents the HorizonDB replica. + * @return the singleton change data capture capability for a HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HorizonDbReplicaInner createOrUpdate(String resourceGroupName, String clusterName, String poolName, - String replicaName, HorizonDbReplicaInner resource) { - return beginCreateOrUpdate(resourceGroupName, clusterName, poolName, replicaName, resource).getFinalResult(); + public ChangeDataCaptureCapabilityInner createOrReplace(String resourceGroupName, String clusterName, + ChangeDataCaptureCapabilityInner resource) { + return beginCreateOrReplace(resourceGroupName, clusterName, resource).getFinalResult(); } /** - * Creates a new HorizonDB replica or updates an existing replica. + * Creates or replaces the singleton change data capture capability and reconciles shared engine prerequisites. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 represents the HorizonDB replica. + * @return the singleton change data capture capability for a HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HorizonDbReplicaInner createOrUpdate(String resourceGroupName, String clusterName, String poolName, - String replicaName, HorizonDbReplicaInner resource, Context context) { - return beginCreateOrUpdate(resourceGroupName, clusterName, poolName, replicaName, resource, context) - .getFinalResult(); + public ChangeDataCaptureCapabilityInner createOrReplace(String resourceGroupName, String clusterName, + ChangeDataCaptureCapabilityInner resource, Context context) { + return beginCreateOrReplace(resourceGroupName, clusterName, resource, context).getFinalResult(); } /** - * Updates an existing HorizonDB replica (e.g., role). + * Updates mutable change data capture capability properties. Omitted properties preserve their current values. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 represents the HorizonDB replica along with {@link Response} on successful completion of {@link Mono}. + * @return the singleton change data capture capability for a HorizonDB cluster along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, - String poolName, String replicaName, HorizonDbReplicaForPatchUpdate properties) { + ChangeDataCaptureCapabilityForPatchUpdate 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, clusterName, poolName, replicaName, contentType, - accept, properties, context)) + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, properties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates an existing HorizonDB replica (e.g., role). + * Updates mutable change data capture capability properties. Omitted properties preserve their current values. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 represents the HorizonDB replica along with {@link Response}. + * @return the singleton change data capture capability for a HorizonDB cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String clusterName, String poolName, - String replicaName, HorizonDbReplicaForPatchUpdate properties) { + private Response updateWithResponse(String resourceGroupName, String clusterName, + ChangeDataCaptureCapabilityForPatchUpdate properties) { final String contentType = "application/json"; final String accept = "application/json"; return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, replicaName, contentType, accept, - properties, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, properties, + Context.NONE); } /** - * Updates an existing HorizonDB replica (e.g., role). + * Updates mutable change data capture capability properties. Omitted properties preserve their current values. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 represents the HorizonDB replica along with {@link Response}. + * @return the singleton change data capture capability for a HorizonDB cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String clusterName, String poolName, - String replicaName, HorizonDbReplicaForPatchUpdate properties, Context context) { + private Response updateWithResponse(String resourceGroupName, String clusterName, + ChangeDataCaptureCapabilityForPatchUpdate 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, clusterName, poolName, replicaName, contentType, accept, - properties, context); + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, properties, context); } /** - * Updates an existing HorizonDB replica (e.g., role). + * Updates mutable change data capture capability properties. Omitted properties preserve their current values. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 represents the HorizonDB replica. + * @return the {@link PollerFlux} for polling of the singleton change data capture capability for a HorizonDB + * cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, HorizonDbReplicaInner> beginUpdateAsync( - String resourceGroupName, String clusterName, String poolName, String replicaName, - HorizonDbReplicaForPatchUpdate properties) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, clusterName, poolName, replicaName, properties); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), HorizonDbReplicaInner.class, HorizonDbReplicaInner.class, - this.client.getContext()); + public PollerFlux, ChangeDataCaptureCapabilityInner> beginUpdateAsync( + String resourceGroupName, String clusterName, ChangeDataCaptureCapabilityForPatchUpdate properties) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, clusterName, properties); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ChangeDataCaptureCapabilityInner.class, + ChangeDataCaptureCapabilityInner.class, this.client.getContext()); } /** - * Updates an existing HorizonDB replica (e.g., role). + * Updates mutable change data capture capability properties. Omitted properties preserve their current values. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 represents the HorizonDB replica. + * @return the {@link SyncPoller} for polling of the singleton change data capture capability for a HorizonDB + * cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, HorizonDbReplicaInner> beginUpdate(String resourceGroupName, - String clusterName, String poolName, String replicaName, HorizonDbReplicaForPatchUpdate properties) { - Response response - = updateWithResponse(resourceGroupName, clusterName, poolName, replicaName, properties); - return this.client.getLroResult(response, - HorizonDbReplicaInner.class, HorizonDbReplicaInner.class, Context.NONE); + public SyncPoller, ChangeDataCaptureCapabilityInner> beginUpdate( + String resourceGroupName, String clusterName, ChangeDataCaptureCapabilityForPatchUpdate properties) { + Response response = updateWithResponse(resourceGroupName, clusterName, properties); + return this.client.getLroResult(response, + ChangeDataCaptureCapabilityInner.class, ChangeDataCaptureCapabilityInner.class, Context.NONE); } /** - * Updates an existing HorizonDB replica (e.g., role). + * Updates mutable change data capture capability properties. Omitted properties preserve their current values. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 represents the HorizonDB replica. + * @return the {@link SyncPoller} for polling of the singleton change data capture capability for a HorizonDB + * cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, HorizonDbReplicaInner> beginUpdate(String resourceGroupName, - String clusterName, String poolName, String replicaName, HorizonDbReplicaForPatchUpdate properties, + public SyncPoller, ChangeDataCaptureCapabilityInner> beginUpdate( + String resourceGroupName, String clusterName, ChangeDataCaptureCapabilityForPatchUpdate properties, Context context) { - Response response - = updateWithResponse(resourceGroupName, clusterName, poolName, replicaName, properties, context); - return this.client.getLroResult(response, - HorizonDbReplicaInner.class, HorizonDbReplicaInner.class, context); + Response response = updateWithResponse(resourceGroupName, clusterName, properties, context); + return this.client.getLroResult(response, + ChangeDataCaptureCapabilityInner.class, ChangeDataCaptureCapabilityInner.class, context); } /** - * Updates an existing HorizonDB replica (e.g., role). + * Updates mutable change data capture capability properties. Omitted properties preserve their current values. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 represents the HorizonDB replica on successful completion of {@link Mono}. + * @return the singleton change data capture capability for a HorizonDB cluster on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String clusterName, String poolName, - String replicaName, HorizonDbReplicaForPatchUpdate properties) { - return beginUpdateAsync(resourceGroupName, clusterName, poolName, replicaName, properties).last() + public Mono updateAsync(String resourceGroupName, String clusterName, + ChangeDataCaptureCapabilityForPatchUpdate properties) { + return beginUpdateAsync(resourceGroupName, clusterName, properties).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates an existing HorizonDB replica (e.g., role). + * Updates mutable change data capture capability properties. Omitted properties preserve their current values. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 represents the HorizonDB replica. + * @return the singleton change data capture capability for a HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HorizonDbReplicaInner update(String resourceGroupName, String clusterName, String poolName, - String replicaName, HorizonDbReplicaForPatchUpdate properties) { - return beginUpdate(resourceGroupName, clusterName, poolName, replicaName, properties).getFinalResult(); + public ChangeDataCaptureCapabilityInner update(String resourceGroupName, String clusterName, + ChangeDataCaptureCapabilityForPatchUpdate properties) { + return beginUpdate(resourceGroupName, clusterName, properties).getFinalResult(); } /** - * Updates an existing HorizonDB replica (e.g., role). + * Updates mutable change data capture capability properties. Omitted properties preserve their current values. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @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 represents the HorizonDB replica. + * @return the singleton change data capture capability for a HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HorizonDbReplicaInner update(String resourceGroupName, String clusterName, String poolName, - String replicaName, HorizonDbReplicaForPatchUpdate properties, Context context) { - return beginUpdate(resourceGroupName, clusterName, poolName, replicaName, properties, context).getFinalResult(); + public ChangeDataCaptureCapabilityInner update(String resourceGroupName, String clusterName, + ChangeDataCaptureCapabilityForPatchUpdate properties, Context context) { + return beginUpdate(resourceGroupName, clusterName, properties, context).getFinalResult(); } /** - * Deletes a HorizonDB replica. + * Deletes the change data capture capability after all change data capture destinations and configurations have + * been removed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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) - public Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, - String poolName, String replicaName) { + public Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName) { return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, replicaName, context)) + this.client.getSubscriptionId(), resourceGroupName, clusterName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a HorizonDB replica. + * Deletes the change data capture capability after all change data capture destinations and configurations have + * been removed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 clusterName, String poolName, - String replicaName) { + private Response deleteWithResponse(String resourceGroupName, String clusterName) { return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, replicaName, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, clusterName, Context.NONE); } /** - * Deletes a HorizonDB replica. + * Deletes the change data capture capability after all change data capture destinations and configurations have + * been removed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -846,59 +666,52 @@ private Response deleteWithResponse(String resourceGroupName, String * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String clusterName, String poolName, - String replicaName, Context context) { + private Response deleteWithResponse(String resourceGroupName, String clusterName, Context context) { return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, replicaName, context); + this.client.getSubscriptionId(), resourceGroupName, clusterName, context); } /** - * Deletes a HorizonDB replica. + * Deletes the change data capture capability after all change data capture destinations and configurations have + * been removed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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) - public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, - String poolName, String replicaName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, clusterName, poolName, replicaName); + public 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()); } /** - * Deletes a HorizonDB replica. + * Deletes the change data capture capability after all change data capture destinations and configurations have + * been removed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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, String poolName, - String replicaName) { - Response response = deleteWithResponse(resourceGroupName, clusterName, poolName, replicaName); + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName) { + Response response = deleteWithResponse(resourceGroupName, clusterName); return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes a HorizonDB replica. + * Deletes the change data capture capability after all change data capture destinations and configurations have + * been removed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -906,63 +719,176 @@ 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, String poolName, - String replicaName, Context context) { - Response response - = deleteWithResponse(resourceGroupName, clusterName, poolName, replicaName, context); + 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); } /** - * Deletes a HorizonDB replica. + * Deletes the change data capture capability after all change data capture destinations and configurations have + * been removed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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) - public Mono deleteAsync(String resourceGroupName, String clusterName, String poolName, String replicaName) { - return beginDeleteAsync(resourceGroupName, clusterName, poolName, replicaName).last() - .flatMap(this.client::getLroFinalResultOrError); + public Mono deleteAsync(String resourceGroupName, String clusterName) { + return beginDeleteAsync(resourceGroupName, clusterName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the change data capture capability after all change data capture destinations and configurations have + * been removed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String clusterName) { + beginDelete(resourceGroupName, clusterName).getFinalResult(); + } + + /** + * Deletes the change data capture capability after all change data capture destinations and configurations have + * been removed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String clusterName, Context context) { + beginDelete(resourceGroupName, clusterName, context).getFinalResult(); + } + + /** + * Lists the optional singleton change data capture capability for a cluster. The result contains zero or one item. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 ChangeDataCaptureCapability list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @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())); + } + + /** + * Lists the optional singleton change data capture capability for a cluster. The result contains zero or one item. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 ChangeDataCaptureCapability list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String clusterName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Deletes a HorizonDB replica. + * Lists the optional singleton change data capture capability for a cluster. The result contains zero or one item. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ChangeDataCaptureCapability list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String clusterName, String poolName, String replicaName) { - beginDelete(resourceGroupName, clusterName, poolName, replicaName).getFinalResult(); + 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); } /** - * Deletes a HorizonDB replica. + * Lists the optional singleton change data capture capability for a cluster. The result contains zero or one item. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ChangeDataCaptureCapability list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String clusterName, String poolName, String replicaName, + 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); + } + + /** + * Lists the optional singleton change data capture capability for a cluster. The result contains zero or one item. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 ChangeDataCaptureCapability list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * Lists the optional singleton change data capture capability for a cluster. The result contains zero or one item. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 ChangeDataCaptureCapability list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterName, Context context) { - beginDelete(resourceGroupName, clusterName, poolName, replicaName, context).getFinalResult(); + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -972,14 +898,14 @@ public void delete(String resourceGroupName, String clusterName, String poolName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbReplica list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a ChangeDataCaptureCapability list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + 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(), + .>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,12 +917,12 @@ private Mono> listNextSinglePageAsync(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 the response of a HorizonDbReplica list operation along with {@link PagedResponse}. + * @return the response of a ChangeDataCaptureCapability list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { + private PagedResponse listNextSinglePage(String nextLink) { final String accept = "application/json"; - Response res + 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); @@ -1010,12 +936,12 @@ private PagedResponse listNextSinglePage(String nextLink) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbReplica list operation along with {@link PagedResponse}. + * @return the response of a ChangeDataCaptureCapability list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { + private PagedResponse listNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - Response res + 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/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureCapabilitiesImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureCapabilitiesImpl.java new file mode 100644 index 0000000000000..85af7e46cb222 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureCapabilitiesImpl.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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.horizondb.fluent.ChangeDataCaptureCapabilitiesClient; +import com.azure.resourcemanager.horizondb.fluent.models.ChangeDataCaptureCapabilityInner; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureCapabilities; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureCapability; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureCapabilityForPatchUpdate; + +public final class ChangeDataCaptureCapabilitiesImpl implements ChangeDataCaptureCapabilities { + private static final ClientLogger LOGGER = new ClientLogger(ChangeDataCaptureCapabilitiesImpl.class); + + private final ChangeDataCaptureCapabilitiesClient innerClient; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + public ChangeDataCaptureCapabilitiesImpl(ChangeDataCaptureCapabilitiesClient innerClient, + com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String clusterName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, clusterName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ChangeDataCaptureCapabilityImpl(inner.getValue(), this.manager())); + } + + public ChangeDataCaptureCapability get(String resourceGroupName, String clusterName) { + ChangeDataCaptureCapabilityInner inner = this.serviceClient().get(resourceGroupName, clusterName); + if (inner != null) { + return new ChangeDataCaptureCapabilityImpl(inner, this.manager()); + } else { + return null; + } + } + + public ChangeDataCaptureCapability createOrReplace(String resourceGroupName, String clusterName, + ChangeDataCaptureCapabilityInner resource) { + ChangeDataCaptureCapabilityInner inner + = this.serviceClient().createOrReplace(resourceGroupName, clusterName, resource); + if (inner != null) { + return new ChangeDataCaptureCapabilityImpl(inner, this.manager()); + } else { + return null; + } + } + + public ChangeDataCaptureCapability createOrReplace(String resourceGroupName, String clusterName, + ChangeDataCaptureCapabilityInner resource, Context context) { + ChangeDataCaptureCapabilityInner inner + = this.serviceClient().createOrReplace(resourceGroupName, clusterName, resource, context); + if (inner != null) { + return new ChangeDataCaptureCapabilityImpl(inner, this.manager()); + } else { + return null; + } + } + + public ChangeDataCaptureCapability update(String resourceGroupName, String clusterName, + ChangeDataCaptureCapabilityForPatchUpdate properties) { + ChangeDataCaptureCapabilityInner inner + = this.serviceClient().update(resourceGroupName, clusterName, properties); + if (inner != null) { + return new ChangeDataCaptureCapabilityImpl(inner, this.manager()); + } else { + return null; + } + } + + public ChangeDataCaptureCapability update(String resourceGroupName, String clusterName, + ChangeDataCaptureCapabilityForPatchUpdate properties, Context context) { + ChangeDataCaptureCapabilityInner inner + = this.serviceClient().update(resourceGroupName, clusterName, properties, context); + if (inner != null) { + return new ChangeDataCaptureCapabilityImpl(inner, this.manager()); + } else { + return null; + } + } + + 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 ChangeDataCaptureCapabilityImpl(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 ChangeDataCaptureCapabilityImpl(inner1, this.manager())); + } + + private ChangeDataCaptureCapabilitiesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPoolImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureCapabilityImpl.java similarity index 57% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPoolImpl.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureCapabilityImpl.java index 214a79c62568f..0bf5ecdb9cf5c 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPoolImpl.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureCapabilityImpl.java @@ -5,18 +5,16 @@ package com.azure.resourcemanager.horizondb.implementation; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbPoolInner; -import com.azure.resourcemanager.horizondb.models.HorizonDbPool; -import com.azure.resourcemanager.horizondb.models.HorizonDbPoolProperties; -import java.util.Collections; -import java.util.Map; +import com.azure.resourcemanager.horizondb.fluent.models.ChangeDataCaptureCapabilityInner; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureCapability; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureCapabilityProperties; -public final class HorizonDbPoolImpl implements HorizonDbPool { - private HorizonDbPoolInner innerObject; +public final class ChangeDataCaptureCapabilityImpl implements ChangeDataCaptureCapability { + private ChangeDataCaptureCapabilityInner innerObject; private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; - HorizonDbPoolImpl(HorizonDbPoolInner innerObject, + ChangeDataCaptureCapabilityImpl(ChangeDataCaptureCapabilityInner innerObject, com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -34,24 +32,19 @@ public String type() { return this.innerModel().type(); } - public HorizonDbPoolProperties properties() { + public ChangeDataCaptureCapabilityProperties properties() { return this.innerModel().properties(); } - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } + public String eTag() { + return this.innerModel().eTag(); } public SystemData systemData() { return this.innerModel().systemData(); } - public HorizonDbPoolInner innerModel() { + public ChangeDataCaptureCapabilityInner innerModel() { return this.innerObject; } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureConfigurationImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureConfigurationImpl.java new file mode 100644 index 0000000000000..6094bad2f67a8 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureConfigurationImpl.java @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.horizondb.fluent.models.ChangeDataCaptureConfigurationInner; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureConfiguration; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureConfigurationForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureConfigurationProperties; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureConfigurationPropertiesForPatchUpdate; + +public final class ChangeDataCaptureConfigurationImpl implements ChangeDataCaptureConfiguration, + ChangeDataCaptureConfiguration.Definition, ChangeDataCaptureConfiguration.Update { + private ChangeDataCaptureConfigurationInner innerObject; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public ChangeDataCaptureConfigurationProperties properties() { + return this.innerModel().properties(); + } + + public String eTag() { + return this.innerModel().eTag(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ChangeDataCaptureConfigurationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String clusterName; + + private String configurationName; + + private ChangeDataCaptureConfigurationForPatchUpdate updateProperties; + + public ChangeDataCaptureConfigurationImpl withExistingCluster(String resourceGroupName, String clusterName) { + this.resourceGroupName = resourceGroupName; + this.clusterName = clusterName; + return this; + } + + public ChangeDataCaptureConfiguration create() { + this.innerObject = serviceManager.serviceClient() + .getChangeDataCaptureConfigurations() + .createOrReplace(resourceGroupName, clusterName, configurationName, this.innerModel(), Context.NONE); + return this; + } + + public ChangeDataCaptureConfiguration create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getChangeDataCaptureConfigurations() + .createOrReplace(resourceGroupName, clusterName, configurationName, this.innerModel(), context); + return this; + } + + ChangeDataCaptureConfigurationImpl(String name, + com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerObject = new ChangeDataCaptureConfigurationInner(); + this.serviceManager = serviceManager; + this.configurationName = name; + } + + public ChangeDataCaptureConfigurationImpl update() { + this.updateProperties = new ChangeDataCaptureConfigurationForPatchUpdate(); + return this; + } + + public ChangeDataCaptureConfiguration apply() { + this.innerObject = serviceManager.serviceClient() + .getChangeDataCaptureConfigurations() + .update(resourceGroupName, clusterName, configurationName, updateProperties, Context.NONE); + return this; + } + + public ChangeDataCaptureConfiguration apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getChangeDataCaptureConfigurations() + .update(resourceGroupName, clusterName, configurationName, updateProperties, context); + return this; + } + + ChangeDataCaptureConfigurationImpl(ChangeDataCaptureConfigurationInner innerObject, + com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusters"); + this.configurationName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "changeDataCaptureConfigurations"); + } + + public ChangeDataCaptureConfiguration refresh() { + this.innerObject = serviceManager.serviceClient() + .getChangeDataCaptureConfigurations() + .getWithResponse(resourceGroupName, clusterName, configurationName, Context.NONE) + .getValue(); + return this; + } + + public ChangeDataCaptureConfiguration refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getChangeDataCaptureConfigurations() + .getWithResponse(resourceGroupName, clusterName, configurationName, context) + .getValue(); + return this; + } + + public ChangeDataCaptureConfigurationImpl withProperties(ChangeDataCaptureConfigurationProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public ChangeDataCaptureConfigurationImpl + withProperties(ChangeDataCaptureConfigurationPropertiesForPatchUpdate properties) { + this.updateProperties.withProperties(properties); + return this; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureConfigurationsClientImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureConfigurationsClientImpl.java new file mode 100644 index 0000000000000..0adaec7bfbe70 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureConfigurationsClientImpl.java @@ -0,0 +1,1041 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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.horizondb.fluent.ChangeDataCaptureConfigurationsClient; +import com.azure.resourcemanager.horizondb.fluent.models.ChangeDataCaptureConfigurationInner; +import com.azure.resourcemanager.horizondb.implementation.models.ChangeDataCaptureConfigurationListResult; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureConfigurationForPatchUpdate; +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 ChangeDataCaptureConfigurationsClient. + */ +public final class ChangeDataCaptureConfigurationsClientImpl implements ChangeDataCaptureConfigurationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ChangeDataCaptureConfigurationsService service; + + /** + * The service client containing this operation class. + */ + private final HorizonDbManagementClientImpl client; + + /** + * Initializes an instance of ChangeDataCaptureConfigurationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ChangeDataCaptureConfigurationsClientImpl(HorizonDbManagementClientImpl client) { + this.service = RestProxy.create(ChangeDataCaptureConfigurationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for HorizonDbManagementClientChangeDataCaptureConfigurations to be used + * by the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "HorizonDbManagementClientChangeDataCaptureConfigurations") + public interface ChangeDataCaptureConfigurationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCaptureConfigurations/{configurationName}") + @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("clusterName") String clusterName, + @PathParam("configurationName") String configurationName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCaptureConfigurations/{configurationName}") + @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("configurationName") String configurationName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCaptureConfigurations/{configurationName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrReplace(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("configurationName") String configurationName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ChangeDataCaptureConfigurationInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCaptureConfigurations/{configurationName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrReplaceSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("configurationName") String configurationName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ChangeDataCaptureConfigurationInner resource, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCaptureConfigurations/{configurationName}") + @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("clusterName") String clusterName, + @PathParam("configurationName") String configurationName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ChangeDataCaptureConfigurationForPatchUpdate properties, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCaptureConfigurations/{configurationName}") + @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("configurationName") String configurationName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ChangeDataCaptureConfigurationForPatchUpdate properties, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCaptureConfigurations/{configurationName}") + @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("clusterName") String clusterName, + @PathParam("configurationName") String configurationName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCaptureConfigurations/{configurationName}") + @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("configurationName") String configurationName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCaptureConfigurations") + @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("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCaptureConfigurations") + @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, + @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 a change data capture configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a change data capture configuration along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, + String clusterName, String configurationName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, configurationName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a change data capture configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a change data capture configuration on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String clusterName, + String configurationName) { + return getWithResponseAsync(resourceGroupName, clusterName, configurationName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a change data capture configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a change data capture configuration along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String clusterName, + String configurationName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, configurationName, accept, context); + } + + /** + * Gets a change data capture configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a change data capture configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ChangeDataCaptureConfigurationInner get(String resourceGroupName, String clusterName, + String configurationName) { + return getWithResponse(resourceGroupName, clusterName, configurationName, Context.NONE).getValue(); + } + + /** + * Creates or replaces a change data capture configuration that enrolls a PostgreSQL database for Microsoft Fabric + * Mirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a HorizonDB database enrollment for Microsoft Fabric Mirroring along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrReplaceWithResponseAsync(String resourceGroupName, + String clusterName, String configurationName, ChangeDataCaptureConfigurationInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrReplace(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, configurationName, contentType, accept, + resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or replaces a change data capture configuration that enrolls a PostgreSQL database for Microsoft Fabric + * Mirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a HorizonDB database enrollment for Microsoft Fabric Mirroring along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrReplaceWithResponse(String resourceGroupName, String clusterName, + String configurationName, ChangeDataCaptureConfigurationInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrReplaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, configurationName, contentType, accept, + resource, Context.NONE); + } + + /** + * Creates or replaces a change data capture configuration that enrolls a PostgreSQL database for Microsoft Fabric + * Mirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a HorizonDB database enrollment for Microsoft Fabric Mirroring along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrReplaceWithResponse(String resourceGroupName, String clusterName, + String configurationName, ChangeDataCaptureConfigurationInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrReplaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, configurationName, contentType, accept, + resource, context); + } + + /** + * Creates or replaces a change data capture configuration that enrolls a PostgreSQL database for Microsoft Fabric + * Mirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a HorizonDB database enrollment for Microsoft Fabric Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, ChangeDataCaptureConfigurationInner> + beginCreateOrReplaceAsync(String resourceGroupName, String clusterName, String configurationName, + ChangeDataCaptureConfigurationInner resource) { + Mono>> mono + = createOrReplaceWithResponseAsync(resourceGroupName, clusterName, configurationName, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ChangeDataCaptureConfigurationInner.class, + ChangeDataCaptureConfigurationInner.class, this.client.getContext()); + } + + /** + * Creates or replaces a change data capture configuration that enrolls a PostgreSQL database for Microsoft Fabric + * Mirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a HorizonDB database enrollment for Microsoft Fabric Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ChangeDataCaptureConfigurationInner> + beginCreateOrReplace(String resourceGroupName, String clusterName, String configurationName, + ChangeDataCaptureConfigurationInner resource) { + Response response + = createOrReplaceWithResponse(resourceGroupName, clusterName, configurationName, resource); + return this.client.getLroResult( + response, ChangeDataCaptureConfigurationInner.class, ChangeDataCaptureConfigurationInner.class, + Context.NONE); + } + + /** + * Creates or replaces a change data capture configuration that enrolls a PostgreSQL database for Microsoft Fabric + * Mirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a HorizonDB database enrollment for Microsoft Fabric Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ChangeDataCaptureConfigurationInner> + beginCreateOrReplace(String resourceGroupName, String clusterName, String configurationName, + ChangeDataCaptureConfigurationInner resource, Context context) { + Response response + = createOrReplaceWithResponse(resourceGroupName, clusterName, configurationName, resource, context); + return this.client.getLroResult( + response, ChangeDataCaptureConfigurationInner.class, ChangeDataCaptureConfigurationInner.class, context); + } + + /** + * Creates or replaces a change data capture configuration that enrolls a PostgreSQL database for Microsoft Fabric + * Mirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a HorizonDB database enrollment for Microsoft Fabric Mirroring on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrReplaceAsync(String resourceGroupName, String clusterName, + String configurationName, ChangeDataCaptureConfigurationInner resource) { + return beginCreateOrReplaceAsync(resourceGroupName, clusterName, configurationName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or replaces a change data capture configuration that enrolls a PostgreSQL database for Microsoft Fabric + * Mirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a HorizonDB database enrollment for Microsoft Fabric Mirroring. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ChangeDataCaptureConfigurationInner createOrReplace(String resourceGroupName, String clusterName, + String configurationName, ChangeDataCaptureConfigurationInner resource) { + return beginCreateOrReplace(resourceGroupName, clusterName, configurationName, resource).getFinalResult(); + } + + /** + * Creates or replaces a change data capture configuration that enrolls a PostgreSQL database for Microsoft Fabric + * Mirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a HorizonDB database enrollment for Microsoft Fabric Mirroring. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ChangeDataCaptureConfigurationInner createOrReplace(String resourceGroupName, String clusterName, + String configurationName, ChangeDataCaptureConfigurationInner resource, Context context) { + return beginCreateOrReplace(resourceGroupName, clusterName, configurationName, resource, context) + .getFinalResult(); + } + + /** + * Updates mutable change data capture configuration properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @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 a HorizonDB database enrollment for Microsoft Fabric Mirroring along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, + String configurationName, ChangeDataCaptureConfigurationForPatchUpdate 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, clusterName, configurationName, contentType, accept, + properties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates mutable change data capture configuration properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @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 a HorizonDB database enrollment for Microsoft Fabric Mirroring along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String clusterName, + String configurationName, ChangeDataCaptureConfigurationForPatchUpdate properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, configurationName, contentType, accept, + properties, Context.NONE); + } + + /** + * Updates mutable change data capture configuration properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @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 a HorizonDB database enrollment for Microsoft Fabric Mirroring along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String clusterName, + String configurationName, ChangeDataCaptureConfigurationForPatchUpdate 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, clusterName, configurationName, contentType, accept, + properties, context); + } + + /** + * Updates mutable change data capture configuration properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @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 a HorizonDB database enrollment for Microsoft Fabric Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, ChangeDataCaptureConfigurationInner> + beginUpdateAsync(String resourceGroupName, String clusterName, String configurationName, + ChangeDataCaptureConfigurationForPatchUpdate properties) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, clusterName, configurationName, properties); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ChangeDataCaptureConfigurationInner.class, + ChangeDataCaptureConfigurationInner.class, this.client.getContext()); + } + + /** + * Updates mutable change data capture configuration properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @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 a HorizonDB database enrollment for Microsoft Fabric Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ChangeDataCaptureConfigurationInner> beginUpdate( + String resourceGroupName, String clusterName, String configurationName, + ChangeDataCaptureConfigurationForPatchUpdate properties) { + Response response + = updateWithResponse(resourceGroupName, clusterName, configurationName, properties); + return this.client.getLroResult( + response, ChangeDataCaptureConfigurationInner.class, ChangeDataCaptureConfigurationInner.class, + Context.NONE); + } + + /** + * Updates mutable change data capture configuration properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @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 a HorizonDB database enrollment for Microsoft Fabric Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ChangeDataCaptureConfigurationInner> beginUpdate( + String resourceGroupName, String clusterName, String configurationName, + ChangeDataCaptureConfigurationForPatchUpdate properties, Context context) { + Response response + = updateWithResponse(resourceGroupName, clusterName, configurationName, properties, context); + return this.client.getLroResult( + response, ChangeDataCaptureConfigurationInner.class, ChangeDataCaptureConfigurationInner.class, context); + } + + /** + * Updates mutable change data capture configuration properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @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 a HorizonDB database enrollment for Microsoft Fabric Mirroring on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync(String resourceGroupName, String clusterName, + String configurationName, ChangeDataCaptureConfigurationForPatchUpdate properties) { + return beginUpdateAsync(resourceGroupName, clusterName, configurationName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates mutable change data capture configuration properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @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 a HorizonDB database enrollment for Microsoft Fabric Mirroring. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ChangeDataCaptureConfigurationInner update(String resourceGroupName, String clusterName, + String configurationName, ChangeDataCaptureConfigurationForPatchUpdate properties) { + return beginUpdate(resourceGroupName, clusterName, configurationName, properties).getFinalResult(); + } + + /** + * Updates mutable change data capture configuration properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @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 a HorizonDB database enrollment for Microsoft Fabric Mirroring. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ChangeDataCaptureConfigurationInner update(String resourceGroupName, String clusterName, + String configurationName, ChangeDataCaptureConfigurationForPatchUpdate properties, Context context) { + return beginUpdate(resourceGroupName, clusterName, configurationName, properties, context).getFinalResult(); + } + + /** + * Deletes a change data capture configuration after destination-side replication has been stopped or detached. This + * operation never deletes the Microsoft Fabric mirrored-database item. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String configurationName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, configurationName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a change data capture configuration after destination-side replication has been stopped or detached. This + * operation never deletes the Microsoft Fabric mirrored-database item. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 clusterName, + String configurationName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, configurationName, Context.NONE); + } + + /** + * Deletes a change data capture configuration after destination-side replication has been stopped or detached. This + * operation never deletes the Microsoft Fabric mirrored-database item. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 clusterName, + String configurationName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, configurationName, context); + } + + /** + * Deletes a change data capture configuration after destination-side replication has been stopped or detached. This + * operation never deletes the Microsoft Fabric mirrored-database item. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String configurationName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterName, configurationName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a change data capture configuration after destination-side replication has been stopped or detached. This + * operation never deletes the Microsoft Fabric mirrored-database item. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, + String configurationName) { + Response response = deleteWithResponse(resourceGroupName, clusterName, configurationName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Deletes a change data capture configuration after destination-side replication has been stopped or detached. This + * operation never deletes the Microsoft Fabric mirrored-database item. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, + String configurationName, Context context) { + Response response = deleteWithResponse(resourceGroupName, clusterName, configurationName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Deletes a change data capture configuration after destination-side replication has been stopped or detached. This + * operation never deletes the Microsoft Fabric mirrored-database item. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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) + public Mono deleteAsync(String resourceGroupName, String clusterName, String configurationName) { + return beginDeleteAsync(resourceGroupName, clusterName, configurationName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a change data capture configuration after destination-side replication has been stopped or detached. This + * operation never deletes the Microsoft Fabric mirrored-database item. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 configurationName) { + beginDelete(resourceGroupName, clusterName, configurationName).getFinalResult(); + } + + /** + * Deletes a change data capture configuration after destination-side replication has been stopped or detached. This + * operation never deletes the Microsoft Fabric mirrored-database item. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 configurationName, Context context) { + beginDelete(resourceGroupName, clusterName, configurationName, context).getFinalResult(); + } + + /** + * Lists change data capture configurations in a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 ChangeDataCaptureConfiguration list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @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())); + } + + /** + * Lists change data capture configurations in a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 ChangeDataCaptureConfiguration list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String clusterName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists change data capture configurations in a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 ChangeDataCaptureConfiguration list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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); + } + + /** + * Lists change data capture configurations in a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 ChangeDataCaptureConfiguration list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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); + } + + /** + * Lists change data capture configurations in a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 ChangeDataCaptureConfiguration list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * Lists change data capture configurations in a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 ChangeDataCaptureConfiguration list operation as paginated response with + * {@link PagedIterable}. + */ + @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 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 ChangeDataCaptureConfiguration 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 ChangeDataCaptureConfiguration 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 ChangeDataCaptureConfiguration 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/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureConfigurationsImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureConfigurationsImpl.java new file mode 100644 index 0000000000000..db3ba5d2f527b --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureConfigurationsImpl.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.horizondb.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.horizondb.fluent.ChangeDataCaptureConfigurationsClient; +import com.azure.resourcemanager.horizondb.fluent.models.ChangeDataCaptureConfigurationInner; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureConfiguration; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureConfigurations; + +public final class ChangeDataCaptureConfigurationsImpl implements ChangeDataCaptureConfigurations { + private static final ClientLogger LOGGER = new ClientLogger(ChangeDataCaptureConfigurationsImpl.class); + + private final ChangeDataCaptureConfigurationsClient innerClient; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + public ChangeDataCaptureConfigurationsImpl(ChangeDataCaptureConfigurationsClient innerClient, + com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String clusterName, + String configurationName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, clusterName, configurationName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ChangeDataCaptureConfigurationImpl(inner.getValue(), this.manager())); + } + + public ChangeDataCaptureConfiguration get(String resourceGroupName, String clusterName, String configurationName) { + ChangeDataCaptureConfigurationInner inner + = this.serviceClient().get(resourceGroupName, clusterName, configurationName); + if (inner != null) { + return new ChangeDataCaptureConfigurationImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String clusterName, String configurationName) { + this.serviceClient().delete(resourceGroupName, clusterName, configurationName); + } + + public void delete(String resourceGroupName, String clusterName, String configurationName, Context context) { + this.serviceClient().delete(resourceGroupName, clusterName, configurationName, context); + } + + public PagedIterable list(String resourceGroupName, String clusterName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, clusterName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ChangeDataCaptureConfigurationImpl(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 ChangeDataCaptureConfigurationImpl(inner1, this.manager())); + } + + public ChangeDataCaptureConfiguration 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 clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String configurationName = ResourceManagerUtils.getValueFromIdByName(id, "changeDataCaptureConfigurations"); + if (configurationName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( + "The resource ID '%s' is not valid. Missing path segment 'changeDataCaptureConfigurations'.", id))); + } + return this.getWithResponse(resourceGroupName, clusterName, configurationName, 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 clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String configurationName = ResourceManagerUtils.getValueFromIdByName(id, "changeDataCaptureConfigurations"); + if (configurationName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( + "The resource ID '%s' is not valid. Missing path segment 'changeDataCaptureConfigurations'.", id))); + } + return this.getWithResponse(resourceGroupName, clusterName, configurationName, 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 clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String configurationName = ResourceManagerUtils.getValueFromIdByName(id, "changeDataCaptureConfigurations"); + if (configurationName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( + "The resource ID '%s' is not valid. Missing path segment 'changeDataCaptureConfigurations'.", id))); + } + this.delete(resourceGroupName, clusterName, configurationName, 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 clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String configurationName = ResourceManagerUtils.getValueFromIdByName(id, "changeDataCaptureConfigurations"); + if (configurationName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( + "The resource ID '%s' is not valid. Missing path segment 'changeDataCaptureConfigurations'.", id))); + } + this.delete(resourceGroupName, clusterName, configurationName, context); + } + + private ChangeDataCaptureConfigurationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } + + public ChangeDataCaptureConfigurationImpl define(String name) { + return new ChangeDataCaptureConfigurationImpl(name, this.manager()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureDestinationImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureDestinationImpl.java new file mode 100644 index 0000000000000..9f134d1984a78 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureDestinationImpl.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.horizondb.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.horizondb.fluent.models.ChangeDataCaptureDestinationInner; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDestination; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDestinationForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDestinationProperties; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDestinationPropertiesForPatchUpdate; + +public final class ChangeDataCaptureDestinationImpl implements ChangeDataCaptureDestination, + ChangeDataCaptureDestination.Definition, ChangeDataCaptureDestination.Update { + private ChangeDataCaptureDestinationInner innerObject; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public ChangeDataCaptureDestinationProperties properties() { + return this.innerModel().properties(); + } + + public String eTag() { + return this.innerModel().eTag(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ChangeDataCaptureDestinationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String clusterName; + + private String destinationName; + + private ChangeDataCaptureDestinationForPatchUpdate updateProperties; + + public ChangeDataCaptureDestinationImpl withExistingCluster(String resourceGroupName, String clusterName) { + this.resourceGroupName = resourceGroupName; + this.clusterName = clusterName; + return this; + } + + public ChangeDataCaptureDestination create() { + this.innerObject = serviceManager.serviceClient() + .getChangeDataCaptureDestinations() + .createOrReplace(resourceGroupName, clusterName, destinationName, this.innerModel(), Context.NONE); + return this; + } + + public ChangeDataCaptureDestination create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getChangeDataCaptureDestinations() + .createOrReplace(resourceGroupName, clusterName, destinationName, this.innerModel(), context); + return this; + } + + ChangeDataCaptureDestinationImpl(String name, com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerObject = new ChangeDataCaptureDestinationInner(); + this.serviceManager = serviceManager; + this.destinationName = name; + } + + public ChangeDataCaptureDestinationImpl update() { + this.updateProperties = new ChangeDataCaptureDestinationForPatchUpdate(); + return this; + } + + public ChangeDataCaptureDestination apply() { + this.innerObject = serviceManager.serviceClient() + .getChangeDataCaptureDestinations() + .update(resourceGroupName, clusterName, destinationName, updateProperties, Context.NONE); + return this; + } + + public ChangeDataCaptureDestination apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getChangeDataCaptureDestinations() + .update(resourceGroupName, clusterName, destinationName, updateProperties, context); + return this; + } + + ChangeDataCaptureDestinationImpl(ChangeDataCaptureDestinationInner innerObject, + com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusters"); + this.destinationName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "changeDataCaptureDestinations"); + } + + public ChangeDataCaptureDestination refresh() { + this.innerObject = serviceManager.serviceClient() + .getChangeDataCaptureDestinations() + .getWithResponse(resourceGroupName, clusterName, destinationName, Context.NONE) + .getValue(); + return this; + } + + public ChangeDataCaptureDestination refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getChangeDataCaptureDestinations() + .getWithResponse(resourceGroupName, clusterName, destinationName, context) + .getValue(); + return this; + } + + public ChangeDataCaptureDestinationImpl withProperties(ChangeDataCaptureDestinationProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public ChangeDataCaptureDestinationImpl + withProperties(ChangeDataCaptureDestinationPropertiesForPatchUpdate properties) { + this.updateProperties.withProperties(properties); + return this; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureDestinationsClientImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureDestinationsClientImpl.java new file mode 100644 index 0000000000000..495514b1a3df3 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureDestinationsClientImpl.java @@ -0,0 +1,1268 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureDestinationsClient; +import com.azure.resourcemanager.horizondb.fluent.models.ActivateChangeDataCaptureIdentityResultInner; +import com.azure.resourcemanager.horizondb.fluent.models.ChangeDataCaptureDestinationInner; +import com.azure.resourcemanager.horizondb.implementation.models.ChangeDataCaptureDestinationListResult; +import com.azure.resourcemanager.horizondb.models.ActivateChangeDataCaptureIdentityRequest; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDestinationForPatchUpdate; +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 ChangeDataCaptureDestinationsClient. + */ +public final class ChangeDataCaptureDestinationsClientImpl implements ChangeDataCaptureDestinationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ChangeDataCaptureDestinationsService service; + + /** + * The service client containing this operation class. + */ + private final HorizonDbManagementClientImpl client; + + /** + * Initializes an instance of ChangeDataCaptureDestinationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ChangeDataCaptureDestinationsClientImpl(HorizonDbManagementClientImpl client) { + this.service = RestProxy.create(ChangeDataCaptureDestinationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for HorizonDbManagementClientChangeDataCaptureDestinations to be used by + * the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "HorizonDbManagementClientChangeDataCaptureDestinations") + public interface ChangeDataCaptureDestinationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCaptureDestinations/{destinationName}") + @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("clusterName") String clusterName, + @PathParam("destinationName") String destinationName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCaptureDestinations/{destinationName}") + @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("destinationName") String destinationName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCaptureDestinations/{destinationName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrReplace(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("destinationName") String destinationName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ChangeDataCaptureDestinationInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCaptureDestinations/{destinationName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrReplaceSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("destinationName") String destinationName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ChangeDataCaptureDestinationInner resource, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCaptureDestinations/{destinationName}") + @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("clusterName") String clusterName, + @PathParam("destinationName") String destinationName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ChangeDataCaptureDestinationForPatchUpdate properties, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCaptureDestinations/{destinationName}") + @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("destinationName") String destinationName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ChangeDataCaptureDestinationForPatchUpdate properties, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCaptureDestinations/{destinationName}") + @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("clusterName") String clusterName, + @PathParam("destinationName") String destinationName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCaptureDestinations/{destinationName}") + @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("destinationName") String destinationName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCaptureDestinations") + @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("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCaptureDestinations") + @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, + @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCaptureDestinations/{destinationName}/activateIdentity") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> activateIdentity(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, + @PathParam("clusterName") String clusterName, @PathParam("destinationName") String destinationName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ActivateChangeDataCaptureIdentityRequest body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCaptureDestinations/{destinationName}/activateIdentity") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response activateIdentitySync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, + @PathParam("clusterName") String clusterName, @PathParam("destinationName") String destinationName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ActivateChangeDataCaptureIdentityRequest body, 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 a change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a change data capture destination along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, + String clusterName, String destinationName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, destinationName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a change data capture destination on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String clusterName, + String destinationName) { + return getWithResponseAsync(resourceGroupName, clusterName, destinationName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a change data capture destination along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String clusterName, + String destinationName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, destinationName, accept, context); + } + + /** + * Gets a change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a change data capture destination. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ChangeDataCaptureDestinationInner get(String resourceGroupName, String clusterName, String destinationName) { + return getWithResponse(resourceGroupName, clusterName, destinationName, Context.NONE).getValue(); + } + + /** + * Creates or replaces a Microsoft Fabric change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a reusable Microsoft Fabric destination for HorizonDB change data capture configurations along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrReplaceWithResponseAsync(String resourceGroupName, + String clusterName, String destinationName, ChangeDataCaptureDestinationInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrReplace(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, destinationName, contentType, accept, + resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or replaces a Microsoft Fabric change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a reusable Microsoft Fabric destination for HorizonDB change data capture configurations along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrReplaceWithResponse(String resourceGroupName, String clusterName, + String destinationName, ChangeDataCaptureDestinationInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrReplaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, destinationName, contentType, accept, + resource, Context.NONE); + } + + /** + * Creates or replaces a Microsoft Fabric change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a reusable Microsoft Fabric destination for HorizonDB change data capture configurations along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrReplaceWithResponse(String resourceGroupName, String clusterName, + String destinationName, ChangeDataCaptureDestinationInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrReplaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, destinationName, contentType, accept, + resource, context); + } + + /** + * Creates or replaces a Microsoft Fabric change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a reusable Microsoft Fabric destination for HorizonDB change data + * capture configurations. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, ChangeDataCaptureDestinationInner> + beginCreateOrReplaceAsync(String resourceGroupName, String clusterName, String destinationName, + ChangeDataCaptureDestinationInner resource) { + Mono>> mono + = createOrReplaceWithResponseAsync(resourceGroupName, clusterName, destinationName, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ChangeDataCaptureDestinationInner.class, + ChangeDataCaptureDestinationInner.class, this.client.getContext()); + } + + /** + * Creates or replaces a Microsoft Fabric change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a reusable Microsoft Fabric destination for HorizonDB change data + * capture configurations. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ChangeDataCaptureDestinationInner> + beginCreateOrReplace(String resourceGroupName, String clusterName, String destinationName, + ChangeDataCaptureDestinationInner resource) { + Response response + = createOrReplaceWithResponse(resourceGroupName, clusterName, destinationName, resource); + return this.client.getLroResult(response, + ChangeDataCaptureDestinationInner.class, ChangeDataCaptureDestinationInner.class, Context.NONE); + } + + /** + * Creates or replaces a Microsoft Fabric change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a reusable Microsoft Fabric destination for HorizonDB change data + * capture configurations. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ChangeDataCaptureDestinationInner> + beginCreateOrReplace(String resourceGroupName, String clusterName, String destinationName, + ChangeDataCaptureDestinationInner resource, Context context) { + Response response + = createOrReplaceWithResponse(resourceGroupName, clusterName, destinationName, resource, context); + return this.client.getLroResult(response, + ChangeDataCaptureDestinationInner.class, ChangeDataCaptureDestinationInner.class, context); + } + + /** + * Creates or replaces a Microsoft Fabric change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a reusable Microsoft Fabric destination for HorizonDB change data capture configurations on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrReplaceAsync(String resourceGroupName, String clusterName, + String destinationName, ChangeDataCaptureDestinationInner resource) { + return beginCreateOrReplaceAsync(resourceGroupName, clusterName, destinationName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or replaces a Microsoft Fabric change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a reusable Microsoft Fabric destination for HorizonDB change data capture configurations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ChangeDataCaptureDestinationInner createOrReplace(String resourceGroupName, String clusterName, + String destinationName, ChangeDataCaptureDestinationInner resource) { + return beginCreateOrReplace(resourceGroupName, clusterName, destinationName, resource).getFinalResult(); + } + + /** + * Creates or replaces a Microsoft Fabric change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a reusable Microsoft Fabric destination for HorizonDB change data capture configurations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ChangeDataCaptureDestinationInner createOrReplace(String resourceGroupName, String clusterName, + String destinationName, ChangeDataCaptureDestinationInner resource, Context context) { + return beginCreateOrReplace(resourceGroupName, clusterName, destinationName, resource, context) + .getFinalResult(); + } + + /** + * Updates mutable change data capture destination properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 a reusable Microsoft Fabric destination for HorizonDB change data capture configurations along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, + String destinationName, ChangeDataCaptureDestinationForPatchUpdate 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, clusterName, destinationName, contentType, accept, + properties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates mutable change data capture destination properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 a reusable Microsoft Fabric destination for HorizonDB change data capture configurations along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String clusterName, + String destinationName, ChangeDataCaptureDestinationForPatchUpdate properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, destinationName, contentType, accept, + properties, Context.NONE); + } + + /** + * Updates mutable change data capture destination properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 a reusable Microsoft Fabric destination for HorizonDB change data capture configurations along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String clusterName, + String destinationName, ChangeDataCaptureDestinationForPatchUpdate 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, clusterName, destinationName, contentType, accept, + properties, context); + } + + /** + * Updates mutable change data capture destination properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 a reusable Microsoft Fabric destination for HorizonDB change data + * capture configurations. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, ChangeDataCaptureDestinationInner> + beginUpdateAsync(String resourceGroupName, String clusterName, String destinationName, + ChangeDataCaptureDestinationForPatchUpdate properties) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, clusterName, destinationName, properties); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ChangeDataCaptureDestinationInner.class, + ChangeDataCaptureDestinationInner.class, this.client.getContext()); + } + + /** + * Updates mutable change data capture destination properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 a reusable Microsoft Fabric destination for HorizonDB change data + * capture configurations. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ChangeDataCaptureDestinationInner> beginUpdate( + String resourceGroupName, String clusterName, String destinationName, + ChangeDataCaptureDestinationForPatchUpdate properties) { + Response response = updateWithResponse(resourceGroupName, clusterName, destinationName, properties); + return this.client.getLroResult(response, + ChangeDataCaptureDestinationInner.class, ChangeDataCaptureDestinationInner.class, Context.NONE); + } + + /** + * Updates mutable change data capture destination properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 a reusable Microsoft Fabric destination for HorizonDB change data + * capture configurations. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ChangeDataCaptureDestinationInner> beginUpdate( + String resourceGroupName, String clusterName, String destinationName, + ChangeDataCaptureDestinationForPatchUpdate properties, Context context) { + Response response + = updateWithResponse(resourceGroupName, clusterName, destinationName, properties, context); + return this.client.getLroResult(response, + ChangeDataCaptureDestinationInner.class, ChangeDataCaptureDestinationInner.class, context); + } + + /** + * Updates mutable change data capture destination properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 a reusable Microsoft Fabric destination for HorizonDB change data capture configurations on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync(String resourceGroupName, String clusterName, + String destinationName, ChangeDataCaptureDestinationForPatchUpdate properties) { + return beginUpdateAsync(resourceGroupName, clusterName, destinationName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates mutable change data capture destination properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 a reusable Microsoft Fabric destination for HorizonDB change data capture configurations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ChangeDataCaptureDestinationInner update(String resourceGroupName, String clusterName, + String destinationName, ChangeDataCaptureDestinationForPatchUpdate properties) { + return beginUpdate(resourceGroupName, clusterName, destinationName, properties).getFinalResult(); + } + + /** + * Updates mutable change data capture destination properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 a reusable Microsoft Fabric destination for HorizonDB change data capture configurations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ChangeDataCaptureDestinationInner update(String resourceGroupName, String clusterName, + String destinationName, ChangeDataCaptureDestinationForPatchUpdate properties, Context context) { + return beginUpdate(resourceGroupName, clusterName, destinationName, properties, context).getFinalResult(); + } + + /** + * Deletes a change data capture destination after all referencing configurations and identity assignments have been + * removed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String destinationName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, destinationName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a change data capture destination after all referencing configurations and identity assignments have been + * removed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 clusterName, + String destinationName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, destinationName, Context.NONE); + } + + /** + * Deletes a change data capture destination after all referencing configurations and identity assignments have been + * removed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 clusterName, + String destinationName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, destinationName, context); + } + + /** + * Deletes a change data capture destination after all referencing configurations and identity assignments have been + * removed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String destinationName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterName, destinationName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a change data capture destination after all referencing configurations and identity assignments have been + * removed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, + String destinationName) { + Response response = deleteWithResponse(resourceGroupName, clusterName, destinationName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Deletes a change data capture destination after all referencing configurations and identity assignments have been + * removed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, + String destinationName, Context context) { + Response response = deleteWithResponse(resourceGroupName, clusterName, destinationName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Deletes a change data capture destination after all referencing configurations and identity assignments have been + * removed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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) + public Mono deleteAsync(String resourceGroupName, String clusterName, String destinationName) { + return beginDeleteAsync(resourceGroupName, clusterName, destinationName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a change data capture destination after all referencing configurations and identity assignments have been + * removed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 destinationName) { + beginDelete(resourceGroupName, clusterName, destinationName).getFinalResult(); + } + + /** + * Deletes a change data capture destination after all referencing configurations and identity assignments have been + * removed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 destinationName, Context context) { + beginDelete(resourceGroupName, clusterName, destinationName, context).getFinalResult(); + } + + /** + * Lists change data capture destinations in a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 ChangeDataCaptureDestination list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @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())); + } + + /** + * Lists change data capture destinations in a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 ChangeDataCaptureDestination list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String clusterName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists change data capture destinations in a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 ChangeDataCaptureDestination list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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); + } + + /** + * Lists change data capture destinations in a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 ChangeDataCaptureDestination list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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); + } + + /** + * Lists change data capture destinations in a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 ChangeDataCaptureDestination list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * Lists change data capture destinations in a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 ChangeDataCaptureDestination list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterName, + Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Atomically activates a validated identity assignment for this destination. If-Match is evaluated against the + * destination entity tag. Activating the already-active assignment succeeds idempotently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ifMatch The destination entity tag. The action proceeds only when this value matches the destination's + * current entity tag. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 completed result of activating a change data capture destination identity along with {@link Response} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> activateIdentityWithResponseAsync(String resourceGroupName, String ifMatch, + String clusterName, String destinationName, ActivateChangeDataCaptureIdentityRequest body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.activateIdentity(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, clusterName, destinationName, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Atomically activates a validated identity assignment for this destination. If-Match is evaluated against the + * destination entity tag. Activating the already-active assignment succeeds idempotently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ifMatch The destination entity tag. The action proceeds only when this value matches the destination's + * current entity tag. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 completed result of activating a change data capture destination identity along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response activateIdentityWithResponse(String resourceGroupName, String ifMatch, + String clusterName, String destinationName, ActivateChangeDataCaptureIdentityRequest body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.activateIdentitySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, clusterName, destinationName, contentType, + accept, body, Context.NONE); + } + + /** + * Atomically activates a validated identity assignment for this destination. If-Match is evaluated against the + * destination entity tag. Activating the already-active assignment succeeds idempotently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ifMatch The destination entity tag. The action proceeds only when this value matches the destination's + * current entity tag. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 completed result of activating a change data capture destination identity along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response activateIdentityWithResponse(String resourceGroupName, String ifMatch, + String clusterName, String destinationName, ActivateChangeDataCaptureIdentityRequest body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.activateIdentitySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, clusterName, destinationName, contentType, + accept, body, context); + } + + /** + * Atomically activates a validated identity assignment for this destination. If-Match is evaluated against the + * destination entity tag. Activating the already-active assignment succeeds idempotently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ifMatch The destination entity tag. The action proceeds only when this value matches the destination's + * current entity tag. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 the completed result of activating a change data capture + * destination identity. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + PollerFlux, ActivateChangeDataCaptureIdentityResultInner> + beginActivateIdentityAsync(String resourceGroupName, String ifMatch, String clusterName, String destinationName, + ActivateChangeDataCaptureIdentityRequest body) { + Mono>> mono + = activateIdentityWithResponseAsync(resourceGroupName, ifMatch, clusterName, destinationName, body); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), ActivateChangeDataCaptureIdentityResultInner.class, + ActivateChangeDataCaptureIdentityResultInner.class, this.client.getContext()); + } + + /** + * Atomically activates a validated identity assignment for this destination. If-Match is evaluated against the + * destination entity tag. Activating the already-active assignment succeeds idempotently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ifMatch The destination entity tag. The action proceeds only when this value matches the destination's + * current entity tag. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 the completed result of activating a change data capture + * destination identity. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, ActivateChangeDataCaptureIdentityResultInner> + beginActivateIdentity(String resourceGroupName, String ifMatch, String clusterName, String destinationName, + ActivateChangeDataCaptureIdentityRequest body) { + Response response + = activateIdentityWithResponse(resourceGroupName, ifMatch, clusterName, destinationName, body); + return this.client + .getLroResult( + response, ActivateChangeDataCaptureIdentityResultInner.class, + ActivateChangeDataCaptureIdentityResultInner.class, Context.NONE); + } + + /** + * Atomically activates a validated identity assignment for this destination. If-Match is evaluated against the + * destination entity tag. Activating the already-active assignment succeeds idempotently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ifMatch The destination entity tag. The action proceeds only when this value matches the destination's + * current entity tag. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 SyncPoller} for polling of the completed result of activating a change data capture + * destination identity. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, ActivateChangeDataCaptureIdentityResultInner> + beginActivateIdentity(String resourceGroupName, String ifMatch, String clusterName, String destinationName, + ActivateChangeDataCaptureIdentityRequest body, Context context) { + Response response + = activateIdentityWithResponse(resourceGroupName, ifMatch, clusterName, destinationName, body, context); + return this.client + .getLroResult( + response, ActivateChangeDataCaptureIdentityResultInner.class, + ActivateChangeDataCaptureIdentityResultInner.class, context); + } + + /** + * Atomically activates a validated identity assignment for this destination. If-Match is evaluated against the + * destination entity tag. Activating the already-active assignment succeeds idempotently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ifMatch The destination entity tag. The action proceeds only when this value matches the destination's + * current entity tag. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 completed result of activating a change data capture destination identity on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono activateIdentityAsync(String resourceGroupName, + String ifMatch, String clusterName, String destinationName, ActivateChangeDataCaptureIdentityRequest body) { + return beginActivateIdentityAsync(resourceGroupName, ifMatch, clusterName, destinationName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Atomically activates a validated identity assignment for this destination. If-Match is evaluated against the + * destination entity tag. Activating the already-active assignment succeeds idempotently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ifMatch The destination entity tag. The action proceeds only when this value matches the destination's + * current entity tag. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 completed result of activating a change data capture destination identity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ActivateChangeDataCaptureIdentityResultInner activateIdentity(String resourceGroupName, String ifMatch, + String clusterName, String destinationName, ActivateChangeDataCaptureIdentityRequest body) { + return beginActivateIdentity(resourceGroupName, ifMatch, clusterName, destinationName, body).getFinalResult(); + } + + /** + * Atomically activates a validated identity assignment for this destination. If-Match is evaluated against the + * destination entity tag. Activating the already-active assignment succeeds idempotently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ifMatch The destination entity tag. The action proceeds only when this value matches the destination's + * current entity tag. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 completed result of activating a change data capture destination identity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ActivateChangeDataCaptureIdentityResultInner activateIdentity(String resourceGroupName, String ifMatch, + String clusterName, String destinationName, ActivateChangeDataCaptureIdentityRequest body, Context context) { + return beginActivateIdentity(resourceGroupName, ifMatch, clusterName, destinationName, body, context) + .getFinalResult(); + } + + /** + * 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 ChangeDataCaptureDestination 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 ChangeDataCaptureDestination 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 ChangeDataCaptureDestination 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/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureDestinationsImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureDestinationsImpl.java new file mode 100644 index 0000000000000..9dec27c659a4f --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureDestinationsImpl.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.horizondb.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.horizondb.fluent.ChangeDataCaptureDestinationsClient; +import com.azure.resourcemanager.horizondb.fluent.models.ActivateChangeDataCaptureIdentityResultInner; +import com.azure.resourcemanager.horizondb.fluent.models.ChangeDataCaptureDestinationInner; +import com.azure.resourcemanager.horizondb.models.ActivateChangeDataCaptureIdentityRequest; +import com.azure.resourcemanager.horizondb.models.ActivateChangeDataCaptureIdentityResult; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDestination; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDestinations; + +public final class ChangeDataCaptureDestinationsImpl implements ChangeDataCaptureDestinations { + private static final ClientLogger LOGGER = new ClientLogger(ChangeDataCaptureDestinationsImpl.class); + + private final ChangeDataCaptureDestinationsClient innerClient; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + public ChangeDataCaptureDestinationsImpl(ChangeDataCaptureDestinationsClient innerClient, + com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String clusterName, + String destinationName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, clusterName, destinationName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ChangeDataCaptureDestinationImpl(inner.getValue(), this.manager())); + } + + public ChangeDataCaptureDestination get(String resourceGroupName, String clusterName, String destinationName) { + ChangeDataCaptureDestinationInner inner + = this.serviceClient().get(resourceGroupName, clusterName, destinationName); + if (inner != null) { + return new ChangeDataCaptureDestinationImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String clusterName, String destinationName) { + this.serviceClient().delete(resourceGroupName, clusterName, destinationName); + } + + public void delete(String resourceGroupName, String clusterName, String destinationName, Context context) { + this.serviceClient().delete(resourceGroupName, clusterName, destinationName, context); + } + + public PagedIterable list(String resourceGroupName, String clusterName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, clusterName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ChangeDataCaptureDestinationImpl(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 ChangeDataCaptureDestinationImpl(inner1, this.manager())); + } + + public ActivateChangeDataCaptureIdentityResult activateIdentity(String resourceGroupName, String ifMatch, + String clusterName, String destinationName, ActivateChangeDataCaptureIdentityRequest body) { + ActivateChangeDataCaptureIdentityResultInner inner + = this.serviceClient().activateIdentity(resourceGroupName, ifMatch, clusterName, destinationName, body); + if (inner != null) { + return new ActivateChangeDataCaptureIdentityResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public ActivateChangeDataCaptureIdentityResult activateIdentity(String resourceGroupName, String ifMatch, + String clusterName, String destinationName, ActivateChangeDataCaptureIdentityRequest body, Context context) { + ActivateChangeDataCaptureIdentityResultInner inner = this.serviceClient() + .activateIdentity(resourceGroupName, ifMatch, clusterName, destinationName, body, context); + if (inner != null) { + return new ActivateChangeDataCaptureIdentityResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public ChangeDataCaptureDestination 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 clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String destinationName = ResourceManagerUtils.getValueFromIdByName(id, "changeDataCaptureDestinations"); + if (destinationName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( + "The resource ID '%s' is not valid. Missing path segment 'changeDataCaptureDestinations'.", id))); + } + return this.getWithResponse(resourceGroupName, clusterName, destinationName, 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 clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String destinationName = ResourceManagerUtils.getValueFromIdByName(id, "changeDataCaptureDestinations"); + if (destinationName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( + "The resource ID '%s' is not valid. Missing path segment 'changeDataCaptureDestinations'.", id))); + } + return this.getWithResponse(resourceGroupName, clusterName, destinationName, 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 clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String destinationName = ResourceManagerUtils.getValueFromIdByName(id, "changeDataCaptureDestinations"); + if (destinationName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( + "The resource ID '%s' is not valid. Missing path segment 'changeDataCaptureDestinations'.", id))); + } + this.delete(resourceGroupName, clusterName, destinationName, 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 clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String destinationName = ResourceManagerUtils.getValueFromIdByName(id, "changeDataCaptureDestinations"); + if (destinationName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( + "The resource ID '%s' is not valid. Missing path segment 'changeDataCaptureDestinations'.", id))); + } + this.delete(resourceGroupName, clusterName, destinationName, context); + } + + private ChangeDataCaptureDestinationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } + + public ChangeDataCaptureDestinationImpl define(String name) { + return new ChangeDataCaptureDestinationImpl(name, this.manager()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbClusterImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ClusterImpl.java similarity index 56% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbClusterImpl.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ClusterImpl.java index b2714f10b7dd8..ecbcc8b6223e5 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbClusterImpl.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ClusterImpl.java @@ -7,18 +7,17 @@ import com.azure.core.management.Region; import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbClusterInner; -import com.azure.resourcemanager.horizondb.models.HorizonDbCluster; -import com.azure.resourcemanager.horizondb.models.HorizonDbClusterForPatchUpdate; -import com.azure.resourcemanager.horizondb.models.HorizonDbClusterProperties; -import com.azure.resourcemanager.horizondb.models.HorizonDbClusterPropertiesForPatchUpdate; -import com.azure.resourcemanager.horizondb.models.ManagedServiceIdentity; +import com.azure.resourcemanager.horizondb.fluent.models.ClusterInner; +import com.azure.resourcemanager.horizondb.models.Cluster; +import com.azure.resourcemanager.horizondb.models.ClusterForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.ClusterProperties; +import com.azure.resourcemanager.horizondb.models.ClusterPropertiesForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.HorizonDbClusterManagedServiceIdentity; import java.util.Collections; import java.util.Map; -public final class HorizonDbClusterImpl - implements HorizonDbCluster, HorizonDbCluster.Definition, HorizonDbCluster.Update { - private HorizonDbClusterInner innerObject; +public final class ClusterImpl implements Cluster, Cluster.Definition, Cluster.Update { + private ClusterInner innerObject; private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; @@ -47,11 +46,11 @@ public Map tags() { } } - public HorizonDbClusterProperties properties() { + public ClusterProperties properties() { return this.innerModel().properties(); } - public ManagedServiceIdentity identity() { + public HorizonDbClusterManagedServiceIdentity identity() { return this.innerModel().identity(); } @@ -71,7 +70,7 @@ public String resourceGroupName() { return resourceGroupName; } - public HorizonDbClusterInner innerModel() { + public ClusterInner innerModel() { return this.innerObject; } @@ -83,111 +82,94 @@ private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { private String clusterName; - private HorizonDbClusterForPatchUpdate updateProperties; + private ClusterForPatchUpdate updateProperties; - public HorizonDbClusterImpl withExistingResourceGroup(String resourceGroupName) { + public ClusterImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; return this; } - public HorizonDbCluster create() { + public Cluster create() { this.innerObject = serviceManager.serviceClient() - .getHorizonDbClusters() - .createOrUpdate(resourceGroupName, clusterName, this.innerModel(), Context.NONE); + .getClusters() + .createOrReplace(resourceGroupName, clusterName, this.innerModel(), Context.NONE); return this; } - public HorizonDbCluster create(Context context) { + public Cluster create(Context context) { this.innerObject = serviceManager.serviceClient() - .getHorizonDbClusters() - .createOrUpdate(resourceGroupName, clusterName, this.innerModel(), context); + .getClusters() + .createOrReplace(resourceGroupName, clusterName, this.innerModel(), context); return this; } - HorizonDbClusterImpl(String name, com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { - this.innerObject = new HorizonDbClusterInner(); + ClusterImpl(String name, com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerObject = new ClusterInner(); this.serviceManager = serviceManager; this.clusterName = name; } - public HorizonDbClusterImpl update() { - this.updateProperties = new HorizonDbClusterForPatchUpdate(); + public ClusterImpl update() { + this.updateProperties = new ClusterForPatchUpdate(); return this; } - public HorizonDbCluster apply() { + public Cluster apply() { this.innerObject = serviceManager.serviceClient() - .getHorizonDbClusters() + .getClusters() .update(resourceGroupName, clusterName, updateProperties, Context.NONE); return this; } - public HorizonDbCluster apply(Context context) { + public Cluster apply(Context context) { this.innerObject = serviceManager.serviceClient() - .getHorizonDbClusters() + .getClusters() .update(resourceGroupName, clusterName, updateProperties, context); return this; } - HorizonDbClusterImpl(HorizonDbClusterInner innerObject, - com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + ClusterImpl(ClusterInner innerObject, com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusters"); } - public HorizonDbCluster refresh() { + public Cluster refresh() { this.innerObject = serviceManager.serviceClient() - .getHorizonDbClusters() + .getClusters() .getByResourceGroupWithResponse(resourceGroupName, clusterName, Context.NONE) .getValue(); return this; } - public HorizonDbCluster refresh(Context context) { + public Cluster refresh(Context context) { this.innerObject = serviceManager.serviceClient() - .getHorizonDbClusters() + .getClusters() .getByResourceGroupWithResponse(resourceGroupName, clusterName, context) .getValue(); return this; } - public void start() { - serviceManager.horizonDbClusters().start(resourceGroupName, clusterName); + public Cluster failover() { + return serviceManager.clusters().failover(resourceGroupName, clusterName); } - public void start(Context context) { - serviceManager.horizonDbClusters().start(resourceGroupName, clusterName, context); + public Cluster failover(Context context) { + return serviceManager.clusters().failover(resourceGroupName, clusterName, context); } - public void stop() { - serviceManager.horizonDbClusters().stop(resourceGroupName, clusterName); - } - - public void stop(Context context) { - serviceManager.horizonDbClusters().stop(resourceGroupName, clusterName, context); - } - - public void restart() { - serviceManager.horizonDbClusters().restart(resourceGroupName, clusterName); - } - - public void restart(Context context) { - serviceManager.horizonDbClusters().restart(resourceGroupName, clusterName, context); - } - - public HorizonDbClusterImpl withRegion(Region location) { + public ClusterImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; } - public HorizonDbClusterImpl withRegion(String location) { + public ClusterImpl withRegion(String location) { this.innerModel().withLocation(location); return this; } - public HorizonDbClusterImpl withTags(Map tags) { + public ClusterImpl withTags(Map tags) { if (isInCreateMode()) { this.innerModel().withTags(tags); return this; @@ -197,12 +179,12 @@ public HorizonDbClusterImpl withTags(Map tags) { } } - public HorizonDbClusterImpl withProperties(HorizonDbClusterProperties properties) { + public ClusterImpl withProperties(ClusterProperties properties) { this.innerModel().withProperties(properties); return this; } - public HorizonDbClusterImpl withIdentity(ManagedServiceIdentity identity) { + public ClusterImpl withIdentity(HorizonDbClusterManagedServiceIdentity identity) { if (isInCreateMode()) { this.innerModel().withIdentity(identity); return this; @@ -212,7 +194,7 @@ public HorizonDbClusterImpl withIdentity(ManagedServiceIdentity identity) { } } - public HorizonDbClusterImpl withProperties(HorizonDbClusterPropertiesForPatchUpdate properties) { + public ClusterImpl withProperties(ClusterPropertiesForPatchUpdate properties) { this.updateProperties.withProperties(properties); return this; } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbClustersClientImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ClustersClientImpl.java similarity index 61% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbClustersClientImpl.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ClustersClientImpl.java index 761111df6dd0f..c8699e7bb6ed8 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbClustersClientImpl.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ClustersClientImpl.java @@ -34,22 +34,22 @@ import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbClusterInner; -import com.azure.resourcemanager.horizondb.implementation.models.HorizonDbClusterListResult; -import com.azure.resourcemanager.horizondb.models.HorizonDbClusterForPatchUpdate; +import com.azure.resourcemanager.horizondb.fluent.ClustersClient; +import com.azure.resourcemanager.horizondb.fluent.models.ClusterInner; +import com.azure.resourcemanager.horizondb.implementation.models.ClusterListResult; +import com.azure.resourcemanager.horizondb.models.ClusterForPatchUpdate; 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 HorizonDbClustersClient. + * An instance of this class provides access to all the operations defined in ClustersClient. */ -public final class HorizonDbClustersClientImpl implements HorizonDbClustersClient { +public final class ClustersClientImpl implements ClustersClient { /** * The proxy service used to perform REST calls. */ - private final HorizonDbClustersService service; + private final ClustersService service; /** * The service client containing this operation class. @@ -57,28 +57,27 @@ public final class HorizonDbClustersClientImpl implements HorizonDbClustersClien private final HorizonDbManagementClientImpl client; /** - * Initializes an instance of HorizonDbClustersClientImpl. + * Initializes an instance of ClustersClientImpl. * * @param client the instance of the service client containing this operation class. */ - HorizonDbClustersClientImpl(HorizonDbManagementClientImpl client) { - this.service - = RestProxy.create(HorizonDbClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + ClustersClientImpl(HorizonDbManagementClientImpl client) { + this.service = RestProxy.create(ClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for HorizonDbManagementClientHorizonDbClusters to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for HorizonDbManagementClientClusters to be used by the proxy service to + * perform REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "HorizonDbManagementClientHorizonDbClusters") - public interface HorizonDbClustersService { + @ServiceInterface(name = "HorizonDbManagementClientClusters") + public interface ClustersService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + 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); @@ -87,7 +86,7 @@ Mono> getByResourceGroup(@HostParam("endpoint") @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + 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); @@ -95,20 +94,20 @@ Response getByResourceGroupSync(@HostParam("endpoint") St @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + Mono>> createOrReplace(@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") HorizonDbClusterInner resource, Context context); + @BodyParam("application/json") ClusterInner resource, Context context); @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + Response createOrReplaceSync(@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") HorizonDbClusterInner resource, Context context); + @BodyParam("application/json") ClusterInner resource, Context context); @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}") @ExpectedResponses({ 200, 202 }) @@ -117,7 +116,7 @@ Mono>> update(@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") HorizonDbClusterForPatchUpdate properties, Context context); + @BodyParam("application/json") ClusterForPatchUpdate properties, Context context); @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}") @ExpectedResponses({ 200, 202 }) @@ -126,7 +125,7 @@ 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") HorizonDbClusterForPatchUpdate properties, Context context); + @BodyParam("application/json") ClusterForPatchUpdate properties, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}") @@ -150,7 +149,7 @@ Response deleteSync(@HostParam("endpoint") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @@ -159,7 +158,7 @@ Mono> listByResourceGroup(@HostParam("endpo @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + 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); @@ -168,7 +167,7 @@ Response listByResourceGroupSync(@HostParam("endpoin @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HorizonDb/clusters") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @@ -176,60 +175,24 @@ Mono> list(@HostParam("endpoint") String en @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HorizonDb/clusters") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, + 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" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/start") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/failover") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> start(@HostParam("endpoint") String endpoint, + Mono>> failover(@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" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/start") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/failover") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response startSync(@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" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/stop") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> stop(@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" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/stop") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response stopSync(@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" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/restart") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> restart(@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" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/restart") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response restartSync(@HostParam("endpoint") String endpoint, + Response failoverSync(@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); @@ -238,7 +201,7 @@ Response restartSync(@HostParam("endpoint") String endpoint, @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( + Mono> listByResourceGroupNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -246,7 +209,7 @@ Mono> listByResourceGroupNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupNextSync( + Response listByResourceGroupNextSync( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -254,7 +217,7 @@ Response listByResourceGroupNextSync( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( + Mono> listBySubscriptionNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -262,7 +225,7 @@ Mono> listBySubscriptionNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listBySubscriptionNextSync( + Response listBySubscriptionNextSync( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -279,7 +242,7 @@ Response listBySubscriptionNextSync( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String clusterName) { final String accept = "application/json"; return FluxUtil @@ -299,7 +262,7 @@ public Mono> getByResourceGroupWithResponseAsync * @return information about a HorizonDB cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByResourceGroupAsync(String resourceGroupName, String clusterName) { + public Mono getByResourceGroupAsync(String resourceGroupName, String clusterName) { return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -316,7 +279,7 @@ public Mono getByResourceGroupAsync(String resourceGroupN * @return information about a HorizonDB cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, + public Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, Context context) { final String accept = "application/json"; return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -334,12 +297,20 @@ public Response getByResourceGroupWithResponse(String res * @return information about a HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HorizonDbClusterInner getByResourceGroup(String resourceGroupName, String clusterName) { + public ClusterInner getByResourceGroup(String resourceGroupName, String clusterName) { return getByResourceGroupWithResponse(resourceGroupName, clusterName, Context.NONE).getValue(); } /** - * Creates a new HorizonDB cluster or updates an existing cluster. + * Creates a new HorizonDB cluster or replaces an existing cluster. PointInTimeRestore creates the new Cluster + * resource and hydrates its service-owned database storage from an available source backup. It does not clone + * source pools, Pool-scoped endpoints, firewall rules, parameter-group associations, or other child resources. The + * new Cluster receives its service-generated Cluster-scoped Endpoint named cluster. For restore, postgreSqlVersion + * must be omitted because the service obtains it from backup metadata; all other new-cluster configuration comes + * from the request or service defaults. Same-location restore requires and honors pointInTimeUtc and allows + * creationSourceClusterLocation to be omitted. Cross-location restore requires creationSourceClusterLocation to + * identify the source cluster's Azure location and requires pointInTimeUtc, but ignores the supplied timestamp and + * restores the latest available backup. Cross-location responses omit pointInTimeUtc. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -350,19 +321,27 @@ public HorizonDbClusterInner getByResourceGroup(String resourceGroupName, String * @return represents the HorizonDB cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String clusterName, HorizonDbClusterInner resource) { + public Mono>> createOrReplaceWithResponseAsync(String resourceGroupName, + String clusterName, ClusterInner resource) { final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.createOrReplace(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, resource, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates a new HorizonDB cluster or updates an existing cluster. + * Creates a new HorizonDB cluster or replaces an existing cluster. PointInTimeRestore creates the new Cluster + * resource and hydrates its service-owned database storage from an available source backup. It does not clone + * source pools, Pool-scoped endpoints, firewall rules, parameter-group associations, or other child resources. The + * new Cluster receives its service-generated Cluster-scoped Endpoint named cluster. For restore, postgreSqlVersion + * must be omitted because the service obtains it from backup metadata; all other new-cluster configuration comes + * from the request or service defaults. Same-location restore requires and honors pointInTimeUtc and allows + * creationSourceClusterLocation to be omitted. Cross-location restore requires creationSourceClusterLocation to + * identify the source cluster's Azure location and requires pointInTimeUtc, but ignores the supplied timestamp and + * restores the latest available backup. Cross-location responses omit pointInTimeUtc. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -373,17 +352,25 @@ public Mono>> createOrUpdateWithResponseAsync(String r * @return represents the HorizonDB cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String clusterName, - HorizonDbClusterInner resource) { + private Response createOrReplaceWithResponse(String resourceGroupName, String clusterName, + ClusterInner resource) { final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + return service.createOrReplaceSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, resource, Context.NONE); } /** - * Creates a new HorizonDB cluster or updates an existing cluster. + * Creates a new HorizonDB cluster or replaces an existing cluster. PointInTimeRestore creates the new Cluster + * resource and hydrates its service-owned database storage from an available source backup. It does not clone + * source pools, Pool-scoped endpoints, firewall rules, parameter-group associations, or other child resources. The + * new Cluster receives its service-generated Cluster-scoped Endpoint named cluster. For restore, postgreSqlVersion + * must be omitted because the service obtains it from backup metadata; all other new-cluster configuration comes + * from the request or service defaults. Same-location restore requires and honors pointInTimeUtc and allows + * creationSourceClusterLocation to be omitted. Cross-location restore requires creationSourceClusterLocation to + * identify the source cluster's Azure location and requires pointInTimeUtc, but ignores the supplied timestamp and + * restores the latest available backup. Cross-location responses omit pointInTimeUtc. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -395,16 +382,24 @@ private Response createOrUpdateWithResponse(String resourceGroupName * @return represents the HorizonDB cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String clusterName, - HorizonDbClusterInner resource, Context context) { + private Response createOrReplaceWithResponse(String resourceGroupName, String clusterName, + ClusterInner resource, Context context) { final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + return service.createOrReplaceSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, resource, context); } /** - * Creates a new HorizonDB cluster or updates an existing cluster. + * Creates a new HorizonDB cluster or replaces an existing cluster. PointInTimeRestore creates the new Cluster + * resource and hydrates its service-owned database storage from an available source backup. It does not clone + * source pools, Pool-scoped endpoints, firewall rules, parameter-group associations, or other child resources. The + * new Cluster receives its service-generated Cluster-scoped Endpoint named cluster. For restore, postgreSqlVersion + * must be omitted because the service obtains it from backup metadata; all other new-cluster configuration comes + * from the request or service defaults. Same-location restore requires and honors pointInTimeUtc and allows + * creationSourceClusterLocation to be omitted. Cross-location restore requires creationSourceClusterLocation to + * identify the source cluster's Azure location and requires pointInTimeUtc, but ignores the supplied timestamp and + * restores the latest available backup. Cross-location responses omit pointInTimeUtc. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -415,17 +410,24 @@ private Response createOrUpdateWithResponse(String resourceGroupName * @return the {@link PollerFlux} for polling of represents the HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, HorizonDbClusterInner> - beginCreateOrUpdateAsync(String resourceGroupName, String clusterName, HorizonDbClusterInner resource) { + public PollerFlux, ClusterInner> beginCreateOrReplaceAsync(String resourceGroupName, + String clusterName, ClusterInner resource) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, resource); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), HorizonDbClusterInner.class, HorizonDbClusterInner.class, - this.client.getContext()); + = createOrReplaceWithResponseAsync(resourceGroupName, clusterName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterInner.class, ClusterInner.class, this.client.getContext()); } /** - * Creates a new HorizonDB cluster or updates an existing cluster. + * Creates a new HorizonDB cluster or replaces an existing cluster. PointInTimeRestore creates the new Cluster + * resource and hydrates its service-owned database storage from an available source backup. It does not clone + * source pools, Pool-scoped endpoints, firewall rules, parameter-group associations, or other child resources. The + * new Cluster receives its service-generated Cluster-scoped Endpoint named cluster. For restore, postgreSqlVersion + * must be omitted because the service obtains it from backup metadata; all other new-cluster configuration comes + * from the request or service defaults. Same-location restore requires and honors pointInTimeUtc and allows + * creationSourceClusterLocation to be omitted. Cross-location restore requires creationSourceClusterLocation to + * identify the source cluster's Azure location and requires pointInTimeUtc, but ignores the supplied timestamp and + * restores the latest available backup. Cross-location responses omit pointInTimeUtc. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -436,15 +438,23 @@ private Response createOrUpdateWithResponse(String resourceGroupName * @return the {@link SyncPoller} for polling of represents the HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, HorizonDbClusterInner> - beginCreateOrUpdate(String resourceGroupName, String clusterName, HorizonDbClusterInner resource) { - Response response = createOrUpdateWithResponse(resourceGroupName, clusterName, resource); - return this.client.getLroResult(response, - HorizonDbClusterInner.class, HorizonDbClusterInner.class, Context.NONE); + public SyncPoller, ClusterInner> beginCreateOrReplace(String resourceGroupName, + String clusterName, ClusterInner resource) { + Response response = createOrReplaceWithResponse(resourceGroupName, clusterName, resource); + return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, + Context.NONE); } /** - * Creates a new HorizonDB cluster or updates an existing cluster. + * Creates a new HorizonDB cluster or replaces an existing cluster. PointInTimeRestore creates the new Cluster + * resource and hydrates its service-owned database storage from an available source backup. It does not clone + * source pools, Pool-scoped endpoints, firewall rules, parameter-group associations, or other child resources. The + * new Cluster receives its service-generated Cluster-scoped Endpoint named cluster. For restore, postgreSqlVersion + * must be omitted because the service obtains it from backup metadata; all other new-cluster configuration comes + * from the request or service defaults. Same-location restore requires and honors pointInTimeUtc and allows + * creationSourceClusterLocation to be omitted. Cross-location restore requires creationSourceClusterLocation to + * identify the source cluster's Azure location and requires pointInTimeUtc, but ignores the supplied timestamp and + * restores the latest available backup. Cross-location responses omit pointInTimeUtc. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -456,15 +466,23 @@ private Response createOrUpdateWithResponse(String resourceGroupName * @return the {@link SyncPoller} for polling of represents the HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, HorizonDbClusterInner> beginCreateOrUpdate( - String resourceGroupName, String clusterName, HorizonDbClusterInner resource, Context context) { - Response response = createOrUpdateWithResponse(resourceGroupName, clusterName, resource, context); - return this.client.getLroResult(response, - HorizonDbClusterInner.class, HorizonDbClusterInner.class, context); + public SyncPoller, ClusterInner> beginCreateOrReplace(String resourceGroupName, + String clusterName, ClusterInner resource, Context context) { + Response response = createOrReplaceWithResponse(resourceGroupName, clusterName, resource, context); + return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, + context); } /** - * Creates a new HorizonDB cluster or updates an existing cluster. + * Creates a new HorizonDB cluster or replaces an existing cluster. PointInTimeRestore creates the new Cluster + * resource and hydrates its service-owned database storage from an available source backup. It does not clone + * source pools, Pool-scoped endpoints, firewall rules, parameter-group associations, or other child resources. The + * new Cluster receives its service-generated Cluster-scoped Endpoint named cluster. For restore, postgreSqlVersion + * must be omitted because the service obtains it from backup metadata; all other new-cluster configuration comes + * from the request or service defaults. Same-location restore requires and honors pointInTimeUtc and allows + * creationSourceClusterLocation to be omitted. Cross-location restore requires creationSourceClusterLocation to + * identify the source cluster's Azure location and requires pointInTimeUtc, but ignores the supplied timestamp and + * restores the latest available backup. Cross-location responses omit pointInTimeUtc. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -475,14 +493,22 @@ public SyncPoller, HorizonDbClusterInner> begi * @return represents the HorizonDB cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String clusterName, - HorizonDbClusterInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, clusterName, resource).last() + public Mono createOrReplaceAsync(String resourceGroupName, String clusterName, + ClusterInner resource) { + return beginCreateOrReplaceAsync(resourceGroupName, clusterName, resource).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Creates a new HorizonDB cluster or updates an existing cluster. + * Creates a new HorizonDB cluster or replaces an existing cluster. PointInTimeRestore creates the new Cluster + * resource and hydrates its service-owned database storage from an available source backup. It does not clone + * source pools, Pool-scoped endpoints, firewall rules, parameter-group associations, or other child resources. The + * new Cluster receives its service-generated Cluster-scoped Endpoint named cluster. For restore, postgreSqlVersion + * must be omitted because the service obtains it from backup metadata; all other new-cluster configuration comes + * from the request or service defaults. Same-location restore requires and honors pointInTimeUtc and allows + * creationSourceClusterLocation to be omitted. Cross-location restore requires creationSourceClusterLocation to + * identify the source cluster's Azure location and requires pointInTimeUtc, but ignores the supplied timestamp and + * restores the latest available backup. Cross-location responses omit pointInTimeUtc. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -493,13 +519,20 @@ public Mono createOrUpdateAsync(String resourceGroupName, * @return represents the HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HorizonDbClusterInner createOrUpdate(String resourceGroupName, String clusterName, - HorizonDbClusterInner resource) { - return beginCreateOrUpdate(resourceGroupName, clusterName, resource).getFinalResult(); + public ClusterInner createOrReplace(String resourceGroupName, String clusterName, ClusterInner resource) { + return beginCreateOrReplace(resourceGroupName, clusterName, resource).getFinalResult(); } /** - * Creates a new HorizonDB cluster or updates an existing cluster. + * Creates a new HorizonDB cluster or replaces an existing cluster. PointInTimeRestore creates the new Cluster + * resource and hydrates its service-owned database storage from an available source backup. It does not clone + * source pools, Pool-scoped endpoints, firewall rules, parameter-group associations, or other child resources. The + * new Cluster receives its service-generated Cluster-scoped Endpoint named cluster. For restore, postgreSqlVersion + * must be omitted because the service obtains it from backup metadata; all other new-cluster configuration comes + * from the request or service defaults. Same-location restore requires and honors pointInTimeUtc and allows + * creationSourceClusterLocation to be omitted. Cross-location restore requires creationSourceClusterLocation to + * identify the source cluster's Azure location and requires pointInTimeUtc, but ignores the supplied timestamp and + * restores the latest available backup. Cross-location responses omit pointInTimeUtc. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -511,13 +544,13 @@ public HorizonDbClusterInner createOrUpdate(String resourceGroupName, String clu * @return represents the HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HorizonDbClusterInner createOrUpdate(String resourceGroupName, String clusterName, - HorizonDbClusterInner resource, Context context) { - return beginCreateOrUpdate(resourceGroupName, clusterName, resource, context).getFinalResult(); + public ClusterInner createOrReplace(String resourceGroupName, String clusterName, ClusterInner resource, + Context context) { + return beginCreateOrReplace(resourceGroupName, clusterName, resource, context).getFinalResult(); } /** - * Updates an existing HorizonDB cluster (e.g., tags, virtual cores, replica count). + * Updates an existing HorizonDB cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -529,7 +562,7 @@ public HorizonDbClusterInner createOrUpdate(String resourceGroupName, String clu */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, - HorizonDbClusterForPatchUpdate properties) { + ClusterForPatchUpdate properties) { final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), @@ -538,7 +571,7 @@ public Mono>> updateWithResponseAsync(String resourceG } /** - * Updates an existing HorizonDB cluster (e.g., tags, virtual cores, replica count). + * Updates an existing HorizonDB cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -550,7 +583,7 @@ public Mono>> updateWithResponseAsync(String resourceG */ @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String clusterName, - HorizonDbClusterForPatchUpdate properties) { + ClusterForPatchUpdate properties) { final String contentType = "application/json"; final String accept = "application/json"; return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -559,7 +592,7 @@ private Response updateWithResponse(String resourceGroupName, String } /** - * Updates an existing HorizonDB cluster (e.g., tags, virtual cores, replica count). + * Updates an existing HorizonDB cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -572,7 +605,7 @@ private Response updateWithResponse(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String clusterName, - HorizonDbClusterForPatchUpdate properties, Context context) { + ClusterForPatchUpdate properties, Context context) { final String contentType = "application/json"; final String accept = "application/json"; return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -580,7 +613,7 @@ private Response updateWithResponse(String resourceGroupName, String } /** - * Updates an existing HorizonDB cluster (e.g., tags, virtual cores, replica count). + * Updates an existing HorizonDB cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -591,16 +624,15 @@ private Response updateWithResponse(String resourceGroupName, String * @return the {@link PollerFlux} for polling of represents the HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, HorizonDbClusterInner> - beginUpdateAsync(String resourceGroupName, String clusterName, HorizonDbClusterForPatchUpdate properties) { + public PollerFlux, ClusterInner> beginUpdateAsync(String resourceGroupName, + String clusterName, ClusterForPatchUpdate properties) { Mono>> mono = updateWithResponseAsync(resourceGroupName, clusterName, properties); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), HorizonDbClusterInner.class, HorizonDbClusterInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterInner.class, ClusterInner.class, this.client.getContext()); } /** - * Updates an existing HorizonDB cluster (e.g., tags, virtual cores, replica count). + * Updates an existing HorizonDB cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -611,15 +643,15 @@ private Response updateWithResponse(String resourceGroupName, String * @return the {@link SyncPoller} for polling of represents the HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, HorizonDbClusterInner> beginUpdate(String resourceGroupName, - String clusterName, HorizonDbClusterForPatchUpdate properties) { + public SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, String clusterName, + ClusterForPatchUpdate properties) { Response response = updateWithResponse(resourceGroupName, clusterName, properties); - return this.client.getLroResult(response, - HorizonDbClusterInner.class, HorizonDbClusterInner.class, Context.NONE); + return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, + Context.NONE); } /** - * Updates an existing HorizonDB cluster (e.g., tags, virtual cores, replica count). + * Updates an existing HorizonDB cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -631,15 +663,15 @@ public SyncPoller, HorizonDbClusterInner> begi * @return the {@link SyncPoller} for polling of represents the HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, HorizonDbClusterInner> beginUpdate(String resourceGroupName, - String clusterName, HorizonDbClusterForPatchUpdate properties, Context context) { + public SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, String clusterName, + ClusterForPatchUpdate properties, Context context) { Response response = updateWithResponse(resourceGroupName, clusterName, properties, context); - return this.client.getLroResult(response, - HorizonDbClusterInner.class, HorizonDbClusterInner.class, context); + return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, + context); } /** - * Updates an existing HorizonDB cluster (e.g., tags, virtual cores, replica count). + * Updates an existing HorizonDB cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -650,14 +682,14 @@ public SyncPoller, HorizonDbClusterInner> begi * @return represents the HorizonDB cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String clusterName, - HorizonDbClusterForPatchUpdate properties) { + public Mono updateAsync(String resourceGroupName, String clusterName, + ClusterForPatchUpdate properties) { return beginUpdateAsync(resourceGroupName, clusterName, properties).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates an existing HorizonDB cluster (e.g., tags, virtual cores, replica count). + * Updates an existing HorizonDB cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -668,13 +700,12 @@ public Mono updateAsync(String resourceGroupName, String * @return represents the HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HorizonDbClusterInner update(String resourceGroupName, String clusterName, - HorizonDbClusterForPatchUpdate properties) { + public ClusterInner update(String resourceGroupName, String clusterName, ClusterForPatchUpdate properties) { return beginUpdate(resourceGroupName, clusterName, properties).getFinalResult(); } /** - * Updates an existing HorizonDB cluster (e.g., tags, virtual cores, replica count). + * Updates an existing HorizonDB cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -686,13 +717,15 @@ public HorizonDbClusterInner update(String resourceGroupName, String clusterName * @return represents the HorizonDB cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HorizonDbClusterInner update(String resourceGroupName, String clusterName, - HorizonDbClusterForPatchUpdate properties, Context context) { + public ClusterInner update(String resourceGroupName, String clusterName, ClusterForPatchUpdate properties, + Context context) { return beginUpdate(resourceGroupName, clusterName, properties, context).getFinalResult(); } /** - * Deletes a HorizonDB cluster. + * Deletes a HorizonDB cluster, its Cluster-scoped Endpoint, and all remaining child resources. For an accepted + * deletion, the long-running operation remains nonterminal until physical deletion completes and point GET returns + * 404 Not Found. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -710,7 +743,9 @@ public Mono>> deleteWithResponseAsync(String resourceG } /** - * Deletes a HorizonDB cluster. + * Deletes a HorizonDB cluster, its Cluster-scoped Endpoint, and all remaining child resources. For an accepted + * deletion, the long-running operation remains nonterminal until physical deletion completes and point GET returns + * 404 Not Found. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -726,7 +761,9 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes a HorizonDB cluster. + * Deletes a HorizonDB cluster, its Cluster-scoped Endpoint, and all remaining child resources. For an accepted + * deletion, the long-running operation remains nonterminal until physical deletion completes and point GET returns + * 404 Not Found. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -743,7 +780,9 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes a HorizonDB cluster. + * Deletes a HorizonDB cluster, its Cluster-scoped Endpoint, and all remaining child resources. For an accepted + * deletion, the long-running operation remains nonterminal until physical deletion completes and point GET returns + * 404 Not Found. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -760,7 +799,9 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN } /** - * Deletes a HorizonDB cluster. + * Deletes a HorizonDB cluster, its Cluster-scoped Endpoint, and all remaining child resources. For an accepted + * deletion, the long-running operation remains nonterminal until physical deletion completes and point GET returns + * 404 Not Found. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -776,7 +817,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a HorizonDB cluster. + * Deletes a HorizonDB cluster, its Cluster-scoped Endpoint, and all remaining child resources. For an accepted + * deletion, the long-running operation remains nonterminal until physical deletion completes and point GET returns + * 404 Not Found. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -794,7 +837,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a HorizonDB cluster. + * Deletes a HorizonDB cluster, its Cluster-scoped Endpoint, and all remaining child resources. For an accepted + * deletion, the long-running operation remains nonterminal until physical deletion completes and point GET returns + * 404 Not Found. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -809,7 +854,9 @@ public Mono deleteAsync(String resourceGroupName, String clusterName) { } /** - * Deletes a HorizonDB cluster. + * Deletes a HorizonDB cluster, its Cluster-scoped Endpoint, and all remaining child resources. For an accepted + * deletion, the long-running operation remains nonterminal until physical deletion completes and point GET returns + * 404 Not Found. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -823,7 +870,9 @@ public void delete(String resourceGroupName, String clusterName) { } /** - * Deletes a HorizonDB cluster. + * Deletes a HorizonDB cluster, its Cluster-scoped Endpoint, and all remaining child resources. For an accepted + * deletion, the long-running operation remains nonterminal until physical deletion completes and point GET returns + * 404 Not Found. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -844,17 +893,17 @@ public void delete(String resourceGroupName, String clusterName, 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 the response of a HorizonDbCluster list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a Cluster list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + 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)) + .>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())); } @@ -865,10 +914,10 @@ private Mono> listByResourceGroupSinglePage * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbCluster list operation as paginated response with {@link PagedFlux}. + * @return the response of a Cluster list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + public PagedFlux listByResourceGroupAsync(String resourceGroupName) { return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } @@ -880,12 +929,12 @@ public PagedFlux listByResourceGroupAsync(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 response of a HorizonDbCluster list operation along with {@link PagedResponse}. + * @return the response of a Cluster list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { final String accept = "application/json"; - Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + 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); @@ -899,13 +948,12 @@ private PagedResponse listByResourceGroupSinglePage(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 the response of a HorizonDbCluster list operation along with {@link PagedResponse}. + * @return the response of a Cluster list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, - Context context) { + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { final String accept = "application/json"; - Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + 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); @@ -918,10 +966,10 @@ private PagedResponse listByResourceGroupSinglePage(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 the response of a HorizonDbCluster list operation as paginated response with {@link PagedIterable}. + * @return the response of a Cluster list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { + public PagedIterable listByResourceGroup(String resourceGroupName) { return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), nextLink -> listByResourceGroupNextSinglePage(nextLink)); } @@ -934,10 +982,10 @@ public PagedIterable listByResourceGroup(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbCluster list operation as paginated response with {@link PagedIterable}. + * @return the response of a Cluster list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } @@ -947,17 +995,17 @@ public PagedIterable listByResourceGroup(String resourceG * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbCluster list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a Cluster list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { + 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)) + .>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())); } @@ -966,10 +1014,10 @@ private Mono> listSinglePageAsync() { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbCluster list operation as paginated response with {@link PagedFlux}. + * @return the response of a Cluster list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync() { + public PagedFlux listAsync() { return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } @@ -979,13 +1027,13 @@ public PagedFlux listAsync() { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbCluster list operation along with {@link PagedResponse}. + * @return the response of a Cluster list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage() { + private PagedResponse listSinglePage() { final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + 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); } @@ -997,13 +1045,13 @@ private PagedResponse listSinglePage() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbCluster list operation along with {@link PagedResponse}. + * @return the response of a Cluster list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Context context) { + 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); + 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); } @@ -1013,10 +1061,10 @@ private PagedResponse listSinglePage(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbCluster list operation as paginated response with {@link PagedIterable}. + * @return the response of a Cluster list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { + public PagedIterable list() { return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } @@ -1027,16 +1075,18 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbCluster list operation as paginated response with {@link PagedIterable}. + * @return the response of a Cluster list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { + public PagedIterable list(Context context) { return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * Starts a stopped HorizonDB cluster. + * Triggers failover within the cluster's designated read-write pool. HorizonDB selects the replacement node using + * the same eligibility and node-selection rules as automatic failover. The request fails with 409 Conflict when the + * designated pool is not eligible for failover or another conflicting operation is in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -1046,16 +1096,18 @@ public PagedIterable list(Context context) { * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> startWithResponseAsync(String resourceGroupName, String clusterName) { + public Mono>> failoverWithResponseAsync(String resourceGroupName, String clusterName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.start(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.failover(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Starts a stopped HorizonDB cluster. + * Triggers failover within the cluster's designated read-write pool. HorizonDB selects the replacement node using + * the same eligibility and node-selection rules as automatic failover. The request fails with 409 Conflict when the + * designated pool is not eligible for failover or another conflicting operation is in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -1065,14 +1117,16 @@ public Mono>> startWithResponseAsync(String resourceGr * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response startWithResponse(String resourceGroupName, String clusterName) { + private Response failoverWithResponse(String resourceGroupName, String clusterName) { final String accept = "application/json"; - return service.startSync(this.client.getEndpoint(), this.client.getApiVersion(), + return service.failoverSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, Context.NONE); } /** - * Starts a stopped HorizonDB cluster. + * Triggers failover within the cluster's designated read-write pool. HorizonDB selects the replacement node using + * the same eligibility and node-selection rules as automatic failover. The request fails with 409 Conflict when the + * designated pool is not eligible for failover or another conflicting operation is in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -1083,14 +1137,16 @@ private Response startWithResponse(String resourceGroupName, String * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response startWithResponse(String resourceGroupName, String clusterName, Context context) { + private Response failoverWithResponse(String resourceGroupName, String clusterName, Context context) { final String accept = "application/json"; - return service.startSync(this.client.getEndpoint(), this.client.getApiVersion(), + return service.failoverSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context); } /** - * Starts a stopped HorizonDB cluster. + * Triggers failover within the cluster's designated read-write pool. HorizonDB selects the replacement node using + * the same eligibility and node-selection rules as automatic failover. The request fails with 409 Conflict when the + * designated pool is not eligible for failover or another conflicting operation is in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -1100,311 +1156,17 @@ private Response startWithResponse(String resourceGroupName, String * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginStartAsync(String resourceGroupName, String clusterName) { - Mono>> mono = startWithResponseAsync(resourceGroupName, clusterName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Starts a stopped HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB 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> beginStart(String resourceGroupName, String clusterName) { - Response response = startWithResponse(resourceGroupName, clusterName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Starts a stopped HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB 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 long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStart(String resourceGroupName, String clusterName, - Context context) { - Response response = startWithResponse(resourceGroupName, clusterName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Starts a stopped HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB 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) - public Mono startAsync(String resourceGroupName, String clusterName) { - return beginStartAsync(resourceGroupName, clusterName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Starts a stopped HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void start(String resourceGroupName, String clusterName) { - beginStart(resourceGroupName, clusterName).getFinalResult(); - } - - /** - * Starts a stopped HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void start(String resourceGroupName, String clusterName, Context context) { - beginStart(resourceGroupName, clusterName, context).getFinalResult(); - } - - /** - * Stops a running HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB 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 along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> stopWithResponseAsync(String resourceGroupName, String clusterName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.stop(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Stops a running HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB 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 along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response stopWithResponse(String resourceGroupName, String clusterName) { - final String accept = "application/json"; - return service.stopSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, accept, Context.NONE); - } - - /** - * Stops a running HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB 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 body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response stopWithResponse(String resourceGroupName, String clusterName, Context context) { - final String accept = "application/json"; - return service.stopSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, accept, context); - } - - /** - * Stops a running HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginStopAsync(String resourceGroupName, String clusterName) { - Mono>> mono = stopWithResponseAsync(resourceGroupName, clusterName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Stops a running HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB 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> beginStop(String resourceGroupName, String clusterName) { - Response response = stopWithResponse(resourceGroupName, clusterName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); - } - - /** - * Stops a running HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB 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 long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStop(String resourceGroupName, String clusterName, Context context) { - Response response = stopWithResponse(resourceGroupName, clusterName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); - } - - /** - * Stops a running HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB 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) - public Mono stopAsync(String resourceGroupName, String clusterName) { - return beginStopAsync(resourceGroupName, clusterName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Stops a running HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void stop(String resourceGroupName, String clusterName) { - beginStop(resourceGroupName, clusterName).getFinalResult(); - } - - /** - * Stops a running HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void stop(String resourceGroupName, String clusterName, Context context) { - beginStop(resourceGroupName, clusterName, context).getFinalResult(); - } - - /** - * Restarts a HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB 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 along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> restartWithResponseAsync(String resourceGroupName, String clusterName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.restart(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Restarts a HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB 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 along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response restartWithResponse(String resourceGroupName, String clusterName) { - final String accept = "application/json"; - return service.restartSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, Context.NONE); - } - - /** - * Restarts a HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB 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 body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response restartWithResponse(String resourceGroupName, String clusterName, Context context) { - final String accept = "application/json"; - return service.restartSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context); - } - - /** - * Restarts a HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, Void> beginRestartAsync(String resourceGroupName, String clusterName) { - Mono>> mono = restartWithResponseAsync(resourceGroupName, clusterName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + public PollerFlux, ClusterInner> beginFailoverAsync(String resourceGroupName, + String clusterName) { + Mono>> mono = failoverWithResponseAsync(resourceGroupName, clusterName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterInner.class, ClusterInner.class, this.client.getContext()); } /** - * Restarts a HorizonDB cluster. + * Triggers failover within the cluster's designated read-write pool. HorizonDB selects the replacement node using + * the same eligibility and node-selection rules as automatic failover. The request fails with 409 Conflict when the + * designated pool is not eligible for failover or another conflicting operation is in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -1414,13 +1176,17 @@ public PollerFlux, Void> beginRestartAsync(String resourceGroup * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRestart(String resourceGroupName, String clusterName) { - Response response = restartWithResponse(resourceGroupName, clusterName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + public SyncPoller, ClusterInner> beginFailover(String resourceGroupName, + String clusterName) { + Response response = failoverWithResponse(resourceGroupName, clusterName); + return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, + Context.NONE); } /** - * Restarts a HorizonDB cluster. + * Triggers failover within the cluster's designated read-write pool. HorizonDB selects the replacement node using + * the same eligibility and node-selection rules as automatic failover. The request fails with 409 Conflict when the + * designated pool is not eligible for failover or another conflicting operation is in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -1431,43 +1197,51 @@ public SyncPoller, Void> beginRestart(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRestart(String resourceGroupName, String clusterName, - Context context) { - Response response = restartWithResponse(resourceGroupName, clusterName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); + public SyncPoller, ClusterInner> beginFailover(String resourceGroupName, + String clusterName, Context context) { + Response response = failoverWithResponse(resourceGroupName, clusterName, context); + return this.client.getLroResult(response, ClusterInner.class, ClusterInner.class, + context); } /** - * Restarts a HorizonDB cluster. + * Triggers failover within the cluster's designated read-write pool. HorizonDB selects the replacement node using + * the same eligibility and node-selection rules as automatic failover. The request fails with 409 Conflict when the + * designated pool is not eligible for failover or another conflicting operation is in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB 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. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono restartAsync(String resourceGroupName, String clusterName) { - return beginRestartAsync(resourceGroupName, clusterName).last().flatMap(this.client::getLroFinalResultOrError); + public Mono failoverAsync(String resourceGroupName, String clusterName) { + return beginFailoverAsync(resourceGroupName, clusterName).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Restarts a HorizonDB cluster. + * Triggers failover within the cluster's designated read-write pool. HorizonDB selects the replacement node using + * the same eligibility and node-selection rules as automatic failover. The request fails with 409 Conflict when the + * designated pool is not eligible for failover or another conflicting operation is in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB 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 void restart(String resourceGroupName, String clusterName) { - beginRestart(resourceGroupName, clusterName).getFinalResult(); + public ClusterInner failover(String resourceGroupName, String clusterName) { + return beginFailover(resourceGroupName, clusterName).getFinalResult(); } /** - * Restarts a HorizonDB cluster. + * Triggers failover within the cluster's designated read-write pool. HorizonDB selects the replacement node using + * the same eligibility and node-selection rules as automatic failover. The request fails with 409 Conflict when the + * designated pool is not eligible for failover or another conflicting operation is in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -1475,10 +1249,11 @@ public void restart(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 the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void restart(String resourceGroupName, String clusterName, Context context) { - beginRestart(resourceGroupName, clusterName, context).getFinalResult(); + public ClusterInner failover(String resourceGroupName, String clusterName, Context context) { + return beginFailover(resourceGroupName, clusterName, context).getFinalResult(); } /** @@ -1488,17 +1263,17 @@ public void restart(String resourceGroupName, String clusterName, Context contex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbCluster list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a Cluster list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + 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)) + .>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())); } @@ -1509,12 +1284,12 @@ private Mono> listByResourceGroupNextSingle * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbCluster list operation along with {@link PagedResponse}. + * @return the response of a Cluster list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { final String accept = "application/json"; - Response res + 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); @@ -1528,12 +1303,12 @@ private PagedResponse listByResourceGroupNextSinglePage(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 the response of a HorizonDbCluster list operation along with {@link PagedResponse}. + * @return the response of a Cluster list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - Response res + 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); @@ -1546,17 +1321,17 @@ private PagedResponse listByResourceGroupNextSinglePage(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 the response of a HorizonDbCluster list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a Cluster list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + 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)) + .>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())); } @@ -1567,12 +1342,12 @@ private Mono> listBySubscriptionNextSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbCluster list operation along with {@link PagedResponse}. + * @return the response of a Cluster list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { final String accept = "application/json"; - Response res + 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); @@ -1586,12 +1361,12 @@ private PagedResponse listBySubscriptionNextSinglePage(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 the response of a HorizonDbCluster list operation along with {@link PagedResponse}. + * @return the response of a Cluster list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - Response res + 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/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbClustersImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ClustersImpl.java similarity index 60% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbClustersImpl.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ClustersImpl.java index 2c1cab9d428b8..62e129c2a7523 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbClustersImpl.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ClustersImpl.java @@ -9,36 +9,36 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbClusterInner; -import com.azure.resourcemanager.horizondb.models.HorizonDbCluster; -import com.azure.resourcemanager.horizondb.models.HorizonDbClusters; +import com.azure.resourcemanager.horizondb.fluent.ClustersClient; +import com.azure.resourcemanager.horizondb.fluent.models.ClusterInner; +import com.azure.resourcemanager.horizondb.models.Cluster; +import com.azure.resourcemanager.horizondb.models.Clusters; -public final class HorizonDbClustersImpl implements HorizonDbClusters { - private static final ClientLogger LOGGER = new ClientLogger(HorizonDbClustersImpl.class); +public final class ClustersImpl implements Clusters { + private static final ClientLogger LOGGER = new ClientLogger(ClustersImpl.class); - private final HorizonDbClustersClient innerClient; + private final ClustersClient innerClient; private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; - public HorizonDbClustersImpl(HorizonDbClustersClient innerClient, + public ClustersImpl(ClustersClient innerClient, com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, + public Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, Context context) { - Response inner + Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, clusterName, context); return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new HorizonDbClusterImpl(inner.getValue(), this.manager())); + new ClusterImpl(inner.getValue(), this.manager())); } - public HorizonDbCluster getByResourceGroup(String resourceGroupName, String clusterName) { - HorizonDbClusterInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, clusterName); + public Cluster getByResourceGroup(String resourceGroupName, String clusterName) { + ClusterInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, clusterName); if (inner != null) { - return new HorizonDbClusterImpl(inner, this.manager()); + return new ClusterImpl(inner, this.manager()); } else { return null; } @@ -52,52 +52,45 @@ 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 HorizonDbClusterImpl(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 HorizonDbClusterImpl(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 HorizonDbClusterImpl(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 HorizonDbClusterImpl(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 void start(String resourceGroupName, String clusterName) { - this.serviceClient().start(resourceGroupName, clusterName); - } - - public void start(String resourceGroupName, String clusterName, Context context) { - this.serviceClient().start(resourceGroupName, clusterName, context); - } - - public void stop(String resourceGroupName, String clusterName) { - this.serviceClient().stop(resourceGroupName, clusterName); - } - - public void stop(String resourceGroupName, String clusterName, Context context) { - this.serviceClient().stop(resourceGroupName, clusterName, context); - } - - public void restart(String resourceGroupName, String clusterName) { - this.serviceClient().restart(resourceGroupName, clusterName); + public Cluster failover(String resourceGroupName, String clusterName) { + ClusterInner inner = this.serviceClient().failover(resourceGroupName, clusterName); + if (inner != null) { + return new ClusterImpl(inner, this.manager()); + } else { + return null; + } } - public void restart(String resourceGroupName, String clusterName, Context context) { - this.serviceClient().restart(resourceGroupName, clusterName, context); + public Cluster failover(String resourceGroupName, String clusterName, Context context) { + ClusterInner inner = this.serviceClient().failover(resourceGroupName, clusterName, context); + if (inner != null) { + return new ClusterImpl(inner, this.manager()); + } else { + return null; + } } - public HorizonDbCluster getById(String id) { + public Cluster getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -111,7 +104,7 @@ public HorizonDbCluster getById(String id) { return this.getByResourceGroupWithResponse(resourceGroupName, clusterName, Context.NONE).getValue(); } - public Response getByIdWithResponse(String id, Context context) { + public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -153,7 +146,7 @@ public void deleteByIdWithResponse(String id, Context context) { this.delete(resourceGroupName, clusterName, context); } - private HorizonDbClustersClient serviceClient() { + private ClustersClient serviceClient() { return this.innerClient; } @@ -161,7 +154,7 @@ private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { return this.serviceManager; } - public HorizonDbClusterImpl define(String name) { - return new HorizonDbClusterImpl(name, this.manager()); + public ClusterImpl define(String name) { + return new ClusterImpl(name, this.manager()); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/DefaultParameterGroupImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/DefaultParameterGroupImpl.java new file mode 100644 index 0000000000000..bcb4587261f30 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/DefaultParameterGroupImpl.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.horizondb.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.horizondb.fluent.models.DefaultParameterGroupInner; +import com.azure.resourcemanager.horizondb.models.DefaultParameterGroup; +import com.azure.resourcemanager.horizondb.models.DefaultParameterGroupProperties; + +public final class DefaultParameterGroupImpl implements DefaultParameterGroup { + private DefaultParameterGroupInner innerObject; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + DefaultParameterGroupImpl(DefaultParameterGroupInner innerObject, + com.azure.resourcemanager.horizondb.HorizonDbManager 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 DefaultParameterGroupProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public DefaultParameterGroupInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/DefaultParameterGroupsClientImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/DefaultParameterGroupsClientImpl.java new file mode 100644 index 0000000000000..22b48c6074001 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/DefaultParameterGroupsClientImpl.java @@ -0,0 +1,363 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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.horizondb.fluent.DefaultParameterGroupsClient; +import com.azure.resourcemanager.horizondb.fluent.models.DefaultParameterGroupInner; +import com.azure.resourcemanager.horizondb.implementation.models.DefaultParameterGroupListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in DefaultParameterGroupsClient. + */ +public final class DefaultParameterGroupsClientImpl implements DefaultParameterGroupsClient { + /** + * The proxy service used to perform REST calls. + */ + private final DefaultParameterGroupsService service; + + /** + * The service client containing this operation class. + */ + private final HorizonDbManagementClientImpl client; + + /** + * Initializes an instance of DefaultParameterGroupsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DefaultParameterGroupsClientImpl(HorizonDbManagementClientImpl client) { + this.service = RestProxy.create(DefaultParameterGroupsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for HorizonDbManagementClientDefaultParameterGroups to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "HorizonDbManagementClientDefaultParameterGroups") + public interface DefaultParameterGroupsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HorizonDb/locations/{location}/parameterGroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionAndRegion( + @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.HorizonDb/locations/{location}/parameterGroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionAndRegionSync( + @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.HorizonDb/locations/{location}/parameterGroups/{name}") + @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("name") String name, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HorizonDb/locations/{location}/parameterGroups/{name}") + @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("name") String name, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionAndRegionNext( + @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 listBySubscriptionAndRegionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Lists default parameter groups available for a subscription in a specific region. The response contains at most + * one default parameter group for each PostgreSQL version. + * + * @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 DefaultParameterGroup list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listBySubscriptionAndRegionSinglePageAsync(String location) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listBySubscriptionAndRegion(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())); + } + + /** + * Lists default parameter groups available for a subscription in a specific region. The response contains at most + * one default parameter group for each PostgreSQL version. + * + * @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 DefaultParameterGroup list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listBySubscriptionAndRegionAsync(String location) { + return new PagedFlux<>(() -> listBySubscriptionAndRegionSinglePageAsync(location), + nextLink -> listBySubscriptionAndRegionNextSinglePageAsync(nextLink)); + } + + /** + * Lists default parameter groups available for a subscription in a specific region. The response contains at most + * one default parameter group for each PostgreSQL version. + * + * @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 DefaultParameterGroup list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionAndRegionSinglePage(String location) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionAndRegionSync(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); + } + + /** + * Lists default parameter groups available for a subscription in a specific region. The response contains at most + * one default parameter group for each PostgreSQL version. + * + * @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 DefaultParameterGroup list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionAndRegionSinglePage(String location, + Context context) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionAndRegionSync(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); + } + + /** + * Lists default parameter groups available for a subscription in a specific region. The response contains at most + * one default parameter group for each PostgreSQL version. + * + * @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 DefaultParameterGroup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBySubscriptionAndRegion(String location) { + return new PagedIterable<>(() -> listBySubscriptionAndRegionSinglePage(location), + nextLink -> listBySubscriptionAndRegionNextSinglePage(nextLink)); + } + + /** + * Lists default parameter groups available for a subscription in a specific region. The response contains at most + * one default parameter group for each PostgreSQL version. + * + * @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 DefaultParameterGroup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBySubscriptionAndRegion(String location, Context context) { + return new PagedIterable<>(() -> listBySubscriptionAndRegionSinglePage(location, context), + nextLink -> listBySubscriptionAndRegionNextSinglePage(nextLink, context)); + } + + /** + * Gets a default parameter group available for a subscription in a specific region. Each PostgreSQL version has at + * most one default parameter group in a location. + * + * @param location The name of the Azure region. + * @param name The name of the DefaultParameterGroup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a default parameter group available for a subscription in a specific region along with {@link Response} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String location, String name) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, name, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a default parameter group available for a subscription in a specific region. Each PostgreSQL version has at + * most one default parameter group in a location. + * + * @param location The name of the Azure region. + * @param name The name of the DefaultParameterGroup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a default parameter group available for a subscription in a specific region on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String location, String name) { + return getWithResponseAsync(location, name).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a default parameter group available for a subscription in a specific region. Each PostgreSQL version has at + * most one default parameter group in a location. + * + * @param location The name of the Azure region. + * @param name The name of the DefaultParameterGroup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a default parameter group available for a subscription in a specific region along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String location, String name, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, name, accept, context); + } + + /** + * Gets a default parameter group available for a subscription in a specific region. Each PostgreSQL version has at + * most one default parameter group in a location. + * + * @param location The name of the Azure region. + * @param name The name of the DefaultParameterGroup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a default parameter group available for a subscription in a specific region. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DefaultParameterGroupInner get(String location, String name) { + return getWithResponse(location, name, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DefaultParameterGroup list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listBySubscriptionAndRegionNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.listBySubscriptionAndRegionNext(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 DefaultParameterGroup list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionAndRegionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionAndRegionNextSync(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 DefaultParameterGroup list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionAndRegionNextSinglePage(String nextLink, + Context context) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionAndRegionNextSync(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/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/DefaultParameterGroupsImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/DefaultParameterGroupsImpl.java new file mode 100644 index 0000000000000..4c525f55f7c82 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/DefaultParameterGroupsImpl.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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.horizondb.fluent.DefaultParameterGroupsClient; +import com.azure.resourcemanager.horizondb.fluent.models.DefaultParameterGroupInner; +import com.azure.resourcemanager.horizondb.models.DefaultParameterGroup; +import com.azure.resourcemanager.horizondb.models.DefaultParameterGroups; + +public final class DefaultParameterGroupsImpl implements DefaultParameterGroups { + private static final ClientLogger LOGGER = new ClientLogger(DefaultParameterGroupsImpl.class); + + private final DefaultParameterGroupsClient innerClient; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + public DefaultParameterGroupsImpl(DefaultParameterGroupsClient innerClient, + com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listBySubscriptionAndRegion(String location) { + PagedIterable inner = this.serviceClient().listBySubscriptionAndRegion(location); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DefaultParameterGroupImpl(inner1, this.manager())); + } + + public PagedIterable listBySubscriptionAndRegion(String location, Context context) { + PagedIterable inner + = this.serviceClient().listBySubscriptionAndRegion(location, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DefaultParameterGroupImpl(inner1, this.manager())); + } + + public Response getWithResponse(String location, String name, Context context) { + Response inner = this.serviceClient().getWithResponse(location, name, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DefaultParameterGroupImpl(inner.getValue(), this.manager())); + } + + public DefaultParameterGroup get(String location, String name) { + DefaultParameterGroupInner inner = this.serviceClient().get(location, name); + if (inner != null) { + return new DefaultParameterGroupImpl(inner, this.manager()); + } else { + return null; + } + } + + private DefaultParameterGroupsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/EndpointImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/EndpointImpl.java new file mode 100644 index 0000000000000..1f6f5f377e2b1 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/EndpointImpl.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.horizondb.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.horizondb.fluent.models.EndpointInner; +import com.azure.resourcemanager.horizondb.models.Endpoint; +import com.azure.resourcemanager.horizondb.models.EndpointProperties; + +public final class EndpointImpl implements Endpoint { + private EndpointInner innerObject; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + EndpointImpl(EndpointInner innerObject, com.azure.resourcemanager.horizondb.HorizonDbManager 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 EndpointProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public EndpointInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/EndpointsClientImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/EndpointsClientImpl.java new file mode 100644 index 0000000000000..986d7d233326c --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/EndpointsClientImpl.java @@ -0,0 +1,371 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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.horizondb.fluent.EndpointsClient; +import com.azure.resourcemanager.horizondb.fluent.models.EndpointInner; +import com.azure.resourcemanager.horizondb.implementation.models.EndpointListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in EndpointsClient. + */ +public final class EndpointsClientImpl implements EndpointsClient { + /** + * The proxy service used to perform REST calls. + */ + private final EndpointsService service; + + /** + * The service client containing this operation class. + */ + private final HorizonDbManagementClientImpl client; + + /** + * Initializes an instance of EndpointsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + EndpointsClientImpl(HorizonDbManagementClientImpl client) { + this.service + = RestProxy.create(EndpointsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for HorizonDbManagementClientEndpoints to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "HorizonDbManagementClientEndpoints") + public interface EndpointsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/endpoints/{endpointName}") + @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("clusterName") String clusterName, + @PathParam("endpointName") String endpointName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/endpoints/{endpointName}") + @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("endpointName") String endpointName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/endpoints") + @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("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/endpoints") + @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, + @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 information about a service-generated HorizonDB Cluster- or Pool-scoped Endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param endpointName The platform-assigned name of the HorizonDB endpoint. A Cluster-scoped ReadWrite Endpoint has + * exactly the same name as its associated Cluster. A Pool-scoped Endpoint has exactly the same name as its + * associated Pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a service-generated HorizonDB Cluster- or Pool-scoped Endpoint along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String endpointName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, endpointName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information about a service-generated HorizonDB Cluster- or Pool-scoped Endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param endpointName The platform-assigned name of the HorizonDB endpoint. A Cluster-scoped ReadWrite Endpoint has + * exactly the same name as its associated Cluster. A Pool-scoped Endpoint has exactly the same name as its + * associated Pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a service-generated HorizonDB Cluster- or Pool-scoped Endpoint on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String clusterName, String endpointName) { + return getWithResponseAsync(resourceGroupName, clusterName, endpointName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about a service-generated HorizonDB Cluster- or Pool-scoped Endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param endpointName The platform-assigned name of the HorizonDB endpoint. A Cluster-scoped ReadWrite Endpoint has + * exactly the same name as its associated Cluster. A Pool-scoped Endpoint has exactly the same name as its + * associated Pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a service-generated HorizonDB Cluster- or Pool-scoped Endpoint along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String clusterName, String endpointName, + Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, endpointName, accept, context); + } + + /** + * Gets information about a service-generated HorizonDB Cluster- or Pool-scoped Endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param endpointName The platform-assigned name of the HorizonDB endpoint. A Cluster-scoped ReadWrite Endpoint has + * exactly the same name as its associated Cluster. A Pool-scoped Endpoint has exactly the same name as its + * associated Pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a service-generated HorizonDB Cluster- or Pool-scoped Endpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EndpointInner get(String resourceGroupName, String clusterName, String endpointName) { + return getWithResponse(resourceGroupName, clusterName, endpointName, Context.NONE).getValue(); + } + + /** + * Lists the service-generated Endpoints in a cluster. The collection contains the Cluster-scoped Endpoint named + * cluster and one Pool-scoped Endpoint for each pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Endpoint list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @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())); + } + + /** + * Lists the service-generated Endpoints in a cluster. The collection contains the Cluster-scoped Endpoint named + * cluster and one Pool-scoped Endpoint for each pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Endpoint list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String clusterName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists the service-generated Endpoints in a cluster. The collection contains the Cluster-scoped Endpoint named + * cluster and one Pool-scoped Endpoint for each pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Endpoint list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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); + } + + /** + * Lists the service-generated Endpoints in a cluster. The collection contains the Cluster-scoped Endpoint named + * cluster and one Pool-scoped Endpoint for each pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Endpoint list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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); + } + + /** + * Lists the service-generated Endpoints in a cluster. The collection contains the Cluster-scoped Endpoint named + * cluster and one Pool-scoped Endpoint for each pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Endpoint list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * Lists the service-generated Endpoints in a cluster. The collection contains the Cluster-scoped Endpoint named + * cluster and one Pool-scoped Endpoint for each pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Endpoint list operation as paginated response with {@link PagedIterable}. + */ + @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 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 Endpoint 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 Endpoint 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 Endpoint 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/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/EndpointsImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/EndpointsImpl.java new file mode 100644 index 0000000000000..e4ea8a308b062 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/EndpointsImpl.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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.horizondb.fluent.EndpointsClient; +import com.azure.resourcemanager.horizondb.fluent.models.EndpointInner; +import com.azure.resourcemanager.horizondb.models.Endpoint; +import com.azure.resourcemanager.horizondb.models.Endpoints; + +public final class EndpointsImpl implements Endpoints { + private static final ClientLogger LOGGER = new ClientLogger(EndpointsImpl.class); + + private final EndpointsClient innerClient; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + public EndpointsImpl(EndpointsClient innerClient, + com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String clusterName, String endpointName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, clusterName, endpointName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EndpointImpl(inner.getValue(), this.manager())); + } + + public Endpoint get(String resourceGroupName, String clusterName, String endpointName) { + EndpointInner inner = this.serviceClient().get(resourceGroupName, clusterName, endpointName); + if (inner != null) { + return new EndpointImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list(String resourceGroupName, String clusterName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EndpointImpl(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 EndpointImpl(inner1, this.manager())); + } + + private EndpointsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/FirewallRuleImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/FirewallRuleImpl.java new file mode 100644 index 0000000000000..7baf9530a44da --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/FirewallRuleImpl.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.horizondb.fluent.models.FirewallRuleInner; +import com.azure.resourcemanager.horizondb.models.FirewallRule; +import com.azure.resourcemanager.horizondb.models.FirewallRuleProperties; + +public final class FirewallRuleImpl implements FirewallRule, FirewallRule.Definition { + private FirewallRuleInner innerObject; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + FirewallRuleImpl(FirewallRuleInner innerObject, + com.azure.resourcemanager.horizondb.HorizonDbManager 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 FirewallRuleProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public FirewallRuleInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String clusterName; + + private String poolName; + + private String firewallRuleName; + + public FirewallRuleImpl withExistingPool(String resourceGroupName, String clusterName, String poolName) { + this.resourceGroupName = resourceGroupName; + this.clusterName = clusterName; + this.poolName = poolName; + return this; + } + + public FirewallRule create() { + this.innerObject = serviceManager.serviceClient() + .getFirewallRules() + .createOrReplace(resourceGroupName, clusterName, poolName, firewallRuleName, this.innerModel(), + Context.NONE); + return this; + } + + public FirewallRule create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getFirewallRules() + .createOrReplace(resourceGroupName, clusterName, poolName, firewallRuleName, this.innerModel(), context); + return this; + } + + FirewallRuleImpl(String name, com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerObject = new FirewallRuleInner(); + this.serviceManager = serviceManager; + this.firewallRuleName = name; + } + + public FirewallRule refresh() { + this.innerObject = serviceManager.serviceClient() + .getFirewallRules() + .getWithResponse(resourceGroupName, clusterName, poolName, firewallRuleName, Context.NONE) + .getValue(); + return this; + } + + public FirewallRule refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getFirewallRules() + .getWithResponse(resourceGroupName, clusterName, poolName, firewallRuleName, context) + .getValue(); + return this; + } + + public FirewallRuleImpl withProperties(FirewallRuleProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbFirewallRulesClientImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/FirewallRulesClientImpl.java similarity index 73% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbFirewallRulesClientImpl.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/FirewallRulesClientImpl.java index c066df228ed03..2002106e26fa7 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbFirewallRulesClientImpl.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/FirewallRulesClientImpl.java @@ -32,21 +32,21 @@ import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.horizondb.fluent.HorizonDbFirewallRulesClient; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbFirewallRuleInner; -import com.azure.resourcemanager.horizondb.implementation.models.HorizonDbFirewallRuleListResult; +import com.azure.resourcemanager.horizondb.fluent.FirewallRulesClient; +import com.azure.resourcemanager.horizondb.fluent.models.FirewallRuleInner; +import com.azure.resourcemanager.horizondb.implementation.models.FirewallRuleListResult; 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 HorizonDbFirewallRulesClient. + * An instance of this class provides access to all the operations defined in FirewallRulesClient. */ -public final class HorizonDbFirewallRulesClientImpl implements HorizonDbFirewallRulesClient { +public final class FirewallRulesClientImpl implements FirewallRulesClient { /** * The proxy service used to perform REST calls. */ - private final HorizonDbFirewallRulesService service; + private final FirewallRulesService service; /** * The service client containing this operation class. @@ -54,28 +54,28 @@ public final class HorizonDbFirewallRulesClientImpl implements HorizonDbFirewall private final HorizonDbManagementClientImpl client; /** - * Initializes an instance of HorizonDbFirewallRulesClientImpl. + * Initializes an instance of FirewallRulesClientImpl. * * @param client the instance of the service client containing this operation class. */ - HorizonDbFirewallRulesClientImpl(HorizonDbManagementClientImpl client) { - this.service = RestProxy.create(HorizonDbFirewallRulesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); + FirewallRulesClientImpl(HorizonDbManagementClientImpl client) { + this.service + = RestProxy.create(FirewallRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for HorizonDbManagementClientHorizonDbFirewallRules to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for HorizonDbManagementClientFirewallRules to be used by the proxy + * service to perform REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "HorizonDbManagementClientHorizonDbFirewallRules") - public interface HorizonDbFirewallRulesService { + @ServiceInterface(name = "HorizonDbManagementClientFirewallRules") + public interface FirewallRulesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/firewallRules/{firewallRuleName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") 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, @PathParam("poolName") String poolName, @PathParam("firewallRuleName") String firewallRuleName, @@ -85,7 +85,7 @@ Mono> get(@HostParam("endpoint") String end @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/firewallRules/{firewallRuleName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") 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("poolName") String poolName, @PathParam("firewallRuleName") String firewallRuleName, @@ -95,7 +95,7 @@ Response getSync(@HostParam("endpoint") String endpo @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/firewallRules") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); @@ -104,7 +104,7 @@ Mono> list(@HostParam("endpoint") Stri @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/firewallRules") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); @@ -112,22 +112,22 @@ Response listSync(@HostParam("endpoint") String @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/firewallRules/{firewallRuleName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + Mono>> createOrReplace(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("poolName") String poolName, @PathParam("firewallRuleName") String firewallRuleName, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") HorizonDbFirewallRuleInner resource, Context context); + @BodyParam("application/json") FirewallRuleInner resource, Context context); @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/firewallRules/{firewallRuleName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + Response createOrReplaceSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("poolName") String poolName, @PathParam("firewallRuleName") String firewallRuleName, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") HorizonDbFirewallRuleInner resource, Context context); + @BodyParam("application/json") FirewallRuleInner resource, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/firewallRules/{firewallRuleName}") @@ -153,34 +153,32 @@ Response deleteSync(@HostParam("endpoint") String endpoint, @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @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); + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets information about a HorizonDB firewall rule. + * Gets information about a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB firewall rule along with {@link Response} on successful completion of + * @return information about a HorizonDB pool firewall rule along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + public Mono> getWithResponseAsync(String resourceGroupName, String clusterName, String poolName, String firewallRuleName) { final String accept = "application/json"; return FluxUtil @@ -191,59 +189,59 @@ public Mono> getWithResponseAsync(String re } /** - * Gets information about a HorizonDB firewall rule. + * Gets information about a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB firewall rule on successful completion of {@link Mono}. + * @return information about a HorizonDB pool firewall rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String clusterName, String poolName, + public Mono getAsync(String resourceGroupName, String clusterName, String poolName, String firewallRuleName) { return getWithResponseAsync(resourceGroupName, clusterName, poolName, firewallRuleName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets information about a HorizonDB firewall rule. + * Gets information about a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB firewall rule along with {@link Response}. + * @return information about a HorizonDB pool firewall rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String clusterName, - String poolName, String firewallRuleName, Context context) { + public Response getWithResponse(String resourceGroupName, String clusterName, String poolName, + String firewallRuleName, Context context) { final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, firewallRuleName, accept, context); } /** - * Gets information about a HorizonDB firewall rule. + * Gets information about a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB firewall rule. + * @return information about a HorizonDB pool firewall rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HorizonDbFirewallRuleInner get(String resourceGroupName, String clusterName, String poolName, + public FirewallRuleInner get(String resourceGroupName, String clusterName, String poolName, String firewallRuleName) { return getWithResponse(resourceGroupName, clusterName, poolName, firewallRuleName, Context.NONE).getValue(); } @@ -257,18 +255,18 @@ public HorizonDbFirewallRuleInner get(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 the response of a HorizonDbFirewallRule list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a FirewallRule list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String clusterName, String poolName) { + private Mono> listSinglePageAsync(String resourceGroupName, String clusterName, + String poolName) { final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -281,11 +279,10 @@ private Mono> listSinglePageAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbFirewallRule list operation as paginated response with {@link PagedFlux}. + * @return the response of a FirewallRule list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String clusterName, - String poolName) { + public PagedFlux listAsync(String resourceGroupName, String clusterName, String poolName) { return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName, poolName), nextLink -> listNextSinglePageAsync(nextLink)); } @@ -299,15 +296,14 @@ public PagedFlux listAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbFirewallRule list operation along with {@link PagedResponse}. + * @return the response of a FirewallRule list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String clusterName, + private PagedResponse listSinglePage(String resourceGroupName, String clusterName, String poolName) { final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, poolName, accept, Context.NONE); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -322,15 +318,14 @@ private PagedResponse listSinglePage(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 response of a HorizonDbFirewallRule list operation along with {@link PagedResponse}. + * @return the response of a FirewallRule list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String clusterName, + private PagedResponse listSinglePage(String resourceGroupName, String clusterName, String poolName, Context context) { final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, poolName, accept, context); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -344,11 +339,10 @@ private PagedResponse listSinglePage(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 response of a HorizonDbFirewallRule list operation as paginated response with {@link PagedIterable}. + * @return the response of a FirewallRule list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String clusterName, - String poolName) { + public PagedIterable list(String resourceGroupName, String clusterName, String poolName) { return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName, poolName), nextLink -> listNextSinglePage(nextLink)); } @@ -363,227 +357,225 @@ public PagedIterable list(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbFirewallRule list operation as paginated response with {@link PagedIterable}. + * @return the response of a FirewallRule list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String clusterName, String poolName, + public PagedIterable list(String resourceGroupName, String clusterName, String poolName, Context context) { return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName, poolName, context), nextLink -> listNextSinglePage(nextLink, context)); } /** - * Creates a new HorizonDB firewall rule or updates an existing rule. + * Creates or replaces a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @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 represents the HorizonDB firewall rule along with {@link Response} on successful completion of - * {@link Mono}. + * @return represents a customer-managed firewall rule for a HorizonDB pool along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String clusterName, String poolName, String firewallRuleName, HorizonDbFirewallRuleInner resource) { + public Mono>> createOrReplaceWithResponseAsync(String resourceGroupName, + String clusterName, String poolName, String firewallRuleName, FirewallRuleInner resource) { final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.createOrReplace(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, firewallRuleName, contentType, accept, resource, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates a new HorizonDB firewall rule or updates an existing rule. + * Creates or replaces a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @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 represents the HorizonDB firewall rule along with {@link Response}. + * @return represents a customer-managed firewall rule for a HorizonDB pool along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String clusterName, - String poolName, String firewallRuleName, HorizonDbFirewallRuleInner resource) { + private Response createOrReplaceWithResponse(String resourceGroupName, String clusterName, + String poolName, String firewallRuleName, FirewallRuleInner resource) { final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + return service.createOrReplaceSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, firewallRuleName, contentType, accept, resource, Context.NONE); } /** - * Creates a new HorizonDB firewall rule or updates an existing rule. + * Creates or replaces a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @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 represents the HorizonDB firewall rule along with {@link Response}. + * @return represents a customer-managed firewall rule for a HorizonDB pool along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String clusterName, - String poolName, String firewallRuleName, HorizonDbFirewallRuleInner resource, Context context) { + private Response createOrReplaceWithResponse(String resourceGroupName, String clusterName, + String poolName, String firewallRuleName, FirewallRuleInner resource, Context context) { final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + return service.createOrReplaceSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, firewallRuleName, contentType, accept, resource, context); } /** - * Creates a new HorizonDB firewall rule or updates an existing rule. + * Creates or replaces a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @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 represents the HorizonDB firewall rule. + * @return the {@link PollerFlux} for polling of represents a customer-managed firewall rule for a HorizonDB pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, HorizonDbFirewallRuleInner> beginCreateOrUpdateAsync( + public PollerFlux, FirewallRuleInner> beginCreateOrReplaceAsync( String resourceGroupName, String clusterName, String poolName, String firewallRuleName, - HorizonDbFirewallRuleInner resource) { + FirewallRuleInner resource) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, poolName, firewallRuleName, resource); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), HorizonDbFirewallRuleInner.class, HorizonDbFirewallRuleInner.class, - this.client.getContext()); + = createOrReplaceWithResponseAsync(resourceGroupName, clusterName, poolName, firewallRuleName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + FirewallRuleInner.class, FirewallRuleInner.class, this.client.getContext()); } /** - * Creates a new HorizonDB firewall rule or updates an existing rule. + * Creates or replaces a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @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 represents the HorizonDB firewall rule. + * @return the {@link SyncPoller} for polling of represents a customer-managed firewall rule for a HorizonDB pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, HorizonDbFirewallRuleInner> beginCreateOrUpdate( - String resourceGroupName, String clusterName, String poolName, String firewallRuleName, - HorizonDbFirewallRuleInner resource) { + public SyncPoller, FirewallRuleInner> beginCreateOrReplace(String resourceGroupName, + String clusterName, String poolName, String firewallRuleName, FirewallRuleInner resource) { Response response - = createOrUpdateWithResponse(resourceGroupName, clusterName, poolName, firewallRuleName, resource); - return this.client.getLroResult(response, - HorizonDbFirewallRuleInner.class, HorizonDbFirewallRuleInner.class, Context.NONE); + = createOrReplaceWithResponse(resourceGroupName, clusterName, poolName, firewallRuleName, resource); + return this.client.getLroResult(response, FirewallRuleInner.class, + FirewallRuleInner.class, Context.NONE); } /** - * Creates a new HorizonDB firewall rule or updates an existing rule. + * Creates or replaces a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @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 represents the HorizonDB firewall rule. + * @return the {@link SyncPoller} for polling of represents a customer-managed firewall rule for a HorizonDB pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, HorizonDbFirewallRuleInner> beginCreateOrUpdate( - String resourceGroupName, String clusterName, String poolName, String firewallRuleName, - HorizonDbFirewallRuleInner resource, Context context) { - Response response - = createOrUpdateWithResponse(resourceGroupName, clusterName, poolName, firewallRuleName, resource, context); - return this.client.getLroResult(response, - HorizonDbFirewallRuleInner.class, HorizonDbFirewallRuleInner.class, context); + public SyncPoller, FirewallRuleInner> beginCreateOrReplace(String resourceGroupName, + String clusterName, String poolName, String firewallRuleName, FirewallRuleInner resource, Context context) { + Response response = createOrReplaceWithResponse(resourceGroupName, clusterName, poolName, + firewallRuleName, resource, context); + return this.client.getLroResult(response, FirewallRuleInner.class, + FirewallRuleInner.class, context); } /** - * Creates a new HorizonDB firewall rule or updates an existing rule. + * Creates or replaces a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @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 represents the HorizonDB firewall rule on successful completion of {@link Mono}. + * @return represents a customer-managed firewall rule for a HorizonDB pool on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String clusterName, - String poolName, String firewallRuleName, HorizonDbFirewallRuleInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, clusterName, poolName, firewallRuleName, resource).last() + public Mono createOrReplaceAsync(String resourceGroupName, String clusterName, String poolName, + String firewallRuleName, FirewallRuleInner resource) { + return beginCreateOrReplaceAsync(resourceGroupName, clusterName, poolName, firewallRuleName, resource).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Creates a new HorizonDB firewall rule or updates an existing rule. + * Creates or replaces a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @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 represents the HorizonDB firewall rule. + * @return represents a customer-managed firewall rule for a HorizonDB pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HorizonDbFirewallRuleInner createOrUpdate(String resourceGroupName, String clusterName, String poolName, - String firewallRuleName, HorizonDbFirewallRuleInner resource) { - return beginCreateOrUpdate(resourceGroupName, clusterName, poolName, firewallRuleName, resource) + public FirewallRuleInner createOrReplace(String resourceGroupName, String clusterName, String poolName, + String firewallRuleName, FirewallRuleInner resource) { + return beginCreateOrReplace(resourceGroupName, clusterName, poolName, firewallRuleName, resource) .getFinalResult(); } /** - * Creates a new HorizonDB firewall rule or updates an existing rule. + * Creates or replaces a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @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 represents the HorizonDB firewall rule. + * @return represents a customer-managed firewall rule for a HorizonDB pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HorizonDbFirewallRuleInner createOrUpdate(String resourceGroupName, String clusterName, String poolName, - String firewallRuleName, HorizonDbFirewallRuleInner resource, Context context) { - return beginCreateOrUpdate(resourceGroupName, clusterName, poolName, firewallRuleName, resource, context) + public FirewallRuleInner createOrReplace(String resourceGroupName, String clusterName, String poolName, + String firewallRuleName, FirewallRuleInner resource, Context context) { + return beginCreateOrReplace(resourceGroupName, clusterName, poolName, firewallRuleName, resource, context) .getFinalResult(); } /** - * Deletes a HorizonDB firewall rule. + * Deletes a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -599,12 +591,12 @@ public Mono>> deleteWithResponseAsync(String resourceG } /** - * Deletes a HorizonDB firewall rule. + * Deletes a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -618,12 +610,12 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes a HorizonDB firewall rule. + * Deletes a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -638,12 +630,12 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes a HorizonDB firewall rule. + * Deletes a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -659,12 +651,12 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN } /** - * Deletes a HorizonDB firewall rule. + * Deletes a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -678,12 +670,12 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a HorizonDB firewall rule. + * Deletes a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -699,12 +691,12 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a HorizonDB firewall rule. + * Deletes a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -718,12 +710,12 @@ public Mono deleteAsync(String resourceGroupName, String clusterName, Stri } /** - * Deletes a HorizonDB firewall rule. + * Deletes a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -734,12 +726,12 @@ public void delete(String resourceGroupName, String clusterName, String poolName } /** - * Deletes a HorizonDB firewall rule. + * Deletes a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -758,15 +750,15 @@ public void delete(String resourceGroupName, String clusterName, String poolName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbFirewallRule list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a FirewallRule list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + 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)) + .>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())); } @@ -777,12 +769,12 @@ private Mono> listNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbFirewallRule list operation along with {@link PagedResponse}. + * @return the response of a FirewallRule list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { + private PagedResponse listNextSinglePage(String nextLink) { final String accept = "application/json"; - Response res + 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); @@ -796,12 +788,12 @@ private PagedResponse listNextSinglePage(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 HorizonDbFirewallRule list operation along with {@link PagedResponse}. + * @return the response of a FirewallRule list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { + private PagedResponse listNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - Response res + 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/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbFirewallRulesImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/FirewallRulesImpl.java similarity index 78% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbFirewallRulesImpl.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/FirewallRulesImpl.java index ec8935c28e4fe..76ac09c86b03b 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbFirewallRulesImpl.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/FirewallRulesImpl.java @@ -9,54 +9,51 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.horizondb.fluent.HorizonDbFirewallRulesClient; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbFirewallRuleInner; -import com.azure.resourcemanager.horizondb.models.HorizonDbFirewallRule; -import com.azure.resourcemanager.horizondb.models.HorizonDbFirewallRules; +import com.azure.resourcemanager.horizondb.fluent.FirewallRulesClient; +import com.azure.resourcemanager.horizondb.fluent.models.FirewallRuleInner; +import com.azure.resourcemanager.horizondb.models.FirewallRule; +import com.azure.resourcemanager.horizondb.models.FirewallRules; -public final class HorizonDbFirewallRulesImpl implements HorizonDbFirewallRules { - private static final ClientLogger LOGGER = new ClientLogger(HorizonDbFirewallRulesImpl.class); +public final class FirewallRulesImpl implements FirewallRules { + private static final ClientLogger LOGGER = new ClientLogger(FirewallRulesImpl.class); - private final HorizonDbFirewallRulesClient innerClient; + private final FirewallRulesClient innerClient; private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; - public HorizonDbFirewallRulesImpl(HorizonDbFirewallRulesClient innerClient, + public FirewallRulesImpl(FirewallRulesClient innerClient, com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getWithResponse(String resourceGroupName, String clusterName, - String poolName, String firewallRuleName, Context context) { - Response inner + public Response getWithResponse(String resourceGroupName, String clusterName, String poolName, + String firewallRuleName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, clusterName, poolName, firewallRuleName, context); return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new HorizonDbFirewallRuleImpl(inner.getValue(), this.manager())); + new FirewallRuleImpl(inner.getValue(), this.manager())); } - public HorizonDbFirewallRule get(String resourceGroupName, String clusterName, String poolName, - String firewallRuleName) { - HorizonDbFirewallRuleInner inner - = this.serviceClient().get(resourceGroupName, clusterName, poolName, firewallRuleName); + public FirewallRule get(String resourceGroupName, String clusterName, String poolName, String firewallRuleName) { + FirewallRuleInner inner = this.serviceClient().get(resourceGroupName, clusterName, poolName, firewallRuleName); if (inner != null) { - return new HorizonDbFirewallRuleImpl(inner, this.manager()); + return new FirewallRuleImpl(inner, this.manager()); } else { return null; } } - public PagedIterable list(String resourceGroupName, String clusterName, String poolName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, clusterName, poolName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new HorizonDbFirewallRuleImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String clusterName, String poolName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName, poolName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FirewallRuleImpl(inner1, this.manager())); } - public PagedIterable list(String resourceGroupName, String clusterName, String poolName, + public PagedIterable list(String resourceGroupName, String clusterName, String poolName, Context context) { - PagedIterable inner + PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName, poolName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new HorizonDbFirewallRuleImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FirewallRuleImpl(inner1, this.manager())); } public void delete(String resourceGroupName, String clusterName, String poolName, String firewallRuleName) { @@ -68,7 +65,7 @@ public void delete(String resourceGroupName, String clusterName, String poolName this.serviceClient().delete(resourceGroupName, clusterName, poolName, firewallRuleName, context); } - public HorizonDbFirewallRule getById(String id) { + public FirewallRule getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -93,7 +90,7 @@ public HorizonDbFirewallRule getById(String id) { .getValue(); } - public Response getByIdWithResponse(String id, Context context) { + public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -165,7 +162,7 @@ public void deleteByIdWithResponse(String id, Context context) { this.delete(resourceGroupName, clusterName, poolName, firewallRuleName, context); } - private HorizonDbFirewallRulesClient serviceClient() { + private FirewallRulesClient serviceClient() { return this.innerClient; } @@ -173,7 +170,7 @@ private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { return this.serviceManager; } - public HorizonDbFirewallRuleImpl define(String name) { - return new HorizonDbFirewallRuleImpl(name, this.manager()); + public FirewallRuleImpl define(String name) { + return new FirewallRuleImpl(name, this.manager()); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbAdministratorImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbAdministratorImpl.java deleted file mode 100644 index 000179f21c286..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbAdministratorImpl.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbAdministratorInner; -import com.azure.resourcemanager.horizondb.models.HorizonDbAdministrator; -import com.azure.resourcemanager.horizondb.models.HorizonDbAdministratorAdd; -import com.azure.resourcemanager.horizondb.models.HorizonDbAdministratorProperties; -import com.azure.resourcemanager.horizondb.models.HorizonDbAdministratorPropertiesForAdd; - -public final class HorizonDbAdministratorImpl - implements HorizonDbAdministrator, HorizonDbAdministrator.Definition, HorizonDbAdministrator.Update { - private HorizonDbAdministratorInner innerObject; - - private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public HorizonDbAdministratorProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public HorizonDbAdministratorInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String clusterName; - - private String objectId; - - private HorizonDbAdministratorAdd createResource; - - private HorizonDbAdministratorAdd updateResource; - - public HorizonDbAdministratorImpl withExistingCluster(String resourceGroupName, String clusterName) { - this.resourceGroupName = resourceGroupName; - this.clusterName = clusterName; - return this; - } - - public HorizonDbAdministrator create() { - this.innerObject = serviceManager.serviceClient() - .getHorizonDbAdministrators() - .createOrUpdate(resourceGroupName, clusterName, objectId, createResource, Context.NONE); - return this; - } - - public HorizonDbAdministrator create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getHorizonDbAdministrators() - .createOrUpdate(resourceGroupName, clusterName, objectId, createResource, context); - return this; - } - - HorizonDbAdministratorImpl(String name, com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { - this.serviceManager = serviceManager; - this.objectId = name; - this.createResource = new HorizonDbAdministratorAdd(); - } - - public HorizonDbAdministratorImpl update() { - this.updateResource = new HorizonDbAdministratorAdd(); - return this; - } - - public HorizonDbAdministrator apply() { - this.innerObject = serviceManager.serviceClient() - .getHorizonDbAdministrators() - .createOrUpdate(resourceGroupName, clusterName, objectId, updateResource, Context.NONE); - return this; - } - - public HorizonDbAdministrator apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getHorizonDbAdministrators() - .createOrUpdate(resourceGroupName, clusterName, objectId, updateResource, context); - return this; - } - - HorizonDbAdministratorImpl(HorizonDbAdministratorInner innerObject, - com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusters"); - this.objectId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "administrators"); - } - - public HorizonDbAdministrator refresh() { - this.innerObject = serviceManager.serviceClient() - .getHorizonDbAdministrators() - .getWithResponse(resourceGroupName, clusterName, objectId, Context.NONE) - .getValue(); - return this; - } - - public HorizonDbAdministrator refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getHorizonDbAdministrators() - .getWithResponse(resourceGroupName, clusterName, objectId, context) - .getValue(); - return this; - } - - public HorizonDbAdministratorImpl withProperties(HorizonDbAdministratorPropertiesForAdd properties) { - if (isInCreateMode()) { - this.createResource.withProperties(properties); - return this; - } else { - this.updateResource.withProperties(properties); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel() == null || this.innerModel().id() == null; - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbFirewallRuleImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbFirewallRuleImpl.java deleted file mode 100644 index b9ddc9e190d54..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbFirewallRuleImpl.java +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbFirewallRuleInner; -import com.azure.resourcemanager.horizondb.models.HorizonDbFirewallRule; -import com.azure.resourcemanager.horizondb.models.HorizonDbFirewallRuleProperties; - -public final class HorizonDbFirewallRuleImpl - implements HorizonDbFirewallRule, HorizonDbFirewallRule.Definition, HorizonDbFirewallRule.Update { - private HorizonDbFirewallRuleInner innerObject; - - private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public HorizonDbFirewallRuleProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public HorizonDbFirewallRuleInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String clusterName; - - private String poolName; - - private String firewallRuleName; - - public HorizonDbFirewallRuleImpl withExistingPool(String resourceGroupName, String clusterName, String poolName) { - this.resourceGroupName = resourceGroupName; - this.clusterName = clusterName; - this.poolName = poolName; - return this; - } - - public HorizonDbFirewallRule create() { - this.innerObject = serviceManager.serviceClient() - .getHorizonDbFirewallRules() - .createOrUpdate(resourceGroupName, clusterName, poolName, firewallRuleName, this.innerModel(), - Context.NONE); - return this; - } - - public HorizonDbFirewallRule create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getHorizonDbFirewallRules() - .createOrUpdate(resourceGroupName, clusterName, poolName, firewallRuleName, this.innerModel(), context); - return this; - } - - HorizonDbFirewallRuleImpl(String name, com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { - this.innerObject = new HorizonDbFirewallRuleInner(); - this.serviceManager = serviceManager; - this.firewallRuleName = name; - } - - public HorizonDbFirewallRuleImpl update() { - return this; - } - - public HorizonDbFirewallRule apply() { - this.innerObject = serviceManager.serviceClient() - .getHorizonDbFirewallRules() - .createOrUpdate(resourceGroupName, clusterName, poolName, firewallRuleName, this.innerModel(), - Context.NONE); - return this; - } - - public HorizonDbFirewallRule apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getHorizonDbFirewallRules() - .createOrUpdate(resourceGroupName, clusterName, poolName, firewallRuleName, this.innerModel(), context); - return this; - } - - HorizonDbFirewallRuleImpl(HorizonDbFirewallRuleInner innerObject, - com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusters"); - this.poolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "pools"); - this.firewallRuleName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "firewallRules"); - } - - public HorizonDbFirewallRule refresh() { - this.innerObject = serviceManager.serviceClient() - .getHorizonDbFirewallRules() - .getWithResponse(resourceGroupName, clusterName, poolName, firewallRuleName, Context.NONE) - .getValue(); - return this; - } - - public HorizonDbFirewallRule refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getHorizonDbFirewallRules() - .getWithResponse(resourceGroupName, clusterName, poolName, firewallRuleName, context) - .getValue(); - return this; - } - - public HorizonDbFirewallRuleImpl withProperties(HorizonDbFirewallRuleProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbManagementClientImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbManagementClientImpl.java index f7065652627ed..03cb2a667709f 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbManagementClientImpl.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbManagementClientImpl.java @@ -26,16 +26,29 @@ 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.horizondb.fluent.HorizonDbAdministratorsClient; -import com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient; -import com.azure.resourcemanager.horizondb.fluent.HorizonDbFirewallRulesClient; +import com.azure.resourcemanager.horizondb.fluent.AuthenticationsClient; +import com.azure.resourcemanager.horizondb.fluent.CapabilitiesClient; +import com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureCapabilitiesClient; +import com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureConfigurationsClient; +import com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureDestinationsClient; +import com.azure.resourcemanager.horizondb.fluent.ClustersClient; +import com.azure.resourcemanager.horizondb.fluent.DefaultParameterGroupsClient; +import com.azure.resourcemanager.horizondb.fluent.EndpointsClient; +import com.azure.resourcemanager.horizondb.fluent.FirewallRulesClient; import com.azure.resourcemanager.horizondb.fluent.HorizonDbManagementClient; -import com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient; -import com.azure.resourcemanager.horizondb.fluent.HorizonDbPoolsClient; -import com.azure.resourcemanager.horizondb.fluent.HorizonDbPrivateEndpointConnectionsClient; -import com.azure.resourcemanager.horizondb.fluent.HorizonDbPrivateLinkResourcesClient; -import com.azure.resourcemanager.horizondb.fluent.HorizonDbReplicasClient; +import com.azure.resourcemanager.horizondb.fluent.IdentityAssignmentsClient; +import com.azure.resourcemanager.horizondb.fluent.LogCaptureConfigurationsClient; +import com.azure.resourcemanager.horizondb.fluent.LogFilesClient; +import com.azure.resourcemanager.horizondb.fluent.MaintenanceEventsClient; +import com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAdministratorsClient; +import com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAuthenticationsClient; +import com.azure.resourcemanager.horizondb.fluent.NodesClient; import com.azure.resourcemanager.horizondb.fluent.OperationsClient; +import com.azure.resourcemanager.horizondb.fluent.ParameterGroupsClient; +import com.azure.resourcemanager.horizondb.fluent.PasswordAuthenticationsClient; +import com.azure.resourcemanager.horizondb.fluent.PoolsClient; +import com.azure.resourcemanager.horizondb.fluent.PrivateEndpointConnectionsClient; +import com.azure.resourcemanager.horizondb.fluent.PrivateLinkResourcesClient; import java.io.IOException; import java.lang.reflect.Type; import java.nio.ByteBuffer; @@ -149,115 +162,297 @@ public OperationsClient getOperations() { } /** - * The HorizonDbClustersClient object to access its operations. + * The CapabilitiesClient object to access its operations. */ - private final HorizonDbClustersClient horizonDbClusters; + private final CapabilitiesClient capabilities; /** - * Gets the HorizonDbClustersClient object to access its operations. + * Gets the CapabilitiesClient object to access its operations. * - * @return the HorizonDbClustersClient object. + * @return the CapabilitiesClient object. */ - public HorizonDbClustersClient getHorizonDbClusters() { - return this.horizonDbClusters; + public CapabilitiesClient getCapabilities() { + return this.capabilities; } /** - * The HorizonDbPoolsClient object to access its operations. + * The ClustersClient object to access its operations. */ - private final HorizonDbPoolsClient horizonDbPools; + private final ClustersClient clusters; /** - * Gets the HorizonDbPoolsClient object to access its operations. + * Gets the ClustersClient object to access its operations. * - * @return the HorizonDbPoolsClient object. + * @return the ClustersClient object. */ - public HorizonDbPoolsClient getHorizonDbPools() { - return this.horizonDbPools; + public ClustersClient getClusters() { + return this.clusters; } /** - * The HorizonDbReplicasClient object to access its operations. + * The PoolsClient object to access its operations. */ - private final HorizonDbReplicasClient horizonDbReplicas; + private final PoolsClient pools; /** - * Gets the HorizonDbReplicasClient object to access its operations. + * Gets the PoolsClient object to access its operations. * - * @return the HorizonDbReplicasClient object. + * @return the PoolsClient object. */ - public HorizonDbReplicasClient getHorizonDbReplicas() { - return this.horizonDbReplicas; + public PoolsClient getPools() { + return this.pools; } /** - * The HorizonDbFirewallRulesClient object to access its operations. + * The FirewallRulesClient object to access its operations. */ - private final HorizonDbFirewallRulesClient horizonDbFirewallRules; + private final FirewallRulesClient firewallRules; /** - * Gets the HorizonDbFirewallRulesClient object to access its operations. + * Gets the FirewallRulesClient object to access its operations. * - * @return the HorizonDbFirewallRulesClient object. + * @return the FirewallRulesClient object. */ - public HorizonDbFirewallRulesClient getHorizonDbFirewallRules() { - return this.horizonDbFirewallRules; + public FirewallRulesClient getFirewallRules() { + return this.firewallRules; } /** - * The HorizonDbPrivateEndpointConnectionsClient object to access its operations. + * The PrivateEndpointConnectionsClient object to access its operations. */ - private final HorizonDbPrivateEndpointConnectionsClient horizonDbPrivateEndpointConnections; + private final PrivateEndpointConnectionsClient privateEndpointConnections; /** - * Gets the HorizonDbPrivateEndpointConnectionsClient object to access its operations. + * Gets the PrivateEndpointConnectionsClient object to access its operations. * - * @return the HorizonDbPrivateEndpointConnectionsClient object. + * @return the PrivateEndpointConnectionsClient object. */ - public HorizonDbPrivateEndpointConnectionsClient getHorizonDbPrivateEndpointConnections() { - return this.horizonDbPrivateEndpointConnections; + public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { + return this.privateEndpointConnections; } /** - * The HorizonDbPrivateLinkResourcesClient object to access its operations. + * The PrivateLinkResourcesClient object to access its operations. */ - private final HorizonDbPrivateLinkResourcesClient horizonDbPrivateLinkResources; + private final PrivateLinkResourcesClient privateLinkResources; /** - * Gets the HorizonDbPrivateLinkResourcesClient object to access its operations. + * Gets the PrivateLinkResourcesClient object to access its operations. * - * @return the HorizonDbPrivateLinkResourcesClient object. + * @return the PrivateLinkResourcesClient object. */ - public HorizonDbPrivateLinkResourcesClient getHorizonDbPrivateLinkResources() { - return this.horizonDbPrivateLinkResources; + public PrivateLinkResourcesClient getPrivateLinkResources() { + return this.privateLinkResources; } /** - * The HorizonDbParameterGroupsClient object to access its operations. + * The ParameterGroupsClient object to access its operations. */ - private final HorizonDbParameterGroupsClient horizonDbParameterGroups; + private final ParameterGroupsClient parameterGroups; /** - * Gets the HorizonDbParameterGroupsClient object to access its operations. + * Gets the ParameterGroupsClient object to access its operations. * - * @return the HorizonDbParameterGroupsClient object. + * @return the ParameterGroupsClient object. */ - public HorizonDbParameterGroupsClient getHorizonDbParameterGroups() { - return this.horizonDbParameterGroups; + public ParameterGroupsClient getParameterGroups() { + return this.parameterGroups; } /** - * The HorizonDbAdministratorsClient object to access its operations. + * The DefaultParameterGroupsClient object to access its operations. */ - private final HorizonDbAdministratorsClient horizonDbAdministrators; + private final DefaultParameterGroupsClient defaultParameterGroups; /** - * Gets the HorizonDbAdministratorsClient object to access its operations. + * Gets the DefaultParameterGroupsClient object to access its operations. * - * @return the HorizonDbAdministratorsClient object. + * @return the DefaultParameterGroupsClient object. */ - public HorizonDbAdministratorsClient getHorizonDbAdministrators() { - return this.horizonDbAdministrators; + public DefaultParameterGroupsClient getDefaultParameterGroups() { + return this.defaultParameterGroups; + } + + /** + * The MicrosoftEntraAdministratorsClient object to access its operations. + */ + private final MicrosoftEntraAdministratorsClient microsoftEntraAdministrators; + + /** + * Gets the MicrosoftEntraAdministratorsClient object to access its operations. + * + * @return the MicrosoftEntraAdministratorsClient object. + */ + public MicrosoftEntraAdministratorsClient getMicrosoftEntraAdministrators() { + return this.microsoftEntraAdministrators; + } + + /** + * The AuthenticationsClient object to access its operations. + */ + private final AuthenticationsClient authentications; + + /** + * Gets the AuthenticationsClient object to access its operations. + * + * @return the AuthenticationsClient object. + */ + public AuthenticationsClient getAuthentications() { + return this.authentications; + } + + /** + * The PasswordAuthenticationsClient object to access its operations. + */ + private final PasswordAuthenticationsClient passwordAuthentications; + + /** + * Gets the PasswordAuthenticationsClient object to access its operations. + * + * @return the PasswordAuthenticationsClient object. + */ + public PasswordAuthenticationsClient getPasswordAuthentications() { + return this.passwordAuthentications; + } + + /** + * The MicrosoftEntraAuthenticationsClient object to access its operations. + */ + private final MicrosoftEntraAuthenticationsClient microsoftEntraAuthentications; + + /** + * Gets the MicrosoftEntraAuthenticationsClient object to access its operations. + * + * @return the MicrosoftEntraAuthenticationsClient object. + */ + public MicrosoftEntraAuthenticationsClient getMicrosoftEntraAuthentications() { + return this.microsoftEntraAuthentications; + } + + /** + * The ChangeDataCaptureCapabilitiesClient object to access its operations. + */ + private final ChangeDataCaptureCapabilitiesClient changeDataCaptureCapabilities; + + /** + * Gets the ChangeDataCaptureCapabilitiesClient object to access its operations. + * + * @return the ChangeDataCaptureCapabilitiesClient object. + */ + public ChangeDataCaptureCapabilitiesClient getChangeDataCaptureCapabilities() { + return this.changeDataCaptureCapabilities; + } + + /** + * The ChangeDataCaptureDestinationsClient object to access its operations. + */ + private final ChangeDataCaptureDestinationsClient changeDataCaptureDestinations; + + /** + * Gets the ChangeDataCaptureDestinationsClient object to access its operations. + * + * @return the ChangeDataCaptureDestinationsClient object. + */ + public ChangeDataCaptureDestinationsClient getChangeDataCaptureDestinations() { + return this.changeDataCaptureDestinations; + } + + /** + * The IdentityAssignmentsClient object to access its operations. + */ + private final IdentityAssignmentsClient identityAssignments; + + /** + * Gets the IdentityAssignmentsClient object to access its operations. + * + * @return the IdentityAssignmentsClient object. + */ + public IdentityAssignmentsClient getIdentityAssignments() { + return this.identityAssignments; + } + + /** + * The ChangeDataCaptureConfigurationsClient object to access its operations. + */ + private final ChangeDataCaptureConfigurationsClient changeDataCaptureConfigurations; + + /** + * Gets the ChangeDataCaptureConfigurationsClient object to access its operations. + * + * @return the ChangeDataCaptureConfigurationsClient object. + */ + public ChangeDataCaptureConfigurationsClient getChangeDataCaptureConfigurations() { + return this.changeDataCaptureConfigurations; + } + + /** + * The EndpointsClient object to access its operations. + */ + private final EndpointsClient endpoints; + + /** + * Gets the EndpointsClient object to access its operations. + * + * @return the EndpointsClient object. + */ + public EndpointsClient getEndpoints() { + return this.endpoints; + } + + /** + * The MaintenanceEventsClient object to access its operations. + */ + private final MaintenanceEventsClient maintenanceEvents; + + /** + * Gets the MaintenanceEventsClient object to access its operations. + * + * @return the MaintenanceEventsClient object. + */ + public MaintenanceEventsClient getMaintenanceEvents() { + return this.maintenanceEvents; + } + + /** + * The NodesClient object to access its operations. + */ + private final NodesClient nodes; + + /** + * Gets the NodesClient object to access its operations. + * + * @return the NodesClient object. + */ + public NodesClient getNodes() { + return this.nodes; + } + + /** + * The LogCaptureConfigurationsClient object to access its operations. + */ + private final LogCaptureConfigurationsClient logCaptureConfigurations; + + /** + * Gets the LogCaptureConfigurationsClient object to access its operations. + * + * @return the LogCaptureConfigurationsClient object. + */ + public LogCaptureConfigurationsClient getLogCaptureConfigurations() { + return this.logCaptureConfigurations; + } + + /** + * The LogFilesClient object to access its operations. + */ + private final LogFilesClient logFiles; + + /** + * Gets the LogFilesClient object to access its operations. + * + * @return the LogFilesClient object. + */ + public LogFilesClient getLogFiles() { + return this.logFiles; } /** @@ -277,16 +472,29 @@ public HorizonDbAdministratorsClient getHorizonDbAdministrators() { this.defaultPollInterval = defaultPollInterval; this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2026-05-01-preview"; + this.apiVersion = "2026-10-01-preview"; this.operations = new OperationsClientImpl(this); - this.horizonDbClusters = new HorizonDbClustersClientImpl(this); - this.horizonDbPools = new HorizonDbPoolsClientImpl(this); - this.horizonDbReplicas = new HorizonDbReplicasClientImpl(this); - this.horizonDbFirewallRules = new HorizonDbFirewallRulesClientImpl(this); - this.horizonDbPrivateEndpointConnections = new HorizonDbPrivateEndpointConnectionsClientImpl(this); - this.horizonDbPrivateLinkResources = new HorizonDbPrivateLinkResourcesClientImpl(this); - this.horizonDbParameterGroups = new HorizonDbParameterGroupsClientImpl(this); - this.horizonDbAdministrators = new HorizonDbAdministratorsClientImpl(this); + this.capabilities = new CapabilitiesClientImpl(this); + this.clusters = new ClustersClientImpl(this); + this.pools = new PoolsClientImpl(this); + this.firewallRules = new FirewallRulesClientImpl(this); + this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); + this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); + this.parameterGroups = new ParameterGroupsClientImpl(this); + this.defaultParameterGroups = new DefaultParameterGroupsClientImpl(this); + this.microsoftEntraAdministrators = new MicrosoftEntraAdministratorsClientImpl(this); + this.authentications = new AuthenticationsClientImpl(this); + this.passwordAuthentications = new PasswordAuthenticationsClientImpl(this); + this.microsoftEntraAuthentications = new MicrosoftEntraAuthenticationsClientImpl(this); + this.changeDataCaptureCapabilities = new ChangeDataCaptureCapabilitiesClientImpl(this); + this.changeDataCaptureDestinations = new ChangeDataCaptureDestinationsClientImpl(this); + this.identityAssignments = new IdentityAssignmentsClientImpl(this); + this.changeDataCaptureConfigurations = new ChangeDataCaptureConfigurationsClientImpl(this); + this.endpoints = new EndpointsClientImpl(this); + this.maintenanceEvents = new MaintenanceEventsClientImpl(this); + this.nodes = new NodesClientImpl(this); + this.logCaptureConfigurations = new LogCaptureConfigurationsClientImpl(this); + this.logFiles = new LogFilesClientImpl(this); } /** diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPoolsImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPoolsImpl.java deleted file mode 100644 index 75becd5a260ed..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPoolsImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.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.horizondb.fluent.HorizonDbPoolsClient; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbPoolInner; -import com.azure.resourcemanager.horizondb.models.HorizonDbPool; -import com.azure.resourcemanager.horizondb.models.HorizonDbPools; - -public final class HorizonDbPoolsImpl implements HorizonDbPools { - private static final ClientLogger LOGGER = new ClientLogger(HorizonDbPoolsImpl.class); - - private final HorizonDbPoolsClient innerClient; - - private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; - - public HorizonDbPoolsImpl(HorizonDbPoolsClient innerClient, - com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String clusterName, String poolName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, clusterName, poolName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new HorizonDbPoolImpl(inner.getValue(), this.manager())); - } - - public HorizonDbPool get(String resourceGroupName, String clusterName, String poolName) { - HorizonDbPoolInner inner = this.serviceClient().get(resourceGroupName, clusterName, poolName); - if (inner != null) { - return new HorizonDbPoolImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable list(String resourceGroupName, String clusterName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new HorizonDbPoolImpl(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 HorizonDbPoolImpl(inner1, this.manager())); - } - - private HorizonDbPoolsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPrivateEndpointConnectionsImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPrivateEndpointConnectionsImpl.java deleted file mode 100644 index 876947b113ed5..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPrivateEndpointConnectionsImpl.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.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.horizondb.fluent.HorizonDbPrivateEndpointConnectionsClient; -import com.azure.resourcemanager.horizondb.fluent.models.PrivateEndpointConnectionResourceInner; -import com.azure.resourcemanager.horizondb.models.HorizonDbPrivateEndpointConnections; -import com.azure.resourcemanager.horizondb.models.PrivateEndpointConnectionResource; - -public final class HorizonDbPrivateEndpointConnectionsImpl implements HorizonDbPrivateEndpointConnections { - private static final ClientLogger LOGGER = new ClientLogger(HorizonDbPrivateEndpointConnectionsImpl.class); - - private final HorizonDbPrivateEndpointConnectionsClient innerClient; - - private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; - - public HorizonDbPrivateEndpointConnectionsImpl(HorizonDbPrivateEndpointConnectionsClient innerClient, - com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String clusterName, - String privateEndpointConnectionName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PrivateEndpointConnectionResourceImpl(inner.getValue(), this.manager())); - } - - public PrivateEndpointConnectionResource get(String resourceGroupName, String clusterName, - String privateEndpointConnectionName) { - PrivateEndpointConnectionResourceInner inner - = this.serviceClient().get(resourceGroupName, clusterName, privateEndpointConnectionName); - if (inner != null) { - return new PrivateEndpointConnectionResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable list(String resourceGroupName, String clusterName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, clusterName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new PrivateEndpointConnectionResourceImpl(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 PrivateEndpointConnectionResourceImpl(inner1, this.manager())); - } - - public Response updateStatusWithResponse(String resourceGroupName, - String clusterName, String privateEndpointConnectionName, PrivateEndpointConnectionResourceInner resource, - Context context) { - Response inner = this.serviceClient() - .updateStatusWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, resource, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PrivateEndpointConnectionResourceImpl(inner.getValue(), this.manager())); - } - - public PrivateEndpointConnectionResource updateStatus(String resourceGroupName, String clusterName, - String privateEndpointConnectionName, PrivateEndpointConnectionResourceInner resource) { - PrivateEndpointConnectionResourceInner inner = this.serviceClient() - .updateStatus(resourceGroupName, clusterName, privateEndpointConnectionName, resource); - if (inner != null) { - return new PrivateEndpointConnectionResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName) { - this.serviceClient().delete(resourceGroupName, clusterName, privateEndpointConnectionName); - } - - public void delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName, - Context context) { - this.serviceClient().delete(resourceGroupName, clusterName, privateEndpointConnectionName, context); - } - - private HorizonDbPrivateEndpointConnectionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPrivateLinkResourcesImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPrivateLinkResourcesImpl.java deleted file mode 100644 index 82aa93ee9ed32..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPrivateLinkResourcesImpl.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.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.horizondb.fluent.HorizonDbPrivateLinkResourcesClient; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbPrivateLinkResourceInner; -import com.azure.resourcemanager.horizondb.models.HorizonDbPrivateLinkResource; -import com.azure.resourcemanager.horizondb.models.HorizonDbPrivateLinkResources; - -public final class HorizonDbPrivateLinkResourcesImpl implements HorizonDbPrivateLinkResources { - private static final ClientLogger LOGGER = new ClientLogger(HorizonDbPrivateLinkResourcesImpl.class); - - private final HorizonDbPrivateLinkResourcesClient innerClient; - - private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; - - public HorizonDbPrivateLinkResourcesImpl(HorizonDbPrivateLinkResourcesClient innerClient, - com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String clusterName, - String groupName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, clusterName, groupName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new HorizonDbPrivateLinkResourceImpl(inner.getValue(), this.manager())); - } - - public HorizonDbPrivateLinkResource get(String resourceGroupName, String clusterName, String groupName) { - HorizonDbPrivateLinkResourceInner inner = this.serviceClient().get(resourceGroupName, clusterName, groupName); - if (inner != null) { - return new HorizonDbPrivateLinkResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable list(String resourceGroupName, String clusterName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, clusterName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new HorizonDbPrivateLinkResourceImpl(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 HorizonDbPrivateLinkResourceImpl(inner1, this.manager())); - } - - private HorizonDbPrivateLinkResourcesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbReplicaImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbReplicaImpl.java deleted file mode 100644 index b9503a78e8b38..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbReplicaImpl.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbReplicaInner; -import com.azure.resourcemanager.horizondb.models.HorizonDbReplica; -import com.azure.resourcemanager.horizondb.models.HorizonDbReplicaForPatchUpdate; -import com.azure.resourcemanager.horizondb.models.HorizonDbReplicaProperties; -import com.azure.resourcemanager.horizondb.models.HorizonDbReplicaPropertiesForPatchUpdate; - -public final class HorizonDbReplicaImpl - implements HorizonDbReplica, HorizonDbReplica.Definition, HorizonDbReplica.Update { - private HorizonDbReplicaInner innerObject; - - private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public HorizonDbReplicaProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public HorizonDbReplicaInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String clusterName; - - private String poolName; - - private String replicaName; - - private HorizonDbReplicaForPatchUpdate updateProperties; - - public HorizonDbReplicaImpl withExistingPool(String resourceGroupName, String clusterName, String poolName) { - this.resourceGroupName = resourceGroupName; - this.clusterName = clusterName; - this.poolName = poolName; - return this; - } - - public HorizonDbReplica create() { - this.innerObject = serviceManager.serviceClient() - .getHorizonDbReplicas() - .createOrUpdate(resourceGroupName, clusterName, poolName, replicaName, this.innerModel(), Context.NONE); - return this; - } - - public HorizonDbReplica create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getHorizonDbReplicas() - .createOrUpdate(resourceGroupName, clusterName, poolName, replicaName, this.innerModel(), context); - return this; - } - - HorizonDbReplicaImpl(String name, com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { - this.innerObject = new HorizonDbReplicaInner(); - this.serviceManager = serviceManager; - this.replicaName = name; - } - - public HorizonDbReplicaImpl update() { - this.updateProperties = new HorizonDbReplicaForPatchUpdate(); - return this; - } - - public HorizonDbReplica apply() { - this.innerObject = serviceManager.serviceClient() - .getHorizonDbReplicas() - .update(resourceGroupName, clusterName, poolName, replicaName, updateProperties, Context.NONE); - return this; - } - - public HorizonDbReplica apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getHorizonDbReplicas() - .update(resourceGroupName, clusterName, poolName, replicaName, updateProperties, context); - return this; - } - - HorizonDbReplicaImpl(HorizonDbReplicaInner innerObject, - com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusters"); - this.poolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "pools"); - this.replicaName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "replicas"); - } - - public HorizonDbReplica refresh() { - this.innerObject = serviceManager.serviceClient() - .getHorizonDbReplicas() - .getWithResponse(resourceGroupName, clusterName, poolName, replicaName, Context.NONE) - .getValue(); - return this; - } - - public HorizonDbReplica refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getHorizonDbReplicas() - .getWithResponse(resourceGroupName, clusterName, poolName, replicaName, context) - .getValue(); - return this; - } - - public HorizonDbReplicaImpl withProperties(HorizonDbReplicaProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public HorizonDbReplicaImpl withProperties(HorizonDbReplicaPropertiesForPatchUpdate properties) { - this.updateProperties.withProperties(properties); - return this; - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/IdentityAssignmentImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/IdentityAssignmentImpl.java new file mode 100644 index 0000000000000..65f5f1e8e08f6 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/IdentityAssignmentImpl.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.horizondb.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.horizondb.fluent.models.IdentityAssignmentInner; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureIdentityAssignmentProperties; +import com.azure.resourcemanager.horizondb.models.IdentityAssignment; + +public final class IdentityAssignmentImpl implements IdentityAssignment, IdentityAssignment.Definition { + private IdentityAssignmentInner innerObject; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + IdentityAssignmentImpl(IdentityAssignmentInner innerObject, + com.azure.resourcemanager.horizondb.HorizonDbManager 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 ChangeDataCaptureIdentityAssignmentProperties properties() { + return this.innerModel().properties(); + } + + public String eTag() { + return this.innerModel().eTag(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public IdentityAssignmentInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String clusterName; + + private String destinationName; + + private String assignmentName; + + public IdentityAssignmentImpl withExistingChangeDataCaptureDestination(String resourceGroupName, String clusterName, + String destinationName) { + this.resourceGroupName = resourceGroupName; + this.clusterName = clusterName; + this.destinationName = destinationName; + return this; + } + + public IdentityAssignment create() { + this.innerObject = serviceManager.serviceClient() + .getIdentityAssignments() + .createOrReplace(resourceGroupName, clusterName, destinationName, assignmentName, this.innerModel(), + Context.NONE); + return this; + } + + public IdentityAssignment create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getIdentityAssignments() + .createOrReplace(resourceGroupName, clusterName, destinationName, assignmentName, this.innerModel(), + context); + return this; + } + + IdentityAssignmentImpl(String name, com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerObject = new IdentityAssignmentInner(); + this.serviceManager = serviceManager; + this.assignmentName = name; + } + + public IdentityAssignment refresh() { + this.innerObject = serviceManager.serviceClient() + .getIdentityAssignments() + .getWithResponse(resourceGroupName, clusterName, destinationName, assignmentName, Context.NONE) + .getValue(); + return this; + } + + public IdentityAssignment refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getIdentityAssignments() + .getWithResponse(resourceGroupName, clusterName, destinationName, assignmentName, context) + .getValue(); + return this; + } + + public IdentityAssignmentImpl withProperties(ChangeDataCaptureIdentityAssignmentProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/IdentityAssignmentsClientImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/IdentityAssignmentsClientImpl.java new file mode 100644 index 0000000000000..420db2d8a8c58 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/IdentityAssignmentsClientImpl.java @@ -0,0 +1,838 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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.horizondb.fluent.IdentityAssignmentsClient; +import com.azure.resourcemanager.horizondb.fluent.models.IdentityAssignmentInner; +import com.azure.resourcemanager.horizondb.implementation.models.IdentityAssignmentListResult; +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 IdentityAssignmentsClient. + */ +public final class IdentityAssignmentsClientImpl implements IdentityAssignmentsClient { + /** + * The proxy service used to perform REST calls. + */ + private final IdentityAssignmentsService service; + + /** + * The service client containing this operation class. + */ + private final HorizonDbManagementClientImpl client; + + /** + * Initializes an instance of IdentityAssignmentsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + IdentityAssignmentsClientImpl(HorizonDbManagementClientImpl client) { + this.service = RestProxy.create(IdentityAssignmentsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for HorizonDbManagementClientIdentityAssignments to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "HorizonDbManagementClientIdentityAssignments") + public interface IdentityAssignmentsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCaptureDestinations/{destinationName}/identityAssignments/{assignmentName}") + @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("clusterName") String clusterName, + @PathParam("destinationName") String destinationName, @PathParam("assignmentName") String assignmentName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCaptureDestinations/{destinationName}/identityAssignments/{assignmentName}") + @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("destinationName") String destinationName, @PathParam("assignmentName") String assignmentName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCaptureDestinations/{destinationName}/identityAssignments/{assignmentName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrReplace(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("destinationName") String destinationName, @PathParam("assignmentName") String assignmentName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") IdentityAssignmentInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCaptureDestinations/{destinationName}/identityAssignments/{assignmentName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrReplaceSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("destinationName") String destinationName, @PathParam("assignmentName") String assignmentName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") IdentityAssignmentInner resource, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCaptureDestinations/{destinationName}/identityAssignments/{assignmentName}") + @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("clusterName") String clusterName, + @PathParam("destinationName") String destinationName, @PathParam("assignmentName") String assignmentName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCaptureDestinations/{destinationName}/identityAssignments/{assignmentName}") + @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("destinationName") String destinationName, @PathParam("assignmentName") String assignmentName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCaptureDestinations/{destinationName}/identityAssignments") + @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("clusterName") String clusterName, + @PathParam("destinationName") String destinationName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/changeDataCaptureDestinations/{destinationName}/identityAssignments") + @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("destinationName") String destinationName, @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 a change data capture identity assignment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a change data capture identity assignment along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String destinationName, String assignmentName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, destinationName, assignmentName, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a change data capture identity assignment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a change data capture identity assignment on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String clusterName, String destinationName, + String assignmentName) { + return getWithResponseAsync(resourceGroupName, clusterName, destinationName, assignmentName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a change data capture identity assignment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a change data capture identity assignment along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String clusterName, + String destinationName, String assignmentName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, destinationName, assignmentName, accept, context); + } + + /** + * Gets a change data capture identity assignment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a change data capture identity assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public IdentityAssignmentInner get(String resourceGroupName, String clusterName, String destinationName, + String assignmentName) { + return getWithResponse(resourceGroupName, clusterName, destinationName, assignmentName, Context.NONE) + .getValue(); + } + + /** + * Creates or idempotently replaces a change data capture identity assignment. The identity resource ID is immutable + * and must reference a user-assigned managed identity already attached to the parent cluster. The service also + * validates destination permissions, which are not granted by attaching the identity to the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user-assigned managed identity authorized for a HorizonDB change data capture destination along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrReplaceWithResponseAsync(String resourceGroupName, + String clusterName, String destinationName, String assignmentName, IdentityAssignmentInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrReplace(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, destinationName, assignmentName, + contentType, accept, resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or idempotently replaces a change data capture identity assignment. The identity resource ID is immutable + * and must reference a user-assigned managed identity already attached to the parent cluster. The service also + * validates destination permissions, which are not granted by attaching the identity to the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user-assigned managed identity authorized for a HorizonDB change data capture destination along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrReplaceWithResponse(String resourceGroupName, String clusterName, + String destinationName, String assignmentName, IdentityAssignmentInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrReplaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, destinationName, assignmentName, + contentType, accept, resource, Context.NONE); + } + + /** + * Creates or idempotently replaces a change data capture identity assignment. The identity resource ID is immutable + * and must reference a user-assigned managed identity already attached to the parent cluster. The service also + * validates destination permissions, which are not granted by attaching the identity to the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user-assigned managed identity authorized for a HorizonDB change data capture destination along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrReplaceWithResponse(String resourceGroupName, String clusterName, + String destinationName, String assignmentName, IdentityAssignmentInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrReplaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, destinationName, assignmentName, + contentType, accept, resource, context); + } + + /** + * Creates or idempotently replaces a change data capture identity assignment. The identity resource ID is immutable + * and must reference a user-assigned managed identity already attached to the parent cluster. The service also + * validates destination permissions, which are not granted by attaching the identity to the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a user-assigned managed identity authorized for a HorizonDB change + * data capture destination. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, IdentityAssignmentInner> beginCreateOrReplaceAsync( + String resourceGroupName, String clusterName, String destinationName, String assignmentName, + IdentityAssignmentInner resource) { + Mono>> mono = createOrReplaceWithResponseAsync(resourceGroupName, clusterName, + destinationName, assignmentName, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), IdentityAssignmentInner.class, IdentityAssignmentInner.class, + this.client.getContext()); + } + + /** + * Creates or idempotently replaces a change data capture identity assignment. The identity resource ID is immutable + * and must reference a user-assigned managed identity already attached to the parent cluster. The service also + * validates destination permissions, which are not granted by attaching the identity to the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a user-assigned managed identity authorized for a HorizonDB change + * data capture destination. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, IdentityAssignmentInner> beginCreateOrReplace( + String resourceGroupName, String clusterName, String destinationName, String assignmentName, + IdentityAssignmentInner resource) { + Response response + = createOrReplaceWithResponse(resourceGroupName, clusterName, destinationName, assignmentName, resource); + return this.client.getLroResult(response, + IdentityAssignmentInner.class, IdentityAssignmentInner.class, Context.NONE); + } + + /** + * Creates or idempotently replaces a change data capture identity assignment. The identity resource ID is immutable + * and must reference a user-assigned managed identity already attached to the parent cluster. The service also + * validates destination permissions, which are not granted by attaching the identity to the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a user-assigned managed identity authorized for a HorizonDB change + * data capture destination. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, IdentityAssignmentInner> beginCreateOrReplace( + String resourceGroupName, String clusterName, String destinationName, String assignmentName, + IdentityAssignmentInner resource, Context context) { + Response response = createOrReplaceWithResponse(resourceGroupName, clusterName, destinationName, + assignmentName, resource, context); + return this.client.getLroResult(response, + IdentityAssignmentInner.class, IdentityAssignmentInner.class, context); + } + + /** + * Creates or idempotently replaces a change data capture identity assignment. The identity resource ID is immutable + * and must reference a user-assigned managed identity already attached to the parent cluster. The service also + * validates destination permissions, which are not granted by attaching the identity to the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user-assigned managed identity authorized for a HorizonDB change data capture destination on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrReplaceAsync(String resourceGroupName, String clusterName, + String destinationName, String assignmentName, IdentityAssignmentInner resource) { + return beginCreateOrReplaceAsync(resourceGroupName, clusterName, destinationName, assignmentName, resource) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or idempotently replaces a change data capture identity assignment. The identity resource ID is immutable + * and must reference a user-assigned managed identity already attached to the parent cluster. The service also + * validates destination permissions, which are not granted by attaching the identity to the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user-assigned managed identity authorized for a HorizonDB change data capture destination. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public IdentityAssignmentInner createOrReplace(String resourceGroupName, String clusterName, String destinationName, + String assignmentName, IdentityAssignmentInner resource) { + return beginCreateOrReplace(resourceGroupName, clusterName, destinationName, assignmentName, resource) + .getFinalResult(); + } + + /** + * Creates or idempotently replaces a change data capture identity assignment. The identity resource ID is immutable + * and must reference a user-assigned managed identity already attached to the parent cluster. The service also + * validates destination permissions, which are not granted by attaching the identity to the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a user-assigned managed identity authorized for a HorizonDB change data capture destination. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public IdentityAssignmentInner createOrReplace(String resourceGroupName, String clusterName, String destinationName, + String assignmentName, IdentityAssignmentInner resource, Context context) { + return beginCreateOrReplace(resourceGroupName, clusterName, destinationName, assignmentName, resource, context) + .getFinalResult(); + } + + /** + * Deletes an inactive change data capture identity assignment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String destinationName, String assignmentName) { + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, destinationName, assignmentName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes an inactive change data capture identity assignment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 clusterName, + String destinationName, String assignmentName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, destinationName, assignmentName, + Context.NONE); + } + + /** + * Deletes an inactive change data capture identity assignment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 clusterName, + String destinationName, String assignmentName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, destinationName, assignmentName, context); + } + + /** + * Deletes an inactive change data capture identity assignment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String destinationName, String assignmentName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterName, destinationName, assignmentName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes an inactive change data capture identity assignment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, + String destinationName, String assignmentName) { + Response response + = deleteWithResponse(resourceGroupName, clusterName, destinationName, assignmentName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Deletes an inactive change data capture identity assignment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, + String destinationName, String assignmentName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, clusterName, destinationName, assignmentName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Deletes an inactive change data capture identity assignment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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) + public Mono deleteAsync(String resourceGroupName, String clusterName, String destinationName, + String assignmentName) { + return beginDeleteAsync(resourceGroupName, clusterName, destinationName, assignmentName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an inactive change data capture identity assignment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 destinationName, String assignmentName) { + beginDelete(resourceGroupName, clusterName, destinationName, assignmentName).getFinalResult(); + } + + /** + * Deletes an inactive change data capture identity assignment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 destinationName, String assignmentName, + Context context) { + beginDelete(resourceGroupName, clusterName, destinationName, assignmentName, context).getFinalResult(); + } + + /** + * Lists identity assignments for a change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a IdentityAssignment list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String clusterName, String destinationName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, destinationName, 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())); + } + + /** + * Lists identity assignments for a change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a IdentityAssignment list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String clusterName, + String destinationName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName, destinationName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists identity assignments for a change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a IdentityAssignment list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String clusterName, + String destinationName) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, destinationName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists identity assignments for a change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a IdentityAssignment list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String clusterName, + String destinationName, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, destinationName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists identity assignments for a change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a IdentityAssignment list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterName, + String destinationName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName, destinationName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * Lists identity assignments for a change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a IdentityAssignment list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterName, + String destinationName, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName, destinationName, 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 IdentityAssignment 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 IdentityAssignment 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 IdentityAssignment 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/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/IdentityAssignmentsImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/IdentityAssignmentsImpl.java new file mode 100644 index 0000000000000..2e48748b062ba --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/IdentityAssignmentsImpl.java @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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.horizondb.fluent.IdentityAssignmentsClient; +import com.azure.resourcemanager.horizondb.fluent.models.IdentityAssignmentInner; +import com.azure.resourcemanager.horizondb.models.IdentityAssignment; +import com.azure.resourcemanager.horizondb.models.IdentityAssignments; + +public final class IdentityAssignmentsImpl implements IdentityAssignments { + private static final ClientLogger LOGGER = new ClientLogger(IdentityAssignmentsImpl.class); + + private final IdentityAssignmentsClient innerClient; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + public IdentityAssignmentsImpl(IdentityAssignmentsClient innerClient, + com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String clusterName, + String destinationName, String assignmentName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, clusterName, destinationName, assignmentName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new IdentityAssignmentImpl(inner.getValue(), this.manager())); + } + + public IdentityAssignment get(String resourceGroupName, String clusterName, String destinationName, + String assignmentName) { + IdentityAssignmentInner inner + = this.serviceClient().get(resourceGroupName, clusterName, destinationName, assignmentName); + if (inner != null) { + return new IdentityAssignmentImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String clusterName, String destinationName, String assignmentName) { + this.serviceClient().delete(resourceGroupName, clusterName, destinationName, assignmentName); + } + + public void delete(String resourceGroupName, String clusterName, String destinationName, String assignmentName, + Context context) { + this.serviceClient().delete(resourceGroupName, clusterName, destinationName, assignmentName, context); + } + + public PagedIterable list(String resourceGroupName, String clusterName, + String destinationName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, clusterName, destinationName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new IdentityAssignmentImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String clusterName, String destinationName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, clusterName, destinationName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new IdentityAssignmentImpl(inner1, this.manager())); + } + + public IdentityAssignment 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 clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String destinationName = ResourceManagerUtils.getValueFromIdByName(id, "changeDataCaptureDestinations"); + if (destinationName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( + "The resource ID '%s' is not valid. Missing path segment 'changeDataCaptureDestinations'.", id))); + } + String assignmentName = ResourceManagerUtils.getValueFromIdByName(id, "identityAssignments"); + if (assignmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'identityAssignments'.", id))); + } + return this.getWithResponse(resourceGroupName, clusterName, destinationName, assignmentName, 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 clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String destinationName = ResourceManagerUtils.getValueFromIdByName(id, "changeDataCaptureDestinations"); + if (destinationName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( + "The resource ID '%s' is not valid. Missing path segment 'changeDataCaptureDestinations'.", id))); + } + String assignmentName = ResourceManagerUtils.getValueFromIdByName(id, "identityAssignments"); + if (assignmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'identityAssignments'.", id))); + } + return this.getWithResponse(resourceGroupName, clusterName, destinationName, assignmentName, 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 clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String destinationName = ResourceManagerUtils.getValueFromIdByName(id, "changeDataCaptureDestinations"); + if (destinationName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( + "The resource ID '%s' is not valid. Missing path segment 'changeDataCaptureDestinations'.", id))); + } + String assignmentName = ResourceManagerUtils.getValueFromIdByName(id, "identityAssignments"); + if (assignmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'identityAssignments'.", id))); + } + this.delete(resourceGroupName, clusterName, destinationName, assignmentName, 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 clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String destinationName = ResourceManagerUtils.getValueFromIdByName(id, "changeDataCaptureDestinations"); + if (destinationName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( + "The resource ID '%s' is not valid. Missing path segment 'changeDataCaptureDestinations'.", id))); + } + String assignmentName = ResourceManagerUtils.getValueFromIdByName(id, "identityAssignments"); + if (assignmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'identityAssignments'.", id))); + } + this.delete(resourceGroupName, clusterName, destinationName, assignmentName, context); + } + + private IdentityAssignmentsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } + + public IdentityAssignmentImpl define(String name) { + return new IdentityAssignmentImpl(name, this.manager()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/LogCaptureConfigurationImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/LogCaptureConfigurationImpl.java new file mode 100644 index 0000000000000..a236d06ac7435 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/LogCaptureConfigurationImpl.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.horizondb.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.horizondb.fluent.models.LogCaptureConfigurationInner; +import com.azure.resourcemanager.horizondb.models.LogCaptureConfiguration; +import com.azure.resourcemanager.horizondb.models.LogCaptureConfigurationProperties; + +public final class LogCaptureConfigurationImpl implements LogCaptureConfiguration { + private LogCaptureConfigurationInner innerObject; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + LogCaptureConfigurationImpl(LogCaptureConfigurationInner innerObject, + com.azure.resourcemanager.horizondb.HorizonDbManager 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 LogCaptureConfigurationProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public LogCaptureConfigurationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/LogCaptureConfigurationsClientImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/LogCaptureConfigurationsClientImpl.java new file mode 100644 index 0000000000000..515a46678b6dd --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/LogCaptureConfigurationsClientImpl.java @@ -0,0 +1,600 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +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.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.horizondb.fluent.LogCaptureConfigurationsClient; +import com.azure.resourcemanager.horizondb.fluent.models.LogCaptureConfigurationInner; +import com.azure.resourcemanager.horizondb.implementation.models.LogCaptureConfigurationListResult; +import com.azure.resourcemanager.horizondb.models.LogCaptureConfigurationForPatchUpdate; +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 LogCaptureConfigurationsClient. + */ +public final class LogCaptureConfigurationsClientImpl implements LogCaptureConfigurationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final LogCaptureConfigurationsService service; + + /** + * The service client containing this operation class. + */ + private final HorizonDbManagementClientImpl client; + + /** + * Initializes an instance of LogCaptureConfigurationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + LogCaptureConfigurationsClientImpl(HorizonDbManagementClientImpl client) { + this.service = RestProxy.create(LogCaptureConfigurationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for HorizonDbManagementClientLogCaptureConfigurations to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "HorizonDbManagementClientLogCaptureConfigurations") + public interface LogCaptureConfigurationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/logCaptureConfigurations/{logCaptureConfigurationName}") + @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("clusterName") String clusterName, + @PathParam("logCaptureConfigurationName") String logCaptureConfigurationName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/logCaptureConfigurations/{logCaptureConfigurationName}") + @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("logCaptureConfigurationName") String logCaptureConfigurationName, + @HeaderParam("Accept") String accept, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/logCaptureConfigurations/{logCaptureConfigurationName}") + @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("clusterName") String clusterName, + @PathParam("logCaptureConfigurationName") String logCaptureConfigurationName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") LogCaptureConfigurationForPatchUpdate properties, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/logCaptureConfigurations/{logCaptureConfigurationName}") + @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("logCaptureConfigurationName") String logCaptureConfigurationName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") LogCaptureConfigurationForPatchUpdate properties, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/logCaptureConfigurations") + @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("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/logCaptureConfigurations") + @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, + @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 a log capture configuration for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logCaptureConfigurationName The name of the LogCaptureConfiguration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a log capture configuration for a HorizonDB cluster along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, + String clusterName, String logCaptureConfigurationName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, logCaptureConfigurationName, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a log capture configuration for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logCaptureConfigurationName The name of the LogCaptureConfiguration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a log capture configuration for a HorizonDB cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String clusterName, + String logCaptureConfigurationName) { + return getWithResponseAsync(resourceGroupName, clusterName, logCaptureConfigurationName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a log capture configuration for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logCaptureConfigurationName The name of the LogCaptureConfiguration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a log capture configuration for a HorizonDB cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String clusterName, + String logCaptureConfigurationName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, logCaptureConfigurationName, accept, context); + } + + /** + * Gets a log capture configuration for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logCaptureConfigurationName The name of the LogCaptureConfiguration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a log capture configuration for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LogCaptureConfigurationInner get(String resourceGroupName, String clusterName, + String logCaptureConfigurationName) { + return getWithResponse(resourceGroupName, clusterName, logCaptureConfigurationName, Context.NONE).getValue(); + } + + /** + * Updates a log capture configuration. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logCaptureConfigurationName The name of the LogCaptureConfiguration. + * @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 a predefined log capture configuration created by the service for a HorizonDB cluster along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, + String logCaptureConfigurationName, LogCaptureConfigurationForPatchUpdate 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, clusterName, logCaptureConfigurationName, + contentType, accept, properties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates a log capture configuration. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logCaptureConfigurationName The name of the LogCaptureConfiguration. + * @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 a predefined log capture configuration created by the service for a HorizonDB cluster along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String clusterName, + String logCaptureConfigurationName, LogCaptureConfigurationForPatchUpdate properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, logCaptureConfigurationName, contentType, + accept, properties, Context.NONE); + } + + /** + * Updates a log capture configuration. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logCaptureConfigurationName The name of the LogCaptureConfiguration. + * @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 a predefined log capture configuration created by the service for a HorizonDB cluster along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String clusterName, + String logCaptureConfigurationName, LogCaptureConfigurationForPatchUpdate 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, clusterName, logCaptureConfigurationName, contentType, + accept, properties, context); + } + + /** + * Updates a log capture configuration. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logCaptureConfigurationName The name of the LogCaptureConfiguration. + * @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 a predefined log capture configuration created by the service for a + * HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, LogCaptureConfigurationInner> beginUpdateAsync( + String resourceGroupName, String clusterName, String logCaptureConfigurationName, + LogCaptureConfigurationForPatchUpdate properties) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, clusterName, logCaptureConfigurationName, properties); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), LogCaptureConfigurationInner.class, LogCaptureConfigurationInner.class, + this.client.getContext()); + } + + /** + * Updates a log capture configuration. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logCaptureConfigurationName The name of the LogCaptureConfiguration. + * @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 a predefined log capture configuration created by the service for a + * HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, LogCaptureConfigurationInner> beginUpdate( + String resourceGroupName, String clusterName, String logCaptureConfigurationName, + LogCaptureConfigurationForPatchUpdate properties) { + Response response + = updateWithResponse(resourceGroupName, clusterName, logCaptureConfigurationName, properties); + return this.client.getLroResult(response, + LogCaptureConfigurationInner.class, LogCaptureConfigurationInner.class, Context.NONE); + } + + /** + * Updates a log capture configuration. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logCaptureConfigurationName The name of the LogCaptureConfiguration. + * @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 a predefined log capture configuration created by the service for a + * HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, LogCaptureConfigurationInner> beginUpdate( + String resourceGroupName, String clusterName, String logCaptureConfigurationName, + LogCaptureConfigurationForPatchUpdate properties, Context context) { + Response response + = updateWithResponse(resourceGroupName, clusterName, logCaptureConfigurationName, properties, context); + return this.client.getLroResult(response, + LogCaptureConfigurationInner.class, LogCaptureConfigurationInner.class, context); + } + + /** + * Updates a log capture configuration. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logCaptureConfigurationName The name of the LogCaptureConfiguration. + * @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 a predefined log capture configuration created by the service for a HorizonDB cluster on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync(String resourceGroupName, String clusterName, + String logCaptureConfigurationName, LogCaptureConfigurationForPatchUpdate properties) { + return beginUpdateAsync(resourceGroupName, clusterName, logCaptureConfigurationName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a log capture configuration. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logCaptureConfigurationName The name of the LogCaptureConfiguration. + * @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 a predefined log capture configuration created by the service for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LogCaptureConfigurationInner update(String resourceGroupName, String clusterName, + String logCaptureConfigurationName, LogCaptureConfigurationForPatchUpdate properties) { + return beginUpdate(resourceGroupName, clusterName, logCaptureConfigurationName, properties).getFinalResult(); + } + + /** + * Updates a log capture configuration. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logCaptureConfigurationName The name of the LogCaptureConfiguration. + * @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 a predefined log capture configuration created by the service for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LogCaptureConfigurationInner update(String resourceGroupName, String clusterName, + String logCaptureConfigurationName, LogCaptureConfigurationForPatchUpdate properties, Context context) { + return beginUpdate(resourceGroupName, clusterName, logCaptureConfigurationName, properties, context) + .getFinalResult(); + } + + /** + * Lists the log capture configurations for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 LogCaptureConfiguration list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @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())); + } + + /** + * Lists the log capture configurations for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 LogCaptureConfiguration list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String clusterName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists the log capture configurations for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 LogCaptureConfiguration list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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); + } + + /** + * Lists the log capture configurations for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 LogCaptureConfiguration list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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); + } + + /** + * Lists the log capture configurations for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 LogCaptureConfiguration list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * Lists the log capture configurations for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 LogCaptureConfiguration list operation as paginated response with + * {@link PagedIterable}. + */ + @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 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 LogCaptureConfiguration 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 LogCaptureConfiguration 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 LogCaptureConfiguration 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/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/LogCaptureConfigurationsImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/LogCaptureConfigurationsImpl.java new file mode 100644 index 0000000000000..10f0f6d7a89b0 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/LogCaptureConfigurationsImpl.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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.horizondb.fluent.LogCaptureConfigurationsClient; +import com.azure.resourcemanager.horizondb.fluent.models.LogCaptureConfigurationInner; +import com.azure.resourcemanager.horizondb.models.LogCaptureConfiguration; +import com.azure.resourcemanager.horizondb.models.LogCaptureConfigurationForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.LogCaptureConfigurations; + +public final class LogCaptureConfigurationsImpl implements LogCaptureConfigurations { + private static final ClientLogger LOGGER = new ClientLogger(LogCaptureConfigurationsImpl.class); + + private final LogCaptureConfigurationsClient innerClient; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + public LogCaptureConfigurationsImpl(LogCaptureConfigurationsClient innerClient, + com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String clusterName, + String logCaptureConfigurationName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, clusterName, logCaptureConfigurationName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new LogCaptureConfigurationImpl(inner.getValue(), this.manager())); + } + + public LogCaptureConfiguration get(String resourceGroupName, String clusterName, + String logCaptureConfigurationName) { + LogCaptureConfigurationInner inner + = this.serviceClient().get(resourceGroupName, clusterName, logCaptureConfigurationName); + if (inner != null) { + return new LogCaptureConfigurationImpl(inner, this.manager()); + } else { + return null; + } + } + + public LogCaptureConfiguration update(String resourceGroupName, String clusterName, + String logCaptureConfigurationName, LogCaptureConfigurationForPatchUpdate properties) { + LogCaptureConfigurationInner inner + = this.serviceClient().update(resourceGroupName, clusterName, logCaptureConfigurationName, properties); + if (inner != null) { + return new LogCaptureConfigurationImpl(inner, this.manager()); + } else { + return null; + } + } + + public LogCaptureConfiguration update(String resourceGroupName, String clusterName, + String logCaptureConfigurationName, LogCaptureConfigurationForPatchUpdate properties, Context context) { + LogCaptureConfigurationInner inner = this.serviceClient() + .update(resourceGroupName, clusterName, logCaptureConfigurationName, properties, context); + if (inner != null) { + return new LogCaptureConfigurationImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list(String resourceGroupName, String clusterName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LogCaptureConfigurationImpl(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 LogCaptureConfigurationImpl(inner1, this.manager())); + } + + private LogCaptureConfigurationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/LogFileDownloadUrlImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/LogFileDownloadUrlImpl.java new file mode 100644 index 0000000000000..3e9058b45bd3f --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/LogFileDownloadUrlImpl.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.horizondb.implementation; + +import com.azure.resourcemanager.horizondb.fluent.models.LogFileDownloadUrlInner; +import com.azure.resourcemanager.horizondb.models.LogFileDownloadUrl; +import java.time.OffsetDateTime; + +public final class LogFileDownloadUrlImpl implements LogFileDownloadUrl { + private LogFileDownloadUrlInner innerObject; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + LogFileDownloadUrlImpl(LogFileDownloadUrlInner innerObject, + com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String downloadUri() { + return this.innerModel().downloadUri(); + } + + public OffsetDateTime expiresAtUtc() { + return this.innerModel().expiresAtUtc(); + } + + public LogFileDownloadUrlInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/LogFileImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/LogFileImpl.java new file mode 100644 index 0000000000000..18597f2e048d4 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/LogFileImpl.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.horizondb.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.horizondb.fluent.models.LogFileInner; +import com.azure.resourcemanager.horizondb.models.LogFile; +import com.azure.resourcemanager.horizondb.models.LogFileProperties; + +public final class LogFileImpl implements LogFile { + private LogFileInner innerObject; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + LogFileImpl(LogFileInner innerObject, com.azure.resourcemanager.horizondb.HorizonDbManager 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 LogFileProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public LogFileInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/LogFilesClientImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/LogFilesClientImpl.java new file mode 100644 index 0000000000000..8bd6bcb0b624f --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/LogFilesClientImpl.java @@ -0,0 +1,454 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.horizondb.fluent.LogFilesClient; +import com.azure.resourcemanager.horizondb.fluent.models.LogFileDownloadUrlInner; +import com.azure.resourcemanager.horizondb.fluent.models.LogFileInner; +import com.azure.resourcemanager.horizondb.implementation.models.LogFileListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in LogFilesClient. + */ +public final class LogFilesClientImpl implements LogFilesClient { + /** + * The proxy service used to perform REST calls. + */ + private final LogFilesService service; + + /** + * The service client containing this operation class. + */ + private final HorizonDbManagementClientImpl client; + + /** + * Initializes an instance of LogFilesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + LogFilesClientImpl(HorizonDbManagementClientImpl client) { + this.service = RestProxy.create(LogFilesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for HorizonDbManagementClientLogFiles to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "HorizonDbManagementClientLogFiles") + public interface LogFilesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/logFiles/{logFileName}") + @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("clusterName") String clusterName, + @PathParam("logFileName") String logFileName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/logFiles/{logFileName}") + @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("logFileName") String logFileName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/logFiles") + @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("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/logFiles") + @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, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/logFiles/{logFileName}/listDownloadUrls") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listDownloadUrls(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("logFileName") String logFileName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/logFiles/{logFileName}/listDownloadUrls") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listDownloadUrlsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("logFileName") String logFileName, @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 metadata for a captured HorizonDB log file. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logFileName The name of the LogFile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return metadata for a captured HorizonDB log file along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String logFileName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, logFileName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets metadata for a captured HorizonDB log file. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logFileName The name of the LogFile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return metadata for a captured HorizonDB log file on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String clusterName, String logFileName) { + return getWithResponseAsync(resourceGroupName, clusterName, logFileName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets metadata for a captured HorizonDB log file. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logFileName The name of the LogFile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return metadata for a captured HorizonDB log file along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String clusterName, String logFileName, + Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, logFileName, accept, context); + } + + /** + * Gets metadata for a captured HorizonDB log file. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logFileName The name of the LogFile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return metadata for a captured HorizonDB log file. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LogFileInner get(String resourceGroupName, String clusterName, String logFileName) { + return getWithResponse(resourceGroupName, clusterName, logFileName, Context.NONE).getValue(); + } + + /** + * Lists captured log files for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 LogFile list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @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())); + } + + /** + * Lists captured log files for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 LogFile list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String clusterName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists captured log files for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 LogFile list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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); + } + + /** + * Lists captured log files for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 LogFile list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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); + } + + /** + * Lists captured log files for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 LogFile list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * Lists captured log files for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 LogFile list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterName, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Gets a short-lived signed URL for downloading a captured log file. The signed URL is returned only by this action + * so routine resource GET and LIST responses do not expose bearer credentials. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logFileName The name of the LogFile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a short-lived signed URL for downloading a captured log file along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listDownloadUrlsWithResponseAsync(String resourceGroupName, + String clusterName, String logFileName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listDownloadUrls(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, logFileName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a short-lived signed URL for downloading a captured log file. The signed URL is returned only by this action + * so routine resource GET and LIST responses do not expose bearer credentials. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logFileName The name of the LogFile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a short-lived signed URL for downloading a captured log file on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listDownloadUrlsAsync(String resourceGroupName, String clusterName, + String logFileName) { + return listDownloadUrlsWithResponseAsync(resourceGroupName, clusterName, logFileName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a short-lived signed URL for downloading a captured log file. The signed URL is returned only by this action + * so routine resource GET and LIST responses do not expose bearer credentials. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logFileName The name of the LogFile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a short-lived signed URL for downloading a captured log file along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listDownloadUrlsWithResponse(String resourceGroupName, String clusterName, + String logFileName, Context context) { + final String accept = "application/json"; + return service.listDownloadUrlsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, logFileName, accept, context); + } + + /** + * Gets a short-lived signed URL for downloading a captured log file. The signed URL is returned only by this action + * so routine resource GET and LIST responses do not expose bearer credentials. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logFileName The name of the LogFile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a short-lived signed URL for downloading a captured log file. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LogFileDownloadUrlInner listDownloadUrls(String resourceGroupName, String clusterName, String logFileName) { + return listDownloadUrlsWithResponse(resourceGroupName, clusterName, logFileName, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a LogFile 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 LogFile 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 LogFile 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/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/LogFilesImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/LogFilesImpl.java new file mode 100644 index 0000000000000..9211163647093 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/LogFilesImpl.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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.horizondb.fluent.LogFilesClient; +import com.azure.resourcemanager.horizondb.fluent.models.LogFileDownloadUrlInner; +import com.azure.resourcemanager.horizondb.fluent.models.LogFileInner; +import com.azure.resourcemanager.horizondb.models.LogFile; +import com.azure.resourcemanager.horizondb.models.LogFileDownloadUrl; +import com.azure.resourcemanager.horizondb.models.LogFiles; + +public final class LogFilesImpl implements LogFiles { + private static final ClientLogger LOGGER = new ClientLogger(LogFilesImpl.class); + + private final LogFilesClient innerClient; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + public LogFilesImpl(LogFilesClient innerClient, + com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String clusterName, String logFileName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, clusterName, logFileName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new LogFileImpl(inner.getValue(), this.manager())); + } + + public LogFile get(String resourceGroupName, String clusterName, String logFileName) { + LogFileInner inner = this.serviceClient().get(resourceGroupName, clusterName, logFileName); + if (inner != null) { + return new LogFileImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list(String resourceGroupName, String clusterName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LogFileImpl(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 LogFileImpl(inner1, this.manager())); + } + + public Response listDownloadUrlsWithResponse(String resourceGroupName, String clusterName, + String logFileName, Context context) { + Response inner + = this.serviceClient().listDownloadUrlsWithResponse(resourceGroupName, clusterName, logFileName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new LogFileDownloadUrlImpl(inner.getValue(), this.manager())); + } + + public LogFileDownloadUrl listDownloadUrls(String resourceGroupName, String clusterName, String logFileName) { + LogFileDownloadUrlInner inner + = this.serviceClient().listDownloadUrls(resourceGroupName, clusterName, logFileName); + if (inner != null) { + return new LogFileDownloadUrlImpl(inner, this.manager()); + } else { + return null; + } + } + + private LogFilesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/MaintenanceEventActionResponseImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/MaintenanceEventActionResponseImpl.java new file mode 100644 index 0000000000000..3a02c81ad7605 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/MaintenanceEventActionResponseImpl.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.horizondb.implementation; + +import com.azure.resourcemanager.horizondb.fluent.models.MaintenanceEventActionResponseInner; +import com.azure.resourcemanager.horizondb.models.MaintenanceEventActionResponse; +import com.azure.resourcemanager.horizondb.models.MaintenanceEventStatus; +import java.time.OffsetDateTime; + +public final class MaintenanceEventActionResponseImpl implements MaintenanceEventActionResponse { + private MaintenanceEventActionResponseInner innerObject; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + MaintenanceEventActionResponseImpl(MaintenanceEventActionResponseInner innerObject, + com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String maintenanceEventId() { + return this.innerModel().maintenanceEventId(); + } + + public String poolResourceId() { + return this.innerModel().poolResourceId(); + } + + public MaintenanceEventStatus status() { + return this.innerModel().status(); + } + + public OffsetDateTime plannedStartTimeUtc() { + return this.innerModel().plannedStartTimeUtc(); + } + + public OffsetDateTime plannedEndTimeUtc() { + return this.innerModel().plannedEndTimeUtc(); + } + + public Boolean appliedNow() { + return this.innerModel().appliedNow(); + } + + public OffsetDateTime lastUpdatedTimeUtc() { + return this.innerModel().lastUpdatedTimeUtc(); + } + + public MaintenanceEventActionResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/MaintenanceEventImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/MaintenanceEventImpl.java new file mode 100644 index 0000000000000..e0181547ec9e2 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/MaintenanceEventImpl.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.horizondb.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.horizondb.fluent.models.MaintenanceEventInner; +import com.azure.resourcemanager.horizondb.models.MaintenanceEvent; +import com.azure.resourcemanager.horizondb.models.MaintenanceEventProperties; + +public final class MaintenanceEventImpl implements MaintenanceEvent { + private MaintenanceEventInner innerObject; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + MaintenanceEventImpl(MaintenanceEventInner innerObject, + com.azure.resourcemanager.horizondb.HorizonDbManager 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 MaintenanceEventProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public MaintenanceEventInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/MaintenanceEventsClientImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/MaintenanceEventsClientImpl.java new file mode 100644 index 0000000000000..4ae3e1568a3fe --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/MaintenanceEventsClientImpl.java @@ -0,0 +1,873 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.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.horizondb.fluent.MaintenanceEventsClient; +import com.azure.resourcemanager.horizondb.fluent.models.MaintenanceEventActionResponseInner; +import com.azure.resourcemanager.horizondb.fluent.models.MaintenanceEventInner; +import com.azure.resourcemanager.horizondb.implementation.models.MaintenanceEventListResult; +import com.azure.resourcemanager.horizondb.models.MaintenanceEventRescheduleRequest; +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 MaintenanceEventsClient. + */ +public final class MaintenanceEventsClientImpl implements MaintenanceEventsClient { + /** + * The proxy service used to perform REST calls. + */ + private final MaintenanceEventsService service; + + /** + * The service client containing this operation class. + */ + private final HorizonDbManagementClientImpl client; + + /** + * Initializes an instance of MaintenanceEventsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + MaintenanceEventsClientImpl(HorizonDbManagementClientImpl client) { + this.service + = RestProxy.create(MaintenanceEventsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for HorizonDbManagementClientMaintenanceEvents to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "HorizonDbManagementClientMaintenanceEvents") + public interface MaintenanceEventsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/maintenanceEvents/{maintenanceEventId}") + @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("clusterName") String clusterName, + @PathParam("poolName") String poolName, @PathParam("maintenanceEventId") String maintenanceEventId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/maintenanceEvents/{maintenanceEventId}") + @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("poolName") String poolName, @PathParam("maintenanceEventId") String maintenanceEventId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/maintenanceEvents") + @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("clusterName") String clusterName, + @PathParam("poolName") String poolName, @QueryParam("$filter") String filter, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/maintenanceEvents") + @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("poolName") String poolName, @QueryParam("$filter") String filter, + @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/maintenanceEvents/{maintenanceEventId}/reschedule") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> reschedule(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("poolName") String poolName, @PathParam("maintenanceEventId") String maintenanceEventId, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") MaintenanceEventRescheduleRequest body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/maintenanceEvents/{maintenanceEventId}/reschedule") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response rescheduleSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("poolName") String poolName, @PathParam("maintenanceEventId") String maintenanceEventId, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") MaintenanceEventRescheduleRequest body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/maintenanceEvents/{maintenanceEventId}/applyNow") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> applyNow(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("poolName") String poolName, @PathParam("maintenanceEventId") String maintenanceEventId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/maintenanceEvents/{maintenanceEventId}/applyNow") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response applyNowSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("poolName") String poolName, @PathParam("maintenanceEventId") String maintenanceEventId, + @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 information about a maintenance event for a HorizonDB pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a maintenance event for a HorizonDB pool along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String poolName, String maintenanceEventId) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, maintenanceEventId, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information about a maintenance event for a HorizonDB pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a maintenance event for a HorizonDB pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String clusterName, String poolName, + String maintenanceEventId) { + return getWithResponseAsync(resourceGroupName, clusterName, poolName, maintenanceEventId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about a maintenance event for a HorizonDB pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a maintenance event for a HorizonDB pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String clusterName, + String poolName, String maintenanceEventId, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, poolName, maintenanceEventId, accept, context); + } + + /** + * Gets information about a maintenance event for a HorizonDB pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a maintenance event for a HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MaintenanceEventInner get(String resourceGroupName, String clusterName, String poolName, + String maintenanceEventId) { + return getWithResponse(resourceGroupName, clusterName, poolName, maintenanceEventId, Context.NONE).getValue(); + } + + /** + * Lists maintenance events for a HorizonDB pool. Use the OData $filter query parameter to filter by + * properties/status with the eq and or operators. For example, properties/status eq 'Planned' or properties/status + * eq 'InProgress' returns upcoming events. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param filter The OData filter expression to apply to the list operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceEvent list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String clusterName, + String poolName, String filter) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, filter, 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())); + } + + /** + * Lists maintenance events for a HorizonDB pool. Use the OData $filter query parameter to filter by + * properties/status with the eq and or operators. For example, properties/status eq 'Planned' or properties/status + * eq 'InProgress' returns upcoming events. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param filter The OData filter expression to apply to the list operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceEvent list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String clusterName, String poolName, + String filter) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName, poolName, filter), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists maintenance events for a HorizonDB pool. Use the OData $filter query parameter to filter by + * properties/status with the eq and or operators. For example, properties/status eq 'Planned' or properties/status + * eq 'InProgress' returns upcoming events. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceEvent list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String clusterName, String poolName) { + final String filter = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName, poolName, filter), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists maintenance events for a HorizonDB pool. Use the OData $filter query parameter to filter by + * properties/status with the eq and or operators. For example, properties/status eq 'Planned' or properties/status + * eq 'InProgress' returns upcoming events. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param filter The OData filter expression to apply to the list operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceEvent list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String clusterName, + String poolName, String filter) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, poolName, filter, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists maintenance events for a HorizonDB pool. Use the OData $filter query parameter to filter by + * properties/status with the eq and or operators. For example, properties/status eq 'Planned' or properties/status + * eq 'InProgress' returns upcoming events. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param filter The OData filter expression to apply to the list 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 of a MaintenanceEvent list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String clusterName, + String poolName, String filter, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, poolName, filter, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists maintenance events for a HorizonDB pool. Use the OData $filter query parameter to filter by + * properties/status with the eq and or operators. For example, properties/status eq 'Planned' or properties/status + * eq 'InProgress' returns upcoming events. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceEvent list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterName, String poolName) { + final String filter = null; + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName, poolName, filter), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * Lists maintenance events for a HorizonDB pool. Use the OData $filter query parameter to filter by + * properties/status with the eq and or operators. For example, properties/status eq 'Planned' or properties/status + * eq 'InProgress' returns upcoming events. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param filter The OData filter expression to apply to the list 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 of a MaintenanceEvent list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterName, String poolName, + String filter, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName, poolName, filter, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Reschedules a maintenance event to a new date and time. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @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 from a maintenance event reschedule or apply-now action along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> rescheduleWithResponseAsync(String resourceGroupName, String clusterName, + String poolName, String maintenanceEventId, MaintenanceEventRescheduleRequest body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.reschedule(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, maintenanceEventId, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Reschedules a maintenance event to a new date and time. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @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 from a maintenance event reschedule or apply-now action along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response rescheduleWithResponse(String resourceGroupName, String clusterName, String poolName, + String maintenanceEventId, MaintenanceEventRescheduleRequest body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.rescheduleSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, maintenanceEventId, contentType, + accept, body, Context.NONE); + } + + /** + * Reschedules a maintenance event to a new date and time. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @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 from a maintenance event reschedule or apply-now action along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response rescheduleWithResponse(String resourceGroupName, String clusterName, String poolName, + String maintenanceEventId, MaintenanceEventRescheduleRequest body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.rescheduleSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, maintenanceEventId, contentType, + accept, body, context); + } + + /** + * Reschedules a maintenance event to a new date and time. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @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 the response from a maintenance event reschedule or apply-now + * action. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, MaintenanceEventActionResponseInner> + beginRescheduleAsync(String resourceGroupName, String clusterName, String poolName, String maintenanceEventId, + MaintenanceEventRescheduleRequest body) { + Mono>> mono + = rescheduleWithResponseAsync(resourceGroupName, clusterName, poolName, maintenanceEventId, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), MaintenanceEventActionResponseInner.class, + MaintenanceEventActionResponseInner.class, this.client.getContext()); + } + + /** + * Reschedules a maintenance event to a new date and time. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @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 the response from a maintenance event reschedule or apply-now + * action. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MaintenanceEventActionResponseInner> + beginReschedule(String resourceGroupName, String clusterName, String poolName, String maintenanceEventId, + MaintenanceEventRescheduleRequest body) { + Response response + = rescheduleWithResponse(resourceGroupName, clusterName, poolName, maintenanceEventId, body); + return this.client.getLroResult( + response, MaintenanceEventActionResponseInner.class, MaintenanceEventActionResponseInner.class, + Context.NONE); + } + + /** + * Reschedules a maintenance event to a new date and time. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @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 SyncPoller} for polling of the response from a maintenance event reschedule or apply-now + * action. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MaintenanceEventActionResponseInner> + beginReschedule(String resourceGroupName, String clusterName, String poolName, String maintenanceEventId, + MaintenanceEventRescheduleRequest body, Context context) { + Response response + = rescheduleWithResponse(resourceGroupName, clusterName, poolName, maintenanceEventId, body, context); + return this.client.getLroResult( + response, MaintenanceEventActionResponseInner.class, MaintenanceEventActionResponseInner.class, context); + } + + /** + * Reschedules a maintenance event to a new date and time. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @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 from a maintenance event reschedule or apply-now action on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono rescheduleAsync(String resourceGroupName, String clusterName, + String poolName, String maintenanceEventId, MaintenanceEventRescheduleRequest body) { + return beginRescheduleAsync(resourceGroupName, clusterName, poolName, maintenanceEventId, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Reschedules a maintenance event to a new date and time. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @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 from a maintenance event reschedule or apply-now action. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MaintenanceEventActionResponseInner reschedule(String resourceGroupName, String clusterName, String poolName, + String maintenanceEventId, MaintenanceEventRescheduleRequest body) { + return beginReschedule(resourceGroupName, clusterName, poolName, maintenanceEventId, body).getFinalResult(); + } + + /** + * Reschedules a maintenance event to a new date and time. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @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 from a maintenance event reschedule or apply-now action. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MaintenanceEventActionResponseInner reschedule(String resourceGroupName, String clusterName, String poolName, + String maintenanceEventId, MaintenanceEventRescheduleRequest body, Context context) { + return beginReschedule(resourceGroupName, clusterName, poolName, maintenanceEventId, body, context) + .getFinalResult(); + } + + /** + * Applies the maintenance event immediately. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from a maintenance event reschedule or apply-now action along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> applyNowWithResponseAsync(String resourceGroupName, String clusterName, + String poolName, String maintenanceEventId) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.applyNow(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, maintenanceEventId, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Applies the maintenance event immediately. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from a maintenance event reschedule or apply-now action along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response applyNowWithResponse(String resourceGroupName, String clusterName, String poolName, + String maintenanceEventId) { + final String accept = "application/json"; + return service.applyNowSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, maintenanceEventId, accept, + Context.NONE); + } + + /** + * Applies the maintenance event immediately. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from a maintenance event reschedule or apply-now action along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response applyNowWithResponse(String resourceGroupName, String clusterName, String poolName, + String maintenanceEventId, Context context) { + final String accept = "application/json"; + return service.applyNowSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, maintenanceEventId, accept, + context); + } + + /** + * Applies the maintenance event immediately. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the response from a maintenance event reschedule or apply-now + * action. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, MaintenanceEventActionResponseInner> + beginApplyNowAsync(String resourceGroupName, String clusterName, String poolName, String maintenanceEventId) { + Mono>> mono + = applyNowWithResponseAsync(resourceGroupName, clusterName, poolName, maintenanceEventId); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), MaintenanceEventActionResponseInner.class, + MaintenanceEventActionResponseInner.class, this.client.getContext()); + } + + /** + * Applies the maintenance event immediately. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the response from a maintenance event reschedule or apply-now + * action. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MaintenanceEventActionResponseInner> + beginApplyNow(String resourceGroupName, String clusterName, String poolName, String maintenanceEventId) { + Response response + = applyNowWithResponse(resourceGroupName, clusterName, poolName, maintenanceEventId); + return this.client.getLroResult( + response, MaintenanceEventActionResponseInner.class, MaintenanceEventActionResponseInner.class, + Context.NONE); + } + + /** + * Applies the maintenance event immediately. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the response from a maintenance event reschedule or apply-now + * action. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MaintenanceEventActionResponseInner> + beginApplyNow(String resourceGroupName, String clusterName, String poolName, String maintenanceEventId, + Context context) { + Response response + = applyNowWithResponse(resourceGroupName, clusterName, poolName, maintenanceEventId, context); + return this.client.getLroResult( + response, MaintenanceEventActionResponseInner.class, MaintenanceEventActionResponseInner.class, context); + } + + /** + * Applies the maintenance event immediately. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from a maintenance event reschedule or apply-now action on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono applyNowAsync(String resourceGroupName, String clusterName, + String poolName, String maintenanceEventId) { + return beginApplyNowAsync(resourceGroupName, clusterName, poolName, maintenanceEventId).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Applies the maintenance event immediately. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from a maintenance event reschedule or apply-now action. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MaintenanceEventActionResponseInner applyNow(String resourceGroupName, String clusterName, String poolName, + String maintenanceEventId) { + return beginApplyNow(resourceGroupName, clusterName, poolName, maintenanceEventId).getFinalResult(); + } + + /** + * Applies the maintenance event immediately. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from a maintenance event reschedule or apply-now action. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MaintenanceEventActionResponseInner applyNow(String resourceGroupName, String clusterName, String poolName, + String maintenanceEventId, Context context) { + return beginApplyNow(resourceGroupName, clusterName, poolName, maintenanceEventId, context).getFinalResult(); + } + + /** + * 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 MaintenanceEvent 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 MaintenanceEvent 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 MaintenanceEvent 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/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/MaintenanceEventsImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/MaintenanceEventsImpl.java new file mode 100644 index 0000000000000..fd67ad002261a --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/MaintenanceEventsImpl.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.horizondb.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.horizondb.fluent.MaintenanceEventsClient; +import com.azure.resourcemanager.horizondb.fluent.models.MaintenanceEventActionResponseInner; +import com.azure.resourcemanager.horizondb.fluent.models.MaintenanceEventInner; +import com.azure.resourcemanager.horizondb.models.MaintenanceEvent; +import com.azure.resourcemanager.horizondb.models.MaintenanceEventActionResponse; +import com.azure.resourcemanager.horizondb.models.MaintenanceEventRescheduleRequest; +import com.azure.resourcemanager.horizondb.models.MaintenanceEvents; + +public final class MaintenanceEventsImpl implements MaintenanceEvents { + private static final ClientLogger LOGGER = new ClientLogger(MaintenanceEventsImpl.class); + + private final MaintenanceEventsClient innerClient; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + public MaintenanceEventsImpl(MaintenanceEventsClient innerClient, + com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String clusterName, String poolName, + String maintenanceEventId, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, clusterName, poolName, maintenanceEventId, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new MaintenanceEventImpl(inner.getValue(), this.manager())); + } + + public MaintenanceEvent get(String resourceGroupName, String clusterName, String poolName, + String maintenanceEventId) { + MaintenanceEventInner inner + = this.serviceClient().get(resourceGroupName, clusterName, poolName, maintenanceEventId); + if (inner != null) { + return new MaintenanceEventImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list(String resourceGroupName, String clusterName, String poolName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, clusterName, poolName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MaintenanceEventImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String clusterName, String poolName, + String filter, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, clusterName, poolName, filter, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MaintenanceEventImpl(inner1, this.manager())); + } + + public MaintenanceEventActionResponse reschedule(String resourceGroupName, String clusterName, String poolName, + String maintenanceEventId, MaintenanceEventRescheduleRequest body) { + MaintenanceEventActionResponseInner inner + = this.serviceClient().reschedule(resourceGroupName, clusterName, poolName, maintenanceEventId, body); + if (inner != null) { + return new MaintenanceEventActionResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public MaintenanceEventActionResponse reschedule(String resourceGroupName, String clusterName, String poolName, + String maintenanceEventId, MaintenanceEventRescheduleRequest body, Context context) { + MaintenanceEventActionResponseInner inner = this.serviceClient() + .reschedule(resourceGroupName, clusterName, poolName, maintenanceEventId, body, context); + if (inner != null) { + return new MaintenanceEventActionResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public MaintenanceEventActionResponse applyNow(String resourceGroupName, String clusterName, String poolName, + String maintenanceEventId) { + MaintenanceEventActionResponseInner inner + = this.serviceClient().applyNow(resourceGroupName, clusterName, poolName, maintenanceEventId); + if (inner != null) { + return new MaintenanceEventActionResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public MaintenanceEventActionResponse applyNow(String resourceGroupName, String clusterName, String poolName, + String maintenanceEventId, Context context) { + MaintenanceEventActionResponseInner inner + = this.serviceClient().applyNow(resourceGroupName, clusterName, poolName, maintenanceEventId, context); + if (inner != null) { + return new MaintenanceEventActionResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + private MaintenanceEventsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/MicrosoftEntraAdministratorImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/MicrosoftEntraAdministratorImpl.java new file mode 100644 index 0000000000000..cb912e9e227fb --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/MicrosoftEntraAdministratorImpl.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.horizondb.fluent.models.MicrosoftEntraAdministratorInner; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAdministrator; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAdministratorAdd; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAdministratorProperties; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAdministratorPropertiesForAdd; + +public final class MicrosoftEntraAdministratorImpl + implements MicrosoftEntraAdministrator, MicrosoftEntraAdministrator.Definition { + private MicrosoftEntraAdministratorInner innerObject; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + MicrosoftEntraAdministratorImpl(MicrosoftEntraAdministratorInner innerObject, + com.azure.resourcemanager.horizondb.HorizonDbManager 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 MicrosoftEntraAdministratorProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public MicrosoftEntraAdministratorInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String clusterName; + + private String objectId; + + private MicrosoftEntraAdministratorAdd createResource; + + public MicrosoftEntraAdministratorImpl withExistingCluster(String resourceGroupName, String clusterName) { + this.resourceGroupName = resourceGroupName; + this.clusterName = clusterName; + return this; + } + + public MicrosoftEntraAdministrator create() { + this.innerObject = serviceManager.serviceClient() + .getMicrosoftEntraAdministrators() + .createOrReplace(resourceGroupName, clusterName, objectId, createResource, Context.NONE); + return this; + } + + public MicrosoftEntraAdministrator create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getMicrosoftEntraAdministrators() + .createOrReplace(resourceGroupName, clusterName, objectId, createResource, context); + return this; + } + + MicrosoftEntraAdministratorImpl(String name, com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.serviceManager = serviceManager; + this.objectId = name; + this.createResource = new MicrosoftEntraAdministratorAdd(); + } + + public MicrosoftEntraAdministrator refresh() { + this.innerObject = serviceManager.serviceClient() + .getMicrosoftEntraAdministrators() + .getWithResponse(resourceGroupName, clusterName, objectId, Context.NONE) + .getValue(); + return this; + } + + public MicrosoftEntraAdministrator refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getMicrosoftEntraAdministrators() + .getWithResponse(resourceGroupName, clusterName, objectId, context) + .getValue(); + return this; + } + + public MicrosoftEntraAdministratorImpl withProperties(MicrosoftEntraAdministratorPropertiesForAdd properties) { + this.createResource.withProperties(properties); + return this; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbAdministratorsClientImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/MicrosoftEntraAdministratorsClientImpl.java similarity index 65% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbAdministratorsClientImpl.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/MicrosoftEntraAdministratorsClientImpl.java index 3ae62b0c7ba57..d821e2e87baea 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbAdministratorsClientImpl.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/MicrosoftEntraAdministratorsClientImpl.java @@ -32,22 +32,22 @@ import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.horizondb.fluent.HorizonDbAdministratorsClient; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbAdministratorInner; -import com.azure.resourcemanager.horizondb.implementation.models.HorizonDbAdministratorListResult; -import com.azure.resourcemanager.horizondb.models.HorizonDbAdministratorAdd; +import com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAdministratorsClient; +import com.azure.resourcemanager.horizondb.fluent.models.MicrosoftEntraAdministratorInner; +import com.azure.resourcemanager.horizondb.implementation.models.MicrosoftEntraAdministratorListResult; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAdministratorAdd; 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 HorizonDbAdministratorsClient. + * An instance of this class provides access to all the operations defined in MicrosoftEntraAdministratorsClient. */ -public final class HorizonDbAdministratorsClientImpl implements HorizonDbAdministratorsClient { +public final class MicrosoftEntraAdministratorsClientImpl implements MicrosoftEntraAdministratorsClient { /** * The proxy service used to perform REST calls. */ - private final HorizonDbAdministratorsService service; + private final MicrosoftEntraAdministratorsService service; /** * The service client containing this operation class. @@ -55,63 +55,63 @@ public final class HorizonDbAdministratorsClientImpl implements HorizonDbAdminis private final HorizonDbManagementClientImpl client; /** - * Initializes an instance of HorizonDbAdministratorsClientImpl. + * Initializes an instance of MicrosoftEntraAdministratorsClientImpl. * * @param client the instance of the service client containing this operation class. */ - HorizonDbAdministratorsClientImpl(HorizonDbManagementClientImpl client) { - this.service = RestProxy.create(HorizonDbAdministratorsService.class, client.getHttpPipeline(), + MicrosoftEntraAdministratorsClientImpl(HorizonDbManagementClientImpl client) { + this.service = RestProxy.create(MicrosoftEntraAdministratorsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for HorizonDbManagementClientHorizonDbAdministrators to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for HorizonDbManagementClientMicrosoftEntraAdministrators to be used by + * the proxy service to perform REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "HorizonDbManagementClientHorizonDbAdministrators") - public interface HorizonDbAdministratorsService { + @ServiceInterface(name = "HorizonDbManagementClientMicrosoftEntraAdministrators") + public interface MicrosoftEntraAdministratorsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/administrators/{objectId}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/microsoftEntraAdministrators/{objectId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") 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, @PathParam("objectId") String objectId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/administrators/{objectId}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/microsoftEntraAdministrators/{objectId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") 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("objectId") String objectId, @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/administrators/{objectId}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/microsoftEntraAdministrators/{objectId}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + Mono>> createOrReplace(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("objectId") String objectId, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") HorizonDbAdministratorAdd resource, - Context context); + @HeaderParam("Accept") String accept, + @BodyParam("application/json") MicrosoftEntraAdministratorAdd resource, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/administrators/{objectId}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/microsoftEntraAdministrators/{objectId}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + Response createOrReplaceSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("objectId") String objectId, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") HorizonDbAdministratorAdd resource, - Context context); + @HeaderParam("Accept") String accept, + @BodyParam("application/json") MicrosoftEntraAdministratorAdd resource, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/administrators/{objectId}") + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/microsoftEntraAdministrators/{objectId}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete(@HostParam("endpoint") String endpoint, @@ -120,7 +120,7 @@ Mono>> delete(@HostParam("endpoint") String endpoint, @PathParam("objectId") String objectId, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/administrators/{objectId}") + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/microsoftEntraAdministrators/{objectId}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Response deleteSync(@HostParam("endpoint") String endpoint, @@ -129,19 +129,19 @@ Response deleteSync(@HostParam("endpoint") String endpoint, @PathParam("objectId") String objectId, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/administrators") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/microsoftEntraAdministrators") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/administrators") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/microsoftEntraAdministrators") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, + Response listSync(@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); @@ -150,7 +150,7 @@ Response listSync(@HostParam("endpoint") Strin @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( + Mono> listNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -158,25 +158,27 @@ Mono> listNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync( + Response listNextSync( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets information about a HorizonDB administrator. + * Gets information about a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB administrator along with {@link Response} on successful completion of - * {@link Mono}. + * @return information about a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, + public Mono> getWithResponseAsync(String resourceGroupName, String clusterName, String objectId) { final String accept = "application/json"; return FluxUtil @@ -186,36 +188,43 @@ public Mono> getWithResponseAsync(String r } /** - * Gets information about a HorizonDB administrator. + * Gets information about a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB administrator on successful completion of {@link Mono}. + * @return information about a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String clusterName, String objectId) { + public Mono getAsync(String resourceGroupName, String clusterName, + String objectId) { return getWithResponseAsync(resourceGroupName, clusterName, objectId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets information about a HorizonDB administrator. + * Gets information about a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB administrator along with {@link Response}. + * @return information about a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String clusterName, + public Response getWithResponse(String resourceGroupName, String clusterName, String objectId, Context context) { final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), @@ -223,222 +232,250 @@ public Response getWithResponse(String resourceGrou } /** - * Gets information about a HorizonDB administrator. + * Gets information about a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB administrator. + * @return information about a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HorizonDbAdministratorInner get(String resourceGroupName, String clusterName, String objectId) { + public MicrosoftEntraAdministratorInner get(String resourceGroupName, String clusterName, String objectId) { return getWithResponse(resourceGroupName, clusterName, objectId, Context.NONE).getValue(); } /** - * Creates a new HorizonDB administrator or updates an existing administrator. + * Creates or replaces a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @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 represents an Entra ID administrator configured on a HorizonDB cluster along with {@link Response} on - * successful completion of {@link Mono}. + * @return represents a PostgreSQL role that is a member of the azure_pg_admin role and is mapped to a Microsoft + * Entra principal along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String clusterName, String objectId, HorizonDbAdministratorAdd resource) { + public Mono>> createOrReplaceWithResponseAsync(String resourceGroupName, + String clusterName, String objectId, MicrosoftEntraAdministratorAdd resource) { final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.createOrReplace(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, objectId, contentType, accept, resource, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates a new HorizonDB administrator or updates an existing administrator. + * Creates or replaces a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @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 represents an Entra ID administrator configured on a HorizonDB cluster along with {@link Response}. + * @return represents a PostgreSQL role that is a member of the azure_pg_admin role and is mapped to a Microsoft + * Entra principal along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String clusterName, - String objectId, HorizonDbAdministratorAdd resource) { + private Response createOrReplaceWithResponse(String resourceGroupName, String clusterName, + String objectId, MicrosoftEntraAdministratorAdd resource) { final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + return service.createOrReplaceSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, objectId, contentType, accept, resource, Context.NONE); } /** - * Creates a new HorizonDB administrator or updates an existing administrator. + * Creates or replaces a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @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 represents an Entra ID administrator configured on a HorizonDB cluster along with {@link Response}. + * @return represents a PostgreSQL role that is a member of the azure_pg_admin role and is mapped to a Microsoft + * Entra principal along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String clusterName, - String objectId, HorizonDbAdministratorAdd resource, Context context) { + private Response createOrReplaceWithResponse(String resourceGroupName, String clusterName, + String objectId, MicrosoftEntraAdministratorAdd resource, Context context) { final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + return service.createOrReplaceSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, objectId, contentType, accept, resource, context); } /** - * Creates a new HorizonDB administrator or updates an existing administrator. + * Creates or replaces a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @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 represents an Entra ID administrator configured on a HorizonDB - * cluster. + * @return the {@link PollerFlux} for polling of represents a PostgreSQL role that is a member of the azure_pg_admin + * role and is mapped to a Microsoft Entra principal. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, HorizonDbAdministratorInner> beginCreateOrUpdateAsync( - String resourceGroupName, String clusterName, String objectId, HorizonDbAdministratorAdd resource) { + public PollerFlux, MicrosoftEntraAdministratorInner> + beginCreateOrReplaceAsync(String resourceGroupName, String clusterName, String objectId, + MicrosoftEntraAdministratorAdd resource) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, objectId, resource); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), HorizonDbAdministratorInner.class, HorizonDbAdministratorInner.class, - this.client.getContext()); + = createOrReplaceWithResponseAsync(resourceGroupName, clusterName, objectId, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), MicrosoftEntraAdministratorInner.class, + MicrosoftEntraAdministratorInner.class, this.client.getContext()); } /** - * Creates a new HorizonDB administrator or updates an existing administrator. + * Creates or replaces a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @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 represents an Entra ID administrator configured on a HorizonDB - * cluster. + * @return the {@link SyncPoller} for polling of represents a PostgreSQL role that is a member of the azure_pg_admin + * role and is mapped to a Microsoft Entra principal. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, HorizonDbAdministratorInner> beginCreateOrUpdate( - String resourceGroupName, String clusterName, String objectId, HorizonDbAdministratorAdd resource) { - Response response = createOrUpdateWithResponse(resourceGroupName, clusterName, objectId, resource); - return this.client.getLroResult(response, - HorizonDbAdministratorInner.class, HorizonDbAdministratorInner.class, Context.NONE); + public SyncPoller, MicrosoftEntraAdministratorInner> + beginCreateOrReplace(String resourceGroupName, String clusterName, String objectId, + MicrosoftEntraAdministratorAdd resource) { + Response response = createOrReplaceWithResponse(resourceGroupName, clusterName, objectId, resource); + return this.client.getLroResult(response, + MicrosoftEntraAdministratorInner.class, MicrosoftEntraAdministratorInner.class, Context.NONE); } /** - * Creates a new HorizonDB administrator or updates an existing administrator. + * Creates or replaces a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @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 represents an Entra ID administrator configured on a HorizonDB - * cluster. + * @return the {@link SyncPoller} for polling of represents a PostgreSQL role that is a member of the azure_pg_admin + * role and is mapped to a Microsoft Entra principal. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, HorizonDbAdministratorInner> beginCreateOrUpdate( - String resourceGroupName, String clusterName, String objectId, HorizonDbAdministratorAdd resource, - Context context) { + public SyncPoller, MicrosoftEntraAdministratorInner> + beginCreateOrReplace(String resourceGroupName, String clusterName, String objectId, + MicrosoftEntraAdministratorAdd resource, Context context) { Response response - = createOrUpdateWithResponse(resourceGroupName, clusterName, objectId, resource, context); - return this.client.getLroResult(response, - HorizonDbAdministratorInner.class, HorizonDbAdministratorInner.class, context); + = createOrReplaceWithResponse(resourceGroupName, clusterName, objectId, resource, context); + return this.client.getLroResult(response, + MicrosoftEntraAdministratorInner.class, MicrosoftEntraAdministratorInner.class, context); } /** - * Creates a new HorizonDB administrator or updates an existing administrator. + * Creates or replaces a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @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 represents an Entra ID administrator configured on a HorizonDB cluster on successful completion of - * {@link Mono}. + * @return represents a PostgreSQL role that is a member of the azure_pg_admin role and is mapped to a Microsoft + * Entra principal on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String clusterName, - String objectId, HorizonDbAdministratorAdd resource) { - return beginCreateOrUpdateAsync(resourceGroupName, clusterName, objectId, resource).last() + public Mono createOrReplaceAsync(String resourceGroupName, String clusterName, + String objectId, MicrosoftEntraAdministratorAdd resource) { + return beginCreateOrReplaceAsync(resourceGroupName, clusterName, objectId, resource).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Creates a new HorizonDB administrator or updates an existing administrator. + * Creates or replaces a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @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 represents an Entra ID administrator configured on a HorizonDB cluster. + * @return represents a PostgreSQL role that is a member of the azure_pg_admin role and is mapped to a Microsoft + * Entra principal. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HorizonDbAdministratorInner createOrUpdate(String resourceGroupName, String clusterName, String objectId, - HorizonDbAdministratorAdd resource) { - return beginCreateOrUpdate(resourceGroupName, clusterName, objectId, resource).getFinalResult(); + public MicrosoftEntraAdministratorInner createOrReplace(String resourceGroupName, String clusterName, + String objectId, MicrosoftEntraAdministratorAdd resource) { + return beginCreateOrReplace(resourceGroupName, clusterName, objectId, resource).getFinalResult(); } /** - * Creates a new HorizonDB administrator or updates an existing administrator. + * Creates or replaces a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @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 represents an Entra ID administrator configured on a HorizonDB cluster. + * @return represents a PostgreSQL role that is a member of the azure_pg_admin role and is mapped to a Microsoft + * Entra principal. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HorizonDbAdministratorInner createOrUpdate(String resourceGroupName, String clusterName, String objectId, - HorizonDbAdministratorAdd resource, Context context) { - return beginCreateOrUpdate(resourceGroupName, clusterName, objectId, resource, context).getFinalResult(); + public MicrosoftEntraAdministratorInner createOrReplace(String resourceGroupName, String clusterName, + String objectId, MicrosoftEntraAdministratorAdd resource, Context context) { + return beginCreateOrReplace(resourceGroupName, clusterName, objectId, resource, context).getFinalResult(); } /** - * Deletes a HorizonDB administrator. + * Deletes a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -454,11 +491,12 @@ public Mono>> deleteWithResponseAsync(String resourceG } /** - * Deletes a HorizonDB administrator. + * Deletes a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -471,11 +509,12 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes a HorizonDB administrator. + * Deletes a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -490,11 +529,12 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes a HorizonDB administrator. + * Deletes a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -509,11 +549,12 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN } /** - * Deletes a HorizonDB administrator. + * Deletes a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -527,11 +568,12 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a HorizonDB administrator. + * Deletes a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -546,11 +588,12 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a HorizonDB administrator. + * Deletes a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -563,11 +606,12 @@ public Mono deleteAsync(String resourceGroupName, String clusterName, Stri } /** - * Deletes a HorizonDB administrator. + * Deletes a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -578,11 +622,12 @@ public void delete(String resourceGroupName, String clusterName, String objectId } /** - * Deletes a HorizonDB administrator. + * Deletes a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -594,58 +639,63 @@ public void delete(String resourceGroupName, String clusterName, String objectId } /** - * Lists all HorizonDB administrators in a cluster. + * Lists the PostgreSQL roles in a cluster that are members of azure_pg_admin and mapped to Microsoft Entra + * principals. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB 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 HorizonDbAdministrator list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a MicrosoftEntraAdministrator list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, + 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(), + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists all HorizonDB administrators in a cluster. + * Lists the PostgreSQL roles in a cluster that are members of azure_pg_admin and mapped to Microsoft Entra + * principals. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB 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 HorizonDbAdministrator list operation as paginated response with {@link PagedFlux}. + * @return the response of a MicrosoftEntraAdministrator list operation as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String clusterName) { + public PagedFlux listAsync(String resourceGroupName, String clusterName) { return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Lists all HorizonDB administrators in a cluster. + * Lists the PostgreSQL roles in a cluster that are members of azure_pg_admin and mapped to Microsoft Entra + * principals. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB 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 HorizonDbAdministrator list operation along with {@link PagedResponse}. + * @return the response of a MicrosoftEntraAdministrator list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String clusterName) { + private PagedResponse listSinglePage(String resourceGroupName, + String clusterName) { final String accept = "application/json"; - Response res + 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(), @@ -653,7 +703,8 @@ private PagedResponse listSinglePage(String resourc } /** - * Lists all HorizonDB administrators in a cluster. + * Lists the PostgreSQL roles in a cluster that are members of azure_pg_admin and mapped to Microsoft Entra + * principals. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -661,13 +712,13 @@ private PagedResponse listSinglePage(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 response of a HorizonDbAdministrator list operation along with {@link PagedResponse}. + * @return the response of a MicrosoftEntraAdministrator list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String clusterName, + private PagedResponse listSinglePage(String resourceGroupName, String clusterName, Context context) { final String accept = "application/json"; - Response res + 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(), @@ -675,23 +726,26 @@ private PagedResponse listSinglePage(String resourc } /** - * Lists all HorizonDB administrators in a cluster. + * Lists the PostgreSQL roles in a cluster that are members of azure_pg_admin and mapped to Microsoft Entra + * principals. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB 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 HorizonDbAdministrator list operation as paginated response with {@link PagedIterable}. + * @return the response of a MicrosoftEntraAdministrator list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String clusterName) { + public PagedIterable list(String resourceGroupName, String clusterName) { return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName), nextLink -> listNextSinglePage(nextLink)); } /** - * Lists all HorizonDB administrators in a cluster. + * Lists the PostgreSQL roles in a cluster that are members of azure_pg_admin and mapped to Microsoft Entra + * principals. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -699,10 +753,11 @@ public PagedIterable list(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbAdministrator list operation as paginated response with {@link PagedIterable}. + * @return the response of a MicrosoftEntraAdministrator list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String clusterName, + public PagedIterable list(String resourceGroupName, String clusterName, Context context) { return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName, context), nextLink -> listNextSinglePage(nextLink, context)); @@ -715,14 +770,14 @@ public PagedIterable list(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbAdministrator list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a MicrosoftEntraAdministrator list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + 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(), + .>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())); } @@ -734,12 +789,12 @@ private Mono> listNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbAdministrator list operation along with {@link PagedResponse}. + * @return the response of a MicrosoftEntraAdministrator list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { + private PagedResponse listNextSinglePage(String nextLink) { final String accept = "application/json"; - Response res + 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); @@ -753,12 +808,12 @@ private PagedResponse listNextSinglePage(String nex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbAdministrator list operation along with {@link PagedResponse}. + * @return the response of a MicrosoftEntraAdministrator list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { + private PagedResponse listNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - Response res + 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/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbAdministratorsImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/MicrosoftEntraAdministratorsImpl.java similarity index 65% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbAdministratorsImpl.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/MicrosoftEntraAdministratorsImpl.java index 9aca7f7621b36..bd2de89ca8a93 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbAdministratorsImpl.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/MicrosoftEntraAdministratorsImpl.java @@ -9,36 +9,36 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.horizondb.fluent.HorizonDbAdministratorsClient; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbAdministratorInner; -import com.azure.resourcemanager.horizondb.models.HorizonDbAdministrator; -import com.azure.resourcemanager.horizondb.models.HorizonDbAdministrators; +import com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAdministratorsClient; +import com.azure.resourcemanager.horizondb.fluent.models.MicrosoftEntraAdministratorInner; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAdministrator; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAdministrators; -public final class HorizonDbAdministratorsImpl implements HorizonDbAdministrators { - private static final ClientLogger LOGGER = new ClientLogger(HorizonDbAdministratorsImpl.class); +public final class MicrosoftEntraAdministratorsImpl implements MicrosoftEntraAdministrators { + private static final ClientLogger LOGGER = new ClientLogger(MicrosoftEntraAdministratorsImpl.class); - private final HorizonDbAdministratorsClient innerClient; + private final MicrosoftEntraAdministratorsClient innerClient; private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; - public HorizonDbAdministratorsImpl(HorizonDbAdministratorsClient innerClient, + public MicrosoftEntraAdministratorsImpl(MicrosoftEntraAdministratorsClient innerClient, com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getWithResponse(String resourceGroupName, String clusterName, + public Response getWithResponse(String resourceGroupName, String clusterName, String objectId, Context context) { - Response inner + Response inner = this.serviceClient().getWithResponse(resourceGroupName, clusterName, objectId, context); return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new HorizonDbAdministratorImpl(inner.getValue(), this.manager())); + new MicrosoftEntraAdministratorImpl(inner.getValue(), this.manager())); } - public HorizonDbAdministrator get(String resourceGroupName, String clusterName, String objectId) { - HorizonDbAdministratorInner inner = this.serviceClient().get(resourceGroupName, clusterName, objectId); + public MicrosoftEntraAdministrator get(String resourceGroupName, String clusterName, String objectId) { + MicrosoftEntraAdministratorInner inner = this.serviceClient().get(resourceGroupName, clusterName, objectId); if (inner != null) { - return new HorizonDbAdministratorImpl(inner, this.manager()); + return new MicrosoftEntraAdministratorImpl(inner, this.manager()); } else { return null; } @@ -52,18 +52,22 @@ public void delete(String resourceGroupName, String clusterName, String objectId this.serviceClient().delete(resourceGroupName, clusterName, objectId, context); } - public PagedIterable list(String resourceGroupName, String clusterName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new HorizonDbAdministratorImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String clusterName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, clusterName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new MicrosoftEntraAdministratorImpl(inner1, this.manager())); } - public PagedIterable list(String resourceGroupName, String clusterName, Context context) { - PagedIterable inner + public PagedIterable list(String resourceGroupName, String clusterName, + Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new HorizonDbAdministratorImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new MicrosoftEntraAdministratorImpl(inner1, this.manager())); } - public HorizonDbAdministrator getById(String id) { + public MicrosoftEntraAdministrator getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -74,15 +78,15 @@ public HorizonDbAdministrator getById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } - String objectId = ResourceManagerUtils.getValueFromIdByName(id, "administrators"); + String objectId = ResourceManagerUtils.getValueFromIdByName(id, "microsoftEntraAdministrators"); if (objectId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'administrators'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( + "The resource ID '%s' is not valid. Missing path segment 'microsoftEntraAdministrators'.", id))); } return this.getWithResponse(resourceGroupName, clusterName, objectId, Context.NONE).getValue(); } - public Response getByIdWithResponse(String id, Context context) { + public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -93,10 +97,10 @@ public Response getByIdWithResponse(String id, Context c throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } - String objectId = ResourceManagerUtils.getValueFromIdByName(id, "administrators"); + String objectId = ResourceManagerUtils.getValueFromIdByName(id, "microsoftEntraAdministrators"); if (objectId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'administrators'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( + "The resource ID '%s' is not valid. Missing path segment 'microsoftEntraAdministrators'.", id))); } return this.getWithResponse(resourceGroupName, clusterName, objectId, context); } @@ -112,10 +116,10 @@ public void deleteById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } - String objectId = ResourceManagerUtils.getValueFromIdByName(id, "administrators"); + String objectId = ResourceManagerUtils.getValueFromIdByName(id, "microsoftEntraAdministrators"); if (objectId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'administrators'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( + "The resource ID '%s' is not valid. Missing path segment 'microsoftEntraAdministrators'.", id))); } this.delete(resourceGroupName, clusterName, objectId, Context.NONE); } @@ -131,15 +135,15 @@ public void deleteByIdWithResponse(String id, Context context) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } - String objectId = ResourceManagerUtils.getValueFromIdByName(id, "administrators"); + String objectId = ResourceManagerUtils.getValueFromIdByName(id, "microsoftEntraAdministrators"); if (objectId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'administrators'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format( + "The resource ID '%s' is not valid. Missing path segment 'microsoftEntraAdministrators'.", id))); } this.delete(resourceGroupName, clusterName, objectId, context); } - private HorizonDbAdministratorsClient serviceClient() { + private MicrosoftEntraAdministratorsClient serviceClient() { return this.innerClient; } @@ -147,7 +151,7 @@ private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { return this.serviceManager; } - public HorizonDbAdministratorImpl define(String name) { - return new HorizonDbAdministratorImpl(name, this.manager()); + public MicrosoftEntraAdministratorImpl define(String name) { + return new MicrosoftEntraAdministratorImpl(name, this.manager()); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/MicrosoftEntraAuthenticationImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/MicrosoftEntraAuthenticationImpl.java new file mode 100644 index 0000000000000..ff6daf5225de9 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/MicrosoftEntraAuthenticationImpl.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.horizondb.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.horizondb.fluent.models.MicrosoftEntraAuthenticationInner; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAuthentication; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAuthenticationProperties; + +public final class MicrosoftEntraAuthenticationImpl implements MicrosoftEntraAuthentication { + private MicrosoftEntraAuthenticationInner innerObject; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + MicrosoftEntraAuthenticationImpl(MicrosoftEntraAuthenticationInner innerObject, + com.azure.resourcemanager.horizondb.HorizonDbManager 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 MicrosoftEntraAuthenticationProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public MicrosoftEntraAuthenticationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/MicrosoftEntraAuthenticationsClientImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/MicrosoftEntraAuthenticationsClientImpl.java new file mode 100644 index 0000000000000..12be1a4ed27ee --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/MicrosoftEntraAuthenticationsClientImpl.java @@ -0,0 +1,619 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.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.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.horizondb.fluent.MicrosoftEntraAuthenticationsClient; +import com.azure.resourcemanager.horizondb.fluent.models.MicrosoftEntraAuthenticationInner; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAuthenticationForPatchUpdate; +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 MicrosoftEntraAuthenticationsClient. + */ +public final class MicrosoftEntraAuthenticationsClientImpl implements MicrosoftEntraAuthenticationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final MicrosoftEntraAuthenticationsService service; + + /** + * The service client containing this operation class. + */ + private final HorizonDbManagementClientImpl client; + + /** + * Initializes an instance of MicrosoftEntraAuthenticationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + MicrosoftEntraAuthenticationsClientImpl(HorizonDbManagementClientImpl client) { + this.service = RestProxy.create(MicrosoftEntraAuthenticationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for HorizonDbManagementClientMicrosoftEntraAuthentications to be used by + * the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "HorizonDbManagementClientMicrosoftEntraAuthentications") + public interface MicrosoftEntraAuthenticationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/authentications/microsoftEntra") + @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("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/authentications/microsoftEntra") + @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.HorizonDb/clusters/{clusterName}/authentications/microsoftEntra") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrReplace(@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") MicrosoftEntraAuthenticationInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/authentications/microsoftEntra") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrReplaceSync(@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") MicrosoftEntraAuthenticationInner resource, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/authentications/microsoftEntra") + @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("clusterName") String clusterName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") MicrosoftEntraAuthenticationForPatchUpdate properties, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/authentications/microsoftEntra") + @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, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") MicrosoftEntraAuthenticationForPatchUpdate properties, Context context); + } + + /** + * Gets the service-created Microsoft Entra authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 service-created Microsoft Entra authentication method along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, + String clusterName) { + final String accept = "application/json"; + return FluxUtil + .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())); + } + + /** + * Gets the service-created Microsoft Entra authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 service-created Microsoft Entra authentication method on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String clusterName) { + return getWithResponseAsync(resourceGroupName, clusterName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the service-created Microsoft Entra authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 service-created Microsoft Entra authentication method along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String clusterName, + Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, accept, context); + } + + /** + * Gets the service-created Microsoft Entra authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 service-created Microsoft Entra authentication method. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MicrosoftEntraAuthenticationInner get(String resourceGroupName, String clusterName) { + return getWithResponse(resourceGroupName, clusterName, Context.NONE).getValue(); + } + + /** + * Creates or replaces the service-created Microsoft Entra authentication method. State Enabled enables the feature + * and State Disabled disables it; no additional properties are required. Repeating the same request is idempotent. + * Disabling the feature does not remove or modify database roles or users previously created through the + * MicrosoftEntraAdministrators control-plane API or directly through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created Microsoft Entra authentication method for a HorizonDB cluster along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrReplaceWithResponseAsync(String resourceGroupName, + String clusterName, MicrosoftEntraAuthenticationInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrReplace(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, resource, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or replaces the service-created Microsoft Entra authentication method. State Enabled enables the feature + * and State Disabled disables it; no additional properties are required. Repeating the same request is idempotent. + * Disabling the feature does not remove or modify database roles or users previously created through the + * MicrosoftEntraAdministrators control-plane API or directly through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created Microsoft Entra authentication method for a HorizonDB cluster along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrReplaceWithResponse(String resourceGroupName, String clusterName, + MicrosoftEntraAuthenticationInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrReplaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, resource, + Context.NONE); + } + + /** + * Creates or replaces the service-created Microsoft Entra authentication method. State Enabled enables the feature + * and State Disabled disables it; no additional properties are required. Repeating the same request is idempotent. + * Disabling the feature does not remove or modify database roles or users previously created through the + * MicrosoftEntraAdministrators control-plane API or directly through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created Microsoft Entra authentication method for a HorizonDB cluster along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrReplaceWithResponse(String resourceGroupName, String clusterName, + MicrosoftEntraAuthenticationInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrReplaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, resource, context); + } + + /** + * Creates or replaces the service-created Microsoft Entra authentication method. State Enabled enables the feature + * and State Disabled disables it; no additional properties are required. Repeating the same request is idempotent. + * Disabling the feature does not remove or modify database roles or users previously created through the + * MicrosoftEntraAdministrators control-plane API or directly through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 the service-created Microsoft Entra authentication method for a + * HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, MicrosoftEntraAuthenticationInner> + beginCreateOrReplaceAsync(String resourceGroupName, String clusterName, + MicrosoftEntraAuthenticationInner resource) { + Mono>> mono + = createOrReplaceWithResponseAsync(resourceGroupName, clusterName, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), MicrosoftEntraAuthenticationInner.class, + MicrosoftEntraAuthenticationInner.class, this.client.getContext()); + } + + /** + * Creates or replaces the service-created Microsoft Entra authentication method. State Enabled enables the feature + * and State Disabled disables it; no additional properties are required. Repeating the same request is idempotent. + * Disabling the feature does not remove or modify database roles or users previously created through the + * MicrosoftEntraAdministrators control-plane API or directly through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 the service-created Microsoft Entra authentication method for a + * HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MicrosoftEntraAuthenticationInner> + beginCreateOrReplace(String resourceGroupName, String clusterName, MicrosoftEntraAuthenticationInner resource) { + Response response = createOrReplaceWithResponse(resourceGroupName, clusterName, resource); + return this.client.getLroResult(response, + MicrosoftEntraAuthenticationInner.class, MicrosoftEntraAuthenticationInner.class, Context.NONE); + } + + /** + * Creates or replaces the service-created Microsoft Entra authentication method. State Enabled enables the feature + * and State Disabled disables it; no additional properties are required. Repeating the same request is idempotent. + * Disabling the feature does not remove or modify database roles or users previously created through the + * MicrosoftEntraAdministrators control-plane API or directly through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 the service-created Microsoft Entra authentication method for a + * HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MicrosoftEntraAuthenticationInner> + beginCreateOrReplace(String resourceGroupName, String clusterName, MicrosoftEntraAuthenticationInner resource, + Context context) { + Response response = createOrReplaceWithResponse(resourceGroupName, clusterName, resource, context); + return this.client.getLroResult(response, + MicrosoftEntraAuthenticationInner.class, MicrosoftEntraAuthenticationInner.class, context); + } + + /** + * Creates or replaces the service-created Microsoft Entra authentication method. State Enabled enables the feature + * and State Disabled disables it; no additional properties are required. Repeating the same request is idempotent. + * Disabling the feature does not remove or modify database roles or users previously created through the + * MicrosoftEntraAdministrators control-plane API or directly through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created Microsoft Entra authentication method for a HorizonDB cluster on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrReplaceAsync(String resourceGroupName, String clusterName, + MicrosoftEntraAuthenticationInner resource) { + return beginCreateOrReplaceAsync(resourceGroupName, clusterName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or replaces the service-created Microsoft Entra authentication method. State Enabled enables the feature + * and State Disabled disables it; no additional properties are required. Repeating the same request is idempotent. + * Disabling the feature does not remove or modify database roles or users previously created through the + * MicrosoftEntraAdministrators control-plane API or directly through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created Microsoft Entra authentication method for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MicrosoftEntraAuthenticationInner createOrReplace(String resourceGroupName, String clusterName, + MicrosoftEntraAuthenticationInner resource) { + return beginCreateOrReplace(resourceGroupName, clusterName, resource).getFinalResult(); + } + + /** + * Creates or replaces the service-created Microsoft Entra authentication method. State Enabled enables the feature + * and State Disabled disables it; no additional properties are required. Repeating the same request is idempotent. + * Disabling the feature does not remove or modify database roles or users previously created through the + * MicrosoftEntraAdministrators control-plane API or directly through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created Microsoft Entra authentication method for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MicrosoftEntraAuthenticationInner createOrReplace(String resourceGroupName, String clusterName, + MicrosoftEntraAuthenticationInner resource, Context context) { + return beginCreateOrReplace(resourceGroupName, clusterName, resource, context).getFinalResult(); + } + + /** + * Updates the service-created Microsoft Entra authentication method. State Enabled enables the feature and State + * Disabled disables it; no additional properties are required. Disabling the feature does not remove or modify + * database roles or users previously created through the MicrosoftEntraAdministrators control-plane API or directly + * through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created Microsoft Entra authentication method for a HorizonDB cluster along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, + MicrosoftEntraAuthenticationForPatchUpdate 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, clusterName, contentType, accept, properties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates the service-created Microsoft Entra authentication method. State Enabled enables the feature and State + * Disabled disables it; no additional properties are required. Disabling the feature does not remove or modify + * database roles or users previously created through the MicrosoftEntraAdministrators control-plane API or directly + * through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created Microsoft Entra authentication method for a HorizonDB cluster along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String clusterName, + MicrosoftEntraAuthenticationForPatchUpdate properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, properties, + Context.NONE); + } + + /** + * Updates the service-created Microsoft Entra authentication method. State Enabled enables the feature and State + * Disabled disables it; no additional properties are required. Disabling the feature does not remove or modify + * database roles or users previously created through the MicrosoftEntraAdministrators control-plane API or directly + * through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created Microsoft Entra authentication method for a HorizonDB cluster along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String clusterName, + MicrosoftEntraAuthenticationForPatchUpdate 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, clusterName, contentType, accept, properties, context); + } + + /** + * Updates the service-created Microsoft Entra authentication method. State Enabled enables the feature and State + * Disabled disables it; no additional properties are required. Disabling the feature does not remove or modify + * database roles or users previously created through the MicrosoftEntraAdministrators control-plane API or directly + * through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 the service-created Microsoft Entra authentication method for a + * HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, MicrosoftEntraAuthenticationInner> + beginUpdateAsync(String resourceGroupName, String clusterName, + MicrosoftEntraAuthenticationForPatchUpdate properties) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, clusterName, properties); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), MicrosoftEntraAuthenticationInner.class, + MicrosoftEntraAuthenticationInner.class, this.client.getContext()); + } + + /** + * Updates the service-created Microsoft Entra authentication method. State Enabled enables the feature and State + * Disabled disables it; no additional properties are required. Disabling the feature does not remove or modify + * database roles or users previously created through the MicrosoftEntraAdministrators control-plane API or directly + * through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 the service-created Microsoft Entra authentication method for a + * HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MicrosoftEntraAuthenticationInner> beginUpdate( + String resourceGroupName, String clusterName, MicrosoftEntraAuthenticationForPatchUpdate properties) { + Response response = updateWithResponse(resourceGroupName, clusterName, properties); + return this.client.getLroResult(response, + MicrosoftEntraAuthenticationInner.class, MicrosoftEntraAuthenticationInner.class, Context.NONE); + } + + /** + * Updates the service-created Microsoft Entra authentication method. State Enabled enables the feature and State + * Disabled disables it; no additional properties are required. Disabling the feature does not remove or modify + * database roles or users previously created through the MicrosoftEntraAdministrators control-plane API or directly + * through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 the service-created Microsoft Entra authentication method for a + * HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MicrosoftEntraAuthenticationInner> beginUpdate( + String resourceGroupName, String clusterName, MicrosoftEntraAuthenticationForPatchUpdate properties, + Context context) { + Response response = updateWithResponse(resourceGroupName, clusterName, properties, context); + return this.client.getLroResult(response, + MicrosoftEntraAuthenticationInner.class, MicrosoftEntraAuthenticationInner.class, context); + } + + /** + * Updates the service-created Microsoft Entra authentication method. State Enabled enables the feature and State + * Disabled disables it; no additional properties are required. Disabling the feature does not remove or modify + * database roles or users previously created through the MicrosoftEntraAdministrators control-plane API or directly + * through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created Microsoft Entra authentication method for a HorizonDB cluster on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync(String resourceGroupName, String clusterName, + MicrosoftEntraAuthenticationForPatchUpdate properties) { + return beginUpdateAsync(resourceGroupName, clusterName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates the service-created Microsoft Entra authentication method. State Enabled enables the feature and State + * Disabled disables it; no additional properties are required. Disabling the feature does not remove or modify + * database roles or users previously created through the MicrosoftEntraAdministrators control-plane API or directly + * through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created Microsoft Entra authentication method for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MicrosoftEntraAuthenticationInner update(String resourceGroupName, String clusterName, + MicrosoftEntraAuthenticationForPatchUpdate properties) { + return beginUpdate(resourceGroupName, clusterName, properties).getFinalResult(); + } + + /** + * Updates the service-created Microsoft Entra authentication method. State Enabled enables the feature and State + * Disabled disables it; no additional properties are required. Disabling the feature does not remove or modify + * database roles or users previously created through the MicrosoftEntraAdministrators control-plane API or directly + * through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created Microsoft Entra authentication method for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MicrosoftEntraAuthenticationInner update(String resourceGroupName, String clusterName, + MicrosoftEntraAuthenticationForPatchUpdate properties, Context context) { + return beginUpdate(resourceGroupName, clusterName, properties, context).getFinalResult(); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/MicrosoftEntraAuthenticationsImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/MicrosoftEntraAuthenticationsImpl.java new file mode 100644 index 0000000000000..1e13ac92e5f5d --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/MicrosoftEntraAuthenticationsImpl.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.horizondb.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.horizondb.fluent.MicrosoftEntraAuthenticationsClient; +import com.azure.resourcemanager.horizondb.fluent.models.MicrosoftEntraAuthenticationInner; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAuthentication; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAuthenticationForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAuthentications; + +public final class MicrosoftEntraAuthenticationsImpl implements MicrosoftEntraAuthentications { + private static final ClientLogger LOGGER = new ClientLogger(MicrosoftEntraAuthenticationsImpl.class); + + private final MicrosoftEntraAuthenticationsClient innerClient; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + public MicrosoftEntraAuthenticationsImpl(MicrosoftEntraAuthenticationsClient innerClient, + com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String clusterName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, clusterName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new MicrosoftEntraAuthenticationImpl(inner.getValue(), this.manager())); + } + + public MicrosoftEntraAuthentication get(String resourceGroupName, String clusterName) { + MicrosoftEntraAuthenticationInner inner = this.serviceClient().get(resourceGroupName, clusterName); + if (inner != null) { + return new MicrosoftEntraAuthenticationImpl(inner, this.manager()); + } else { + return null; + } + } + + public MicrosoftEntraAuthentication createOrReplace(String resourceGroupName, String clusterName, + MicrosoftEntraAuthenticationInner resource) { + MicrosoftEntraAuthenticationInner inner + = this.serviceClient().createOrReplace(resourceGroupName, clusterName, resource); + if (inner != null) { + return new MicrosoftEntraAuthenticationImpl(inner, this.manager()); + } else { + return null; + } + } + + public MicrosoftEntraAuthentication createOrReplace(String resourceGroupName, String clusterName, + MicrosoftEntraAuthenticationInner resource, Context context) { + MicrosoftEntraAuthenticationInner inner + = this.serviceClient().createOrReplace(resourceGroupName, clusterName, resource, context); + if (inner != null) { + return new MicrosoftEntraAuthenticationImpl(inner, this.manager()); + } else { + return null; + } + } + + public MicrosoftEntraAuthentication update(String resourceGroupName, String clusterName, + MicrosoftEntraAuthenticationForPatchUpdate properties) { + MicrosoftEntraAuthenticationInner inner + = this.serviceClient().update(resourceGroupName, clusterName, properties); + if (inner != null) { + return new MicrosoftEntraAuthenticationImpl(inner, this.manager()); + } else { + return null; + } + } + + public MicrosoftEntraAuthentication update(String resourceGroupName, String clusterName, + MicrosoftEntraAuthenticationForPatchUpdate properties, Context context) { + MicrosoftEntraAuthenticationInner inner + = this.serviceClient().update(resourceGroupName, clusterName, properties, context); + if (inner != null) { + return new MicrosoftEntraAuthenticationImpl(inner, this.manager()); + } else { + return null; + } + } + + private MicrosoftEntraAuthenticationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/NodeImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/NodeImpl.java new file mode 100644 index 0000000000000..fad2c4dbd66ca --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/NodeImpl.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.horizondb.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.horizondb.fluent.models.NodeInner; +import com.azure.resourcemanager.horizondb.models.Node; +import com.azure.resourcemanager.horizondb.models.NodeProperties; + +public final class NodeImpl implements Node { + private NodeInner innerObject; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + NodeImpl(NodeInner innerObject, com.azure.resourcemanager.horizondb.HorizonDbManager 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 NodeProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public NodeInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPoolsClientImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/NodesClientImpl.java similarity index 69% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPoolsClientImpl.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/NodesClientImpl.java index 37af89d01041e..d5a0e720f32ef 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPoolsClientImpl.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/NodesClientImpl.java @@ -25,19 +25,19 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.horizondb.fluent.HorizonDbPoolsClient; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbPoolInner; -import com.azure.resourcemanager.horizondb.implementation.models.HorizonDbPoolListResult; +import com.azure.resourcemanager.horizondb.fluent.NodesClient; +import com.azure.resourcemanager.horizondb.fluent.models.NodeInner; +import com.azure.resourcemanager.horizondb.implementation.models.NodeListResult; import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in HorizonDbPoolsClient. + * An instance of this class provides access to all the operations defined in NodesClient. */ -public final class HorizonDbPoolsClientImpl implements HorizonDbPoolsClient { +public final class NodesClientImpl implements NodesClient { /** * The proxy service used to perform REST calls. */ - private final HorizonDbPoolsService service; + private final NodesService service; /** * The service client containing this operation class. @@ -45,256 +45,270 @@ public final class HorizonDbPoolsClientImpl implements HorizonDbPoolsClient { private final HorizonDbManagementClientImpl client; /** - * Initializes an instance of HorizonDbPoolsClientImpl. + * Initializes an instance of NodesClientImpl. * * @param client the instance of the service client containing this operation class. */ - HorizonDbPoolsClientImpl(HorizonDbManagementClientImpl client) { - this.service - = RestProxy.create(HorizonDbPoolsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + NodesClientImpl(HorizonDbManagementClientImpl client) { + this.service = RestProxy.create(NodesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for HorizonDbManagementClientHorizonDbPools to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for HorizonDbManagementClientNodes to be used by the proxy service to + * perform REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "HorizonDbManagementClientHorizonDbPools") - public interface HorizonDbPoolsService { + @ServiceInterface(name = "HorizonDbManagementClientNodes") + public interface NodesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/nodes/{nodeName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") 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, - @PathParam("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); + @PathParam("poolName") String poolName, @PathParam("nodeName") String nodeName, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/nodes/{nodeName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") 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("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); + @PathParam("poolName") String poolName, @PathParam("nodeName") String nodeName, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/nodes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/nodes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, + Response listSync(@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("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets information about a HorizonDB pool. + * Gets a node allocated to a HorizonDB pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. + * @param nodeName The name of the Node. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB pool along with {@link Response} on successful completion of {@link Mono}. + * @return a node allocated to a HorizonDB pool along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String clusterName, - String poolName) { + public Mono> getWithResponseAsync(String resourceGroupName, String clusterName, String poolName, + String nodeName) { final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, nodeName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets information about a HorizonDB pool. + * Gets a node allocated to a HorizonDB pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. + * @param nodeName The name of the Node. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB pool on successful completion of {@link Mono}. + * @return a node allocated to a HorizonDB pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String clusterName, String poolName) { - return getWithResponseAsync(resourceGroupName, clusterName, poolName) + public Mono getAsync(String resourceGroupName, String clusterName, String poolName, String nodeName) { + return getWithResponseAsync(resourceGroupName, clusterName, poolName, nodeName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets information about a HorizonDB pool. + * Gets a node allocated to a HorizonDB pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. + * @param nodeName The name of the Node. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB pool along with {@link Response}. + * @return a node allocated to a HorizonDB pool along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String clusterName, String poolName, - Context context) { + public Response getWithResponse(String resourceGroupName, String clusterName, String poolName, + String nodeName, Context context) { final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, poolName, accept, context); + resourceGroupName, clusterName, poolName, nodeName, accept, context); } /** - * Gets information about a HorizonDB pool. + * Gets a node allocated to a HorizonDB pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. + * @param nodeName The name of the Node. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB pool. + * @return a node allocated to a HorizonDB pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HorizonDbPoolInner get(String resourceGroupName, String clusterName, String poolName) { - return getWithResponse(resourceGroupName, clusterName, poolName, Context.NONE).getValue(); + public NodeInner get(String resourceGroupName, String clusterName, String poolName, String nodeName) { + return getWithResponse(resourceGroupName, clusterName, poolName, nodeName, Context.NONE).getValue(); } /** - * Lists all HorizonDB pools in a cluster. + * Lists the nodes allocated to a HorizonDB pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbPool list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return the response of a Node list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String clusterName) { + private Mono> listSinglePageAsync(String resourceGroupName, String clusterName, + String poolName) { 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)) + this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, 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())); } /** - * Lists all HorizonDB pools in a cluster. + * Lists the nodes allocated to a HorizonDB pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbPool list operation as paginated response with {@link PagedFlux}. + * @return the response of a Node list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String clusterName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName), + public PagedFlux listAsync(String resourceGroupName, String clusterName, String poolName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName, poolName), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Lists all HorizonDB pools in a cluster. + * Lists the nodes allocated to a HorizonDB pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbPool list operation along with {@link PagedResponse}. + * @return the response of a Node list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String clusterName) { + private PagedResponse listSinglePage(String resourceGroupName, String clusterName, String poolName) { final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, Context.NONE); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * Lists all HorizonDB pools in a cluster. + * Lists the nodes allocated to a HorizonDB pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbPool list operation along with {@link PagedResponse}. + * @return the response of a Node list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, String clusterName, + private PagedResponse listSinglePage(String resourceGroupName, String clusterName, String poolName, Context context) { final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * Lists all HorizonDB pools in a cluster. + * Lists the nodes allocated to a HorizonDB pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbPool list operation as paginated response with {@link PagedIterable}. + * @return the response of a Node list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String clusterName) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName), + public PagedIterable list(String resourceGroupName, String clusterName, String poolName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName, poolName), nextLink -> listNextSinglePage(nextLink)); } /** - * Lists all HorizonDB pools in a cluster. + * Lists the nodes allocated to a HorizonDB pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbPool list operation as paginated response with {@link PagedIterable}. + * @return the response of a Node list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String clusterName, Context context) { - return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName, context), + public PagedIterable list(String resourceGroupName, String clusterName, String poolName, + Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName, poolName, context), nextLink -> listNextSinglePage(nextLink, context)); } @@ -305,15 +319,15 @@ public PagedIterable list(String resourceGroupName, String c * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbPool list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return the response of a Node list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + 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)) + .>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())); } @@ -324,13 +338,12 @@ private Mono> listNextSinglePageAsync(String n * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbPool list operation along with {@link PagedResponse}. + * @return the response of a Node list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { + private PagedResponse listNextSinglePage(String nextLink) { final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + 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); } @@ -343,13 +356,12 @@ private PagedResponse listNextSinglePage(String nextLink) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbPool list operation along with {@link PagedResponse}. + * @return the response of a Node list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { + private PagedResponse listNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + 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/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/NodesImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/NodesImpl.java new file mode 100644 index 0000000000000..4efeb35a6a0d5 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/NodesImpl.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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.horizondb.fluent.NodesClient; +import com.azure.resourcemanager.horizondb.fluent.models.NodeInner; +import com.azure.resourcemanager.horizondb.models.Node; +import com.azure.resourcemanager.horizondb.models.Nodes; + +public final class NodesImpl implements Nodes { + private static final ClientLogger LOGGER = new ClientLogger(NodesImpl.class); + + private final NodesClient innerClient; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + public NodesImpl(NodesClient innerClient, com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String clusterName, String poolName, + String nodeName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, clusterName, poolName, nodeName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NodeImpl(inner.getValue(), this.manager())); + } + + public Node get(String resourceGroupName, String clusterName, String poolName, String nodeName) { + NodeInner inner = this.serviceClient().get(resourceGroupName, clusterName, poolName, nodeName); + if (inner != null) { + return new NodeImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list(String resourceGroupName, String clusterName, String poolName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName, poolName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new NodeImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String clusterName, String poolName, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName, poolName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new NodeImpl(inner1, this.manager())); + } + + private NodesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ParameterGroupConnectionPropertiesImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ParameterGroupConnectionPropertiesImpl.java new file mode 100644 index 0000000000000..46b5321713ef2 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ParameterGroupConnectionPropertiesImpl.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.horizondb.implementation; + +import com.azure.resourcemanager.horizondb.fluent.models.ParameterGroupConnectionPropertiesInner; +import com.azure.resourcemanager.horizondb.models.ParameterGroupConnectionProperties; + +public final class ParameterGroupConnectionPropertiesImpl implements ParameterGroupConnectionProperties { + private ParameterGroupConnectionPropertiesInner innerObject; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + ParameterGroupConnectionPropertiesImpl(ParameterGroupConnectionPropertiesInner innerObject, + com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String poolResourceId() { + return this.innerModel().poolResourceId(); + } + + public ParameterGroupConnectionPropertiesInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbParameterGroupImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ParameterGroupImpl.java similarity index 60% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbParameterGroupImpl.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ParameterGroupImpl.java index b1b7144483923..113f0bded3ed9 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbParameterGroupImpl.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ParameterGroupImpl.java @@ -7,17 +7,16 @@ import com.azure.core.management.Region; import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbParameterGroupInner; -import com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroup; -import com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroupForPatchUpdate; -import com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroupProperties; -import com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroupPropertiesForPatchUpdate; +import com.azure.resourcemanager.horizondb.fluent.models.ParameterGroupInner; +import com.azure.resourcemanager.horizondb.models.ParameterGroup; +import com.azure.resourcemanager.horizondb.models.ParameterGroupForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.ParameterGroupProperties; +import com.azure.resourcemanager.horizondb.models.ParameterGroupPropertiesForPatchUpdate; import java.util.Collections; import java.util.Map; -public final class HorizonDbParameterGroupImpl - implements HorizonDbParameterGroup, HorizonDbParameterGroup.Definition, HorizonDbParameterGroup.Update { - private HorizonDbParameterGroupInner innerObject; +public final class ParameterGroupImpl implements ParameterGroup, ParameterGroup.Definition, ParameterGroup.Update { + private ParameterGroupInner innerObject; private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; @@ -46,7 +45,7 @@ public Map tags() { } } - public HorizonDbParameterGroupProperties properties() { + public ParameterGroupProperties properties() { return this.innerModel().properties(); } @@ -66,7 +65,7 @@ public String resourceGroupName() { return resourceGroupName; } - public HorizonDbParameterGroupInner innerModel() { + public ParameterGroupInner innerModel() { return this.innerObject; } @@ -78,53 +77,53 @@ private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { private String parameterGroupName; - private HorizonDbParameterGroupForPatchUpdate updateProperties; + private ParameterGroupForPatchUpdate updateProperties; - public HorizonDbParameterGroupImpl withExistingResourceGroup(String resourceGroupName) { + public ParameterGroupImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; return this; } - public HorizonDbParameterGroup create() { + public ParameterGroup create() { this.innerObject = serviceManager.serviceClient() - .getHorizonDbParameterGroups() - .createOrUpdate(resourceGroupName, parameterGroupName, this.innerModel(), Context.NONE); + .getParameterGroups() + .createOrReplace(resourceGroupName, parameterGroupName, this.innerModel(), Context.NONE); return this; } - public HorizonDbParameterGroup create(Context context) { + public ParameterGroup create(Context context) { this.innerObject = serviceManager.serviceClient() - .getHorizonDbParameterGroups() - .createOrUpdate(resourceGroupName, parameterGroupName, this.innerModel(), context); + .getParameterGroups() + .createOrReplace(resourceGroupName, parameterGroupName, this.innerModel(), context); return this; } - HorizonDbParameterGroupImpl(String name, com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { - this.innerObject = new HorizonDbParameterGroupInner(); + ParameterGroupImpl(String name, com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerObject = new ParameterGroupInner(); this.serviceManager = serviceManager; this.parameterGroupName = name; } - public HorizonDbParameterGroupImpl update() { - this.updateProperties = new HorizonDbParameterGroupForPatchUpdate(); + public ParameterGroupImpl update() { + this.updateProperties = new ParameterGroupForPatchUpdate(); return this; } - public HorizonDbParameterGroup apply() { + public ParameterGroup apply() { this.innerObject = serviceManager.serviceClient() - .getHorizonDbParameterGroups() + .getParameterGroups() .update(resourceGroupName, parameterGroupName, updateProperties, Context.NONE); return this; } - public HorizonDbParameterGroup apply(Context context) { + public ParameterGroup apply(Context context) { this.innerObject = serviceManager.serviceClient() - .getHorizonDbParameterGroups() + .getParameterGroups() .update(resourceGroupName, parameterGroupName, updateProperties, context); return this; } - HorizonDbParameterGroupImpl(HorizonDbParameterGroupInner innerObject, + ParameterGroupImpl(ParameterGroupInner innerObject, com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -132,33 +131,33 @@ public HorizonDbParameterGroup apply(Context context) { this.parameterGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "parameterGroups"); } - public HorizonDbParameterGroup refresh() { + public ParameterGroup refresh() { this.innerObject = serviceManager.serviceClient() - .getHorizonDbParameterGroups() + .getParameterGroups() .getByResourceGroupWithResponse(resourceGroupName, parameterGroupName, Context.NONE) .getValue(); return this; } - public HorizonDbParameterGroup refresh(Context context) { + public ParameterGroup refresh(Context context) { this.innerObject = serviceManager.serviceClient() - .getHorizonDbParameterGroups() + .getParameterGroups() .getByResourceGroupWithResponse(resourceGroupName, parameterGroupName, context) .getValue(); return this; } - public HorizonDbParameterGroupImpl withRegion(Region location) { + public ParameterGroupImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; } - public HorizonDbParameterGroupImpl withRegion(String location) { + public ParameterGroupImpl withRegion(String location) { this.innerModel().withLocation(location); return this; } - public HorizonDbParameterGroupImpl withTags(Map tags) { + public ParameterGroupImpl withTags(Map tags) { if (isInCreateMode()) { this.innerModel().withTags(tags); return this; @@ -168,12 +167,12 @@ public HorizonDbParameterGroupImpl withTags(Map tags) { } } - public HorizonDbParameterGroupImpl withProperties(HorizonDbParameterGroupProperties properties) { + public ParameterGroupImpl withProperties(ParameterGroupProperties properties) { this.innerModel().withProperties(properties); return this; } - public HorizonDbParameterGroupImpl withProperties(HorizonDbParameterGroupPropertiesForPatchUpdate properties) { + public ParameterGroupImpl withProperties(ParameterGroupPropertiesForPatchUpdate properties) { this.updateProperties.withProperties(properties); return this; } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbParameterGroupsClientImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ParameterGroupsClientImpl.java similarity index 66% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbParameterGroupsClientImpl.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ParameterGroupsClientImpl.java index bc809a22ffdbe..f63b24b7df98a 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbParameterGroupsClientImpl.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ParameterGroupsClientImpl.java @@ -33,24 +33,24 @@ import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbParameterGroupConnectionPropertiesInner; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbParameterGroupInner; -import com.azure.resourcemanager.horizondb.implementation.models.HorizonDbParameterGroupConnectionPropertiesListResult; -import com.azure.resourcemanager.horizondb.implementation.models.HorizonDbParameterGroupListResult; -import com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroupForPatchUpdate; +import com.azure.resourcemanager.horizondb.fluent.ParameterGroupsClient; +import com.azure.resourcemanager.horizondb.fluent.models.ParameterGroupConnectionPropertiesInner; +import com.azure.resourcemanager.horizondb.fluent.models.ParameterGroupInner; +import com.azure.resourcemanager.horizondb.implementation.models.PagedParameterGroupConnectionProperties; +import com.azure.resourcemanager.horizondb.implementation.models.ParameterGroupListResult; +import com.azure.resourcemanager.horizondb.models.ParameterGroupForPatchUpdate; 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 HorizonDbParameterGroupsClient. + * An instance of this class provides access to all the operations defined in ParameterGroupsClient. */ -public final class HorizonDbParameterGroupsClientImpl implements HorizonDbParameterGroupsClient { +public final class ParameterGroupsClientImpl implements ParameterGroupsClient { /** * The proxy service used to perform REST calls. */ - private final HorizonDbParameterGroupsService service; + private final ParameterGroupsService service; /** * The service client containing this operation class. @@ -58,28 +58,28 @@ public final class HorizonDbParameterGroupsClientImpl implements HorizonDbParame private final HorizonDbManagementClientImpl client; /** - * Initializes an instance of HorizonDbParameterGroupsClientImpl. + * Initializes an instance of ParameterGroupsClientImpl. * * @param client the instance of the service client containing this operation class. */ - HorizonDbParameterGroupsClientImpl(HorizonDbManagementClientImpl client) { - this.service = RestProxy.create(HorizonDbParameterGroupsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); + ParameterGroupsClientImpl(HorizonDbManagementClientImpl client) { + this.service + = RestProxy.create(ParameterGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for HorizonDbManagementClientHorizonDbParameterGroups to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for HorizonDbManagementClientParameterGroups to be used by the proxy + * service to perform REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "HorizonDbManagementClientHorizonDbParameterGroups") - public interface HorizonDbParameterGroupsService { + @ServiceInterface(name = "HorizonDbManagementClientParameterGroups") + public interface ParameterGroupsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/parameterGroups/{parameterGroupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("parameterGroupName") String parameterGroupName, @HeaderParam("Accept") String accept, @@ -89,7 +89,7 @@ Mono> getByResourceGroup(@HostParam("endp @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/parameterGroups/{parameterGroupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("parameterGroupName") String parameterGroupName, @HeaderParam("Accept") String accept, @@ -98,21 +98,21 @@ Response getByResourceGroupSync(@HostParam("endpoi @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/parameterGroups/{parameterGroupName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + Mono>> createOrReplace(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("parameterGroupName") String parameterGroupName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") HorizonDbParameterGroupInner resource, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ParameterGroupInner resource, Context context); @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/parameterGroups/{parameterGroupName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + Response createOrReplaceSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("parameterGroupName") String parameterGroupName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") HorizonDbParameterGroupInner resource, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ParameterGroupInner resource, Context context); @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/parameterGroups/{parameterGroupName}") @@ -123,7 +123,7 @@ Mono>> update(@HostParam("endpoint") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("parameterGroupName") String parameterGroupName, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") HorizonDbParameterGroupForPatchUpdate properties, Context context); + @BodyParam("application/json") ParameterGroupForPatchUpdate properties, Context context); @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/parameterGroups/{parameterGroupName}") @ExpectedResponses({ 200, 202 }) @@ -133,7 +133,7 @@ Response updateSync(@HostParam("endpoint") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("parameterGroupName") String parameterGroupName, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") HorizonDbParameterGroupForPatchUpdate properties, Context context); + @BodyParam("application/json") ParameterGroupForPatchUpdate properties, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/parameterGroups/{parameterGroupName}") @@ -157,7 +157,7 @@ Response deleteSync(@HostParam("endpoint") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/parameterGroups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @@ -166,7 +166,7 @@ Mono> listByResourceGroup(@HostParam @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/parameterGroups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + 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); @@ -175,7 +175,7 @@ Response listByResourceGroupSync(@HostParam(" @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HorizonDb/parameterGroups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @@ -183,7 +183,7 @@ Mono> list(@HostParam("endpoint") St @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HorizonDb/parameterGroups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @@ -191,9 +191,8 @@ Response listSync(@HostParam("endpoint") Stri @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/parameterGroups/{parameterGroupName}/connections") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listConnections( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> listConnections(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("parameterGroupName") String parameterGroupName, @HeaderParam("Accept") String accept, Context context); @@ -202,46 +201,17 @@ Mono> listConnec @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/parameterGroups/{parameterGroupName}/connections") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listConnectionsSync( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Response listConnectionsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("parameterGroupName") String parameterGroupName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/parameterGroups/{parameterGroupName}/versions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listVersions(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("parameterGroupName") String parameterGroupName, @QueryParam("version") Integer version, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/parameterGroups/{parameterGroupName}/versions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listVersionsSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("parameterGroupName") String parameterGroupName, @QueryParam("version") Integer version, - @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( + Mono> listByResourceGroupNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -249,7 +219,7 @@ Response listByResourceGroupNextSync( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( + Response listByResourceGroupNextSync( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -257,7 +227,7 @@ Mono> listBySubscriptionNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listBySubscriptionNextSync( + Mono> listBySubscriptionNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -265,7 +235,7 @@ Response listBySubscriptionNextSync( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listConnectionsNext( + Response listBySubscriptionNextSync( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -273,7 +243,7 @@ Mono> listConnec @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listConnectionsNextSync( + Mono> listConnectionsNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -281,15 +251,7 @@ Response listConnectionsN @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listVersionsNext( - @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 listVersionsNextSync( + Response listConnectionsNextSync( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -306,7 +268,7 @@ Response listVersionsNextSync( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String parameterGroupName) { final String accept = "application/json"; return FluxUtil @@ -326,8 +288,7 @@ public Mono> getByResourceGroupWithRespon * @return information about a HorizonDB parameter group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByResourceGroupAsync(String resourceGroupName, - String parameterGroupName) { + public Mono getByResourceGroupAsync(String resourceGroupName, String parameterGroupName) { return getByResourceGroupWithResponseAsync(resourceGroupName, parameterGroupName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -344,7 +305,7 @@ public Mono getByResourceGroupAsync(String resourc * @return information about a HorizonDB parameter group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, + public Response getByResourceGroupWithResponse(String resourceGroupName, String parameterGroupName, Context context) { final String accept = "application/json"; return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -362,12 +323,12 @@ public Response getByResourceGroupWithResponse(Str * @return information about a HorizonDB parameter group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HorizonDbParameterGroupInner getByResourceGroup(String resourceGroupName, String parameterGroupName) { + public ParameterGroupInner getByResourceGroup(String resourceGroupName, String parameterGroupName) { return getByResourceGroupWithResponse(resourceGroupName, parameterGroupName, Context.NONE).getValue(); } /** - * Creates a new HorizonDB parameter group or updates an existing parameter group. + * Creates a new HorizonDB parameter group or replaces an existing parameter group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -379,19 +340,19 @@ public HorizonDbParameterGroupInner getByResourceGroup(String resourceGroupName, * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String parameterGroupName, HorizonDbParameterGroupInner resource) { + public Mono>> createOrReplaceWithResponseAsync(String resourceGroupName, + String parameterGroupName, ParameterGroupInner resource) { final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.createOrReplace(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, parameterGroupName, contentType, accept, resource, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates a new HorizonDB parameter group or updates an existing parameter group. + * Creates a new HorizonDB parameter group or replaces an existing parameter group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -402,17 +363,17 @@ public Mono>> createOrUpdateWithResponseAsync(String r * @return represents the HorizonDB parameter group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String parameterGroupName, - HorizonDbParameterGroupInner resource) { + private Response createOrReplaceWithResponse(String resourceGroupName, String parameterGroupName, + ParameterGroupInner resource) { final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + return service.createOrReplaceSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, parameterGroupName, contentType, accept, resource, Context.NONE); } /** - * Creates a new HorizonDB parameter group or updates an existing parameter group. + * Creates a new HorizonDB parameter group or replaces an existing parameter group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -424,17 +385,17 @@ private Response createOrUpdateWithResponse(String resourceGroupName * @return represents the HorizonDB parameter group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response createOrUpdateWithResponse(String resourceGroupName, String parameterGroupName, - HorizonDbParameterGroupInner resource, Context context) { + private Response createOrReplaceWithResponse(String resourceGroupName, String parameterGroupName, + ParameterGroupInner resource, Context context) { final String contentType = "application/json"; final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + return service.createOrReplaceSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, parameterGroupName, contentType, accept, resource, context); } /** - * Creates a new HorizonDB parameter group or updates an existing parameter group. + * Creates a new HorizonDB parameter group or replaces an existing parameter group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -445,17 +406,16 @@ private Response createOrUpdateWithResponse(String resourceGroupName * @return the {@link PollerFlux} for polling of represents the HorizonDB parameter group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, HorizonDbParameterGroupInner> beginCreateOrUpdateAsync( - String resourceGroupName, String parameterGroupName, HorizonDbParameterGroupInner resource) { + public PollerFlux, ParameterGroupInner> + beginCreateOrReplaceAsync(String resourceGroupName, String parameterGroupName, ParameterGroupInner resource) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, parameterGroupName, resource); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), HorizonDbParameterGroupInner.class, HorizonDbParameterGroupInner.class, - this.client.getContext()); + = createOrReplaceWithResponseAsync(resourceGroupName, parameterGroupName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ParameterGroupInner.class, ParameterGroupInner.class, this.client.getContext()); } /** - * Creates a new HorizonDB parameter group or updates an existing parameter group. + * Creates a new HorizonDB parameter group or replaces an existing parameter group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -466,15 +426,15 @@ public PollerFlux, HorizonDbParameterGr * @return the {@link SyncPoller} for polling of represents the HorizonDB parameter group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, HorizonDbParameterGroupInner> beginCreateOrUpdate( - String resourceGroupName, String parameterGroupName, HorizonDbParameterGroupInner resource) { - Response response = createOrUpdateWithResponse(resourceGroupName, parameterGroupName, resource); - return this.client.getLroResult(response, - HorizonDbParameterGroupInner.class, HorizonDbParameterGroupInner.class, Context.NONE); + public SyncPoller, ParameterGroupInner> + beginCreateOrReplace(String resourceGroupName, String parameterGroupName, ParameterGroupInner resource) { + Response response = createOrReplaceWithResponse(resourceGroupName, parameterGroupName, resource); + return this.client.getLroResult(response, ParameterGroupInner.class, + ParameterGroupInner.class, Context.NONE); } /** - * Creates a new HorizonDB parameter group or updates an existing parameter group. + * Creates a new HorizonDB parameter group or replaces an existing parameter group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -486,16 +446,16 @@ public SyncPoller, HorizonDbParameterGr * @return the {@link SyncPoller} for polling of represents the HorizonDB parameter group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, HorizonDbParameterGroupInner> beginCreateOrUpdate( - String resourceGroupName, String parameterGroupName, HorizonDbParameterGroupInner resource, Context context) { + public SyncPoller, ParameterGroupInner> beginCreateOrReplace( + String resourceGroupName, String parameterGroupName, ParameterGroupInner resource, Context context) { Response response - = createOrUpdateWithResponse(resourceGroupName, parameterGroupName, resource, context); - return this.client.getLroResult(response, - HorizonDbParameterGroupInner.class, HorizonDbParameterGroupInner.class, context); + = createOrReplaceWithResponse(resourceGroupName, parameterGroupName, resource, context); + return this.client.getLroResult(response, ParameterGroupInner.class, + ParameterGroupInner.class, context); } /** - * Creates a new HorizonDB parameter group or updates an existing parameter group. + * Creates a new HorizonDB parameter group or replaces an existing parameter group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -506,14 +466,14 @@ public SyncPoller, HorizonDbParameterGr * @return represents the HorizonDB parameter group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync(String resourceGroupName, String parameterGroupName, - HorizonDbParameterGroupInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, parameterGroupName, resource).last() + public Mono createOrReplaceAsync(String resourceGroupName, String parameterGroupName, + ParameterGroupInner resource) { + return beginCreateOrReplaceAsync(resourceGroupName, parameterGroupName, resource).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Creates a new HorizonDB parameter group or updates an existing parameter group. + * Creates a new HorizonDB parameter group or replaces an existing parameter group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -524,13 +484,13 @@ public Mono createOrUpdateAsync(String resourceGro * @return represents the HorizonDB parameter group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HorizonDbParameterGroupInner createOrUpdate(String resourceGroupName, String parameterGroupName, - HorizonDbParameterGroupInner resource) { - return beginCreateOrUpdate(resourceGroupName, parameterGroupName, resource).getFinalResult(); + public ParameterGroupInner createOrReplace(String resourceGroupName, String parameterGroupName, + ParameterGroupInner resource) { + return beginCreateOrReplace(resourceGroupName, parameterGroupName, resource).getFinalResult(); } /** - * Creates a new HorizonDB parameter group or updates an existing parameter group. + * Creates a new HorizonDB parameter group or replaces an existing parameter group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -542,13 +502,17 @@ public HorizonDbParameterGroupInner createOrUpdate(String resourceGroupName, Str * @return represents the HorizonDB parameter group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HorizonDbParameterGroupInner createOrUpdate(String resourceGroupName, String parameterGroupName, - HorizonDbParameterGroupInner resource, Context context) { - return beginCreateOrUpdate(resourceGroupName, parameterGroupName, resource, context).getFinalResult(); + public ParameterGroupInner createOrReplace(String resourceGroupName, String parameterGroupName, + ParameterGroupInner resource, Context context) { + return beginCreateOrReplace(resourceGroupName, parameterGroupName, resource, context).getFinalResult(); } /** - * Updates an existing HorizonDB parameter group. + * Updates an existing HorizonDB parameter group. Each connected pool's applyMethod setting controls whether dynamic + * parameter changes become effective immediately or remain pending until a customer-initiated pool Restart. Static + * parameter changes always remain pending until a customer-initiated pool Restart. Stop followed by Start and + * scheduled maintenance do not apply pending changes. The operation fails with a conflict while a previous update + * to this parameter group is still being processed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -561,7 +525,7 @@ public HorizonDbParameterGroupInner createOrUpdate(String resourceGroupName, Str */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> updateWithResponseAsync(String resourceGroupName, String parameterGroupName, - HorizonDbParameterGroupForPatchUpdate properties) { + ParameterGroupForPatchUpdate properties) { final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil @@ -572,7 +536,11 @@ public Mono>> updateWithResponseAsync(String resourceG } /** - * Updates an existing HorizonDB parameter group. + * Updates an existing HorizonDB parameter group. Each connected pool's applyMethod setting controls whether dynamic + * parameter changes become effective immediately or remain pending until a customer-initiated pool Restart. Static + * parameter changes always remain pending until a customer-initiated pool Restart. Stop followed by Start and + * scheduled maintenance do not apply pending changes. The operation fails with a conflict while a previous update + * to this parameter group is still being processed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -584,7 +552,7 @@ public Mono>> updateWithResponseAsync(String resourceG */ @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String parameterGroupName, - HorizonDbParameterGroupForPatchUpdate properties) { + ParameterGroupForPatchUpdate properties) { final String contentType = "application/json"; final String accept = "application/json"; return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -593,7 +561,11 @@ private Response updateWithResponse(String resourceGroupName, String } /** - * Updates an existing HorizonDB parameter group. + * Updates an existing HorizonDB parameter group. Each connected pool's applyMethod setting controls whether dynamic + * parameter changes become effective immediately or remain pending until a customer-initiated pool Restart. Static + * parameter changes always remain pending until a customer-initiated pool Restart. Stop followed by Start and + * scheduled maintenance do not apply pending changes. The operation fails with a conflict while a previous update + * to this parameter group is still being processed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -606,7 +578,7 @@ private Response updateWithResponse(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String parameterGroupName, - HorizonDbParameterGroupForPatchUpdate properties, Context context) { + ParameterGroupForPatchUpdate properties, Context context) { final String contentType = "application/json"; final String accept = "application/json"; return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -615,7 +587,11 @@ private Response updateWithResponse(String resourceGroupName, String } /** - * Updates an existing HorizonDB parameter group. + * Updates an existing HorizonDB parameter group. Each connected pool's applyMethod setting controls whether dynamic + * parameter changes become effective immediately or remain pending until a customer-initiated pool Restart. Static + * parameter changes always remain pending until a customer-initiated pool Restart. Stop followed by Start and + * scheduled maintenance do not apply pending changes. The operation fails with a conflict while a previous update + * to this parameter group is still being processed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -626,17 +602,20 @@ private Response updateWithResponse(String resourceGroupName, String * @return the {@link PollerFlux} for polling of represents the HorizonDB parameter group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, HorizonDbParameterGroupInner> beginUpdateAsync( - String resourceGroupName, String parameterGroupName, HorizonDbParameterGroupForPatchUpdate properties) { + public PollerFlux, ParameterGroupInner> beginUpdateAsync(String resourceGroupName, + String parameterGroupName, ParameterGroupForPatchUpdate properties) { Mono>> mono = updateWithResponseAsync(resourceGroupName, parameterGroupName, properties); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), HorizonDbParameterGroupInner.class, HorizonDbParameterGroupInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ParameterGroupInner.class, ParameterGroupInner.class, this.client.getContext()); } /** - * Updates an existing HorizonDB parameter group. + * Updates an existing HorizonDB parameter group. Each connected pool's applyMethod setting controls whether dynamic + * parameter changes become effective immediately or remain pending until a customer-initiated pool Restart. Static + * parameter changes always remain pending until a customer-initiated pool Restart. Stop followed by Start and + * scheduled maintenance do not apply pending changes. The operation fails with a conflict while a previous update + * to this parameter group is still being processed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -647,15 +626,19 @@ public PollerFlux, HorizonDbParameterGr * @return the {@link SyncPoller} for polling of represents the HorizonDB parameter group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, HorizonDbParameterGroupInner> beginUpdate( - String resourceGroupName, String parameterGroupName, HorizonDbParameterGroupForPatchUpdate properties) { + public SyncPoller, ParameterGroupInner> beginUpdate(String resourceGroupName, + String parameterGroupName, ParameterGroupForPatchUpdate properties) { Response response = updateWithResponse(resourceGroupName, parameterGroupName, properties); - return this.client.getLroResult(response, - HorizonDbParameterGroupInner.class, HorizonDbParameterGroupInner.class, Context.NONE); + return this.client.getLroResult(response, ParameterGroupInner.class, + ParameterGroupInner.class, Context.NONE); } /** - * Updates an existing HorizonDB parameter group. + * Updates an existing HorizonDB parameter group. Each connected pool's applyMethod setting controls whether dynamic + * parameter changes become effective immediately or remain pending until a customer-initiated pool Restart. Static + * parameter changes always remain pending until a customer-initiated pool Restart. Stop followed by Start and + * scheduled maintenance do not apply pending changes. The operation fails with a conflict while a previous update + * to this parameter group is still being processed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -667,16 +650,19 @@ public SyncPoller, HorizonDbParameterGr * @return the {@link SyncPoller} for polling of represents the HorizonDB parameter group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, HorizonDbParameterGroupInner> beginUpdate( - String resourceGroupName, String parameterGroupName, HorizonDbParameterGroupForPatchUpdate properties, - Context context) { + public SyncPoller, ParameterGroupInner> beginUpdate(String resourceGroupName, + String parameterGroupName, ParameterGroupForPatchUpdate properties, Context context) { Response response = updateWithResponse(resourceGroupName, parameterGroupName, properties, context); - return this.client.getLroResult(response, - HorizonDbParameterGroupInner.class, HorizonDbParameterGroupInner.class, context); + return this.client.getLroResult(response, ParameterGroupInner.class, + ParameterGroupInner.class, context); } /** - * Updates an existing HorizonDB parameter group. + * Updates an existing HorizonDB parameter group. Each connected pool's applyMethod setting controls whether dynamic + * parameter changes become effective immediately or remain pending until a customer-initiated pool Restart. Static + * parameter changes always remain pending until a customer-initiated pool Restart. Stop followed by Start and + * scheduled maintenance do not apply pending changes. The operation fails with a conflict while a previous update + * to this parameter group is still being processed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -687,14 +673,18 @@ public SyncPoller, HorizonDbParameterGr * @return represents the HorizonDB parameter group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String parameterGroupName, - HorizonDbParameterGroupForPatchUpdate properties) { + public Mono updateAsync(String resourceGroupName, String parameterGroupName, + ParameterGroupForPatchUpdate properties) { return beginUpdateAsync(resourceGroupName, parameterGroupName, properties).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates an existing HorizonDB parameter group. + * Updates an existing HorizonDB parameter group. Each connected pool's applyMethod setting controls whether dynamic + * parameter changes become effective immediately or remain pending until a customer-initiated pool Restart. Static + * parameter changes always remain pending until a customer-initiated pool Restart. Stop followed by Start and + * scheduled maintenance do not apply pending changes. The operation fails with a conflict while a previous update + * to this parameter group is still being processed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -705,13 +695,17 @@ public Mono updateAsync(String resourceGroupName, * @return represents the HorizonDB parameter group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HorizonDbParameterGroupInner update(String resourceGroupName, String parameterGroupName, - HorizonDbParameterGroupForPatchUpdate properties) { + public ParameterGroupInner update(String resourceGroupName, String parameterGroupName, + ParameterGroupForPatchUpdate properties) { return beginUpdate(resourceGroupName, parameterGroupName, properties).getFinalResult(); } /** - * Updates an existing HorizonDB parameter group. + * Updates an existing HorizonDB parameter group. Each connected pool's applyMethod setting controls whether dynamic + * parameter changes become effective immediately or remain pending until a customer-initiated pool Restart. Static + * parameter changes always remain pending until a customer-initiated pool Restart. Stop followed by Start and + * scheduled maintenance do not apply pending changes. The operation fails with a conflict while a previous update + * to this parameter group is still being processed. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -723,13 +717,14 @@ public HorizonDbParameterGroupInner update(String resourceGroupName, String para * @return represents the HorizonDB parameter group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HorizonDbParameterGroupInner update(String resourceGroupName, String parameterGroupName, - HorizonDbParameterGroupForPatchUpdate properties, Context context) { + public ParameterGroupInner update(String resourceGroupName, String parameterGroupName, + ParameterGroupForPatchUpdate properties, Context context) { return beginUpdate(resourceGroupName, parameterGroupName, properties, context).getFinalResult(); } /** - * Deletes a HorizonDB parameter group. + * Deletes a HorizonDB parameter group. Deletion fails with a conflict when the parameter group is associated with + * one or more pools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -748,7 +743,8 @@ public Mono>> deleteWithResponseAsync(String resourceG } /** - * Deletes a HorizonDB parameter group. + * Deletes a HorizonDB parameter group. Deletion fails with a conflict when the parameter group is associated with + * one or more pools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -764,7 +760,8 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes a HorizonDB parameter group. + * Deletes a HorizonDB parameter group. Deletion fails with a conflict when the parameter group is associated with + * one or more pools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -782,7 +779,8 @@ private Response deleteWithResponse(String resourceGroupName, String } /** - * Deletes a HorizonDB parameter group. + * Deletes a HorizonDB parameter group. Deletion fails with a conflict when the parameter group is associated with + * one or more pools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -799,7 +797,8 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN } /** - * Deletes a HorizonDB parameter group. + * Deletes a HorizonDB parameter group. Deletion fails with a conflict when the parameter group is associated with + * one or more pools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -815,7 +814,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a HorizonDB parameter group. + * Deletes a HorizonDB parameter group. Deletion fails with a conflict when the parameter group is associated with + * one or more pools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -833,7 +833,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a HorizonDB parameter group. + * Deletes a HorizonDB parameter group. Deletion fails with a conflict when the parameter group is associated with + * one or more pools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -849,7 +850,8 @@ public Mono deleteAsync(String resourceGroupName, String parameterGroupNam } /** - * Deletes a HorizonDB parameter group. + * Deletes a HorizonDB parameter group. Deletion fails with a conflict when the parameter group is associated with + * one or more pools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -863,7 +865,8 @@ public void delete(String resourceGroupName, String parameterGroupName) { } /** - * Deletes a HorizonDB parameter group. + * Deletes a HorizonDB parameter group. Deletion fails with a conflict when the parameter group is associated with + * one or more pools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -884,17 +887,16 @@ public void delete(String resourceGroupName, String parameterGroupName, 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 the response of a HorizonDbParameterGroup list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a ParameterGroup list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByResourceGroupSinglePageAsync(String resourceGroupName) { + 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(), + .>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())); } @@ -906,10 +908,10 @@ public void delete(String resourceGroupName, String parameterGroupName, 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 the response of a HorizonDbParameterGroup list operation as paginated response with {@link PagedFlux}. + * @return the response of a ParameterGroup list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + public PagedFlux listByResourceGroupAsync(String resourceGroupName) { return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } @@ -921,12 +923,12 @@ public PagedFlux listByResourceGroupAsync(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbParameterGroup list operation along with {@link PagedResponse}. + * @return the response of a ParameterGroup list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { final String accept = "application/json"; - Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + 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); @@ -940,13 +942,13 @@ private PagedResponse listByResourceGroupSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbParameterGroup list operation along with {@link PagedResponse}. + * @return the response of a ParameterGroup list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { final String accept = "application/json"; - Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + 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); @@ -959,11 +961,10 @@ private PagedResponse listByResourceGroupSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbParameterGroup list operation as paginated response with - * {@link PagedIterable}. + * @return the response of a ParameterGroup list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { + public PagedIterable listByResourceGroup(String resourceGroupName) { return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), nextLink -> listByResourceGroupNextSinglePage(nextLink)); } @@ -976,11 +977,10 @@ public PagedIterable listByResourceGroup(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbParameterGroup list operation as paginated response with - * {@link PagedIterable}. + * @return the response of a ParameterGroup list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } @@ -990,16 +990,16 @@ public PagedIterable listByResourceGroup(String re * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbParameterGroup list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a ParameterGroup list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { + 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(), + .>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())); } @@ -1009,10 +1009,10 @@ private Mono> listSinglePageAsync() * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbParameterGroup list operation as paginated response with {@link PagedFlux}. + * @return the response of a ParameterGroup list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync() { + public PagedFlux listAsync() { return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } @@ -1022,12 +1022,12 @@ public PagedFlux listAsync() { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbParameterGroup list operation along with {@link PagedResponse}. + * @return the response of a ParameterGroup list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage() { + private PagedResponse listSinglePage() { final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), + 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); @@ -1040,12 +1040,12 @@ private PagedResponse listSinglePage() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbParameterGroup list operation along with {@link PagedResponse}. + * @return the response of a ParameterGroup list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Context context) { + private PagedResponse listSinglePage(Context context) { final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), + 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); @@ -1056,11 +1056,10 @@ private PagedResponse listSinglePage(Context conte * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbParameterGroup list operation as paginated response with - * {@link PagedIterable}. + * @return the response of a ParameterGroup list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { + public PagedIterable list() { return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } @@ -1071,11 +1070,10 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbParameterGroup list operation as paginated response with - * {@link PagedIterable}. + * @return the response of a ParameterGroup list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { + public PagedIterable list(Context context) { return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } @@ -1092,13 +1090,13 @@ public PagedIterable list(Context context) { * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> + private Mono> listConnectionsSinglePageAsync(String resourceGroupName, String parameterGroupName) { final String accept = "application/json"; return FluxUtil .withContext(context -> service.listConnections(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, parameterGroupName, accept, context)) - .>map( + .>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())); @@ -1115,7 +1113,7 @@ public PagedIterable list(Context context) { * @return all connections to a parameter group as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listConnectionsAsync(String resourceGroupName, + public PagedFlux listConnectionsAsync(String resourceGroupName, String parameterGroupName) { return new PagedFlux<>(() -> listConnectionsSinglePageAsync(resourceGroupName, parameterGroupName), nextLink -> listConnectionsNextSinglePageAsync(nextLink)); @@ -1132,10 +1130,10 @@ public PagedFlux listConnectio * @return all connections to a parameter group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse - listConnectionsSinglePage(String resourceGroupName, String parameterGroupName) { + private PagedResponse listConnectionsSinglePage(String resourceGroupName, + String parameterGroupName) { final String accept = "application/json"; - Response res + Response res = service.listConnectionsSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, parameterGroupName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -1154,10 +1152,10 @@ public PagedFlux listConnectio * @return all connections to a parameter group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse - listConnectionsSinglePage(String resourceGroupName, String parameterGroupName, Context context) { + private PagedResponse listConnectionsSinglePage(String resourceGroupName, + String parameterGroupName, Context context) { final String accept = "application/json"; - Response res + Response res = service.listConnectionsSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, parameterGroupName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -1175,7 +1173,7 @@ public PagedFlux listConnectio * @return all connections to a parameter group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listConnections(String resourceGroupName, + public PagedIterable listConnections(String resourceGroupName, String parameterGroupName) { return new PagedIterable<>(() -> listConnectionsSinglePage(resourceGroupName, parameterGroupName), nextLink -> listConnectionsNextSinglePage(nextLink)); @@ -1193,157 +1191,12 @@ public PagedIterable listConne * @return all connections to a parameter group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listConnections(String resourceGroupName, + public PagedIterable listConnections(String resourceGroupName, String parameterGroupName, Context context) { return new PagedIterable<>(() -> listConnectionsSinglePage(resourceGroupName, parameterGroupName, context), nextLink -> listConnectionsNextSinglePage(nextLink, context)); } - /** - * Lists parameter groups filtered by version number. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param parameterGroupName The name of the HorizonDB parameter group. - * @param version The version number to filter by. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbParameterGroup list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVersionsSinglePageAsync(String resourceGroupName, - String parameterGroupName, Integer version) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listVersions(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, parameterGroupName, version, 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())); - } - - /** - * Lists parameter groups filtered by version number. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param parameterGroupName The name of the HorizonDB parameter group. - * @param version The version number to filter by. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbParameterGroup list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listVersionsAsync(String resourceGroupName, - String parameterGroupName, Integer version) { - return new PagedFlux<>(() -> listVersionsSinglePageAsync(resourceGroupName, parameterGroupName, version), - nextLink -> listVersionsNextSinglePageAsync(nextLink)); - } - - /** - * Lists parameter groups filtered by version number. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param parameterGroupName The name of the HorizonDB parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbParameterGroup list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listVersionsAsync(String resourceGroupName, - String parameterGroupName) { - final Integer version = null; - return new PagedFlux<>(() -> listVersionsSinglePageAsync(resourceGroupName, parameterGroupName, version), - nextLink -> listVersionsNextSinglePageAsync(nextLink)); - } - - /** - * Lists parameter groups filtered by version number. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param parameterGroupName The name of the HorizonDB parameter group. - * @param version The version number to filter by. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbParameterGroup list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listVersionsSinglePage(String resourceGroupName, - String parameterGroupName, Integer version) { - final String accept = "application/json"; - Response res - = service.listVersionsSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, parameterGroupName, version, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Lists parameter groups filtered by version number. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param parameterGroupName The name of the HorizonDB parameter group. - * @param version The version number to filter by. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbParameterGroup list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listVersionsSinglePage(String resourceGroupName, - String parameterGroupName, Integer version, Context context) { - final String accept = "application/json"; - Response res - = service.listVersionsSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, parameterGroupName, version, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Lists parameter groups filtered by version number. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param parameterGroupName The name of the HorizonDB parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbParameterGroup list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listVersions(String resourceGroupName, - String parameterGroupName) { - final Integer version = null; - return new PagedIterable<>(() -> listVersionsSinglePage(resourceGroupName, parameterGroupName, version), - nextLink -> listVersionsNextSinglePage(nextLink)); - } - - /** - * Lists parameter groups filtered by version number. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param parameterGroupName The name of the HorizonDB parameter group. - * @param version The version number to filter by. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbParameterGroup list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listVersions(String resourceGroupName, String parameterGroupName, - Integer version, Context context) { - return new PagedIterable<>( - () -> listVersionsSinglePage(resourceGroupName, parameterGroupName, version, context), - nextLink -> listVersionsNextSinglePage(nextLink, context)); - } - /** * Get the next page of items. * @@ -1351,16 +1204,16 @@ public PagedIterable listVersions(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbParameterGroup list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a ParameterGroup list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + 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(), + .>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())); } @@ -1372,12 +1225,12 @@ private Mono> listByResourceGroupNex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbParameterGroup list operation along with {@link PagedResponse}. + * @return the response of a ParameterGroup list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { final String accept = "application/json"; - Response res + 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); @@ -1391,13 +1244,12 @@ private PagedResponse listByResourceGroupNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbParameterGroup list operation along with {@link PagedResponse}. + * @return the response of a ParameterGroup list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink, - Context context) { + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - Response res + 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); @@ -1410,16 +1262,16 @@ private PagedResponse listByResourceGroupNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbParameterGroup list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a ParameterGroup list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + 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(), + .>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())); } @@ -1431,12 +1283,12 @@ private Mono> listBySubscriptionNext * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbParameterGroup list operation along with {@link PagedResponse}. + * @return the response of a ParameterGroup list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { final String accept = "application/json"; - Response res + 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); @@ -1450,13 +1302,12 @@ private PagedResponse listBySubscriptionNextSingle * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbParameterGroup list operation along with {@link PagedResponse}. + * @return the response of a ParameterGroup list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listBySubscriptionNextSinglePage(String nextLink, - Context context) { + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - Response res + 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); @@ -1473,12 +1324,12 @@ private PagedResponse listBySubscriptionNextSingle * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> + private Mono> listConnectionsNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext(context -> service.listConnectionsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( + .>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())); @@ -1494,10 +1345,9 @@ private PagedResponse listBySubscriptionNextSingle * @return all connections to a parameter group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse - listConnectionsNextSinglePage(String nextLink) { + private PagedResponse listConnectionsNextSinglePage(String nextLink) { final String accept = "application/json"; - Response res + Response res = service.listConnectionsNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); @@ -1514,69 +1364,12 @@ private PagedResponse listBySubscriptionNextSingle * @return all connections to a parameter group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse - listConnectionsNextSinglePage(String nextLink, Context context) { + private PagedResponse listConnectionsNextSinglePage(String nextLink, + Context context) { final String accept = "application/json"; - Response res + Response res = service.listConnectionsNextSync(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 HorizonDbParameterGroup list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVersionsNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listVersionsNext(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 HorizonDbParameterGroup list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listVersionsNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listVersionsNextSync(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 HorizonDbParameterGroup list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listVersionsNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res - = service.listVersionsNextSync(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/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbParameterGroupsImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ParameterGroupsImpl.java similarity index 56% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbParameterGroupsImpl.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ParameterGroupsImpl.java index d2842ae1b4757..c1816339e2b73 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbParameterGroupsImpl.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/ParameterGroupsImpl.java @@ -9,39 +9,38 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbParameterGroupConnectionPropertiesInner; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbParameterGroupInner; -import com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroup; -import com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroupConnectionProperties; -import com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroups; +import com.azure.resourcemanager.horizondb.fluent.ParameterGroupsClient; +import com.azure.resourcemanager.horizondb.fluent.models.ParameterGroupConnectionPropertiesInner; +import com.azure.resourcemanager.horizondb.fluent.models.ParameterGroupInner; +import com.azure.resourcemanager.horizondb.models.ParameterGroup; +import com.azure.resourcemanager.horizondb.models.ParameterGroupConnectionProperties; +import com.azure.resourcemanager.horizondb.models.ParameterGroups; -public final class HorizonDbParameterGroupsImpl implements HorizonDbParameterGroups { - private static final ClientLogger LOGGER = new ClientLogger(HorizonDbParameterGroupsImpl.class); +public final class ParameterGroupsImpl implements ParameterGroups { + private static final ClientLogger LOGGER = new ClientLogger(ParameterGroupsImpl.class); - private final HorizonDbParameterGroupsClient innerClient; + private final ParameterGroupsClient innerClient; private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; - public HorizonDbParameterGroupsImpl(HorizonDbParameterGroupsClient innerClient, + public ParameterGroupsImpl(ParameterGroupsClient innerClient, com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getByResourceGroupWithResponse(String resourceGroupName, - String parameterGroupName, Context context) { - Response inner + public Response getByResourceGroupWithResponse(String resourceGroupName, String parameterGroupName, + Context context) { + Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, parameterGroupName, context); return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new HorizonDbParameterGroupImpl(inner.getValue(), this.manager())); + new ParameterGroupImpl(inner.getValue(), this.manager())); } - public HorizonDbParameterGroup getByResourceGroup(String resourceGroupName, String parameterGroupName) { - HorizonDbParameterGroupInner inner - = this.serviceClient().getByResourceGroup(resourceGroupName, parameterGroupName); + public ParameterGroup getByResourceGroup(String resourceGroupName, String parameterGroupName) { + ParameterGroupInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, parameterGroupName); if (inner != null) { - return new HorizonDbParameterGroupImpl(inner, this.manager()); + return new ParameterGroupImpl(inner, this.manager()); } else { return null; } @@ -55,57 +54,43 @@ public void delete(String resourceGroupName, String parameterGroupName, Context this.serviceClient().delete(resourceGroupName, parameterGroupName, context); } - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new HorizonDbParameterGroupImpl(inner1, this.manager())); + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ParameterGroupImpl(inner1, this.manager())); } - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new HorizonDbParameterGroupImpl(inner1, this.manager())); + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ParameterGroupImpl(inner1, this.manager())); } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new HorizonDbParameterGroupImpl(inner1, this.manager())); + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ParameterGroupImpl(inner1, this.manager())); } - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new HorizonDbParameterGroupImpl(inner1, this.manager())); + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ParameterGroupImpl(inner1, this.manager())); } - public PagedIterable listConnections(String resourceGroupName, + public PagedIterable listConnections(String resourceGroupName, String parameterGroupName) { - PagedIterable inner + PagedIterable inner = this.serviceClient().listConnections(resourceGroupName, parameterGroupName); return ResourceManagerUtils.mapPage(inner, - inner1 -> new HorizonDbParameterGroupConnectionPropertiesImpl(inner1, this.manager())); + inner1 -> new ParameterGroupConnectionPropertiesImpl(inner1, this.manager())); } - public PagedIterable listConnections(String resourceGroupName, + public PagedIterable listConnections(String resourceGroupName, String parameterGroupName, Context context) { - PagedIterable inner + PagedIterable inner = this.serviceClient().listConnections(resourceGroupName, parameterGroupName, context); return ResourceManagerUtils.mapPage(inner, - inner1 -> new HorizonDbParameterGroupConnectionPropertiesImpl(inner1, this.manager())); - } - - public PagedIterable listVersions(String resourceGroupName, String parameterGroupName) { - PagedIterable inner - = this.serviceClient().listVersions(resourceGroupName, parameterGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new HorizonDbParameterGroupImpl(inner1, this.manager())); - } - - public PagedIterable listVersions(String resourceGroupName, String parameterGroupName, - Integer version, Context context) { - PagedIterable inner - = this.serviceClient().listVersions(resourceGroupName, parameterGroupName, version, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new HorizonDbParameterGroupImpl(inner1, this.manager())); + inner1 -> new ParameterGroupConnectionPropertiesImpl(inner1, this.manager())); } - public HorizonDbParameterGroup getById(String id) { + public ParameterGroup getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -119,7 +104,7 @@ public HorizonDbParameterGroup getById(String id) { return this.getByResourceGroupWithResponse(resourceGroupName, parameterGroupName, Context.NONE).getValue(); } - public Response getByIdWithResponse(String id, Context context) { + public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -161,7 +146,7 @@ public void deleteByIdWithResponse(String id, Context context) { this.delete(resourceGroupName, parameterGroupName, context); } - private HorizonDbParameterGroupsClient serviceClient() { + private ParameterGroupsClient serviceClient() { return this.innerClient; } @@ -169,7 +154,7 @@ private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { return this.serviceManager; } - public HorizonDbParameterGroupImpl define(String name) { - return new HorizonDbParameterGroupImpl(name, this.manager()); + public ParameterGroupImpl define(String name) { + return new ParameterGroupImpl(name, this.manager()); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PasswordAuthenticationImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PasswordAuthenticationImpl.java new file mode 100644 index 0000000000000..4ad97b87e3970 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PasswordAuthenticationImpl.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.horizondb.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.horizondb.fluent.models.PasswordAuthenticationInner; +import com.azure.resourcemanager.horizondb.models.PasswordAuthentication; +import com.azure.resourcemanager.horizondb.models.PasswordAuthenticationProperties; + +public final class PasswordAuthenticationImpl implements PasswordAuthentication { + private PasswordAuthenticationInner innerObject; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + PasswordAuthenticationImpl(PasswordAuthenticationInner innerObject, + com.azure.resourcemanager.horizondb.HorizonDbManager 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 PasswordAuthenticationProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public PasswordAuthenticationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PasswordAuthenticationsClientImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PasswordAuthenticationsClientImpl.java new file mode 100644 index 0000000000000..ec0ba1b924cdb --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PasswordAuthenticationsClientImpl.java @@ -0,0 +1,608 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.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.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.horizondb.fluent.PasswordAuthenticationsClient; +import com.azure.resourcemanager.horizondb.fluent.models.PasswordAuthenticationInner; +import com.azure.resourcemanager.horizondb.models.PasswordAuthenticationForPatchUpdate; +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 PasswordAuthenticationsClient. + */ +public final class PasswordAuthenticationsClientImpl implements PasswordAuthenticationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final PasswordAuthenticationsService service; + + /** + * The service client containing this operation class. + */ + private final HorizonDbManagementClientImpl client; + + /** + * Initializes an instance of PasswordAuthenticationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PasswordAuthenticationsClientImpl(HorizonDbManagementClientImpl client) { + this.service = RestProxy.create(PasswordAuthenticationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for HorizonDbManagementClientPasswordAuthentications to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "HorizonDbManagementClientPasswordAuthentications") + public interface PasswordAuthenticationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/authentications/passwordMethod") + @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("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/authentications/passwordMethod") + @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.HorizonDb/clusters/{clusterName}/authentications/passwordMethod") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrReplace(@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") PasswordAuthenticationInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/authentications/passwordMethod") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrReplaceSync(@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") PasswordAuthenticationInner resource, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/authentications/passwordMethod") + @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("clusterName") String clusterName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PasswordAuthenticationForPatchUpdate properties, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/authentications/passwordMethod") + @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, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PasswordAuthenticationForPatchUpdate properties, Context context); + } + + /** + * Gets the service-created PostgreSQL username-and-password authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 service-created PostgreSQL username-and-password authentication method along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, + String clusterName) { + final String accept = "application/json"; + return FluxUtil + .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())); + } + + /** + * Gets the service-created PostgreSQL username-and-password authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 service-created PostgreSQL username-and-password authentication method on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String clusterName) { + return getWithResponseAsync(resourceGroupName, clusterName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the service-created PostgreSQL username-and-password authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 service-created PostgreSQL username-and-password authentication method along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String clusterName, + Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, accept, context); + } + + /** + * Gets the service-created PostgreSQL username-and-password authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 service-created PostgreSQL username-and-password authentication method. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PasswordAuthenticationInner get(String resourceGroupName, String clusterName) { + return getWithResponse(resourceGroupName, clusterName, Context.NONE).getValue(); + } + + /** + * Creates or replaces the service-created PostgreSQL username-and-password authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created PostgreSQL username-and-password authentication method for a HorizonDB cluster along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrReplaceWithResponseAsync(String resourceGroupName, + String clusterName, PasswordAuthenticationInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrReplace(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, resource, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or replaces the service-created PostgreSQL username-and-password authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created PostgreSQL username-and-password authentication method for a HorizonDB cluster along + * with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrReplaceWithResponse(String resourceGroupName, String clusterName, + PasswordAuthenticationInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrReplaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, resource, + Context.NONE); + } + + /** + * Creates or replaces the service-created PostgreSQL username-and-password authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created PostgreSQL username-and-password authentication method for a HorizonDB cluster along + * with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrReplaceWithResponse(String resourceGroupName, String clusterName, + PasswordAuthenticationInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrReplaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, resource, context); + } + + /** + * Creates or replaces the service-created PostgreSQL username-and-password authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 the service-created PostgreSQL username-and-password authentication + * method for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, PasswordAuthenticationInner> + beginCreateOrReplaceAsync(String resourceGroupName, String clusterName, PasswordAuthenticationInner resource) { + Mono>> mono + = createOrReplaceWithResponseAsync(resourceGroupName, clusterName, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), PasswordAuthenticationInner.class, PasswordAuthenticationInner.class, + this.client.getContext()); + } + + /** + * Creates or replaces the service-created PostgreSQL username-and-password authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 the service-created PostgreSQL username-and-password authentication + * method for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PasswordAuthenticationInner> + beginCreateOrReplace(String resourceGroupName, String clusterName, PasswordAuthenticationInner resource) { + Response response = createOrReplaceWithResponse(resourceGroupName, clusterName, resource); + return this.client.getLroResult(response, + PasswordAuthenticationInner.class, PasswordAuthenticationInner.class, Context.NONE); + } + + /** + * Creates or replaces the service-created PostgreSQL username-and-password authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 the service-created PostgreSQL username-and-password authentication + * method for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PasswordAuthenticationInner> beginCreateOrReplace( + String resourceGroupName, String clusterName, PasswordAuthenticationInner resource, Context context) { + Response response = createOrReplaceWithResponse(resourceGroupName, clusterName, resource, context); + return this.client.getLroResult(response, + PasswordAuthenticationInner.class, PasswordAuthenticationInner.class, context); + } + + /** + * Creates or replaces the service-created PostgreSQL username-and-password authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created PostgreSQL username-and-password authentication method for a HorizonDB cluster on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrReplaceAsync(String resourceGroupName, String clusterName, + PasswordAuthenticationInner resource) { + return beginCreateOrReplaceAsync(resourceGroupName, clusterName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or replaces the service-created PostgreSQL username-and-password authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created PostgreSQL username-and-password authentication method for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PasswordAuthenticationInner createOrReplace(String resourceGroupName, String clusterName, + PasswordAuthenticationInner resource) { + return beginCreateOrReplace(resourceGroupName, clusterName, resource).getFinalResult(); + } + + /** + * Creates or replaces the service-created PostgreSQL username-and-password authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created PostgreSQL username-and-password authentication method for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PasswordAuthenticationInner createOrReplace(String resourceGroupName, String clusterName, + PasswordAuthenticationInner resource, Context context) { + return beginCreateOrReplace(resourceGroupName, clusterName, resource, context).getFinalResult(); + } + + /** + * Updates the service-created PostgreSQL username-and-password authentication method. The request is sparse and + * omitted properties preserve their current values. This API version supports enabling the method, disabling the + * method, and resetting its password. For a cluster that already has an administrator but currently has password + * authentication disabled, state Enabled and administratorLoginPassword can be supplied together to re-enable + * password authentication and reset the password. Disabling cannot include credentials and does not remove or + * modify existing database users or roles. Administrator rename is not supported in this API version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created PostgreSQL username-and-password authentication method for a HorizonDB cluster along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, + PasswordAuthenticationForPatchUpdate 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, clusterName, contentType, accept, properties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates the service-created PostgreSQL username-and-password authentication method. The request is sparse and + * omitted properties preserve their current values. This API version supports enabling the method, disabling the + * method, and resetting its password. For a cluster that already has an administrator but currently has password + * authentication disabled, state Enabled and administratorLoginPassword can be supplied together to re-enable + * password authentication and reset the password. Disabling cannot include credentials and does not remove or + * modify existing database users or roles. Administrator rename is not supported in this API version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created PostgreSQL username-and-password authentication method for a HorizonDB cluster along + * with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String clusterName, + PasswordAuthenticationForPatchUpdate properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, properties, + Context.NONE); + } + + /** + * Updates the service-created PostgreSQL username-and-password authentication method. The request is sparse and + * omitted properties preserve their current values. This API version supports enabling the method, disabling the + * method, and resetting its password. For a cluster that already has an administrator but currently has password + * authentication disabled, state Enabled and administratorLoginPassword can be supplied together to re-enable + * password authentication and reset the password. Disabling cannot include credentials and does not remove or + * modify existing database users or roles. Administrator rename is not supported in this API version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created PostgreSQL username-and-password authentication method for a HorizonDB cluster along + * with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String clusterName, + PasswordAuthenticationForPatchUpdate 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, clusterName, contentType, accept, properties, context); + } + + /** + * Updates the service-created PostgreSQL username-and-password authentication method. The request is sparse and + * omitted properties preserve their current values. This API version supports enabling the method, disabling the + * method, and resetting its password. For a cluster that already has an administrator but currently has password + * authentication disabled, state Enabled and administratorLoginPassword can be supplied together to re-enable + * password authentication and reset the password. Disabling cannot include credentials and does not remove or + * modify existing database users or roles. Administrator rename is not supported in this API version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 the service-created PostgreSQL username-and-password authentication + * method for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, PasswordAuthenticationInner> beginUpdateAsync( + String resourceGroupName, String clusterName, PasswordAuthenticationForPatchUpdate properties) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, clusterName, properties); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), PasswordAuthenticationInner.class, PasswordAuthenticationInner.class, + this.client.getContext()); + } + + /** + * Updates the service-created PostgreSQL username-and-password authentication method. The request is sparse and + * omitted properties preserve their current values. This API version supports enabling the method, disabling the + * method, and resetting its password. For a cluster that already has an administrator but currently has password + * authentication disabled, state Enabled and administratorLoginPassword can be supplied together to re-enable + * password authentication and reset the password. Disabling cannot include credentials and does not remove or + * modify existing database users or roles. Administrator rename is not supported in this API version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 the service-created PostgreSQL username-and-password authentication + * method for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PasswordAuthenticationInner> + beginUpdate(String resourceGroupName, String clusterName, PasswordAuthenticationForPatchUpdate properties) { + Response response = updateWithResponse(resourceGroupName, clusterName, properties); + return this.client.getLroResult(response, + PasswordAuthenticationInner.class, PasswordAuthenticationInner.class, Context.NONE); + } + + /** + * Updates the service-created PostgreSQL username-and-password authentication method. The request is sparse and + * omitted properties preserve their current values. This API version supports enabling the method, disabling the + * method, and resetting its password. For a cluster that already has an administrator but currently has password + * authentication disabled, state Enabled and administratorLoginPassword can be supplied together to re-enable + * password authentication and reset the password. Disabling cannot include credentials and does not remove or + * modify existing database users or roles. Administrator rename is not supported in this API version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 the service-created PostgreSQL username-and-password authentication + * method for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PasswordAuthenticationInner> beginUpdate( + String resourceGroupName, String clusterName, PasswordAuthenticationForPatchUpdate properties, + Context context) { + Response response = updateWithResponse(resourceGroupName, clusterName, properties, context); + return this.client.getLroResult(response, + PasswordAuthenticationInner.class, PasswordAuthenticationInner.class, context); + } + + /** + * Updates the service-created PostgreSQL username-and-password authentication method. The request is sparse and + * omitted properties preserve their current values. This API version supports enabling the method, disabling the + * method, and resetting its password. For a cluster that already has an administrator but currently has password + * authentication disabled, state Enabled and administratorLoginPassword can be supplied together to re-enable + * password authentication and reset the password. Disabling cannot include credentials and does not remove or + * modify existing database users or roles. Administrator rename is not supported in this API version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created PostgreSQL username-and-password authentication method for a HorizonDB cluster on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync(String resourceGroupName, String clusterName, + PasswordAuthenticationForPatchUpdate properties) { + return beginUpdateAsync(resourceGroupName, clusterName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates the service-created PostgreSQL username-and-password authentication method. The request is sparse and + * omitted properties preserve their current values. This API version supports enabling the method, disabling the + * method, and resetting its password. For a cluster that already has an administrator but currently has password + * authentication disabled, state Enabled and administratorLoginPassword can be supplied together to re-enable + * password authentication and reset the password. Disabling cannot include credentials and does not remove or + * modify existing database users or roles. Administrator rename is not supported in this API version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created PostgreSQL username-and-password authentication method for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PasswordAuthenticationInner update(String resourceGroupName, String clusterName, + PasswordAuthenticationForPatchUpdate properties) { + return beginUpdate(resourceGroupName, clusterName, properties).getFinalResult(); + } + + /** + * Updates the service-created PostgreSQL username-and-password authentication method. The request is sparse and + * omitted properties preserve their current values. This API version supports enabling the method, disabling the + * method, and resetting its password. For a cluster that already has an administrator but currently has password + * authentication disabled, state Enabled and administratorLoginPassword can be supplied together to re-enable + * password authentication and reset the password. Disabling cannot include credentials and does not remove or + * modify existing database users or roles. Administrator rename is not supported in this API version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created PostgreSQL username-and-password authentication method for a HorizonDB cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PasswordAuthenticationInner update(String resourceGroupName, String clusterName, + PasswordAuthenticationForPatchUpdate properties, Context context) { + return beginUpdate(resourceGroupName, clusterName, properties, context).getFinalResult(); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PasswordAuthenticationsImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PasswordAuthenticationsImpl.java new file mode 100644 index 0000000000000..0534c2b7a7bc6 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PasswordAuthenticationsImpl.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.horizondb.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.horizondb.fluent.PasswordAuthenticationsClient; +import com.azure.resourcemanager.horizondb.fluent.models.PasswordAuthenticationInner; +import com.azure.resourcemanager.horizondb.models.PasswordAuthentication; +import com.azure.resourcemanager.horizondb.models.PasswordAuthenticationForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.PasswordAuthentications; + +public final class PasswordAuthenticationsImpl implements PasswordAuthentications { + private static final ClientLogger LOGGER = new ClientLogger(PasswordAuthenticationsImpl.class); + + private final PasswordAuthenticationsClient innerClient; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + public PasswordAuthenticationsImpl(PasswordAuthenticationsClient innerClient, + com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String clusterName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, clusterName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PasswordAuthenticationImpl(inner.getValue(), this.manager())); + } + + public PasswordAuthentication get(String resourceGroupName, String clusterName) { + PasswordAuthenticationInner inner = this.serviceClient().get(resourceGroupName, clusterName); + if (inner != null) { + return new PasswordAuthenticationImpl(inner, this.manager()); + } else { + return null; + } + } + + public PasswordAuthentication createOrReplace(String resourceGroupName, String clusterName, + PasswordAuthenticationInner resource) { + PasswordAuthenticationInner inner + = this.serviceClient().createOrReplace(resourceGroupName, clusterName, resource); + if (inner != null) { + return new PasswordAuthenticationImpl(inner, this.manager()); + } else { + return null; + } + } + + public PasswordAuthentication createOrReplace(String resourceGroupName, String clusterName, + PasswordAuthenticationInner resource, Context context) { + PasswordAuthenticationInner inner + = this.serviceClient().createOrReplace(resourceGroupName, clusterName, resource, context); + if (inner != null) { + return new PasswordAuthenticationImpl(inner, this.manager()); + } else { + return null; + } + } + + public PasswordAuthentication update(String resourceGroupName, String clusterName, + PasswordAuthenticationForPatchUpdate properties) { + PasswordAuthenticationInner inner = this.serviceClient().update(resourceGroupName, clusterName, properties); + if (inner != null) { + return new PasswordAuthenticationImpl(inner, this.manager()); + } else { + return null; + } + } + + public PasswordAuthentication update(String resourceGroupName, String clusterName, + PasswordAuthenticationForPatchUpdate properties, Context context) { + PasswordAuthenticationInner inner + = this.serviceClient().update(resourceGroupName, clusterName, properties, context); + if (inner != null) { + return new PasswordAuthenticationImpl(inner, this.manager()); + } else { + return null; + } + } + + private PasswordAuthenticationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PoolImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PoolImpl.java new file mode 100644 index 0000000000000..0c39b491ca57f --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PoolImpl.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.horizondb.fluent.models.PoolInner; +import com.azure.resourcemanager.horizondb.models.Pool; +import com.azure.resourcemanager.horizondb.models.PoolForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.PoolProperties; +import com.azure.resourcemanager.horizondb.models.PoolPropertiesForPatchUpdate; +import java.util.Collections; +import java.util.Map; + +public final class PoolImpl implements Pool, Pool.Definition, Pool.Update { + private PoolInner innerObject; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public PoolProperties properties() { + return this.innerModel().properties(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public PoolInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String clusterName; + + private String poolName; + + private PoolForPatchUpdate updateProperties; + + public PoolImpl withExistingCluster(String resourceGroupName, String clusterName) { + this.resourceGroupName = resourceGroupName; + this.clusterName = clusterName; + return this; + } + + public Pool create() { + this.innerObject = serviceManager.serviceClient() + .getPools() + .createOrReplace(resourceGroupName, clusterName, poolName, this.innerModel(), Context.NONE); + return this; + } + + public Pool create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getPools() + .createOrReplace(resourceGroupName, clusterName, poolName, this.innerModel(), context); + return this; + } + + PoolImpl(String name, com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerObject = new PoolInner(); + this.serviceManager = serviceManager; + this.poolName = name; + } + + public PoolImpl update() { + this.updateProperties = new PoolForPatchUpdate(); + return this; + } + + public Pool apply() { + this.innerObject = serviceManager.serviceClient() + .getPools() + .update(resourceGroupName, clusterName, poolName, updateProperties, Context.NONE); + return this; + } + + public Pool apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getPools() + .update(resourceGroupName, clusterName, poolName, updateProperties, context); + return this; + } + + PoolImpl(PoolInner innerObject, com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusters"); + this.poolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "pools"); + } + + public Pool refresh() { + this.innerObject = serviceManager.serviceClient() + .getPools() + .getWithResponse(resourceGroupName, clusterName, poolName, Context.NONE) + .getValue(); + return this; + } + + public Pool refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getPools() + .getWithResponse(resourceGroupName, clusterName, poolName, context) + .getValue(); + return this; + } + + public Pool start() { + return serviceManager.pools().start(resourceGroupName, clusterName, poolName); + } + + public Pool start(Context context) { + return serviceManager.pools().start(resourceGroupName, clusterName, poolName, context); + } + + public Pool stop() { + return serviceManager.pools().stop(resourceGroupName, clusterName, poolName); + } + + public Pool stop(Context context) { + return serviceManager.pools().stop(resourceGroupName, clusterName, poolName, context); + } + + public Pool restart() { + return serviceManager.pools().restart(resourceGroupName, clusterName, poolName); + } + + public Pool restart(Context context) { + return serviceManager.pools().restart(resourceGroupName, clusterName, poolName, context); + } + + public PoolImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateProperties.withTags(tags); + return this; + } + } + + public PoolImpl withProperties(PoolProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public PoolImpl withProperties(PoolPropertiesForPatchUpdate properties) { + this.updateProperties.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PoolsClientImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PoolsClientImpl.java new file mode 100644 index 0000000000000..f07b4088b890a --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PoolsClientImpl.java @@ -0,0 +1,2068 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.horizondb.fluent.PoolsClient; +import com.azure.resourcemanager.horizondb.fluent.models.PoolInner; +import com.azure.resourcemanager.horizondb.implementation.models.PoolListResult; +import com.azure.resourcemanager.horizondb.models.PoolForPatchUpdate; +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 PoolsClient. + */ +public final class PoolsClientImpl implements PoolsClient { + /** + * The proxy service used to perform REST calls. + */ + private final PoolsService service; + + /** + * The service client containing this operation class. + */ + private final HorizonDbManagementClientImpl client; + + /** + * Initializes an instance of PoolsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PoolsClientImpl(HorizonDbManagementClientImpl client) { + this.service = RestProxy.create(PoolsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for HorizonDbManagementClientPools to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "HorizonDbManagementClientPools") + public interface PoolsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}") + @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("clusterName") String clusterName, + @PathParam("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}") + @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("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrReplace(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("poolName") String poolName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") PoolInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrReplaceSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("poolName") String poolName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") PoolInner resource, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}") + @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("clusterName") String clusterName, + @PathParam("poolName") String poolName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") PoolForPatchUpdate properties, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}") + @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("poolName") String poolName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") PoolForPatchUpdate properties, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}") + @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("clusterName") String clusterName, + @PathParam("poolName") String poolName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}") + @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("poolName") String poolName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools") + @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("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools") + @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, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/start") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> start(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/start") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response startSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/stop") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> stop(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/stop") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response stopSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/restart") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> restart(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/pools/{poolName}/restart") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response restartSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("poolName") String poolName, @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 information about a HorizonDB pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a HorizonDB pool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String poolName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information about a HorizonDB pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a HorizonDB pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String clusterName, String poolName) { + return getWithResponseAsync(resourceGroupName, clusterName, poolName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about a HorizonDB pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a HorizonDB pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String clusterName, String poolName, + Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, poolName, accept, context); + } + + /** + * Gets information about a HorizonDB pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PoolInner get(String resourceGroupName, String clusterName, String poolName) { + return getWithResponse(resourceGroupName, clusterName, poolName, Context.NONE).getValue(); + } + + /** + * Creates a new HorizonDB pool or replaces an existing pool, including its node allocation, compute model, + * high-availability configuration, or associated parameter group. nodeCount and highAvailability.mode are required + * and have no service defaults. nodeCount must be 1 through 16. Disabled is valid only when nodeCount is 1. AnyZone + * and ZoneRedundant are valid only when nodeCount is 2 through 16. AnyZone permits same-zone or cross-zone + * placement, while ZoneRedundant requires nodes to be allocated across availability zones. Node allocation and + * high-availability reconfiguration are atomic: if all requested nodes or the required zonal topology cannot be + * provisioned, the long-running operation fails and the previous resource state is preserved. A pool name must + * differ from its parent cluster name because the Cluster-scoped ReadWrite Endpoint is named after the Cluster and + * the Pool-scoped ReadOnly Endpoint is named after the Pool; the service rejects a request whose names would + * collide. Creating a pool also creates exactly one service-managed Pool-scoped ReadOnly Endpoint representing that + * Pool and its network boundary. The Endpoint's associatedResourceId identifies the Pool, and the Endpoint cannot + * outlive or be deleted independently from it. When the first pool is created, the service automatically designates + * it to host the cluster's read-write node when an eligible node is available. A Cluster must contain at least one + * Pool before a private endpoint connection can be created or approved. This API version supports at most one pool + * per cluster; an attempt to create another pool is rejected with 409 Conflict. parameterGroup, + * parameterGroupResourceId, and applyMethod are required. When creating a new pool in this API version, + * parameterGroupResourceId must identify the corresponding default parameter group; a customer-created parameter + * group is rejected. When replacing an existing pool, the request can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated before the resource is changed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 represents the HorizonDB pool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrReplaceWithResponseAsync(String resourceGroupName, + String clusterName, String poolName, PoolInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrReplace(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, contentType, accept, + resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates a new HorizonDB pool or replaces an existing pool, including its node allocation, compute model, + * high-availability configuration, or associated parameter group. nodeCount and highAvailability.mode are required + * and have no service defaults. nodeCount must be 1 through 16. Disabled is valid only when nodeCount is 1. AnyZone + * and ZoneRedundant are valid only when nodeCount is 2 through 16. AnyZone permits same-zone or cross-zone + * placement, while ZoneRedundant requires nodes to be allocated across availability zones. Node allocation and + * high-availability reconfiguration are atomic: if all requested nodes or the required zonal topology cannot be + * provisioned, the long-running operation fails and the previous resource state is preserved. A pool name must + * differ from its parent cluster name because the Cluster-scoped ReadWrite Endpoint is named after the Cluster and + * the Pool-scoped ReadOnly Endpoint is named after the Pool; the service rejects a request whose names would + * collide. Creating a pool also creates exactly one service-managed Pool-scoped ReadOnly Endpoint representing that + * Pool and its network boundary. The Endpoint's associatedResourceId identifies the Pool, and the Endpoint cannot + * outlive or be deleted independently from it. When the first pool is created, the service automatically designates + * it to host the cluster's read-write node when an eligible node is available. A Cluster must contain at least one + * Pool before a private endpoint connection can be created or approved. This API version supports at most one pool + * per cluster; an attempt to create another pool is rejected with 409 Conflict. parameterGroup, + * parameterGroupResourceId, and applyMethod are required. When creating a new pool in this API version, + * parameterGroupResourceId must identify the corresponding default parameter group; a customer-created parameter + * group is rejected. When replacing an existing pool, the request can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated before the resource is changed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 represents the HorizonDB pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrReplaceWithResponse(String resourceGroupName, String clusterName, + String poolName, PoolInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrReplaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, contentType, accept, resource, + Context.NONE); + } + + /** + * Creates a new HorizonDB pool or replaces an existing pool, including its node allocation, compute model, + * high-availability configuration, or associated parameter group. nodeCount and highAvailability.mode are required + * and have no service defaults. nodeCount must be 1 through 16. Disabled is valid only when nodeCount is 1. AnyZone + * and ZoneRedundant are valid only when nodeCount is 2 through 16. AnyZone permits same-zone or cross-zone + * placement, while ZoneRedundant requires nodes to be allocated across availability zones. Node allocation and + * high-availability reconfiguration are atomic: if all requested nodes or the required zonal topology cannot be + * provisioned, the long-running operation fails and the previous resource state is preserved. A pool name must + * differ from its parent cluster name because the Cluster-scoped ReadWrite Endpoint is named after the Cluster and + * the Pool-scoped ReadOnly Endpoint is named after the Pool; the service rejects a request whose names would + * collide. Creating a pool also creates exactly one service-managed Pool-scoped ReadOnly Endpoint representing that + * Pool and its network boundary. The Endpoint's associatedResourceId identifies the Pool, and the Endpoint cannot + * outlive or be deleted independently from it. When the first pool is created, the service automatically designates + * it to host the cluster's read-write node when an eligible node is available. A Cluster must contain at least one + * Pool before a private endpoint connection can be created or approved. This API version supports at most one pool + * per cluster; an attempt to create another pool is rejected with 409 Conflict. parameterGroup, + * parameterGroupResourceId, and applyMethod are required. When creating a new pool in this API version, + * parameterGroupResourceId must identify the corresponding default parameter group; a customer-created parameter + * group is rejected. When replacing an existing pool, the request can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated before the resource is changed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 represents the HorizonDB pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrReplaceWithResponse(String resourceGroupName, String clusterName, + String poolName, PoolInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrReplaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, contentType, accept, resource, + context); + } + + /** + * Creates a new HorizonDB pool or replaces an existing pool, including its node allocation, compute model, + * high-availability configuration, or associated parameter group. nodeCount and highAvailability.mode are required + * and have no service defaults. nodeCount must be 1 through 16. Disabled is valid only when nodeCount is 1. AnyZone + * and ZoneRedundant are valid only when nodeCount is 2 through 16. AnyZone permits same-zone or cross-zone + * placement, while ZoneRedundant requires nodes to be allocated across availability zones. Node allocation and + * high-availability reconfiguration are atomic: if all requested nodes or the required zonal topology cannot be + * provisioned, the long-running operation fails and the previous resource state is preserved. A pool name must + * differ from its parent cluster name because the Cluster-scoped ReadWrite Endpoint is named after the Cluster and + * the Pool-scoped ReadOnly Endpoint is named after the Pool; the service rejects a request whose names would + * collide. Creating a pool also creates exactly one service-managed Pool-scoped ReadOnly Endpoint representing that + * Pool and its network boundary. The Endpoint's associatedResourceId identifies the Pool, and the Endpoint cannot + * outlive or be deleted independently from it. When the first pool is created, the service automatically designates + * it to host the cluster's read-write node when an eligible node is available. A Cluster must contain at least one + * Pool before a private endpoint connection can be created or approved. This API version supports at most one pool + * per cluster; an attempt to create another pool is rejected with 409 Conflict. parameterGroup, + * parameterGroupResourceId, and applyMethod are required. When creating a new pool in this API version, + * parameterGroupResourceId must identify the corresponding default parameter group; a customer-created parameter + * group is rejected. When replacing an existing pool, the request can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated before the resource is changed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, PoolInner> beginCreateOrReplaceAsync(String resourceGroupName, + String clusterName, String poolName, PoolInner resource) { + Mono>> mono + = createOrReplaceWithResponseAsync(resourceGroupName, clusterName, poolName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), PoolInner.class, + PoolInner.class, this.client.getContext()); + } + + /** + * Creates a new HorizonDB pool or replaces an existing pool, including its node allocation, compute model, + * high-availability configuration, or associated parameter group. nodeCount and highAvailability.mode are required + * and have no service defaults. nodeCount must be 1 through 16. Disabled is valid only when nodeCount is 1. AnyZone + * and ZoneRedundant are valid only when nodeCount is 2 through 16. AnyZone permits same-zone or cross-zone + * placement, while ZoneRedundant requires nodes to be allocated across availability zones. Node allocation and + * high-availability reconfiguration are atomic: if all requested nodes or the required zonal topology cannot be + * provisioned, the long-running operation fails and the previous resource state is preserved. A pool name must + * differ from its parent cluster name because the Cluster-scoped ReadWrite Endpoint is named after the Cluster and + * the Pool-scoped ReadOnly Endpoint is named after the Pool; the service rejects a request whose names would + * collide. Creating a pool also creates exactly one service-managed Pool-scoped ReadOnly Endpoint representing that + * Pool and its network boundary. The Endpoint's associatedResourceId identifies the Pool, and the Endpoint cannot + * outlive or be deleted independently from it. When the first pool is created, the service automatically designates + * it to host the cluster's read-write node when an eligible node is available. A Cluster must contain at least one + * Pool before a private endpoint connection can be created or approved. This API version supports at most one pool + * per cluster; an attempt to create another pool is rejected with 409 Conflict. parameterGroup, + * parameterGroupResourceId, and applyMethod are required. When creating a new pool in this API version, + * parameterGroupResourceId must identify the corresponding default parameter group; a customer-created parameter + * group is rejected. When replacing an existing pool, the request can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated before the resource is changed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PoolInner> beginCreateOrReplace(String resourceGroupName, + String clusterName, String poolName, PoolInner resource) { + Response response = createOrReplaceWithResponse(resourceGroupName, clusterName, poolName, resource); + return this.client.getLroResult(response, PoolInner.class, PoolInner.class, Context.NONE); + } + + /** + * Creates a new HorizonDB pool or replaces an existing pool, including its node allocation, compute model, + * high-availability configuration, or associated parameter group. nodeCount and highAvailability.mode are required + * and have no service defaults. nodeCount must be 1 through 16. Disabled is valid only when nodeCount is 1. AnyZone + * and ZoneRedundant are valid only when nodeCount is 2 through 16. AnyZone permits same-zone or cross-zone + * placement, while ZoneRedundant requires nodes to be allocated across availability zones. Node allocation and + * high-availability reconfiguration are atomic: if all requested nodes or the required zonal topology cannot be + * provisioned, the long-running operation fails and the previous resource state is preserved. A pool name must + * differ from its parent cluster name because the Cluster-scoped ReadWrite Endpoint is named after the Cluster and + * the Pool-scoped ReadOnly Endpoint is named after the Pool; the service rejects a request whose names would + * collide. Creating a pool also creates exactly one service-managed Pool-scoped ReadOnly Endpoint representing that + * Pool and its network boundary. The Endpoint's associatedResourceId identifies the Pool, and the Endpoint cannot + * outlive or be deleted independently from it. When the first pool is created, the service automatically designates + * it to host the cluster's read-write node when an eligible node is available. A Cluster must contain at least one + * Pool before a private endpoint connection can be created or approved. This API version supports at most one pool + * per cluster; an attempt to create another pool is rejected with 409 Conflict. parameterGroup, + * parameterGroupResourceId, and applyMethod are required. When creating a new pool in this API version, + * parameterGroupResourceId must identify the corresponding default parameter group; a customer-created parameter + * group is rejected. When replacing an existing pool, the request can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated before the resource is changed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PoolInner> beginCreateOrReplace(String resourceGroupName, + String clusterName, String poolName, PoolInner resource, Context context) { + Response response + = createOrReplaceWithResponse(resourceGroupName, clusterName, poolName, resource, context); + return this.client.getLroResult(response, PoolInner.class, PoolInner.class, context); + } + + /** + * Creates a new HorizonDB pool or replaces an existing pool, including its node allocation, compute model, + * high-availability configuration, or associated parameter group. nodeCount and highAvailability.mode are required + * and have no service defaults. nodeCount must be 1 through 16. Disabled is valid only when nodeCount is 1. AnyZone + * and ZoneRedundant are valid only when nodeCount is 2 through 16. AnyZone permits same-zone or cross-zone + * placement, while ZoneRedundant requires nodes to be allocated across availability zones. Node allocation and + * high-availability reconfiguration are atomic: if all requested nodes or the required zonal topology cannot be + * provisioned, the long-running operation fails and the previous resource state is preserved. A pool name must + * differ from its parent cluster name because the Cluster-scoped ReadWrite Endpoint is named after the Cluster and + * the Pool-scoped ReadOnly Endpoint is named after the Pool; the service rejects a request whose names would + * collide. Creating a pool also creates exactly one service-managed Pool-scoped ReadOnly Endpoint representing that + * Pool and its network boundary. The Endpoint's associatedResourceId identifies the Pool, and the Endpoint cannot + * outlive or be deleted independently from it. When the first pool is created, the service automatically designates + * it to host the cluster's read-write node when an eligible node is available. A Cluster must contain at least one + * Pool before a private endpoint connection can be created or approved. This API version supports at most one pool + * per cluster; an attempt to create another pool is rejected with 409 Conflict. parameterGroup, + * parameterGroupResourceId, and applyMethod are required. When creating a new pool in this API version, + * parameterGroupResourceId must identify the corresponding default parameter group; a customer-created parameter + * group is rejected. When replacing an existing pool, the request can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated before the resource is changed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 represents the HorizonDB pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrReplaceAsync(String resourceGroupName, String clusterName, String poolName, + PoolInner resource) { + return beginCreateOrReplaceAsync(resourceGroupName, clusterName, poolName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a new HorizonDB pool or replaces an existing pool, including its node allocation, compute model, + * high-availability configuration, or associated parameter group. nodeCount and highAvailability.mode are required + * and have no service defaults. nodeCount must be 1 through 16. Disabled is valid only when nodeCount is 1. AnyZone + * and ZoneRedundant are valid only when nodeCount is 2 through 16. AnyZone permits same-zone or cross-zone + * placement, while ZoneRedundant requires nodes to be allocated across availability zones. Node allocation and + * high-availability reconfiguration are atomic: if all requested nodes or the required zonal topology cannot be + * provisioned, the long-running operation fails and the previous resource state is preserved. A pool name must + * differ from its parent cluster name because the Cluster-scoped ReadWrite Endpoint is named after the Cluster and + * the Pool-scoped ReadOnly Endpoint is named after the Pool; the service rejects a request whose names would + * collide. Creating a pool also creates exactly one service-managed Pool-scoped ReadOnly Endpoint representing that + * Pool and its network boundary. The Endpoint's associatedResourceId identifies the Pool, and the Endpoint cannot + * outlive or be deleted independently from it. When the first pool is created, the service automatically designates + * it to host the cluster's read-write node when an eligible node is available. A Cluster must contain at least one + * Pool before a private endpoint connection can be created or approved. This API version supports at most one pool + * per cluster; an attempt to create another pool is rejected with 409 Conflict. parameterGroup, + * parameterGroupResourceId, and applyMethod are required. When creating a new pool in this API version, + * parameterGroupResourceId must identify the corresponding default parameter group; a customer-created parameter + * group is rejected. When replacing an existing pool, the request can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated before the resource is changed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PoolInner createOrReplace(String resourceGroupName, String clusterName, String poolName, + PoolInner resource) { + return beginCreateOrReplace(resourceGroupName, clusterName, poolName, resource).getFinalResult(); + } + + /** + * Creates a new HorizonDB pool or replaces an existing pool, including its node allocation, compute model, + * high-availability configuration, or associated parameter group. nodeCount and highAvailability.mode are required + * and have no service defaults. nodeCount must be 1 through 16. Disabled is valid only when nodeCount is 1. AnyZone + * and ZoneRedundant are valid only when nodeCount is 2 through 16. AnyZone permits same-zone or cross-zone + * placement, while ZoneRedundant requires nodes to be allocated across availability zones. Node allocation and + * high-availability reconfiguration are atomic: if all requested nodes or the required zonal topology cannot be + * provisioned, the long-running operation fails and the previous resource state is preserved. A pool name must + * differ from its parent cluster name because the Cluster-scoped ReadWrite Endpoint is named after the Cluster and + * the Pool-scoped ReadOnly Endpoint is named after the Pool; the service rejects a request whose names would + * collide. Creating a pool also creates exactly one service-managed Pool-scoped ReadOnly Endpoint representing that + * Pool and its network boundary. The Endpoint's associatedResourceId identifies the Pool, and the Endpoint cannot + * outlive or be deleted independently from it. When the first pool is created, the service automatically designates + * it to host the cluster's read-write node when an eligible node is available. A Cluster must contain at least one + * Pool before a private endpoint connection can be created or approved. This API version supports at most one pool + * per cluster; an attempt to create another pool is rejected with 409 Conflict. parameterGroup, + * parameterGroupResourceId, and applyMethod are required. When creating a new pool in this API version, + * parameterGroupResourceId must identify the corresponding default parameter group; a customer-created parameter + * group is rejected. When replacing an existing pool, the request can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated before the resource is changed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PoolInner createOrReplace(String resourceGroupName, String clusterName, String poolName, PoolInner resource, + Context context) { + return beginCreateOrReplace(resourceGroupName, clusterName, poolName, resource, context).getFinalResult(); + } + + /** + * Updates an existing HorizonDB pool, including its node allocation, selected compute model properties, compute + * model type, high-availability configuration, or associated parameter group. Omitted nodeCount and + * highAvailability.mode values preserve their existing values; the service recursively merges the PATCH before + * atomically validating the effective tuple. nodeCount, when supplied, must be 1 through 16. Disabled is valid only + * when the effective nodeCount is 1. AnyZone and ZoneRedundant are valid only when the effective nodeCount is 2 + * through 16. Therefore, crossing between those node-count ranges requires nodeCount and highAvailability.mode to + * be changed together. AnyZone permits same-zone or cross-zone placement. Changing from AnyZone to ZoneRedundant + * may allocate a replacement node in another availability zone and replace a read-only node, disconnecting + * connections to the replaced node. If all requested nodes or the required zonal topology cannot be provisioned, + * the long-running operation fails and the previous resource state is preserved. To deallocate runtime compute + * without changing the configured nodeCount, use the Pool stop action. When parameterGroup is supplied, both + * parameterGroupResourceId and applyMethod are required. The pool can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated against the recursively merged configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 represents the HorizonDB pool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, + String poolName, PoolForPatchUpdate 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, clusterName, poolName, contentType, accept, + properties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates an existing HorizonDB pool, including its node allocation, selected compute model properties, compute + * model type, high-availability configuration, or associated parameter group. Omitted nodeCount and + * highAvailability.mode values preserve their existing values; the service recursively merges the PATCH before + * atomically validating the effective tuple. nodeCount, when supplied, must be 1 through 16. Disabled is valid only + * when the effective nodeCount is 1. AnyZone and ZoneRedundant are valid only when the effective nodeCount is 2 + * through 16. Therefore, crossing between those node-count ranges requires nodeCount and highAvailability.mode to + * be changed together. AnyZone permits same-zone or cross-zone placement. Changing from AnyZone to ZoneRedundant + * may allocate a replacement node in another availability zone and replace a read-only node, disconnecting + * connections to the replaced node. If all requested nodes or the required zonal topology cannot be provisioned, + * the long-running operation fails and the previous resource state is preserved. To deallocate runtime compute + * without changing the configured nodeCount, use the Pool stop action. When parameterGroup is supplied, both + * parameterGroupResourceId and applyMethod are required. The pool can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated against the recursively merged configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 represents the HorizonDB pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String clusterName, String poolName, + PoolForPatchUpdate properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, contentType, accept, properties, + Context.NONE); + } + + /** + * Updates an existing HorizonDB pool, including its node allocation, selected compute model properties, compute + * model type, high-availability configuration, or associated parameter group. Omitted nodeCount and + * highAvailability.mode values preserve their existing values; the service recursively merges the PATCH before + * atomically validating the effective tuple. nodeCount, when supplied, must be 1 through 16. Disabled is valid only + * when the effective nodeCount is 1. AnyZone and ZoneRedundant are valid only when the effective nodeCount is 2 + * through 16. Therefore, crossing between those node-count ranges requires nodeCount and highAvailability.mode to + * be changed together. AnyZone permits same-zone or cross-zone placement. Changing from AnyZone to ZoneRedundant + * may allocate a replacement node in another availability zone and replace a read-only node, disconnecting + * connections to the replaced node. If all requested nodes or the required zonal topology cannot be provisioned, + * the long-running operation fails and the previous resource state is preserved. To deallocate runtime compute + * without changing the configured nodeCount, use the Pool stop action. When parameterGroup is supplied, both + * parameterGroupResourceId and applyMethod are required. The pool can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated against the recursively merged configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 represents the HorizonDB pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String clusterName, String poolName, + PoolForPatchUpdate 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, clusterName, poolName, contentType, accept, properties, + context); + } + + /** + * Updates an existing HorizonDB pool, including its node allocation, selected compute model properties, compute + * model type, high-availability configuration, or associated parameter group. Omitted nodeCount and + * highAvailability.mode values preserve their existing values; the service recursively merges the PATCH before + * atomically validating the effective tuple. nodeCount, when supplied, must be 1 through 16. Disabled is valid only + * when the effective nodeCount is 1. AnyZone and ZoneRedundant are valid only when the effective nodeCount is 2 + * through 16. Therefore, crossing between those node-count ranges requires nodeCount and highAvailability.mode to + * be changed together. AnyZone permits same-zone or cross-zone placement. Changing from AnyZone to ZoneRedundant + * may allocate a replacement node in another availability zone and replace a read-only node, disconnecting + * connections to the replaced node. If all requested nodes or the required zonal topology cannot be provisioned, + * the long-running operation fails and the previous resource state is preserved. To deallocate runtime compute + * without changing the configured nodeCount, use the Pool stop action. When parameterGroup is supplied, both + * parameterGroupResourceId and applyMethod are required. The pool can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated against the recursively merged configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, PoolInner> beginUpdateAsync(String resourceGroupName, String clusterName, + String poolName, PoolForPatchUpdate properties) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, clusterName, poolName, properties); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), PoolInner.class, + PoolInner.class, this.client.getContext()); + } + + /** + * Updates an existing HorizonDB pool, including its node allocation, selected compute model properties, compute + * model type, high-availability configuration, or associated parameter group. Omitted nodeCount and + * highAvailability.mode values preserve their existing values; the service recursively merges the PATCH before + * atomically validating the effective tuple. nodeCount, when supplied, must be 1 through 16. Disabled is valid only + * when the effective nodeCount is 1. AnyZone and ZoneRedundant are valid only when the effective nodeCount is 2 + * through 16. Therefore, crossing between those node-count ranges requires nodeCount and highAvailability.mode to + * be changed together. AnyZone permits same-zone or cross-zone placement. Changing from AnyZone to ZoneRedundant + * may allocate a replacement node in another availability zone and replace a read-only node, disconnecting + * connections to the replaced node. If all requested nodes or the required zonal topology cannot be provisioned, + * the long-running operation fails and the previous resource state is preserved. To deallocate runtime compute + * without changing the configured nodeCount, use the Pool stop action. When parameterGroup is supplied, both + * parameterGroupResourceId and applyMethod are required. The pool can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated against the recursively merged configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PoolInner> beginUpdate(String resourceGroupName, String clusterName, + String poolName, PoolForPatchUpdate properties) { + Response response = updateWithResponse(resourceGroupName, clusterName, poolName, properties); + return this.client.getLroResult(response, PoolInner.class, PoolInner.class, Context.NONE); + } + + /** + * Updates an existing HorizonDB pool, including its node allocation, selected compute model properties, compute + * model type, high-availability configuration, or associated parameter group. Omitted nodeCount and + * highAvailability.mode values preserve their existing values; the service recursively merges the PATCH before + * atomically validating the effective tuple. nodeCount, when supplied, must be 1 through 16. Disabled is valid only + * when the effective nodeCount is 1. AnyZone and ZoneRedundant are valid only when the effective nodeCount is 2 + * through 16. Therefore, crossing between those node-count ranges requires nodeCount and highAvailability.mode to + * be changed together. AnyZone permits same-zone or cross-zone placement. Changing from AnyZone to ZoneRedundant + * may allocate a replacement node in another availability zone and replace a read-only node, disconnecting + * connections to the replaced node. If all requested nodes or the required zonal topology cannot be provisioned, + * the long-running operation fails and the previous resource state is preserved. To deallocate runtime compute + * without changing the configured nodeCount, use the Pool stop action. When parameterGroup is supplied, both + * parameterGroupResourceId and applyMethod are required. The pool can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated against the recursively merged configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PoolInner> beginUpdate(String resourceGroupName, String clusterName, + String poolName, PoolForPatchUpdate properties, Context context) { + Response response + = updateWithResponse(resourceGroupName, clusterName, poolName, properties, context); + return this.client.getLroResult(response, PoolInner.class, PoolInner.class, context); + } + + /** + * Updates an existing HorizonDB pool, including its node allocation, selected compute model properties, compute + * model type, high-availability configuration, or associated parameter group. Omitted nodeCount and + * highAvailability.mode values preserve their existing values; the service recursively merges the PATCH before + * atomically validating the effective tuple. nodeCount, when supplied, must be 1 through 16. Disabled is valid only + * when the effective nodeCount is 1. AnyZone and ZoneRedundant are valid only when the effective nodeCount is 2 + * through 16. Therefore, crossing between those node-count ranges requires nodeCount and highAvailability.mode to + * be changed together. AnyZone permits same-zone or cross-zone placement. Changing from AnyZone to ZoneRedundant + * may allocate a replacement node in another availability zone and replace a read-only node, disconnecting + * connections to the replaced node. If all requested nodes or the required zonal topology cannot be provisioned, + * the long-running operation fails and the previous resource state is preserved. To deallocate runtime compute + * without changing the configured nodeCount, use the Pool stop action. When parameterGroup is supplied, both + * parameterGroupResourceId and applyMethod are required. The pool can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated against the recursively merged configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 represents the HorizonDB pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync(String resourceGroupName, String clusterName, String poolName, + PoolForPatchUpdate properties) { + return beginUpdateAsync(resourceGroupName, clusterName, poolName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates an existing HorizonDB pool, including its node allocation, selected compute model properties, compute + * model type, high-availability configuration, or associated parameter group. Omitted nodeCount and + * highAvailability.mode values preserve their existing values; the service recursively merges the PATCH before + * atomically validating the effective tuple. nodeCount, when supplied, must be 1 through 16. Disabled is valid only + * when the effective nodeCount is 1. AnyZone and ZoneRedundant are valid only when the effective nodeCount is 2 + * through 16. Therefore, crossing between those node-count ranges requires nodeCount and highAvailability.mode to + * be changed together. AnyZone permits same-zone or cross-zone placement. Changing from AnyZone to ZoneRedundant + * may allocate a replacement node in another availability zone and replace a read-only node, disconnecting + * connections to the replaced node. If all requested nodes or the required zonal topology cannot be provisioned, + * the long-running operation fails and the previous resource state is preserved. To deallocate runtime compute + * without changing the configured nodeCount, use the Pool stop action. When parameterGroup is supplied, both + * parameterGroupResourceId and applyMethod are required. The pool can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated against the recursively merged configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PoolInner update(String resourceGroupName, String clusterName, String poolName, + PoolForPatchUpdate properties) { + return beginUpdate(resourceGroupName, clusterName, poolName, properties).getFinalResult(); + } + + /** + * Updates an existing HorizonDB pool, including its node allocation, selected compute model properties, compute + * model type, high-availability configuration, or associated parameter group. Omitted nodeCount and + * highAvailability.mode values preserve their existing values; the service recursively merges the PATCH before + * atomically validating the effective tuple. nodeCount, when supplied, must be 1 through 16. Disabled is valid only + * when the effective nodeCount is 1. AnyZone and ZoneRedundant are valid only when the effective nodeCount is 2 + * through 16. Therefore, crossing between those node-count ranges requires nodeCount and highAvailability.mode to + * be changed together. AnyZone permits same-zone or cross-zone placement. Changing from AnyZone to ZoneRedundant + * may allocate a replacement node in another availability zone and replace a read-only node, disconnecting + * connections to the replaced node. If all requested nodes or the required zonal topology cannot be provisioned, + * the long-running operation fails and the previous resource state is preserved. To deallocate runtime compute + * without changing the configured nodeCount, use the Pool stop action. When parameterGroup is supplied, both + * parameterGroupResourceId and applyMethod are required. The pool can switch its association in either direction + * between the corresponding default parameter group and a customer-created parameter group. applyMethod controls + * when dynamic parameter changes become effective. Static parameter changes always require a customer-initiated + * Restart; Stop followed by Start and scheduled maintenance do not apply pending changes. Subtype-specific compute + * constraints are validated against the recursively merged configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @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 represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PoolInner update(String resourceGroupName, String clusterName, String poolName, + PoolForPatchUpdate properties, Context context) { + return beginUpdate(resourceGroupName, clusterName, poolName, properties, context).getFinalResult(); + } + + /** + * Deletes a HorizonDB pool together with the Pool-scoped Endpoint whose associatedResourceId identifies that Pool + * and all FirewallRule children of that Endpoint. The Endpoint cannot outlive or be deleted independently from its + * Pool. When this is the Cluster's last surviving Pool, the service also disconnects every existing private + * endpoint connection associated with the Cluster by setting its privateLinkServiceConnectionState.status to + * Rejected and providing a description that the last Pool was deleted. The HorizonDB private endpoint connection + * resources remain available for inspection and cleanup, and customer-owned Microsoft.Network/privateEndpoints + * resources are not deleted. The delete long-running operation completes only after all required private endpoint + * disconnections have completed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String poolName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a HorizonDB pool together with the Pool-scoped Endpoint whose associatedResourceId identifies that Pool + * and all FirewallRule children of that Endpoint. The Endpoint cannot outlive or be deleted independently from its + * Pool. When this is the Cluster's last surviving Pool, the service also disconnects every existing private + * endpoint connection associated with the Cluster by setting its privateLinkServiceConnectionState.status to + * Rejected and providing a description that the last Pool was deleted. The HorizonDB private endpoint connection + * resources remain available for inspection and cleanup, and customer-owned Microsoft.Network/privateEndpoints + * resources are not deleted. The delete long-running operation completes only after all required private endpoint + * disconnections have completed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 clusterName, String poolName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, Context.NONE); + } + + /** + * Deletes a HorizonDB pool together with the Pool-scoped Endpoint whose associatedResourceId identifies that Pool + * and all FirewallRule children of that Endpoint. The Endpoint cannot outlive or be deleted independently from its + * Pool. When this is the Cluster's last surviving Pool, the service also disconnects every existing private + * endpoint connection associated with the Cluster by setting its privateLinkServiceConnectionState.status to + * Rejected and providing a description that the last Pool was deleted. The HorizonDB private endpoint connection + * resources remain available for inspection and cleanup, and customer-owned Microsoft.Network/privateEndpoints + * resources are not deleted. The delete long-running operation completes only after all required private endpoint + * disconnections have completed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 clusterName, String poolName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, context); + } + + /** + * Deletes a HorizonDB pool together with the Pool-scoped Endpoint whose associatedResourceId identifies that Pool + * and all FirewallRule children of that Endpoint. The Endpoint cannot outlive or be deleted independently from its + * Pool. When this is the Cluster's last surviving Pool, the service also disconnects every existing private + * endpoint connection associated with the Cluster by setting its privateLinkServiceConnectionState.status to + * Rejected and providing a description that the last Pool was deleted. The HorizonDB private endpoint connection + * resources remain available for inspection and cleanup, and customer-owned Microsoft.Network/privateEndpoints + * resources are not deleted. The delete long-running operation completes only after all required private endpoint + * disconnections have completed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String poolName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, poolName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a HorizonDB pool together with the Pool-scoped Endpoint whose associatedResourceId identifies that Pool + * and all FirewallRule children of that Endpoint. The Endpoint cannot outlive or be deleted independently from its + * Pool. When this is the Cluster's last surviving Pool, the service also disconnects every existing private + * endpoint connection associated with the Cluster by setting its privateLinkServiceConnectionState.status to + * Rejected and providing a description that the last Pool was deleted. The HorizonDB private endpoint connection + * resources remain available for inspection and cleanup, and customer-owned Microsoft.Network/privateEndpoints + * resources are not deleted. The delete long-running operation completes only after all required private endpoint + * disconnections have completed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, + String poolName) { + Response response = deleteWithResponse(resourceGroupName, clusterName, poolName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Deletes a HorizonDB pool together with the Pool-scoped Endpoint whose associatedResourceId identifies that Pool + * and all FirewallRule children of that Endpoint. The Endpoint cannot outlive or be deleted independently from its + * Pool. When this is the Cluster's last surviving Pool, the service also disconnects every existing private + * endpoint connection associated with the Cluster by setting its privateLinkServiceConnectionState.status to + * Rejected and providing a description that the last Pool was deleted. The HorizonDB private endpoint connection + * resources remain available for inspection and cleanup, and customer-owned Microsoft.Network/privateEndpoints + * resources are not deleted. The delete long-running operation completes only after all required private endpoint + * disconnections have completed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, String poolName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, clusterName, poolName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Deletes a HorizonDB pool together with the Pool-scoped Endpoint whose associatedResourceId identifies that Pool + * and all FirewallRule children of that Endpoint. The Endpoint cannot outlive or be deleted independently from its + * Pool. When this is the Cluster's last surviving Pool, the service also disconnects every existing private + * endpoint connection associated with the Cluster by setting its privateLinkServiceConnectionState.status to + * Rejected and providing a description that the last Pool was deleted. The HorizonDB private endpoint connection + * resources remain available for inspection and cleanup, and customer-owned Microsoft.Network/privateEndpoints + * resources are not deleted. The delete long-running operation completes only after all required private endpoint + * disconnections have completed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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) + public Mono deleteAsync(String resourceGroupName, String clusterName, String poolName) { + return beginDeleteAsync(resourceGroupName, clusterName, poolName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a HorizonDB pool together with the Pool-scoped Endpoint whose associatedResourceId identifies that Pool + * and all FirewallRule children of that Endpoint. The Endpoint cannot outlive or be deleted independently from its + * Pool. When this is the Cluster's last surviving Pool, the service also disconnects every existing private + * endpoint connection associated with the Cluster by setting its privateLinkServiceConnectionState.status to + * Rejected and providing a description that the last Pool was deleted. The HorizonDB private endpoint connection + * resources remain available for inspection and cleanup, and customer-owned Microsoft.Network/privateEndpoints + * resources are not deleted. The delete long-running operation completes only after all required private endpoint + * disconnections have completed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 poolName) { + beginDelete(resourceGroupName, clusterName, poolName).getFinalResult(); + } + + /** + * Deletes a HorizonDB pool together with the Pool-scoped Endpoint whose associatedResourceId identifies that Pool + * and all FirewallRule children of that Endpoint. The Endpoint cannot outlive or be deleted independently from its + * Pool. When this is the Cluster's last surviving Pool, the service also disconnects every existing private + * endpoint connection associated with the Cluster by setting its privateLinkServiceConnectionState.status to + * Rejected and providing a description that the last Pool was deleted. The HorizonDB private endpoint connection + * resources remain available for inspection and cleanup, and customer-owned Microsoft.Network/privateEndpoints + * resources are not deleted. The delete long-running operation completes only after all required private endpoint + * disconnections have completed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 poolName, Context context) { + beginDelete(resourceGroupName, clusterName, poolName, context).getFinalResult(); + } + + /** + * Lists all HorizonDB pools in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Pool list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @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())); + } + + /** + * Lists all HorizonDB pools in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Pool list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String clusterName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all HorizonDB pools in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Pool list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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); + } + + /** + * Lists all HorizonDB pools in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Pool list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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); + } + + /** + * Lists all HorizonDB pools in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Pool list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * Lists all HorizonDB pools in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Pool list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterName, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Starts a stopped HorizonDB pool. Power operations are supported only at pool scope in this API version; there is + * no cluster-level start action. Start does not apply pending dynamic or static parameter changes; + * parameterGroup.syncStatus remains PendingReboot until a customer-initiated Restart. When the pool is already + * Ready, the operation succeeds as a true idempotent no-op and likewise leaves pending parameter changes pending. + * The operation is allowed when the pool has no allocated nodes. After the Pool is running, its Pool-scoped + * ReadOnly Endpoint routes only when at least one allocated node is not currently playing the read-write role. The + * request fails with 409 Conflict when another operation is in progress or the pool is in any other incompatible + * state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> startWithResponseAsync(String resourceGroupName, String clusterName, + String poolName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.start(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Starts a stopped HorizonDB pool. Power operations are supported only at pool scope in this API version; there is + * no cluster-level start action. Start does not apply pending dynamic or static parameter changes; + * parameterGroup.syncStatus remains PendingReboot until a customer-initiated Restart. When the pool is already + * Ready, the operation succeeds as a true idempotent no-op and likewise leaves pending parameter changes pending. + * The operation is allowed when the pool has no allocated nodes. After the Pool is running, its Pool-scoped + * ReadOnly Endpoint routes only when at least one allocated node is not currently playing the read-write role. The + * request fails with 409 Conflict when another operation is in progress or the pool is in any other incompatible + * state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response startWithResponse(String resourceGroupName, String clusterName, String poolName) { + final String accept = "application/json"; + return service.startSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, accept, Context.NONE); + } + + /** + * Starts a stopped HorizonDB pool. Power operations are supported only at pool scope in this API version; there is + * no cluster-level start action. Start does not apply pending dynamic or static parameter changes; + * parameterGroup.syncStatus remains PendingReboot until a customer-initiated Restart. When the pool is already + * Ready, the operation succeeds as a true idempotent no-op and likewise leaves pending parameter changes pending. + * The operation is allowed when the pool has no allocated nodes. After the Pool is running, its Pool-scoped + * ReadOnly Endpoint routes only when at least one allocated node is not currently playing the read-write role. The + * request fails with 409 Conflict when another operation is in progress or the pool is in any other incompatible + * state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response startWithResponse(String resourceGroupName, String clusterName, String poolName, + Context context) { + final String accept = "application/json"; + return service.startSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, accept, context); + } + + /** + * Starts a stopped HorizonDB pool. Power operations are supported only at pool scope in this API version; there is + * no cluster-level start action. Start does not apply pending dynamic or static parameter changes; + * parameterGroup.syncStatus remains PendingReboot until a customer-initiated Restart. When the pool is already + * Ready, the operation succeeds as a true idempotent no-op and likewise leaves pending parameter changes pending. + * The operation is allowed when the pool has no allocated nodes. After the Pool is running, its Pool-scoped + * ReadOnly Endpoint routes only when at least one allocated node is not currently playing the read-write role. The + * request fails with 409 Conflict when another operation is in progress or the pool is in any other incompatible + * state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, PoolInner> beginStartAsync(String resourceGroupName, String clusterName, + String poolName) { + Mono>> mono = startWithResponseAsync(resourceGroupName, clusterName, poolName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), PoolInner.class, + PoolInner.class, this.client.getContext()); + } + + /** + * Starts a stopped HorizonDB pool. Power operations are supported only at pool scope in this API version; there is + * no cluster-level start action. Start does not apply pending dynamic or static parameter changes; + * parameterGroup.syncStatus remains PendingReboot until a customer-initiated Restart. When the pool is already + * Ready, the operation succeeds as a true idempotent no-op and likewise leaves pending parameter changes pending. + * The operation is allowed when the pool has no allocated nodes. After the Pool is running, its Pool-scoped + * ReadOnly Endpoint routes only when at least one allocated node is not currently playing the read-write role. The + * request fails with 409 Conflict when another operation is in progress or the pool is in any other incompatible + * state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PoolInner> beginStart(String resourceGroupName, String clusterName, + String poolName) { + Response response = startWithResponse(resourceGroupName, clusterName, poolName); + return this.client.getLroResult(response, PoolInner.class, PoolInner.class, Context.NONE); + } + + /** + * Starts a stopped HorizonDB pool. Power operations are supported only at pool scope in this API version; there is + * no cluster-level start action. Start does not apply pending dynamic or static parameter changes; + * parameterGroup.syncStatus remains PendingReboot until a customer-initiated Restart. When the pool is already + * Ready, the operation succeeds as a true idempotent no-op and likewise leaves pending parameter changes pending. + * The operation is allowed when the pool has no allocated nodes. After the Pool is running, its Pool-scoped + * ReadOnly Endpoint routes only when at least one allocated node is not currently playing the read-write role. The + * request fails with 409 Conflict when another operation is in progress or the pool is in any other incompatible + * state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PoolInner> beginStart(String resourceGroupName, String clusterName, + String poolName, Context context) { + Response response = startWithResponse(resourceGroupName, clusterName, poolName, context); + return this.client.getLroResult(response, PoolInner.class, PoolInner.class, context); + } + + /** + * Starts a stopped HorizonDB pool. Power operations are supported only at pool scope in this API version; there is + * no cluster-level start action. Start does not apply pending dynamic or static parameter changes; + * parameterGroup.syncStatus remains PendingReboot until a customer-initiated Restart. When the pool is already + * Ready, the operation succeeds as a true idempotent no-op and likewise leaves pending parameter changes pending. + * The operation is allowed when the pool has no allocated nodes. After the Pool is running, its Pool-scoped + * ReadOnly Endpoint routes only when at least one allocated node is not currently playing the read-write role. The + * request fails with 409 Conflict when another operation is in progress or the pool is in any other incompatible + * state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono startAsync(String resourceGroupName, String clusterName, String poolName) { + return beginStartAsync(resourceGroupName, clusterName, poolName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Starts a stopped HorizonDB pool. Power operations are supported only at pool scope in this API version; there is + * no cluster-level start action. Start does not apply pending dynamic or static parameter changes; + * parameterGroup.syncStatus remains PendingReboot until a customer-initiated Restart. When the pool is already + * Ready, the operation succeeds as a true idempotent no-op and likewise leaves pending parameter changes pending. + * The operation is allowed when the pool has no allocated nodes. After the Pool is running, its Pool-scoped + * ReadOnly Endpoint routes only when at least one allocated node is not currently playing the read-write role. The + * request fails with 409 Conflict when another operation is in progress or the pool is in any other incompatible + * state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PoolInner start(String resourceGroupName, String clusterName, String poolName) { + return beginStart(resourceGroupName, clusterName, poolName).getFinalResult(); + } + + /** + * Starts a stopped HorizonDB pool. Power operations are supported only at pool scope in this API version; there is + * no cluster-level start action. Start does not apply pending dynamic or static parameter changes; + * parameterGroup.syncStatus remains PendingReboot until a customer-initiated Restart. When the pool is already + * Ready, the operation succeeds as a true idempotent no-op and likewise leaves pending parameter changes pending. + * The operation is allowed when the pool has no allocated nodes. After the Pool is running, its Pool-scoped + * ReadOnly Endpoint routes only when at least one allocated node is not currently playing the read-write role. The + * request fails with 409 Conflict when another operation is in progress or the pool is in any other incompatible + * state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PoolInner start(String resourceGroupName, String clusterName, String poolName, Context context) { + return beginStart(resourceGroupName, clusterName, poolName, context).getFinalResult(); + } + + /** + * Stops a running HorizonDB pool and deallocates compute. Power operations are supported only at pool scope in this + * API version; there is no cluster-level stop action. Stop does not apply pending dynamic or static parameter + * changes; parameterGroup.syncStatus remains PendingReboot. A subsequent Start also preserves those pending + * changes. The operation succeeds as an idempotent no-op when the pool is already Stopped. It is allowed when the + * pool has no allocated nodes. The Pool-scoped ReadOnly Endpoint remains discoverable but has no routing + * destination while the Pool is Stopped. The request fails with 409 Conflict when another operation is in progress + * or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> stopWithResponseAsync(String resourceGroupName, String clusterName, + String poolName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.stop(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Stops a running HorizonDB pool and deallocates compute. Power operations are supported only at pool scope in this + * API version; there is no cluster-level stop action. Stop does not apply pending dynamic or static parameter + * changes; parameterGroup.syncStatus remains PendingReboot. A subsequent Start also preserves those pending + * changes. The operation succeeds as an idempotent no-op when the pool is already Stopped. It is allowed when the + * pool has no allocated nodes. The Pool-scoped ReadOnly Endpoint remains discoverable but has no routing + * destination while the Pool is Stopped. The request fails with 409 Conflict when another operation is in progress + * or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response stopWithResponse(String resourceGroupName, String clusterName, String poolName) { + final String accept = "application/json"; + return service.stopSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, poolName, accept, Context.NONE); + } + + /** + * Stops a running HorizonDB pool and deallocates compute. Power operations are supported only at pool scope in this + * API version; there is no cluster-level stop action. Stop does not apply pending dynamic or static parameter + * changes; parameterGroup.syncStatus remains PendingReboot. A subsequent Start also preserves those pending + * changes. The operation succeeds as an idempotent no-op when the pool is already Stopped. It is allowed when the + * pool has no allocated nodes. The Pool-scoped ReadOnly Endpoint remains discoverable but has no routing + * destination while the Pool is Stopped. The request fails with 409 Conflict when another operation is in progress + * or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response stopWithResponse(String resourceGroupName, String clusterName, String poolName, + Context context) { + final String accept = "application/json"; + return service.stopSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, poolName, accept, context); + } + + /** + * Stops a running HorizonDB pool and deallocates compute. Power operations are supported only at pool scope in this + * API version; there is no cluster-level stop action. Stop does not apply pending dynamic or static parameter + * changes; parameterGroup.syncStatus remains PendingReboot. A subsequent Start also preserves those pending + * changes. The operation succeeds as an idempotent no-op when the pool is already Stopped. It is allowed when the + * pool has no allocated nodes. The Pool-scoped ReadOnly Endpoint remains discoverable but has no routing + * destination while the Pool is Stopped. The request fails with 409 Conflict when another operation is in progress + * or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, PoolInner> beginStopAsync(String resourceGroupName, String clusterName, + String poolName) { + Mono>> mono = stopWithResponseAsync(resourceGroupName, clusterName, poolName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), PoolInner.class, + PoolInner.class, this.client.getContext()); + } + + /** + * Stops a running HorizonDB pool and deallocates compute. Power operations are supported only at pool scope in this + * API version; there is no cluster-level stop action. Stop does not apply pending dynamic or static parameter + * changes; parameterGroup.syncStatus remains PendingReboot. A subsequent Start also preserves those pending + * changes. The operation succeeds as an idempotent no-op when the pool is already Stopped. It is allowed when the + * pool has no allocated nodes. The Pool-scoped ReadOnly Endpoint remains discoverable but has no routing + * destination while the Pool is Stopped. The request fails with 409 Conflict when another operation is in progress + * or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PoolInner> beginStop(String resourceGroupName, String clusterName, + String poolName) { + Response response = stopWithResponse(resourceGroupName, clusterName, poolName); + return this.client.getLroResult(response, PoolInner.class, PoolInner.class, Context.NONE); + } + + /** + * Stops a running HorizonDB pool and deallocates compute. Power operations are supported only at pool scope in this + * API version; there is no cluster-level stop action. Stop does not apply pending dynamic or static parameter + * changes; parameterGroup.syncStatus remains PendingReboot. A subsequent Start also preserves those pending + * changes. The operation succeeds as an idempotent no-op when the pool is already Stopped. It is allowed when the + * pool has no allocated nodes. The Pool-scoped ReadOnly Endpoint remains discoverable but has no routing + * destination while the Pool is Stopped. The request fails with 409 Conflict when another operation is in progress + * or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PoolInner> beginStop(String resourceGroupName, String clusterName, + String poolName, Context context) { + Response response = stopWithResponse(resourceGroupName, clusterName, poolName, context); + return this.client.getLroResult(response, PoolInner.class, PoolInner.class, context); + } + + /** + * Stops a running HorizonDB pool and deallocates compute. Power operations are supported only at pool scope in this + * API version; there is no cluster-level stop action. Stop does not apply pending dynamic or static parameter + * changes; parameterGroup.syncStatus remains PendingReboot. A subsequent Start also preserves those pending + * changes. The operation succeeds as an idempotent no-op when the pool is already Stopped. It is allowed when the + * pool has no allocated nodes. The Pool-scoped ReadOnly Endpoint remains discoverable but has no routing + * destination while the Pool is Stopped. The request fails with 409 Conflict when another operation is in progress + * or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono stopAsync(String resourceGroupName, String clusterName, String poolName) { + return beginStopAsync(resourceGroupName, clusterName, poolName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Stops a running HorizonDB pool and deallocates compute. Power operations are supported only at pool scope in this + * API version; there is no cluster-level stop action. Stop does not apply pending dynamic or static parameter + * changes; parameterGroup.syncStatus remains PendingReboot. A subsequent Start also preserves those pending + * changes. The operation succeeds as an idempotent no-op when the pool is already Stopped. It is allowed when the + * pool has no allocated nodes. The Pool-scoped ReadOnly Endpoint remains discoverable but has no routing + * destination while the Pool is Stopped. The request fails with 409 Conflict when another operation is in progress + * or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PoolInner stop(String resourceGroupName, String clusterName, String poolName) { + return beginStop(resourceGroupName, clusterName, poolName).getFinalResult(); + } + + /** + * Stops a running HorizonDB pool and deallocates compute. Power operations are supported only at pool scope in this + * API version; there is no cluster-level stop action. Stop does not apply pending dynamic or static parameter + * changes; parameterGroup.syncStatus remains PendingReboot. A subsequent Start also preserves those pending + * changes. The operation succeeds as an idempotent no-op when the pool is already Stopped. It is allowed when the + * pool has no allocated nodes. The Pool-scoped ReadOnly Endpoint remains discoverable but has no routing + * destination while the Pool is Stopped. The request fails with 409 Conflict when another operation is in progress + * or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PoolInner stop(String resourceGroupName, String clusterName, String poolName, Context context) { + return beginStop(resourceGroupName, clusterName, poolName, context).getFinalResult(); + } + + /** + * Restarts the PostgreSQL container on all allocated nodes in a ready HorizonDB pool and applies pending dynamic + * and static parameter changes. This customer-initiated Restart is the only operation that applies static parameter + * changes or dynamic parameter changes requested with PendingReboot; Stop followed by Start and scheduled + * maintenance do not apply them. Power operations are supported only at pool scope in this API version; there is no + * cluster-level restart action. When the pool has no allocated nodes, the operation succeeds without restarting any + * nodes, pending changes are considered applied, parameterGroup.syncStatus becomes InSync, and the resulting + * configuration applies to nodes allocated later. The request fails with 409 Conflict when another operation is in + * progress or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> restartWithResponseAsync(String resourceGroupName, String clusterName, + String poolName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.restart(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Restarts the PostgreSQL container on all allocated nodes in a ready HorizonDB pool and applies pending dynamic + * and static parameter changes. This customer-initiated Restart is the only operation that applies static parameter + * changes or dynamic parameter changes requested with PendingReboot; Stop followed by Start and scheduled + * maintenance do not apply them. Power operations are supported only at pool scope in this API version; there is no + * cluster-level restart action. When the pool has no allocated nodes, the operation succeeds without restarting any + * nodes, pending changes are considered applied, parameterGroup.syncStatus becomes InSync, and the resulting + * configuration applies to nodes allocated later. The request fails with 409 Conflict when another operation is in + * progress or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response restartWithResponse(String resourceGroupName, String clusterName, String poolName) { + final String accept = "application/json"; + return service.restartSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, accept, Context.NONE); + } + + /** + * Restarts the PostgreSQL container on all allocated nodes in a ready HorizonDB pool and applies pending dynamic + * and static parameter changes. This customer-initiated Restart is the only operation that applies static parameter + * changes or dynamic parameter changes requested with PendingReboot; Stop followed by Start and scheduled + * maintenance do not apply them. Power operations are supported only at pool scope in this API version; there is no + * cluster-level restart action. When the pool has no allocated nodes, the operation succeeds without restarting any + * nodes, pending changes are considered applied, parameterGroup.syncStatus becomes InSync, and the resulting + * configuration applies to nodes allocated later. The request fails with 409 Conflict when another operation is in + * progress or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response restartWithResponse(String resourceGroupName, String clusterName, String poolName, + Context context) { + final String accept = "application/json"; + return service.restartSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, poolName, accept, context); + } + + /** + * Restarts the PostgreSQL container on all allocated nodes in a ready HorizonDB pool and applies pending dynamic + * and static parameter changes. This customer-initiated Restart is the only operation that applies static parameter + * changes or dynamic parameter changes requested with PendingReboot; Stop followed by Start and scheduled + * maintenance do not apply them. Power operations are supported only at pool scope in this API version; there is no + * cluster-level restart action. When the pool has no allocated nodes, the operation succeeds without restarting any + * nodes, pending changes are considered applied, parameterGroup.syncStatus becomes InSync, and the resulting + * configuration applies to nodes allocated later. The request fails with 409 Conflict when another operation is in + * progress or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, PoolInner> beginRestartAsync(String resourceGroupName, String clusterName, + String poolName) { + Mono>> mono = restartWithResponseAsync(resourceGroupName, clusterName, poolName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), PoolInner.class, + PoolInner.class, this.client.getContext()); + } + + /** + * Restarts the PostgreSQL container on all allocated nodes in a ready HorizonDB pool and applies pending dynamic + * and static parameter changes. This customer-initiated Restart is the only operation that applies static parameter + * changes or dynamic parameter changes requested with PendingReboot; Stop followed by Start and scheduled + * maintenance do not apply them. Power operations are supported only at pool scope in this API version; there is no + * cluster-level restart action. When the pool has no allocated nodes, the operation succeeds without restarting any + * nodes, pending changes are considered applied, parameterGroup.syncStatus becomes InSync, and the resulting + * configuration applies to nodes allocated later. The request fails with 409 Conflict when another operation is in + * progress or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PoolInner> beginRestart(String resourceGroupName, String clusterName, + String poolName) { + Response response = restartWithResponse(resourceGroupName, clusterName, poolName); + return this.client.getLroResult(response, PoolInner.class, PoolInner.class, Context.NONE); + } + + /** + * Restarts the PostgreSQL container on all allocated nodes in a ready HorizonDB pool and applies pending dynamic + * and static parameter changes. This customer-initiated Restart is the only operation that applies static parameter + * changes or dynamic parameter changes requested with PendingReboot; Stop followed by Start and scheduled + * maintenance do not apply them. Power operations are supported only at pool scope in this API version; there is no + * cluster-level restart action. When the pool has no allocated nodes, the operation succeeds without restarting any + * nodes, pending changes are considered applied, parameterGroup.syncStatus becomes InSync, and the resulting + * configuration applies to nodes allocated later. The request fails with 409 Conflict when another operation is in + * progress or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PoolInner> beginRestart(String resourceGroupName, String clusterName, + String poolName, Context context) { + Response response = restartWithResponse(resourceGroupName, clusterName, poolName, context); + return this.client.getLroResult(response, PoolInner.class, PoolInner.class, context); + } + + /** + * Restarts the PostgreSQL container on all allocated nodes in a ready HorizonDB pool and applies pending dynamic + * and static parameter changes. This customer-initiated Restart is the only operation that applies static parameter + * changes or dynamic parameter changes requested with PendingReboot; Stop followed by Start and scheduled + * maintenance do not apply them. Power operations are supported only at pool scope in this API version; there is no + * cluster-level restart action. When the pool has no allocated nodes, the operation succeeds without restarting any + * nodes, pending changes are considered applied, parameterGroup.syncStatus becomes InSync, and the resulting + * configuration applies to nodes allocated later. The request fails with 409 Conflict when another operation is in + * progress or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono restartAsync(String resourceGroupName, String clusterName, String poolName) { + return beginRestartAsync(resourceGroupName, clusterName, poolName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Restarts the PostgreSQL container on all allocated nodes in a ready HorizonDB pool and applies pending dynamic + * and static parameter changes. This customer-initiated Restart is the only operation that applies static parameter + * changes or dynamic parameter changes requested with PendingReboot; Stop followed by Start and scheduled + * maintenance do not apply them. Power operations are supported only at pool scope in this API version; there is no + * cluster-level restart action. When the pool has no allocated nodes, the operation succeeds without restarting any + * nodes, pending changes are considered applied, parameterGroup.syncStatus becomes InSync, and the resulting + * configuration applies to nodes allocated later. The request fails with 409 Conflict when another operation is in + * progress or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PoolInner restart(String resourceGroupName, String clusterName, String poolName) { + return beginRestart(resourceGroupName, clusterName, poolName).getFinalResult(); + } + + /** + * Restarts the PostgreSQL container on all allocated nodes in a ready HorizonDB pool and applies pending dynamic + * and static parameter changes. This customer-initiated Restart is the only operation that applies static parameter + * changes or dynamic parameter changes requested with PendingReboot; Stop followed by Start and scheduled + * maintenance do not apply them. Power operations are supported only at pool scope in this API version; there is no + * cluster-level restart action. When the pool has no allocated nodes, the operation succeeds without restarting any + * nodes, pending changes are considered applied, parameterGroup.syncStatus becomes InSync, and the resulting + * configuration applies to nodes allocated later. The request fails with 409 Conflict when another operation is in + * progress or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PoolInner restart(String resourceGroupName, String clusterName, String poolName, Context context) { + return beginRestart(resourceGroupName, clusterName, poolName, context).getFinalResult(); + } + + /** + * 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 Pool 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 Pool 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 Pool 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/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbReplicasImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PoolsImpl.java similarity index 58% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbReplicasImpl.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PoolsImpl.java index 2a981612c3cef..132e1b413e5f5 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbReplicasImpl.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PoolsImpl.java @@ -9,64 +9,113 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.horizondb.fluent.HorizonDbReplicasClient; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbReplicaInner; -import com.azure.resourcemanager.horizondb.models.HorizonDbReplica; -import com.azure.resourcemanager.horizondb.models.HorizonDbReplicas; +import com.azure.resourcemanager.horizondb.fluent.PoolsClient; +import com.azure.resourcemanager.horizondb.fluent.models.PoolInner; +import com.azure.resourcemanager.horizondb.models.Pool; +import com.azure.resourcemanager.horizondb.models.Pools; -public final class HorizonDbReplicasImpl implements HorizonDbReplicas { - private static final ClientLogger LOGGER = new ClientLogger(HorizonDbReplicasImpl.class); +public final class PoolsImpl implements Pools { + private static final ClientLogger LOGGER = new ClientLogger(PoolsImpl.class); - private final HorizonDbReplicasClient innerClient; + private final PoolsClient innerClient; private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; - public HorizonDbReplicasImpl(HorizonDbReplicasClient innerClient, - com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + public PoolsImpl(PoolsClient innerClient, com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getWithResponse(String resourceGroupName, String clusterName, String poolName, - String replicaName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, clusterName, poolName, replicaName, context); + public Response getWithResponse(String resourceGroupName, String clusterName, String poolName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, clusterName, poolName, context); return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new HorizonDbReplicaImpl(inner.getValue(), this.manager())); + new PoolImpl(inner.getValue(), this.manager())); } - public HorizonDbReplica get(String resourceGroupName, String clusterName, String poolName, String replicaName) { - HorizonDbReplicaInner inner = this.serviceClient().get(resourceGroupName, clusterName, poolName, replicaName); + public Pool get(String resourceGroupName, String clusterName, String poolName) { + PoolInner inner = this.serviceClient().get(resourceGroupName, clusterName, poolName); if (inner != null) { - return new HorizonDbReplicaImpl(inner, this.manager()); + return new PoolImpl(inner, this.manager()); } else { return null; } } - public PagedIterable list(String resourceGroupName, String clusterName, String poolName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, clusterName, poolName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new HorizonDbReplicaImpl(inner1, this.manager())); + public void delete(String resourceGroupName, String clusterName, String poolName) { + this.serviceClient().delete(resourceGroupName, clusterName, poolName); } - public PagedIterable list(String resourceGroupName, String clusterName, String poolName, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, clusterName, poolName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new HorizonDbReplicaImpl(inner1, this.manager())); + public void delete(String resourceGroupName, String clusterName, String poolName, Context context) { + this.serviceClient().delete(resourceGroupName, clusterName, poolName, context); } - public void delete(String resourceGroupName, String clusterName, String poolName, String replicaName) { - this.serviceClient().delete(resourceGroupName, clusterName, poolName, replicaName); + public PagedIterable list(String resourceGroupName, String clusterName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PoolImpl(inner1, this.manager())); } - public void delete(String resourceGroupName, String clusterName, String poolName, String replicaName, - Context context) { - this.serviceClient().delete(resourceGroupName, clusterName, poolName, replicaName, context); + public PagedIterable list(String resourceGroupName, String clusterName, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PoolImpl(inner1, this.manager())); + } + + public Pool start(String resourceGroupName, String clusterName, String poolName) { + PoolInner inner = this.serviceClient().start(resourceGroupName, clusterName, poolName); + if (inner != null) { + return new PoolImpl(inner, this.manager()); + } else { + return null; + } + } + + public Pool start(String resourceGroupName, String clusterName, String poolName, Context context) { + PoolInner inner = this.serviceClient().start(resourceGroupName, clusterName, poolName, context); + if (inner != null) { + return new PoolImpl(inner, this.manager()); + } else { + return null; + } + } + + public Pool stop(String resourceGroupName, String clusterName, String poolName) { + PoolInner inner = this.serviceClient().stop(resourceGroupName, clusterName, poolName); + if (inner != null) { + return new PoolImpl(inner, this.manager()); + } else { + return null; + } } - public HorizonDbReplica getById(String id) { + public Pool stop(String resourceGroupName, String clusterName, String poolName, Context context) { + PoolInner inner = this.serviceClient().stop(resourceGroupName, clusterName, poolName, context); + if (inner != null) { + return new PoolImpl(inner, this.manager()); + } else { + return null; + } + } + + public Pool restart(String resourceGroupName, String clusterName, String poolName) { + PoolInner inner = this.serviceClient().restart(resourceGroupName, clusterName, poolName); + if (inner != null) { + return new PoolImpl(inner, this.manager()); + } else { + return null; + } + } + + public Pool restart(String resourceGroupName, String clusterName, String poolName, Context context) { + PoolInner inner = this.serviceClient().restart(resourceGroupName, clusterName, poolName, context); + if (inner != null) { + return new PoolImpl(inner, this.manager()); + } else { + return null; + } + } + + public Pool getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -82,15 +131,10 @@ public HorizonDbReplica getById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'pools'.", id))); } - String replicaName = ResourceManagerUtils.getValueFromIdByName(id, "replicas"); - if (replicaName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicas'.", id))); - } - return this.getWithResponse(resourceGroupName, clusterName, poolName, replicaName, Context.NONE).getValue(); + return this.getWithResponse(resourceGroupName, clusterName, poolName, Context.NONE).getValue(); } - public Response getByIdWithResponse(String id, Context context) { + public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -106,12 +150,7 @@ public Response getByIdWithResponse(String id, Context context throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'pools'.", id))); } - String replicaName = ResourceManagerUtils.getValueFromIdByName(id, "replicas"); - if (replicaName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicas'.", id))); - } - return this.getWithResponse(resourceGroupName, clusterName, poolName, replicaName, context); + return this.getWithResponse(resourceGroupName, clusterName, poolName, context); } public void deleteById(String id) { @@ -130,12 +169,7 @@ public void deleteById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'pools'.", id))); } - String replicaName = ResourceManagerUtils.getValueFromIdByName(id, "replicas"); - if (replicaName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicas'.", id))); - } - this.delete(resourceGroupName, clusterName, poolName, replicaName, Context.NONE); + this.delete(resourceGroupName, clusterName, poolName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { @@ -154,15 +188,10 @@ public void deleteByIdWithResponse(String id, Context context) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'pools'.", id))); } - String replicaName = ResourceManagerUtils.getValueFromIdByName(id, "replicas"); - if (replicaName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'replicas'.", id))); - } - this.delete(resourceGroupName, clusterName, poolName, replicaName, context); + this.delete(resourceGroupName, clusterName, poolName, context); } - private HorizonDbReplicasClient serviceClient() { + private PoolsClient serviceClient() { return this.innerClient; } @@ -170,7 +199,7 @@ private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { return this.serviceManager; } - public HorizonDbReplicaImpl define(String name) { - return new HorizonDbReplicaImpl(name, this.manager()); + public PoolImpl define(String name) { + return new PoolImpl(name, this.manager()); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PrivateEndpointConnectionResourceImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PrivateEndpointConnectionResourceImpl.java index 78e3abf0af86b..0e003ed008b61 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PrivateEndpointConnectionResourceImpl.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PrivateEndpointConnectionResourceImpl.java @@ -5,21 +5,17 @@ package com.azure.resourcemanager.horizondb.implementation; import com.azure.core.management.SystemData; +import com.azure.core.util.Context; import com.azure.resourcemanager.horizondb.fluent.models.PrivateEndpointConnectionResourceInner; import com.azure.resourcemanager.horizondb.models.PrivateEndpointConnectionProperties; import com.azure.resourcemanager.horizondb.models.PrivateEndpointConnectionResource; -public final class PrivateEndpointConnectionResourceImpl implements PrivateEndpointConnectionResource { +public final class PrivateEndpointConnectionResourceImpl implements PrivateEndpointConnectionResource, + PrivateEndpointConnectionResource.Definition, PrivateEndpointConnectionResource.Update { private PrivateEndpointConnectionResourceInner innerObject; private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; - PrivateEndpointConnectionResourceImpl(PrivateEndpointConnectionResourceInner innerObject, - com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - public String id() { return this.innerModel().id(); } @@ -40,6 +36,10 @@ public SystemData systemData() { return this.innerModel().systemData(); } + public String resourceGroupName() { + return resourceGroupName; + } + public PrivateEndpointConnectionResourceInner innerModel() { return this.innerObject; } @@ -47,4 +47,88 @@ public PrivateEndpointConnectionResourceInner innerModel() { private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { return this.serviceManager; } + + private String resourceGroupName; + + private String clusterName; + + private String privateEndpointConnectionName; + + public PrivateEndpointConnectionResourceImpl withExistingCluster(String resourceGroupName, String clusterName) { + this.resourceGroupName = resourceGroupName; + this.clusterName = clusterName; + return this; + } + + public PrivateEndpointConnectionResource create() { + this.innerObject = serviceManager.serviceClient() + .getPrivateEndpointConnections() + .approveOrReject(resourceGroupName, clusterName, privateEndpointConnectionName, this.innerModel(), + Context.NONE); + return this; + } + + public PrivateEndpointConnectionResource create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getPrivateEndpointConnections() + .approveOrReject(resourceGroupName, clusterName, privateEndpointConnectionName, this.innerModel(), context); + return this; + } + + PrivateEndpointConnectionResourceImpl(String name, + com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerObject = new PrivateEndpointConnectionResourceInner(); + this.serviceManager = serviceManager; + this.privateEndpointConnectionName = name; + } + + public PrivateEndpointConnectionResourceImpl update() { + return this; + } + + public PrivateEndpointConnectionResource apply() { + this.innerObject = serviceManager.serviceClient() + .getPrivateEndpointConnections() + .approveOrReject(resourceGroupName, clusterName, privateEndpointConnectionName, this.innerModel(), + Context.NONE); + return this; + } + + public PrivateEndpointConnectionResource apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getPrivateEndpointConnections() + .approveOrReject(resourceGroupName, clusterName, privateEndpointConnectionName, this.innerModel(), context); + return this; + } + + PrivateEndpointConnectionResourceImpl(PrivateEndpointConnectionResourceInner innerObject, + com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusters"); + this.privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateEndpointConnections"); + } + + public PrivateEndpointConnectionResource refresh() { + this.innerObject = serviceManager.serviceClient() + .getPrivateEndpointConnections() + .getWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, Context.NONE) + .getValue(); + return this; + } + + public PrivateEndpointConnectionResource refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getPrivateEndpointConnections() + .getWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, context) + .getValue(); + return this; + } + + public PrivateEndpointConnectionResourceImpl withProperties(PrivateEndpointConnectionProperties properties) { + this.innerModel().withProperties(properties); + return this; + } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPrivateEndpointConnectionsClientImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PrivateEndpointConnectionsClientImpl.java similarity index 75% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPrivateEndpointConnectionsClientImpl.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PrivateEndpointConnectionsClientImpl.java index a47e2202931c0..2f31f8140475a 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPrivateEndpointConnectionsClientImpl.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PrivateEndpointConnectionsClientImpl.java @@ -32,7 +32,7 @@ import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.horizondb.fluent.HorizonDbPrivateEndpointConnectionsClient; +import com.azure.resourcemanager.horizondb.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.horizondb.fluent.models.PrivateEndpointConnectionResourceInner; import com.azure.resourcemanager.horizondb.implementation.models.PrivateEndpointConnectionResourceListResult; import java.nio.ByteBuffer; @@ -40,13 +40,13 @@ import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in HorizonDbPrivateEndpointConnectionsClient. + * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ -public final class HorizonDbPrivateEndpointConnectionsClientImpl implements HorizonDbPrivateEndpointConnectionsClient { +public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpointConnectionsClient { /** * The proxy service used to perform REST calls. */ - private final HorizonDbPrivateEndpointConnectionsService service; + private final PrivateEndpointConnectionsService service; /** * The service client containing this operation class. @@ -54,23 +54,23 @@ public final class HorizonDbPrivateEndpointConnectionsClientImpl implements Hori private final HorizonDbManagementClientImpl client; /** - * Initializes an instance of HorizonDbPrivateEndpointConnectionsClientImpl. + * Initializes an instance of PrivateEndpointConnectionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - HorizonDbPrivateEndpointConnectionsClientImpl(HorizonDbManagementClientImpl client) { - this.service = RestProxy.create(HorizonDbPrivateEndpointConnectionsService.class, client.getHttpPipeline(), + PrivateEndpointConnectionsClientImpl(HorizonDbManagementClientImpl client) { + this.service = RestProxy.create(PrivateEndpointConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for HorizonDbManagementClientHorizonDbPrivateEndpointConnections to be - * used by the proxy service to perform REST calls. + * The interface defining all the services for HorizonDbManagementClientPrivateEndpointConnections to be used by the + * proxy service to perform REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "HorizonDbManagementClientHorizonDbPrivateEndpointConnections") - public interface HorizonDbPrivateEndpointConnectionsService { + @ServiceInterface(name = "HorizonDbManagementClientPrivateEndpointConnections") + public interface PrivateEndpointConnectionsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200 }) @@ -112,7 +112,7 @@ Response listSync(@HostParam("endpo @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> updateStatus(@HostParam("endpoint") String endpoint, + Mono>> approveOrReject(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, @@ -122,7 +122,7 @@ Mono> updateStatus(@HostParam(" @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateStatusSync(@HostParam("endpoint") String endpoint, + Response approveOrRejectSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, @@ -365,7 +365,10 @@ public PagedIterable list(String resourc } /** - * Approves or rejects a private endpoint connection. + * Approves or rejects an existing private endpoint connection. Approval requires the parent Cluster to contain at + * least one Pool. An approval attempt when the Cluster has no Pools fails with 409 Conflict and the stable error + * code PrivateEndpointRequiresPool. Rejection remains allowed when the Cluster has no Pools so that existing + * connections can be cleaned up. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -379,20 +382,22 @@ public PagedIterable list(String resourc * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateStatusWithResponseAsync( - String resourceGroupName, String clusterName, String privateEndpointConnectionName, - PrivateEndpointConnectionResourceInner resource) { + public Mono>> approveOrRejectWithResponseAsync(String resourceGroupName, + String clusterName, String privateEndpointConnectionName, PrivateEndpointConnectionResourceInner resource) { final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.updateStatus(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.approveOrReject(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, privateEndpointConnectionName, contentType, accept, resource, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Approves or rejects a private endpoint connection. + * Approves or rejects an existing private endpoint connection. Approval requires the parent Cluster to contain at + * least one Pool. An approval attempt when the Cluster has no Pools fails with 409 Conflict and the stable error + * code PrivateEndpointRequiresPool. Rejection remains allowed when the Cluster has no Pools so that existing + * connections can be cleaned up. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -402,17 +407,23 @@ public Mono> updateStatusWithRe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection resource on successful completion of {@link Mono}. + * @return a private endpoint connection resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateStatusAsync(String resourceGroupName, String clusterName, + private Response approveOrRejectWithResponse(String resourceGroupName, String clusterName, String privateEndpointConnectionName, PrivateEndpointConnectionResourceInner resource) { - return updateStatusWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName, resource) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.approveOrRejectSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, privateEndpointConnectionName, contentType, + accept, resource, Context.NONE); } /** - * Approves or rejects a private endpoint connection. + * Approves or rejects an existing private endpoint connection. Approval requires the parent Cluster to contain at + * least one Pool. An approval attempt when the Cluster has no Pools fails with 409 Conflict and the stable error + * code PrivateEndpointRequiresPool. Rejection remains allowed when the Cluster has no Pools so that existing + * connections can be cleaned up. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -426,18 +437,125 @@ public Mono updateStatusAsync(String res * @return a private endpoint connection resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateStatusWithResponse(String resourceGroupName, - String clusterName, String privateEndpointConnectionName, PrivateEndpointConnectionResourceInner resource, - Context context) { + private Response approveOrRejectWithResponse(String resourceGroupName, String clusterName, + String privateEndpointConnectionName, PrivateEndpointConnectionResourceInner resource, Context context) { final String contentType = "application/json"; final String accept = "application/json"; - return service.updateStatusSync(this.client.getEndpoint(), this.client.getApiVersion(), + return service.approveOrRejectSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, privateEndpointConnectionName, contentType, accept, resource, context); } /** - * Approves or rejects a private endpoint connection. + * Approves or rejects an existing private endpoint connection. Approval requires the parent Cluster to contain at + * least one Pool. An approval attempt when the Cluster has no Pools fails with 409 Conflict and the stable error + * code PrivateEndpointRequiresPool. Rejection remains allowed when the Cluster has no Pools so that existing + * connections can be cleaned up. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a private endpoint connection resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, PrivateEndpointConnectionResourceInner> + beginApproveOrRejectAsync(String resourceGroupName, String clusterName, String privateEndpointConnectionName, + PrivateEndpointConnectionResourceInner resource) { + Mono>> mono + = approveOrRejectWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName, resource); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), PrivateEndpointConnectionResourceInner.class, + PrivateEndpointConnectionResourceInner.class, this.client.getContext()); + } + + /** + * Approves or rejects an existing private endpoint connection. Approval requires the parent Cluster to contain at + * least one Pool. An approval attempt when the Cluster has no Pools fails with 409 Conflict and the stable error + * code PrivateEndpointRequiresPool. Rejection remains allowed when the Cluster has no Pools so that existing + * connections can be cleaned up. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a private endpoint connection resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PrivateEndpointConnectionResourceInner> + beginApproveOrReject(String resourceGroupName, String clusterName, String privateEndpointConnectionName, + PrivateEndpointConnectionResourceInner resource) { + Response response + = approveOrRejectWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, resource); + return this.client.getLroResult( + response, PrivateEndpointConnectionResourceInner.class, PrivateEndpointConnectionResourceInner.class, + Context.NONE); + } + + /** + * Approves or rejects an existing private endpoint connection. Approval requires the parent Cluster to contain at + * least one Pool. An approval attempt when the Cluster has no Pools fails with 409 Conflict and the stable error + * code PrivateEndpointRequiresPool. Rejection remains allowed when the Cluster has no Pools so that existing + * connections can be cleaned up. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a private endpoint connection resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PrivateEndpointConnectionResourceInner> + beginApproveOrReject(String resourceGroupName, String clusterName, String privateEndpointConnectionName, + PrivateEndpointConnectionResourceInner resource, Context context) { + Response response = approveOrRejectWithResponse(resourceGroupName, clusterName, + privateEndpointConnectionName, resource, context); + return this.client.getLroResult( + response, PrivateEndpointConnectionResourceInner.class, PrivateEndpointConnectionResourceInner.class, + context); + } + + /** + * Approves or rejects an existing private endpoint connection. Approval requires the parent Cluster to contain at + * least one Pool. An approval attempt when the Cluster has no Pools fails with 409 Conflict and the stable error + * code PrivateEndpointRequiresPool. Rejection remains allowed when the Cluster has no Pools so that existing + * connections can be cleaned up. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono approveOrRejectAsync(String resourceGroupName, + String clusterName, String privateEndpointConnectionName, PrivateEndpointConnectionResourceInner resource) { + return beginApproveOrRejectAsync(resourceGroupName, clusterName, privateEndpointConnectionName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Approves or rejects an existing private endpoint connection. Approval requires the parent Cluster to contain at + * least one Pool. An approval attempt when the Cluster has no Pools fails with 409 Conflict and the stable error + * code PrivateEndpointRequiresPool. Rejection remains allowed when the Cluster has no Pools so that existing + * connections can be cleaned up. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -450,10 +568,34 @@ public Response updateStatusWithResponse * @return a private endpoint connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionResourceInner updateStatus(String resourceGroupName, String clusterName, + public PrivateEndpointConnectionResourceInner approveOrReject(String resourceGroupName, String clusterName, String privateEndpointConnectionName, PrivateEndpointConnectionResourceInner resource) { - return updateStatusWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, resource, - Context.NONE).getValue(); + return beginApproveOrReject(resourceGroupName, clusterName, privateEndpointConnectionName, resource) + .getFinalResult(); + } + + /** + * Approves or rejects an existing private endpoint connection. Approval requires the parent Cluster to contain at + * least one Pool. An approval attempt when the Cluster has no Pools fails with 409 Conflict and the stable error + * code PrivateEndpointRequiresPool. Rejection remains allowed when the Cluster has no Pools so that existing + * connections can be cleaned up. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionResourceInner approveOrReject(String resourceGroupName, String clusterName, + String privateEndpointConnectionName, PrivateEndpointConnectionResourceInner resource, Context context) { + return beginApproveOrReject(resourceGroupName, clusterName, privateEndpointConnectionName, resource, context) + .getFinalResult(); } /** diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PrivateEndpointConnectionsImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PrivateEndpointConnectionsImpl.java new file mode 100644 index 0000000000000..708dc3f118e56 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PrivateEndpointConnectionsImpl.java @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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.horizondb.fluent.PrivateEndpointConnectionsClient; +import com.azure.resourcemanager.horizondb.fluent.models.PrivateEndpointConnectionResourceInner; +import com.azure.resourcemanager.horizondb.models.PrivateEndpointConnectionResource; +import com.azure.resourcemanager.horizondb.models.PrivateEndpointConnections; + +public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections { + private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionsImpl.class); + + private final PrivateEndpointConnectionsClient innerClient; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + public PrivateEndpointConnectionsImpl(PrivateEndpointConnectionsClient innerClient, + com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String clusterName, + String privateEndpointConnectionName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PrivateEndpointConnectionResourceImpl(inner.getValue(), this.manager())); + } + + public PrivateEndpointConnectionResource get(String resourceGroupName, String clusterName, + String privateEndpointConnectionName) { + PrivateEndpointConnectionResourceInner inner + = this.serviceClient().get(resourceGroupName, clusterName, privateEndpointConnectionName); + if (inner != null) { + return new PrivateEndpointConnectionResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list(String resourceGroupName, String clusterName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, clusterName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new PrivateEndpointConnectionResourceImpl(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 PrivateEndpointConnectionResourceImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName) { + this.serviceClient().delete(resourceGroupName, clusterName, privateEndpointConnectionName); + } + + public void delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName, + Context context) { + this.serviceClient().delete(resourceGroupName, clusterName, privateEndpointConnectionName, context); + } + + public PrivateEndpointConnectionResource 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 clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); + if (privateEndpointConnectionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); + } + return this.getWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, 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 clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); + if (privateEndpointConnectionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); + } + return this.getWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, 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 clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); + if (privateEndpointConnectionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); + } + this.delete(resourceGroupName, clusterName, privateEndpointConnectionName, 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 clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); + if (privateEndpointConnectionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); + } + this.delete(resourceGroupName, clusterName, privateEndpointConnectionName, context); + } + + private PrivateEndpointConnectionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } + + public PrivateEndpointConnectionResourceImpl define(String name) { + return new PrivateEndpointConnectionResourceImpl(name, this.manager()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPrivateLinkResourceImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PrivateLinkResourceImpl.java similarity index 71% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPrivateLinkResourceImpl.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PrivateLinkResourceImpl.java index 5b45a5d835a58..0658f984ad2a6 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPrivateLinkResourceImpl.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PrivateLinkResourceImpl.java @@ -5,16 +5,16 @@ package com.azure.resourcemanager.horizondb.implementation; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbPrivateLinkResourceInner; -import com.azure.resourcemanager.horizondb.models.HorizonDbPrivateLinkResource; +import com.azure.resourcemanager.horizondb.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.horizondb.models.PrivateLinkResource; import com.azure.resourcemanager.horizondb.models.PrivateLinkResourceProperties; -public final class HorizonDbPrivateLinkResourceImpl implements HorizonDbPrivateLinkResource { - private HorizonDbPrivateLinkResourceInner innerObject; +public final class PrivateLinkResourceImpl implements PrivateLinkResource { + private PrivateLinkResourceInner innerObject; private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; - HorizonDbPrivateLinkResourceImpl(HorizonDbPrivateLinkResourceInner innerObject, + PrivateLinkResourceImpl(PrivateLinkResourceInner innerObject, com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -40,7 +40,7 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public HorizonDbPrivateLinkResourceInner innerModel() { + public PrivateLinkResourceInner innerModel() { return this.innerObject; } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPrivateLinkResourcesClientImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PrivateLinkResourcesClientImpl.java similarity index 77% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPrivateLinkResourcesClientImpl.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PrivateLinkResourcesClientImpl.java index 153a1b4e4db45..ce48704aecfeb 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPrivateLinkResourcesClientImpl.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PrivateLinkResourcesClientImpl.java @@ -25,19 +25,19 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.horizondb.fluent.HorizonDbPrivateLinkResourcesClient; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbPrivateLinkResourceInner; -import com.azure.resourcemanager.horizondb.implementation.models.HorizonDbPrivateLinkResourceListResult; +import com.azure.resourcemanager.horizondb.fluent.PrivateLinkResourcesClient; +import com.azure.resourcemanager.horizondb.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.horizondb.implementation.models.PrivateLinkResourceListResult; import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in HorizonDbPrivateLinkResourcesClient. + * An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ -public final class HorizonDbPrivateLinkResourcesClientImpl implements HorizonDbPrivateLinkResourcesClient { +public final class PrivateLinkResourcesClientImpl implements PrivateLinkResourcesClient { /** * The proxy service used to perform REST calls. */ - private final HorizonDbPrivateLinkResourcesService service; + private final PrivateLinkResourcesService service; /** * The service client containing this operation class. @@ -45,28 +45,28 @@ public final class HorizonDbPrivateLinkResourcesClientImpl implements HorizonDbP private final HorizonDbManagementClientImpl client; /** - * Initializes an instance of HorizonDbPrivateLinkResourcesClientImpl. + * Initializes an instance of PrivateLinkResourcesClientImpl. * * @param client the instance of the service client containing this operation class. */ - HorizonDbPrivateLinkResourcesClientImpl(HorizonDbManagementClientImpl client) { - this.service = RestProxy.create(HorizonDbPrivateLinkResourcesService.class, client.getHttpPipeline(), + PrivateLinkResourcesClientImpl(HorizonDbManagementClientImpl client) { + this.service = RestProxy.create(PrivateLinkResourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for HorizonDbManagementClientHorizonDbPrivateLinkResources to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for HorizonDbManagementClientPrivateLinkResources to be used by the proxy + * service to perform REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "HorizonDbManagementClientHorizonDbPrivateLinkResources") - public interface HorizonDbPrivateLinkResourcesService { + @ServiceInterface(name = "HorizonDbManagementClientPrivateLinkResources") + public interface PrivateLinkResourcesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/privateLinkResources/{groupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") 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, @PathParam("groupName") String groupName, @HeaderParam("Accept") String accept, Context context); @@ -75,7 +75,7 @@ Mono> get(@HostParam("endpoint") Str @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/privateLinkResources/{groupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") 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("groupName") String groupName, @HeaderParam("Accept") String accept, Context context); @@ -84,7 +84,7 @@ Response getSync(@HostParam("endpoint") Strin @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/privateLinkResources") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @HeaderParam("Accept") String accept, Context context); @@ -93,7 +93,7 @@ Mono> list(@HostParam("endpoint @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}/privateLinkResources") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, + Response listSync(@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); @@ -102,7 +102,7 @@ Response listSync(@HostParam("endpoint") @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( + Mono> listNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -110,7 +110,7 @@ Mono> listNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync( + Response listNextSync( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -127,8 +127,8 @@ Response listNextSync( * @return a private link resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String clusterName, String groupName) { + public Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String groupName) { final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), @@ -148,8 +148,7 @@ public Mono> getWithResponseAsync(St * @return a private link resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String clusterName, - String groupName) { + public Mono getAsync(String resourceGroupName, String clusterName, String groupName) { return getWithResponseAsync(resourceGroupName, clusterName, groupName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -167,7 +166,7 @@ public Mono getAsync(String resourceGroupName * @return a private link resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String clusterName, + public Response getWithResponse(String resourceGroupName, String clusterName, String groupName, Context context) { final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), @@ -186,7 +185,7 @@ public Response getWithResponse(String resour * @return a private link resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HorizonDbPrivateLinkResourceInner get(String resourceGroupName, String clusterName, String groupName) { + public PrivateLinkResourceInner get(String resourceGroupName, String clusterName, String groupName) { return getWithResponse(resourceGroupName, clusterName, groupName, Context.NONE).getValue(); } @@ -198,17 +197,17 @@ public HorizonDbPrivateLinkResourceInner get(String resourceGroupName, String cl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbPrivateLinkResource list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the response of a PrivateLinkResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, + 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(), + .>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())); } @@ -221,11 +220,10 @@ private Mono> listSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbPrivateLinkResource list operation as paginated response with - * {@link PagedFlux}. + * @return the response of a PrivateLinkResource list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String clusterName) { + public PagedFlux listAsync(String resourceGroupName, String clusterName) { return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName), nextLink -> listNextSinglePageAsync(nextLink)); } @@ -238,13 +236,12 @@ public PagedFlux listAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbPrivateLinkResource list operation along with {@link PagedResponse}. + * @return the response of a PrivateLinkResource list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, - String clusterName) { + private PagedResponse listSinglePage(String resourceGroupName, String clusterName) { final String accept = "application/json"; - Response res + 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(), @@ -260,13 +257,13 @@ private PagedResponse listSinglePage(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbPrivateLinkResource list operation along with {@link PagedResponse}. + * @return the response of a PrivateLinkResource list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(String resourceGroupName, - String clusterName, Context context) { + private PagedResponse listSinglePage(String resourceGroupName, String clusterName, + Context context) { final String accept = "application/json"; - Response res + 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(), @@ -281,11 +278,10 @@ private PagedResponse listSinglePage(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbPrivateLinkResource list operation as paginated response with - * {@link PagedIterable}. + * @return the response of a PrivateLinkResource list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String clusterName) { + public PagedIterable list(String resourceGroupName, String clusterName) { return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName), nextLink -> listNextSinglePage(nextLink)); } @@ -299,12 +295,10 @@ public PagedIterable list(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 response of a HorizonDbPrivateLinkResource list operation as paginated response with - * {@link PagedIterable}. + * @return the response of a PrivateLinkResource list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String clusterName, - Context context) { + public PagedIterable list(String resourceGroupName, String clusterName, Context context) { return new PagedIterable<>(() -> listSinglePage(resourceGroupName, clusterName, context), nextLink -> listNextSinglePage(nextLink, context)); } @@ -316,14 +310,14 @@ public PagedIterable list(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 response of a HorizonDbPrivateLinkResource list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the response of a PrivateLinkResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + 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(), + .>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())); } @@ -335,12 +329,12 @@ private Mono> listNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbPrivateLinkResource list operation along with {@link PagedResponse}. + * @return the response of a PrivateLinkResource list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { + private PagedResponse listNextSinglePage(String nextLink) { final String accept = "application/json"; - Response res + 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); @@ -354,12 +348,12 @@ private PagedResponse listNextSinglePage(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbPrivateLinkResource list operation along with {@link PagedResponse}. + * @return the response of a PrivateLinkResource list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { + private PagedResponse listNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - Response res + 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/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PrivateLinkResourcesImpl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PrivateLinkResourcesImpl.java new file mode 100644 index 0000000000000..e3363cce181f3 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/PrivateLinkResourcesImpl.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.horizondb.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.horizondb.fluent.PrivateLinkResourcesClient; +import com.azure.resourcemanager.horizondb.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.horizondb.models.PrivateLinkResource; +import com.azure.resourcemanager.horizondb.models.PrivateLinkResources; + +public final class PrivateLinkResourcesImpl implements PrivateLinkResources { + private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkResourcesImpl.class); + + private final PrivateLinkResourcesClient innerClient; + + private final com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager; + + public PrivateLinkResourcesImpl(PrivateLinkResourcesClient innerClient, + com.azure.resourcemanager.horizondb.HorizonDbManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String clusterName, String groupName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, clusterName, groupName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PrivateLinkResourceImpl(inner.getValue(), this.manager())); + } + + public PrivateLinkResource get(String resourceGroupName, String clusterName, String groupName) { + PrivateLinkResourceInner inner = this.serviceClient().get(resourceGroupName, clusterName, groupName); + if (inner != null) { + return new PrivateLinkResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list(String resourceGroupName, String clusterName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(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 PrivateLinkResourceImpl(inner1, this.manager())); + } + + private PrivateLinkResourcesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.horizondb.HorizonDbManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbClusterListResult.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/AuthenticationListResult.java similarity index 59% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbClusterListResult.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/AuthenticationListResult.java index a4587d0b2cb71..ef02a32b3f331 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbClusterListResult.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/AuthenticationListResult.java @@ -9,19 +9,19 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbClusterInner; +import com.azure.resourcemanager.horizondb.fluent.models.AuthenticationInner; import java.io.IOException; import java.util.List; /** - * The response of a HorizonDbCluster list operation. + * The response of a Authentication list operation. */ @Immutable -public final class HorizonDbClusterListResult implements JsonSerializable { +public final class AuthenticationListResult implements JsonSerializable { /* - * The HorizonDbCluster items on this page + * The Authentication items on this page */ - private List value; + private List value; /* * The link to the next page of items @@ -29,17 +29,17 @@ public final class HorizonDbClusterListResult implements JsonSerializable value() { + public List value() { return this.value; } @@ -64,33 +64,33 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of HorizonDbClusterListResult from the JsonReader. + * Reads an instance of AuthenticationListResult from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbClusterListResult if the JsonReader was pointing to an instance of it, or null if + * @return An instance of AuthenticationListResult 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 HorizonDbClusterListResult. + * @throws IOException If an error occurs while reading the AuthenticationListResult. */ - public static HorizonDbClusterListResult fromJson(JsonReader jsonReader) throws IOException { + public static AuthenticationListResult fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - HorizonDbClusterListResult deserializedHorizonDbClusterListResult = new HorizonDbClusterListResult(); + AuthenticationListResult deserializedAuthenticationListResult = new AuthenticationListResult(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> HorizonDbClusterInner.fromJson(reader1)); - deserializedHorizonDbClusterListResult.value = value; + List value + = reader.readArray(reader1 -> AuthenticationInner.fromJson(reader1)); + deserializedAuthenticationListResult.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedHorizonDbClusterListResult.nextLink = reader.getString(); + deserializedAuthenticationListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedHorizonDbClusterListResult; + return deserializedAuthenticationListResult; }); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbPoolListResult.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/CapabilityListResult.java similarity index 60% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbPoolListResult.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/CapabilityListResult.java index 95ed0dd0e4f29..4d5cfb2e05765 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbPoolListResult.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/CapabilityListResult.java @@ -9,19 +9,19 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbPoolInner; +import com.azure.resourcemanager.horizondb.fluent.models.CapabilityInner; import java.io.IOException; import java.util.List; /** - * The response of a HorizonDbPool list operation. + * The response of a Capability list operation. */ @Immutable -public final class HorizonDbPoolListResult implements JsonSerializable { +public final class CapabilityListResult implements JsonSerializable { /* - * The HorizonDbPool items on this page + * The Capability items on this page */ - private List value; + private List value; /* * The link to the next page of items @@ -29,17 +29,17 @@ public final class HorizonDbPoolListResult implements JsonSerializable value() { + public List value() { return this.value; } @@ -64,32 +64,32 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of HorizonDbPoolListResult from the JsonReader. + * Reads an instance of CapabilityListResult from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbPoolListResult if the JsonReader was pointing to an instance of it, or null if it + * @return An instance of CapabilityListResult 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 HorizonDbPoolListResult. + * @throws IOException If an error occurs while reading the CapabilityListResult. */ - public static HorizonDbPoolListResult fromJson(JsonReader jsonReader) throws IOException { + public static CapabilityListResult fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - HorizonDbPoolListResult deserializedHorizonDbPoolListResult = new HorizonDbPoolListResult(); + CapabilityListResult deserializedCapabilityListResult = new CapabilityListResult(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> HorizonDbPoolInner.fromJson(reader1)); - deserializedHorizonDbPoolListResult.value = value; + List value = reader.readArray(reader1 -> CapabilityInner.fromJson(reader1)); + deserializedCapabilityListResult.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedHorizonDbPoolListResult.nextLink = reader.getString(); + deserializedCapabilityListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedHorizonDbPoolListResult; + return deserializedCapabilityListResult; }); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbAdministratorListResult.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/ChangeDataCaptureCapabilityListResult.java similarity index 54% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbAdministratorListResult.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/ChangeDataCaptureCapabilityListResult.java index 0e175f396fcf1..cb8191a214fb7 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbAdministratorListResult.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/ChangeDataCaptureCapabilityListResult.java @@ -9,19 +9,20 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbAdministratorInner; +import com.azure.resourcemanager.horizondb.fluent.models.ChangeDataCaptureCapabilityInner; import java.io.IOException; import java.util.List; /** - * The response of a HorizonDbAdministrator list operation. + * The response of a ChangeDataCaptureCapability list operation. */ @Immutable -public final class HorizonDbAdministratorListResult implements JsonSerializable { +public final class ChangeDataCaptureCapabilityListResult + implements JsonSerializable { /* - * The HorizonDbAdministrator items on this page + * The ChangeDataCaptureCapability items on this page */ - private List value; + private List value; /* * The link to the next page of items @@ -29,17 +30,17 @@ public final class HorizonDbAdministratorListResult implements JsonSerializable< private String nextLink; /** - * Creates an instance of HorizonDbAdministratorListResult class. + * Creates an instance of ChangeDataCaptureCapabilityListResult class. */ - private HorizonDbAdministratorListResult() { + private ChangeDataCaptureCapabilityListResult() { } /** - * Get the value property: The HorizonDbAdministrator items on this page. + * Get the value property: The ChangeDataCaptureCapability items on this page. * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -64,34 +65,34 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of HorizonDbAdministratorListResult from the JsonReader. + * Reads an instance of ChangeDataCaptureCapabilityListResult from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbAdministratorListResult if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. + * @return An instance of ChangeDataCaptureCapabilityListResult 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 HorizonDbAdministratorListResult. + * @throws IOException If an error occurs while reading the ChangeDataCaptureCapabilityListResult. */ - public static HorizonDbAdministratorListResult fromJson(JsonReader jsonReader) throws IOException { + public static ChangeDataCaptureCapabilityListResult fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - HorizonDbAdministratorListResult deserializedHorizonDbAdministratorListResult - = new HorizonDbAdministratorListResult(); + ChangeDataCaptureCapabilityListResult deserializedChangeDataCaptureCapabilityListResult + = new ChangeDataCaptureCapabilityListResult(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> HorizonDbAdministratorInner.fromJson(reader1)); - deserializedHorizonDbAdministratorListResult.value = value; + List value + = reader.readArray(reader1 -> ChangeDataCaptureCapabilityInner.fromJson(reader1)); + deserializedChangeDataCaptureCapabilityListResult.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedHorizonDbAdministratorListResult.nextLink = reader.getString(); + deserializedChangeDataCaptureCapabilityListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedHorizonDbAdministratorListResult; + return deserializedChangeDataCaptureCapabilityListResult; }); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/ChangeDataCaptureConfigurationListResult.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/ChangeDataCaptureConfigurationListResult.java new file mode 100644 index 0000000000000..743c7519e288a --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/ChangeDataCaptureConfigurationListResult.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.horizondb.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.horizondb.fluent.models.ChangeDataCaptureConfigurationInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ChangeDataCaptureConfiguration list operation. + */ +@Immutable +public final class ChangeDataCaptureConfigurationListResult + implements JsonSerializable { + /* + * The ChangeDataCaptureConfiguration items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ChangeDataCaptureConfigurationListResult class. + */ + private ChangeDataCaptureConfigurationListResult() { + } + + /** + * Get the value property: The ChangeDataCaptureConfiguration 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 ChangeDataCaptureConfigurationListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChangeDataCaptureConfigurationListResult 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 ChangeDataCaptureConfigurationListResult. + */ + public static ChangeDataCaptureConfigurationListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChangeDataCaptureConfigurationListResult deserializedChangeDataCaptureConfigurationListResult + = new ChangeDataCaptureConfigurationListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ChangeDataCaptureConfigurationInner.fromJson(reader1)); + deserializedChangeDataCaptureConfigurationListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedChangeDataCaptureConfigurationListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedChangeDataCaptureConfigurationListResult; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbPrivateLinkResourceListResult.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/ChangeDataCaptureDestinationListResult.java similarity index 61% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbPrivateLinkResourceListResult.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/ChangeDataCaptureDestinationListResult.java index 97bb7f3e37b93..1b0f0cd0a0098 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbPrivateLinkResourceListResult.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/ChangeDataCaptureDestinationListResult.java @@ -9,20 +9,20 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbPrivateLinkResourceInner; +import com.azure.resourcemanager.horizondb.fluent.models.ChangeDataCaptureDestinationInner; import java.io.IOException; import java.util.List; /** - * The response of a HorizonDbPrivateLinkResource list operation. + * The response of a ChangeDataCaptureDestination list operation. */ @Immutable -public final class HorizonDbPrivateLinkResourceListResult - implements JsonSerializable { +public final class ChangeDataCaptureDestinationListResult + implements JsonSerializable { /* - * The HorizonDbPrivateLinkResource items on this page + * The ChangeDataCaptureDestination items on this page */ - private List value; + private List value; /* * The link to the next page of items @@ -30,17 +30,17 @@ public final class HorizonDbPrivateLinkResourceListResult private String nextLink; /** - * Creates an instance of HorizonDbPrivateLinkResourceListResult class. + * Creates an instance of ChangeDataCaptureDestinationListResult class. */ - private HorizonDbPrivateLinkResourceListResult() { + private ChangeDataCaptureDestinationListResult() { } /** - * Get the value property: The HorizonDbPrivateLinkResource items on this page. + * Get the value property: The ChangeDataCaptureDestination items on this page. * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -65,34 +65,34 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of HorizonDbPrivateLinkResourceListResult from the JsonReader. + * Reads an instance of ChangeDataCaptureDestinationListResult from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbPrivateLinkResourceListResult if the JsonReader was pointing to an instance of + * @return An instance of ChangeDataCaptureDestinationListResult 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 HorizonDbPrivateLinkResourceListResult. + * @throws IOException If an error occurs while reading the ChangeDataCaptureDestinationListResult. */ - public static HorizonDbPrivateLinkResourceListResult fromJson(JsonReader jsonReader) throws IOException { + public static ChangeDataCaptureDestinationListResult fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - HorizonDbPrivateLinkResourceListResult deserializedHorizonDbPrivateLinkResourceListResult - = new HorizonDbPrivateLinkResourceListResult(); + ChangeDataCaptureDestinationListResult deserializedChangeDataCaptureDestinationListResult + = new ChangeDataCaptureDestinationListResult(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> HorizonDbPrivateLinkResourceInner.fromJson(reader1)); - deserializedHorizonDbPrivateLinkResourceListResult.value = value; + List value + = reader.readArray(reader1 -> ChangeDataCaptureDestinationInner.fromJson(reader1)); + deserializedChangeDataCaptureDestinationListResult.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedHorizonDbPrivateLinkResourceListResult.nextLink = reader.getString(); + deserializedChangeDataCaptureDestinationListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedHorizonDbPrivateLinkResourceListResult; + return deserializedChangeDataCaptureDestinationListResult; }); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/ClusterListResult.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/ClusterListResult.java new file mode 100644 index 0000000000000..b9088ef1274a4 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/ClusterListResult.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.horizondb.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.horizondb.fluent.models.ClusterInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a Cluster list operation. + */ +@Immutable +public final class ClusterListResult implements JsonSerializable { + /* + * The Cluster items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ClusterListResult class. + */ + private ClusterListResult() { + } + + /** + * Get the value property: The Cluster items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@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 ClusterListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClusterListResult 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 ClusterListResult. + */ + public static ClusterListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClusterListResult deserializedClusterListResult = new ClusterListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ClusterInner.fromJson(reader1)); + deserializedClusterListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedClusterListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedClusterListResult; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbFirewallRuleListResult.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/DefaultParameterGroupListResult.java similarity index 62% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbFirewallRuleListResult.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/DefaultParameterGroupListResult.java index 2be284751257b..3bf8e8c9f6558 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbFirewallRuleListResult.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/DefaultParameterGroupListResult.java @@ -9,19 +9,19 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbFirewallRuleInner; +import com.azure.resourcemanager.horizondb.fluent.models.DefaultParameterGroupInner; import java.io.IOException; import java.util.List; /** - * The response of a HorizonDbFirewallRule list operation. + * The response of a DefaultParameterGroup list operation. */ @Immutable -public final class HorizonDbFirewallRuleListResult implements JsonSerializable { +public final class DefaultParameterGroupListResult implements JsonSerializable { /* - * The HorizonDbFirewallRule items on this page + * The DefaultParameterGroup items on this page */ - private List value; + private List value; /* * The link to the next page of items @@ -29,17 +29,17 @@ public final class HorizonDbFirewallRuleListResult implements JsonSerializable value() { + public List value() { return this.value; } @@ -64,34 +64,34 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of HorizonDbFirewallRuleListResult from the JsonReader. + * Reads an instance of DefaultParameterGroupListResult from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbFirewallRuleListResult if the JsonReader was pointing to an instance of it, or + * @return An instance of DefaultParameterGroupListResult 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 HorizonDbFirewallRuleListResult. + * @throws IOException If an error occurs while reading the DefaultParameterGroupListResult. */ - public static HorizonDbFirewallRuleListResult fromJson(JsonReader jsonReader) throws IOException { + public static DefaultParameterGroupListResult fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - HorizonDbFirewallRuleListResult deserializedHorizonDbFirewallRuleListResult - = new HorizonDbFirewallRuleListResult(); + DefaultParameterGroupListResult deserializedDefaultParameterGroupListResult + = new DefaultParameterGroupListResult(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> HorizonDbFirewallRuleInner.fromJson(reader1)); - deserializedHorizonDbFirewallRuleListResult.value = value; + List value + = reader.readArray(reader1 -> DefaultParameterGroupInner.fromJson(reader1)); + deserializedDefaultParameterGroupListResult.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedHorizonDbFirewallRuleListResult.nextLink = reader.getString(); + deserializedDefaultParameterGroupListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedHorizonDbFirewallRuleListResult; + return deserializedDefaultParameterGroupListResult; }); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/EndpointListResult.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/EndpointListResult.java new file mode 100644 index 0000000000000..8a0d6e3532697 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/EndpointListResult.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.horizondb.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.horizondb.fluent.models.EndpointInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a Endpoint list operation. + */ +@Immutable +public final class EndpointListResult implements JsonSerializable { + /* + * The Endpoint items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of EndpointListResult class. + */ + private EndpointListResult() { + } + + /** + * Get the value property: The Endpoint 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 EndpointListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointListResult 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 EndpointListResult. + */ + public static EndpointListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointListResult deserializedEndpointListResult = new EndpointListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> EndpointInner.fromJson(reader1)); + deserializedEndpointListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedEndpointListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointListResult; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/FirewallRuleListResult.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/FirewallRuleListResult.java new file mode 100644 index 0000000000000..5dfc3e774df1f --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/FirewallRuleListResult.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.horizondb.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.horizondb.fluent.models.FirewallRuleInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a FirewallRule list operation. + */ +@Immutable +public final class FirewallRuleListResult implements JsonSerializable { + /* + * The FirewallRule items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of FirewallRuleListResult class. + */ + private FirewallRuleListResult() { + } + + /** + * Get the value property: The FirewallRule 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 FirewallRuleListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FirewallRuleListResult 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 FirewallRuleListResult. + */ + public static FirewallRuleListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FirewallRuleListResult deserializedFirewallRuleListResult = new FirewallRuleListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> FirewallRuleInner.fromJson(reader1)); + deserializedFirewallRuleListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedFirewallRuleListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedFirewallRuleListResult; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbParameterGroupConnectionPropertiesListResult.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbParameterGroupConnectionPropertiesListResult.java deleted file mode 100644 index e4f653392c666..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbParameterGroupConnectionPropertiesListResult.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.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.horizondb.fluent.models.HorizonDbParameterGroupConnectionPropertiesInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a HorizonDbParameterGroupConnectionProperties list operation. - */ -@Immutable -public final class HorizonDbParameterGroupConnectionPropertiesListResult - implements JsonSerializable { - /* - * The HorizonDbParameterGroupConnectionProperties items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of HorizonDbParameterGroupConnectionPropertiesListResult class. - */ - private HorizonDbParameterGroupConnectionPropertiesListResult() { - } - - /** - * Get the value property: The HorizonDbParameterGroupConnectionProperties 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 HorizonDbParameterGroupConnectionPropertiesListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbParameterGroupConnectionPropertiesListResult 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 HorizonDbParameterGroupConnectionPropertiesListResult. - */ - public static HorizonDbParameterGroupConnectionPropertiesListResult fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - HorizonDbParameterGroupConnectionPropertiesListResult deserializedHorizonDbParameterGroupConnectionPropertiesListResult - = new HorizonDbParameterGroupConnectionPropertiesListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader - .readArray(reader1 -> HorizonDbParameterGroupConnectionPropertiesInner.fromJson(reader1)); - deserializedHorizonDbParameterGroupConnectionPropertiesListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedHorizonDbParameterGroupConnectionPropertiesListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHorizonDbParameterGroupConnectionPropertiesListResult; - }); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/IdentityAssignmentListResult.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/IdentityAssignmentListResult.java new file mode 100644 index 0000000000000..24e6d6a55cb1b --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/IdentityAssignmentListResult.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.horizondb.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.horizondb.fluent.models.IdentityAssignmentInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a IdentityAssignment list operation. + */ +@Immutable +public final class IdentityAssignmentListResult implements JsonSerializable { + /* + * The IdentityAssignment items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of IdentityAssignmentListResult class. + */ + private IdentityAssignmentListResult() { + } + + /** + * Get the value property: The IdentityAssignment 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 IdentityAssignmentListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IdentityAssignmentListResult 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 IdentityAssignmentListResult. + */ + public static IdentityAssignmentListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IdentityAssignmentListResult deserializedIdentityAssignmentListResult = new IdentityAssignmentListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> IdentityAssignmentInner.fromJson(reader1)); + deserializedIdentityAssignmentListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedIdentityAssignmentListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIdentityAssignmentListResult; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbParameterGroupListResult.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/LogCaptureConfigurationListResult.java similarity index 62% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbParameterGroupListResult.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/LogCaptureConfigurationListResult.java index de7d1e92c6263..3a2032851ef84 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbParameterGroupListResult.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/LogCaptureConfigurationListResult.java @@ -9,19 +9,19 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbParameterGroupInner; +import com.azure.resourcemanager.horizondb.fluent.models.LogCaptureConfigurationInner; import java.io.IOException; import java.util.List; /** - * The response of a HorizonDbParameterGroup list operation. + * The response of a LogCaptureConfiguration list operation. */ @Immutable -public final class HorizonDbParameterGroupListResult implements JsonSerializable { +public final class LogCaptureConfigurationListResult implements JsonSerializable { /* - * The HorizonDbParameterGroup items on this page + * The LogCaptureConfiguration items on this page */ - private List value; + private List value; /* * The link to the next page of items @@ -29,17 +29,17 @@ public final class HorizonDbParameterGroupListResult implements JsonSerializable private String nextLink; /** - * Creates an instance of HorizonDbParameterGroupListResult class. + * Creates an instance of LogCaptureConfigurationListResult class. */ - private HorizonDbParameterGroupListResult() { + private LogCaptureConfigurationListResult() { } /** - * Get the value property: The HorizonDbParameterGroup items on this page. + * Get the value property: The LogCaptureConfiguration items on this page. * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -64,34 +64,34 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of HorizonDbParameterGroupListResult from the JsonReader. + * Reads an instance of LogCaptureConfigurationListResult from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbParameterGroupListResult if the JsonReader was pointing to an instance of it, or + * @return An instance of LogCaptureConfigurationListResult 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 HorizonDbParameterGroupListResult. + * @throws IOException If an error occurs while reading the LogCaptureConfigurationListResult. */ - public static HorizonDbParameterGroupListResult fromJson(JsonReader jsonReader) throws IOException { + public static LogCaptureConfigurationListResult fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - HorizonDbParameterGroupListResult deserializedHorizonDbParameterGroupListResult - = new HorizonDbParameterGroupListResult(); + LogCaptureConfigurationListResult deserializedLogCaptureConfigurationListResult + = new LogCaptureConfigurationListResult(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> HorizonDbParameterGroupInner.fromJson(reader1)); - deserializedHorizonDbParameterGroupListResult.value = value; + List value + = reader.readArray(reader1 -> LogCaptureConfigurationInner.fromJson(reader1)); + deserializedLogCaptureConfigurationListResult.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedHorizonDbParameterGroupListResult.nextLink = reader.getString(); + deserializedLogCaptureConfigurationListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedHorizonDbParameterGroupListResult; + return deserializedLogCaptureConfigurationListResult; }); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/LogFileListResult.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/LogFileListResult.java new file mode 100644 index 0000000000000..c34b2b2677374 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/LogFileListResult.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.horizondb.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.horizondb.fluent.models.LogFileInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a LogFile list operation. + */ +@Immutable +public final class LogFileListResult implements JsonSerializable { + /* + * The LogFile items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of LogFileListResult class. + */ + private LogFileListResult() { + } + + /** + * Get the value property: The LogFile 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 LogFileListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LogFileListResult 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 LogFileListResult. + */ + public static LogFileListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LogFileListResult deserializedLogFileListResult = new LogFileListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> LogFileInner.fromJson(reader1)); + deserializedLogFileListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedLogFileListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLogFileListResult; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbReplicaListResult.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/MaintenanceEventListResult.java similarity index 63% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbReplicaListResult.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/MaintenanceEventListResult.java index 3c1314a8f0846..43f16fe08045f 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbReplicaListResult.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/MaintenanceEventListResult.java @@ -9,19 +9,19 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbReplicaInner; +import com.azure.resourcemanager.horizondb.fluent.models.MaintenanceEventInner; import java.io.IOException; import java.util.List; /** - * The response of a HorizonDbReplica list operation. + * The response of a MaintenanceEvent list operation. */ @Immutable -public final class HorizonDbReplicaListResult implements JsonSerializable { +public final class MaintenanceEventListResult implements JsonSerializable { /* - * The HorizonDbReplica items on this page + * The MaintenanceEvent items on this page */ - private List value; + private List value; /* * The link to the next page of items @@ -29,17 +29,17 @@ public final class HorizonDbReplicaListResult implements JsonSerializable value() { + public List value() { return this.value; } @@ -64,33 +64,33 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of HorizonDbReplicaListResult from the JsonReader. + * Reads an instance of MaintenanceEventListResult from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbReplicaListResult if the JsonReader was pointing to an instance of it, or null if + * @return An instance of MaintenanceEventListResult 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 HorizonDbReplicaListResult. + * @throws IOException If an error occurs while reading the MaintenanceEventListResult. */ - public static HorizonDbReplicaListResult fromJson(JsonReader jsonReader) throws IOException { + public static MaintenanceEventListResult fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - HorizonDbReplicaListResult deserializedHorizonDbReplicaListResult = new HorizonDbReplicaListResult(); + MaintenanceEventListResult deserializedMaintenanceEventListResult = new MaintenanceEventListResult(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> HorizonDbReplicaInner.fromJson(reader1)); - deserializedHorizonDbReplicaListResult.value = value; + List value + = reader.readArray(reader1 -> MaintenanceEventInner.fromJson(reader1)); + deserializedMaintenanceEventListResult.value = value; } else if ("nextLink".equals(fieldName)) { - deserializedHorizonDbReplicaListResult.nextLink = reader.getString(); + deserializedMaintenanceEventListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } } - return deserializedHorizonDbReplicaListResult; + return deserializedMaintenanceEventListResult; }); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/MicrosoftEntraAdministratorListResult.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/MicrosoftEntraAdministratorListResult.java new file mode 100644 index 0000000000000..a81e44c79b20e --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/MicrosoftEntraAdministratorListResult.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.horizondb.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.horizondb.fluent.models.MicrosoftEntraAdministratorInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a MicrosoftEntraAdministrator list operation. + */ +@Immutable +public final class MicrosoftEntraAdministratorListResult + implements JsonSerializable { + /* + * The MicrosoftEntraAdministrator items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of MicrosoftEntraAdministratorListResult class. + */ + private MicrosoftEntraAdministratorListResult() { + } + + /** + * Get the value property: The MicrosoftEntraAdministrator 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 MicrosoftEntraAdministratorListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MicrosoftEntraAdministratorListResult 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 MicrosoftEntraAdministratorListResult. + */ + public static MicrosoftEntraAdministratorListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MicrosoftEntraAdministratorListResult deserializedMicrosoftEntraAdministratorListResult + = new MicrosoftEntraAdministratorListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> MicrosoftEntraAdministratorInner.fromJson(reader1)); + deserializedMicrosoftEntraAdministratorListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedMicrosoftEntraAdministratorListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMicrosoftEntraAdministratorListResult; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/NodeListResult.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/NodeListResult.java new file mode 100644 index 0000000000000..693fd0e77252a --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/NodeListResult.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.horizondb.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.horizondb.fluent.models.NodeInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a Node list operation. + */ +@Immutable +public final class NodeListResult implements JsonSerializable { + /* + * The Node items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of NodeListResult class. + */ + private NodeListResult() { + } + + /** + * Get the value property: The Node 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 NodeListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NodeListResult 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 NodeListResult. + */ + public static NodeListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NodeListResult deserializedNodeListResult = new NodeListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> NodeInner.fromJson(reader1)); + deserializedNodeListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedNodeListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNodeListResult; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/PagedParameterGroupConnectionProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/PagedParameterGroupConnectionProperties.java new file mode 100644 index 0000000000000..4008ba5dfc0c5 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/PagedParameterGroupConnectionProperties.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.horizondb.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.horizondb.fluent.models.ParameterGroupConnectionPropertiesInner; +import java.io.IOException; +import java.util.List; + +/** + * A page of HorizonDB parameter group connections. + */ +@Immutable +public final class PagedParameterGroupConnectionProperties + implements JsonSerializable { + /* + * The parameter group connection items on this page. + */ + private List value; + + /* + * The link to the next page of items. + */ + private String nextLink; + + /** + * Creates an instance of PagedParameterGroupConnectionProperties class. + */ + private PagedParameterGroupConnectionProperties() { + } + + /** + * Get the value property: The parameter group connection 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 PagedParameterGroupConnectionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PagedParameterGroupConnectionProperties 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 PagedParameterGroupConnectionProperties. + */ + public static PagedParameterGroupConnectionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PagedParameterGroupConnectionProperties deserializedPagedParameterGroupConnectionProperties + = new PagedParameterGroupConnectionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ParameterGroupConnectionPropertiesInner.fromJson(reader1)); + deserializedPagedParameterGroupConnectionProperties.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPagedParameterGroupConnectionProperties.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPagedParameterGroupConnectionProperties; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/ParameterGroupListResult.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/ParameterGroupListResult.java new file mode 100644 index 0000000000000..37389b55a930e --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/ParameterGroupListResult.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.horizondb.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.horizondb.fluent.models.ParameterGroupInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ParameterGroup list operation. + */ +@Immutable +public final class ParameterGroupListResult implements JsonSerializable { + /* + * The ParameterGroup items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ParameterGroupListResult class. + */ + private ParameterGroupListResult() { + } + + /** + * Get the value property: The ParameterGroup 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 ParameterGroupListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ParameterGroupListResult 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 ParameterGroupListResult. + */ + public static ParameterGroupListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ParameterGroupListResult deserializedParameterGroupListResult = new ParameterGroupListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ParameterGroupInner.fromJson(reader1)); + deserializedParameterGroupListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedParameterGroupListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedParameterGroupListResult; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/PoolListResult.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/PoolListResult.java new file mode 100644 index 0000000000000..aa1a7862ac410 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/PoolListResult.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.horizondb.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.horizondb.fluent.models.PoolInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a Pool list operation. + */ +@Immutable +public final class PoolListResult implements JsonSerializable { + /* + * The Pool items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of PoolListResult class. + */ + private PoolListResult() { + } + + /** + * Get the value property: The Pool 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 PoolListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PoolListResult 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 PoolListResult. + */ + public static PoolListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PoolListResult deserializedPoolListResult = new PoolListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> PoolInner.fromJson(reader1)); + deserializedPoolListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPoolListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPoolListResult; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/PrivateLinkResourceListResult.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/PrivateLinkResourceListResult.java new file mode 100644 index 0000000000000..d87afd0155ac2 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/models/PrivateLinkResourceListResult.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.horizondb.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.horizondb.fluent.models.PrivateLinkResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a PrivateLinkResource list operation. + */ +@Immutable +public final class PrivateLinkResourceListResult implements JsonSerializable { + /* + * The PrivateLinkResource items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of PrivateLinkResourceListResult class. + */ + private PrivateLinkResourceListResult() { + } + + /** + * Get the value property: The PrivateLinkResource 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 PrivateLinkResourceListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkResourceListResult 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 PrivateLinkResourceListResult. + */ + public static PrivateLinkResourceListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkResourceListResult deserializedPrivateLinkResourceListResult + = new PrivateLinkResourceListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PrivateLinkResourceInner.fromJson(reader1)); + deserializedPrivateLinkResourceListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPrivateLinkResourceListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkResourceListResult; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/package-info.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/package-info.java index 4a055a915c78e..a9bc30f6b3828 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/package-info.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/implementation/package-info.java @@ -4,6 +4,6 @@ /** * Package containing the implementations for HorizonDb. - * Azure Resource Provider API for managing HorizonDB clusters, pools, replicas, and firewall rules. + * Azure Resource Provider API for managing HorizonDB clusters, pools, endpoints, nodes, and firewall rules. */ package com.azure.resourcemanager.horizondb.implementation; diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ActivateChangeDataCaptureIdentityRequest.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ActivateChangeDataCaptureIdentityRequest.java new file mode 100644 index 0000000000000..53b4f45dbb487 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ActivateChangeDataCaptureIdentityRequest.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.horizondb.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 request to activate an identity assignment for a change data capture destination. + */ +@Fluent +public final class ActivateChangeDataCaptureIdentityRequest + implements JsonSerializable { + /* + * The resource ID of an inactive, successfully validated identity assignment under the destination receiving the + * action. + */ + private String identityAssignmentResourceId; + + /* + * Whether existing destination sessions should drain before the identity cutover. The default is false. + */ + private Boolean drainExistingSessions; + + /** + * Creates an instance of ActivateChangeDataCaptureIdentityRequest class. + */ + public ActivateChangeDataCaptureIdentityRequest() { + } + + /** + * Get the identityAssignmentResourceId property: The resource ID of an inactive, successfully validated identity + * assignment under the destination receiving the action. + * + * @return the identityAssignmentResourceId value. + */ + public String identityAssignmentResourceId() { + return this.identityAssignmentResourceId; + } + + /** + * Set the identityAssignmentResourceId property: The resource ID of an inactive, successfully validated identity + * assignment under the destination receiving the action. + * + * @param identityAssignmentResourceId the identityAssignmentResourceId value to set. + * @return the ActivateChangeDataCaptureIdentityRequest object itself. + */ + public ActivateChangeDataCaptureIdentityRequest + withIdentityAssignmentResourceId(String identityAssignmentResourceId) { + this.identityAssignmentResourceId = identityAssignmentResourceId; + return this; + } + + /** + * Get the drainExistingSessions property: Whether existing destination sessions should drain before the identity + * cutover. The default is false. + * + * @return the drainExistingSessions value. + */ + public Boolean drainExistingSessions() { + return this.drainExistingSessions; + } + + /** + * Set the drainExistingSessions property: Whether existing destination sessions should drain before the identity + * cutover. The default is false. + * + * @param drainExistingSessions the drainExistingSessions value to set. + * @return the ActivateChangeDataCaptureIdentityRequest object itself. + */ + public ActivateChangeDataCaptureIdentityRequest withDrainExistingSessions(Boolean drainExistingSessions) { + this.drainExistingSessions = drainExistingSessions; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("identityAssignmentResourceId", this.identityAssignmentResourceId); + jsonWriter.writeBooleanField("drainExistingSessions", this.drainExistingSessions); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActivateChangeDataCaptureIdentityRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActivateChangeDataCaptureIdentityRequest 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 ActivateChangeDataCaptureIdentityRequest. + */ + public static ActivateChangeDataCaptureIdentityRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActivateChangeDataCaptureIdentityRequest deserializedActivateChangeDataCaptureIdentityRequest + = new ActivateChangeDataCaptureIdentityRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("identityAssignmentResourceId".equals(fieldName)) { + deserializedActivateChangeDataCaptureIdentityRequest.identityAssignmentResourceId + = reader.getString(); + } else if ("drainExistingSessions".equals(fieldName)) { + deserializedActivateChangeDataCaptureIdentityRequest.drainExistingSessions + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedActivateChangeDataCaptureIdentityRequest; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ActivateChangeDataCaptureIdentityResult.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ActivateChangeDataCaptureIdentityResult.java new file mode 100644 index 0000000000000..767daebbd8a16 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ActivateChangeDataCaptureIdentityResult.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.horizondb.models; + +import com.azure.resourcemanager.horizondb.fluent.models.ActivateChangeDataCaptureIdentityResultInner; + +/** + * An immutable client-side representation of ActivateChangeDataCaptureIdentityResult. + */ +public interface ActivateChangeDataCaptureIdentityResult { + /** + * Gets the status property: The completed activation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the targetIdentityAssignmentResourceId property: The resource ID of the newly active identity assignment. + * + * @return the targetIdentityAssignmentResourceId value. + */ + String targetIdentityAssignmentResourceId(); + + /** + * Gets the previousIdentityAssignmentResourceId property: The resource ID of the previously active identity + * assignment, when one existed. + * + * @return the previousIdentityAssignmentResourceId value. + */ + String previousIdentityAssignmentResourceId(); + + /** + * Gets the inner com.azure.resourcemanager.horizondb.fluent.models.ActivateChangeDataCaptureIdentityResultInner + * object. + * + * @return the inner object. + */ + ActivateChangeDataCaptureIdentityResultInner innerModel(); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/AiModelManagementStatus.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/AiModelManagementStatus.java new file mode 100644 index 0000000000000..4ba8b2531602a --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/AiModelManagementStatus.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The AI Model Management status for a HorizonDB cluster. + */ +public final class AiModelManagementStatus extends ExpandableStringEnum { + /** + * AI Model Management is enabled. + */ + public static final AiModelManagementStatus ENABLED = fromString("Enabled"); + + /** + * AI Model Management is disabled. + */ + public static final AiModelManagementStatus DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of AiModelManagementStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AiModelManagementStatus() { + } + + /** + * Creates or finds a AiModelManagementStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding AiModelManagementStatus. + */ + public static AiModelManagementStatus fromString(String name) { + return fromString(name, AiModelManagementStatus.class); + } + + /** + * Gets known AiModelManagementStatus values. + * + * @return known AiModelManagementStatus values. + */ + public static Collection values() { + return values(AiModelManagementStatus.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbPool.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Authentication.java similarity index 72% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbPool.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Authentication.java index 5df7b2ff9e50f..bf32095c18fdd 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbPool.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Authentication.java @@ -5,13 +5,12 @@ package com.azure.resourcemanager.horizondb.models; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbPoolInner; -import java.util.Map; +import com.azure.resourcemanager.horizondb.fluent.models.AuthenticationInner; /** - * An immutable client-side representation of HorizonDbPool. + * An immutable client-side representation of Authentication. */ -public interface HorizonDbPool { +public interface Authentication { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -38,14 +37,7 @@ public interface HorizonDbPool { * * @return the properties value. */ - HorizonDbPoolProperties properties(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); + AuthenticationProperties properties(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -55,9 +47,9 @@ public interface HorizonDbPool { SystemData systemData(); /** - * Gets the inner com.azure.resourcemanager.horizondb.fluent.models.HorizonDbPoolInner object. + * Gets the inner com.azure.resourcemanager.horizondb.fluent.models.AuthenticationInner object. * * @return the inner object. */ - HorizonDbPoolInner innerModel(); + AuthenticationInner innerModel(); } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/AuthenticationProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/AuthenticationProperties.java new file mode 100644 index 0000000000000..2cc8bd4a2fc7f --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/AuthenticationProperties.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.horizondb.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; + +/** + * Common read-only properties of a service-created authentication configuration. + */ +@Immutable +public final class AuthenticationProperties implements JsonSerializable { + /* + * The state of the authentication configuration. + */ + private AuthenticationState state; + + /* + * The provisioning state of the authentication configuration. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of AuthenticationProperties class. + */ + private AuthenticationProperties() { + } + + /** + * Get the state property: The state of the authentication configuration. + * + * @return the state value. + */ + public AuthenticationState state() { + return this.state; + } + + /** + * Get the provisioningState property: The provisioning state of the authentication configuration. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AuthenticationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AuthenticationProperties 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 AuthenticationProperties. + */ + public static AuthenticationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AuthenticationProperties deserializedAuthenticationProperties = new AuthenticationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedAuthenticationProperties.state = AuthenticationState.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedAuthenticationProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAuthenticationProperties; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Authentications.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Authentications.java new file mode 100644 index 0000000000000..c09e4133cad4c --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Authentications.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.horizondb.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of Authentications. + */ +public interface Authentications { + /** + * Lists the two service-created authentication configurations for the cluster: passwordMethod and microsoftEntra. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Authentication list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String clusterName); + + /** + * Lists the two service-created authentication configurations for the cluster: passwordMethod and microsoftEntra. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Authentication list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String clusterName, Context context); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/BackupProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/BackupProperties.java new file mode 100644 index 0000000000000..b9fc587aade16 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/BackupProperties.java @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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; + +/** + * Backup configuration properties for a HorizonDB cluster. + */ +@Fluent +public final class BackupProperties implements JsonSerializable { + /* + * The geo-redundancy state. Geo-redundant backup is not supported when dataEncryption.type is AzureKeyVault. + */ + private GeoRedundancyState geoRedundancy; + + /* + * The number of days that automatic backups are retained. The service defaults to 7 days when this property is + * omitted. + */ + private Integer retentionDays; + + /* + * The earliest point in time, in UTC, to which the cluster can currently be restored. + */ + private OffsetDateTime earliestRestorePointUtc; + + /** + * Creates an instance of BackupProperties class. + */ + public BackupProperties() { + } + + /** + * Get the geoRedundancy property: The geo-redundancy state. Geo-redundant backup is not supported when + * dataEncryption.type is AzureKeyVault. + * + * @return the geoRedundancy value. + */ + public GeoRedundancyState geoRedundancy() { + return this.geoRedundancy; + } + + /** + * Set the geoRedundancy property: The geo-redundancy state. Geo-redundant backup is not supported when + * dataEncryption.type is AzureKeyVault. + * + * @param geoRedundancy the geoRedundancy value to set. + * @return the BackupProperties object itself. + */ + public BackupProperties withGeoRedundancy(GeoRedundancyState geoRedundancy) { + this.geoRedundancy = geoRedundancy; + return this; + } + + /** + * Get the retentionDays property: The number of days that automatic backups are retained. The service defaults to 7 + * days when this property is omitted. + * + * @return the retentionDays value. + */ + public Integer retentionDays() { + return this.retentionDays; + } + + /** + * Set the retentionDays property: The number of days that automatic backups are retained. The service defaults to 7 + * days when this property is omitted. + * + * @param retentionDays the retentionDays value to set. + * @return the BackupProperties object itself. + */ + public BackupProperties withRetentionDays(Integer retentionDays) { + this.retentionDays = retentionDays; + return this; + } + + /** + * Get the earliestRestorePointUtc property: The earliest point in time, in UTC, to which the cluster can currently + * be restored. + * + * @return the earliestRestorePointUtc value. + */ + public OffsetDateTime earliestRestorePointUtc() { + return this.earliestRestorePointUtc; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("geoRedundancy", this.geoRedundancy == null ? null : this.geoRedundancy.toString()); + jsonWriter.writeNumberField("retentionDays", this.retentionDays); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BackupProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BackupProperties 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 BackupProperties. + */ + public static BackupProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BackupProperties deserializedBackupProperties = new BackupProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("geoRedundancy".equals(fieldName)) { + deserializedBackupProperties.geoRedundancy = GeoRedundancyState.fromString(reader.getString()); + } else if ("retentionDays".equals(fieldName)) { + deserializedBackupProperties.retentionDays = reader.getNullable(JsonReader::getInt); + } else if ("earliestRestorePointUtc".equals(fieldName)) { + deserializedBackupProperties.earliestRestorePointUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedBackupProperties; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/BackupPropertiesForPatchUpdate.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/BackupPropertiesForPatchUpdate.java new file mode 100644 index 0000000000000..838616b1ad6ec --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/BackupPropertiesForPatchUpdate.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.horizondb.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; + +/** + * Backup configuration properties for updating a HorizonDB cluster. + */ +@Fluent +public final class BackupPropertiesForPatchUpdate implements JsonSerializable { + /* + * The number of days that automatic backups are retained. + */ + private Integer retentionDays; + + /** + * Creates an instance of BackupPropertiesForPatchUpdate class. + */ + public BackupPropertiesForPatchUpdate() { + } + + /** + * Get the retentionDays property: The number of days that automatic backups are retained. + * + * @return the retentionDays value. + */ + public Integer retentionDays() { + return this.retentionDays; + } + + /** + * Set the retentionDays property: The number of days that automatic backups are retained. + * + * @param retentionDays the retentionDays value to set. + * @return the BackupPropertiesForPatchUpdate object itself. + */ + public BackupPropertiesForPatchUpdate withRetentionDays(Integer retentionDays) { + this.retentionDays = retentionDays; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("retentionDays", this.retentionDays); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BackupPropertiesForPatchUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BackupPropertiesForPatchUpdate 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 BackupPropertiesForPatchUpdate. + */ + public static BackupPropertiesForPatchUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BackupPropertiesForPatchUpdate deserializedBackupPropertiesForPatchUpdate + = new BackupPropertiesForPatchUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("retentionDays".equals(fieldName)) { + deserializedBackupPropertiesForPatchUpdate.retentionDays = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedBackupPropertiesForPatchUpdate; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Capabilities.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Capabilities.java new file mode 100644 index 0000000000000..ec287d09a345a --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Capabilities.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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 Capabilities. + */ +public interface Capabilities { + /** + * Gets the singleton HorizonDB capability catalog entry available to a subscription in a specific region. + * + * @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 singleton HorizonDB capability catalog entry available to a subscription in a specific region along + * with {@link Response}. + */ + Response getWithResponse(String location, Context context); + + /** + * Gets the singleton HorizonDB capability catalog entry available to a subscription in a specific region. + * + * @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 singleton HorizonDB capability catalog entry available to a subscription in a specific region. + */ + Capability get(String location); + + /** + * Lists the singleton HorizonDB capability catalog entry available to a subscription in a specific region. The + * result contains one item. + * + * @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 Capability list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String location); + + /** + * Lists the singleton HorizonDB capability catalog entry available to a subscription in a specific region. The + * result contains one item. + * + * @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 Capability list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String location, Context context); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Capability.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Capability.java new file mode 100644 index 0000000000000..913830522e2c3 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Capability.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.horizondb.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.horizondb.fluent.models.CapabilityInner; + +/** + * An immutable client-side representation of Capability. + */ +public interface Capability { + /** + * 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. + */ + CapabilityProperties 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.horizondb.fluent.models.CapabilityInner object. + * + * @return the inner object. + */ + CapabilityInner innerModel(); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/CapabilityProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/CapabilityProperties.java new file mode 100644 index 0000000000000..681256c1cb5fb --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/CapabilityProperties.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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; + +/** + * Properties of the HorizonDB capabilities available to a subscription in a location. + */ +@Immutable +public final class CapabilityProperties implements JsonSerializable { + /* + * The provisioning state of the capability catalog entry. + */ + private ProvisioningState provisioningState; + + /* + * The Cluster capabilities available in the region. + */ + private ClusterCapability clusterCapabilities; + + /* + * The Pool capabilities available in the region, including processor, generation, and compute-model details. + */ + private PoolCapability poolCapabilities; + + /** + * Creates an instance of CapabilityProperties class. + */ + private CapabilityProperties() { + } + + /** + * Get the provisioningState property: The provisioning state of the capability catalog entry. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the clusterCapabilities property: The Cluster capabilities available in the region. + * + * @return the clusterCapabilities value. + */ + public ClusterCapability clusterCapabilities() { + return this.clusterCapabilities; + } + + /** + * Get the poolCapabilities property: The Pool capabilities available in the region, including processor, + * generation, and compute-model details. + * + * @return the poolCapabilities value. + */ + public PoolCapability poolCapabilities() { + return this.poolCapabilities; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CapabilityProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CapabilityProperties 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 CapabilityProperties. + */ + public static CapabilityProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CapabilityProperties deserializedCapabilityProperties = new CapabilityProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("clusterCapabilities".equals(fieldName)) { + deserializedCapabilityProperties.clusterCapabilities = ClusterCapability.fromJson(reader); + } else if ("poolCapabilities".equals(fieldName)) { + deserializedCapabilityProperties.poolCapabilities = PoolCapability.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedCapabilityProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedCapabilityProperties; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureCapabilities.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureCapabilities.java new file mode 100644 index 0000000000000..7e0561b051866 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureCapabilities.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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.horizondb.fluent.models.ChangeDataCaptureCapabilityInner; + +/** + * Resource collection API of ChangeDataCaptureCapabilities. + */ +public interface ChangeDataCaptureCapabilities { + /** + * Gets the singleton change data capture capability for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 singleton change data capture capability for a HorizonDB cluster along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String clusterName, + Context context); + + /** + * Gets the singleton change data capture capability for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 singleton change data capture capability for a HorizonDB cluster. + */ + ChangeDataCaptureCapability get(String resourceGroupName, String clusterName); + + /** + * Creates or replaces the singleton change data capture capability and reconciles shared engine prerequisites. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 singleton change data capture capability for a HorizonDB cluster. + */ + ChangeDataCaptureCapability createOrReplace(String resourceGroupName, String clusterName, + ChangeDataCaptureCapabilityInner resource); + + /** + * Creates or replaces the singleton change data capture capability and reconciles shared engine prerequisites. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 singleton change data capture capability for a HorizonDB cluster. + */ + ChangeDataCaptureCapability createOrReplace(String resourceGroupName, String clusterName, + ChangeDataCaptureCapabilityInner resource, Context context); + + /** + * Updates mutable change data capture capability properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 singleton change data capture capability for a HorizonDB cluster. + */ + ChangeDataCaptureCapability update(String resourceGroupName, String clusterName, + ChangeDataCaptureCapabilityForPatchUpdate properties); + + /** + * Updates mutable change data capture capability properties. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 singleton change data capture capability for a HorizonDB cluster. + */ + ChangeDataCaptureCapability update(String resourceGroupName, String clusterName, + ChangeDataCaptureCapabilityForPatchUpdate properties, Context context); + + /** + * Deletes the change data capture capability after all change data capture destinations and configurations have + * been removed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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); + + /** + * Deletes the change data capture capability after all change data capture destinations and configurations have + * been removed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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. + */ + void delete(String resourceGroupName, String clusterName, Context context); + + /** + * Lists the optional singleton change data capture capability for a cluster. The result contains zero or one item. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 ChangeDataCaptureCapability list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String clusterName); + + /** + * Lists the optional singleton change data capture capability for a cluster. The result contains zero or one item. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 ChangeDataCaptureCapability list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String clusterName, Context context); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureCapability.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureCapability.java new file mode 100644 index 0000000000000..bad6e71ecbdbc --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureCapability.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.horizondb.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.horizondb.fluent.models.ChangeDataCaptureCapabilityInner; + +/** + * An immutable client-side representation of ChangeDataCaptureCapability. + */ +public interface ChangeDataCaptureCapability { + /** + * 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. + */ + ChangeDataCaptureCapabilityProperties properties(); + + /** + * Gets the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + String eTag(); + + /** + * 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.horizondb.fluent.models.ChangeDataCaptureCapabilityInner object. + * + * @return the inner object. + */ + ChangeDataCaptureCapabilityInner innerModel(); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureCapabilityForPatchUpdate.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureCapabilityForPatchUpdate.java new file mode 100644 index 0000000000000..c32ed903503f5 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureCapabilityForPatchUpdate.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.horizondb.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A sparse update request for the singleton change data capture capability. + */ +@Fluent +public final class ChangeDataCaptureCapabilityForPatchUpdate + implements JsonSerializable { + /* + * The capability properties to update. + */ + private ChangeDataCaptureCapabilityPropertiesForPatchUpdate properties; + + /** + * Creates an instance of ChangeDataCaptureCapabilityForPatchUpdate class. + */ + public ChangeDataCaptureCapabilityForPatchUpdate() { + } + + /** + * Get the properties property: The capability properties to update. + * + * @return the properties value. + */ + public ChangeDataCaptureCapabilityPropertiesForPatchUpdate properties() { + return this.properties; + } + + /** + * Set the properties property: The capability properties to update. + * + * @param properties the properties value to set. + * @return the ChangeDataCaptureCapabilityForPatchUpdate object itself. + */ + public ChangeDataCaptureCapabilityForPatchUpdate + withProperties(ChangeDataCaptureCapabilityPropertiesForPatchUpdate 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 ChangeDataCaptureCapabilityForPatchUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChangeDataCaptureCapabilityForPatchUpdate 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 ChangeDataCaptureCapabilityForPatchUpdate. + */ + public static ChangeDataCaptureCapabilityForPatchUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChangeDataCaptureCapabilityForPatchUpdate deserializedChangeDataCaptureCapabilityForPatchUpdate + = new ChangeDataCaptureCapabilityForPatchUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedChangeDataCaptureCapabilityForPatchUpdate.properties + = ChangeDataCaptureCapabilityPropertiesForPatchUpdate.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedChangeDataCaptureCapabilityForPatchUpdate; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureCapabilityProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureCapabilityProperties.java new file mode 100644 index 0000000000000..63a6e644b91d3 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureCapabilityProperties.java @@ -0,0 +1,255 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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 properties of the singleton change data capture capability. + */ +@Fluent +public final class ChangeDataCaptureCapabilityProperties + implements JsonSerializable { + /* + * The requested capability state. + */ + private ChangeDataCaptureDesiredState desiredState; + + /* + * The current effective capability state. + */ + private ChangeDataCaptureEffectiveState effectiveState; + + /* + * The provisioning state of the latest capability mutation. + */ + private ProvisioningState provisioningState; + + /* + * Whether HorizonDB may automatically upgrade the service-owned change data capture extension within the supported + * compatibility policy. + */ + private Boolean autoUpgradeExtension; + + /* + * The implementation architecture currently used for change capture. + */ + private ChangeDataCaptureReplicationArchitecture replicationArchitecture; + + /* + * The installed change data capture extension and its current lifecycle state. + */ + private ChangeDataCaptureExtensionStatus extension; + + /* + * The current readiness of change data capture engine and read-write endpoint prerequisites. + */ + private ChangeDataCapturePrerequisiteStatus prerequisites; + + /* + * The number of change data capture destinations under this cluster. + */ + private int destinationCount; + + /* + * The number of change data capture configurations under this cluster. + */ + private int configurationCount; + + /* + * Customer-safe health information for the capability. + */ + private ChangeDataCaptureStatus status; + + /** + * Creates an instance of ChangeDataCaptureCapabilityProperties class. + */ + public ChangeDataCaptureCapabilityProperties() { + } + + /** + * Get the desiredState property: The requested capability state. + * + * @return the desiredState value. + */ + public ChangeDataCaptureDesiredState desiredState() { + return this.desiredState; + } + + /** + * Set the desiredState property: The requested capability state. + * + * @param desiredState the desiredState value to set. + * @return the ChangeDataCaptureCapabilityProperties object itself. + */ + public ChangeDataCaptureCapabilityProperties withDesiredState(ChangeDataCaptureDesiredState desiredState) { + this.desiredState = desiredState; + return this; + } + + /** + * Get the effectiveState property: The current effective capability state. + * + * @return the effectiveState value. + */ + public ChangeDataCaptureEffectiveState effectiveState() { + return this.effectiveState; + } + + /** + * Get the provisioningState property: The provisioning state of the latest capability mutation. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the autoUpgradeExtension property: Whether HorizonDB may automatically upgrade the service-owned change data + * capture extension within the supported compatibility policy. + * + * @return the autoUpgradeExtension value. + */ + public Boolean autoUpgradeExtension() { + return this.autoUpgradeExtension; + } + + /** + * Set the autoUpgradeExtension property: Whether HorizonDB may automatically upgrade the service-owned change data + * capture extension within the supported compatibility policy. + * + * @param autoUpgradeExtension the autoUpgradeExtension value to set. + * @return the ChangeDataCaptureCapabilityProperties object itself. + */ + public ChangeDataCaptureCapabilityProperties withAutoUpgradeExtension(Boolean autoUpgradeExtension) { + this.autoUpgradeExtension = autoUpgradeExtension; + return this; + } + + /** + * Get the replicationArchitecture property: The implementation architecture currently used for change capture. + * + * @return the replicationArchitecture value. + */ + public ChangeDataCaptureReplicationArchitecture replicationArchitecture() { + return this.replicationArchitecture; + } + + /** + * Get the extension property: The installed change data capture extension and its current lifecycle state. + * + * @return the extension value. + */ + public ChangeDataCaptureExtensionStatus extension() { + return this.extension; + } + + /** + * Get the prerequisites property: The current readiness of change data capture engine and read-write endpoint + * prerequisites. + * + * @return the prerequisites value. + */ + public ChangeDataCapturePrerequisiteStatus prerequisites() { + return this.prerequisites; + } + + /** + * Get the destinationCount property: The number of change data capture destinations under this cluster. + * + * @return the destinationCount value. + */ + public int destinationCount() { + return this.destinationCount; + } + + /** + * Get the configurationCount property: The number of change data capture configurations under this cluster. + * + * @return the configurationCount value. + */ + public int configurationCount() { + return this.configurationCount; + } + + /** + * Get the status property: Customer-safe health information for the capability. + * + * @return the status value. + */ + public ChangeDataCaptureStatus status() { + return this.status; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("desiredState", this.desiredState == null ? null : this.desiredState.toString()); + jsonWriter.writeBooleanField("autoUpgradeExtension", this.autoUpgradeExtension); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ChangeDataCaptureCapabilityProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChangeDataCaptureCapabilityProperties 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 ChangeDataCaptureCapabilityProperties. + */ + public static ChangeDataCaptureCapabilityProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChangeDataCaptureCapabilityProperties deserializedChangeDataCaptureCapabilityProperties + = new ChangeDataCaptureCapabilityProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("desiredState".equals(fieldName)) { + deserializedChangeDataCaptureCapabilityProperties.desiredState + = ChangeDataCaptureDesiredState.fromString(reader.getString()); + } else if ("effectiveState".equals(fieldName)) { + deserializedChangeDataCaptureCapabilityProperties.effectiveState + = ChangeDataCaptureEffectiveState.fromString(reader.getString()); + } else if ("replicationArchitecture".equals(fieldName)) { + deserializedChangeDataCaptureCapabilityProperties.replicationArchitecture + = ChangeDataCaptureReplicationArchitecture.fromString(reader.getString()); + } else if ("extension".equals(fieldName)) { + deserializedChangeDataCaptureCapabilityProperties.extension + = ChangeDataCaptureExtensionStatus.fromJson(reader); + } else if ("prerequisites".equals(fieldName)) { + deserializedChangeDataCaptureCapabilityProperties.prerequisites + = ChangeDataCapturePrerequisiteStatus.fromJson(reader); + } else if ("destinationCount".equals(fieldName)) { + deserializedChangeDataCaptureCapabilityProperties.destinationCount = reader.getInt(); + } else if ("configurationCount".equals(fieldName)) { + deserializedChangeDataCaptureCapabilityProperties.configurationCount = reader.getInt(); + } else if ("status".equals(fieldName)) { + deserializedChangeDataCaptureCapabilityProperties.status = ChangeDataCaptureStatus.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedChangeDataCaptureCapabilityProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("autoUpgradeExtension".equals(fieldName)) { + deserializedChangeDataCaptureCapabilityProperties.autoUpgradeExtension + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedChangeDataCaptureCapabilityProperties; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureCapabilityPropertiesForPatchUpdate.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureCapabilityPropertiesForPatchUpdate.java new file mode 100644 index 0000000000000..fa7f4a958c5d9 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureCapabilityPropertiesForPatchUpdate.java @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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; + +/** + * Properties for updating the singleton change data capture capability. Omitted properties preserve their current + * values. + */ +@Fluent +public final class ChangeDataCaptureCapabilityPropertiesForPatchUpdate + implements JsonSerializable { + /* + * The requested capability state. + */ + private ChangeDataCaptureDesiredState desiredState; + + /* + * Whether HorizonDB may automatically upgrade the service-owned change data capture extension within the supported + * compatibility policy. + */ + private Boolean autoUpgradeExtension; + + /** + * Creates an instance of ChangeDataCaptureCapabilityPropertiesForPatchUpdate class. + */ + public ChangeDataCaptureCapabilityPropertiesForPatchUpdate() { + } + + /** + * Get the desiredState property: The requested capability state. + * + * @return the desiredState value. + */ + public ChangeDataCaptureDesiredState desiredState() { + return this.desiredState; + } + + /** + * Set the desiredState property: The requested capability state. + * + * @param desiredState the desiredState value to set. + * @return the ChangeDataCaptureCapabilityPropertiesForPatchUpdate object itself. + */ + public ChangeDataCaptureCapabilityPropertiesForPatchUpdate + withDesiredState(ChangeDataCaptureDesiredState desiredState) { + this.desiredState = desiredState; + return this; + } + + /** + * Get the autoUpgradeExtension property: Whether HorizonDB may automatically upgrade the service-owned change data + * capture extension within the supported compatibility policy. + * + * @return the autoUpgradeExtension value. + */ + public Boolean autoUpgradeExtension() { + return this.autoUpgradeExtension; + } + + /** + * Set the autoUpgradeExtension property: Whether HorizonDB may automatically upgrade the service-owned change data + * capture extension within the supported compatibility policy. + * + * @param autoUpgradeExtension the autoUpgradeExtension value to set. + * @return the ChangeDataCaptureCapabilityPropertiesForPatchUpdate object itself. + */ + public ChangeDataCaptureCapabilityPropertiesForPatchUpdate withAutoUpgradeExtension(Boolean autoUpgradeExtension) { + this.autoUpgradeExtension = autoUpgradeExtension; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("desiredState", this.desiredState == null ? null : this.desiredState.toString()); + jsonWriter.writeBooleanField("autoUpgradeExtension", this.autoUpgradeExtension); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ChangeDataCaptureCapabilityPropertiesForPatchUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChangeDataCaptureCapabilityPropertiesForPatchUpdate 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 ChangeDataCaptureCapabilityPropertiesForPatchUpdate. + */ + public static ChangeDataCaptureCapabilityPropertiesForPatchUpdate fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ChangeDataCaptureCapabilityPropertiesForPatchUpdate deserializedChangeDataCaptureCapabilityPropertiesForPatchUpdate + = new ChangeDataCaptureCapabilityPropertiesForPatchUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("desiredState".equals(fieldName)) { + deserializedChangeDataCaptureCapabilityPropertiesForPatchUpdate.desiredState + = ChangeDataCaptureDesiredState.fromString(reader.getString()); + } else if ("autoUpgradeExtension".equals(fieldName)) { + deserializedChangeDataCaptureCapabilityPropertiesForPatchUpdate.autoUpgradeExtension + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedChangeDataCaptureCapabilityPropertiesForPatchUpdate; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbReplica.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureConfiguration.java similarity index 58% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbReplica.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureConfiguration.java index 7becfdc1d48c6..d3e3309e8dc28 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbReplica.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureConfiguration.java @@ -6,12 +6,12 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbReplicaInner; +import com.azure.resourcemanager.horizondb.fluent.models.ChangeDataCaptureConfigurationInner; /** - * An immutable client-side representation of HorizonDbReplica. + * An immutable client-side representation of ChangeDataCaptureConfiguration. */ -public interface HorizonDbReplica { +public interface ChangeDataCaptureConfiguration { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -38,7 +38,17 @@ public interface HorizonDbReplica { * * @return the properties value. */ - HorizonDbReplicaProperties properties(); + ChangeDataCaptureConfigurationProperties properties(); + + /** + * Gets the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + String eTag(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -55,47 +65,46 @@ public interface HorizonDbReplica { String resourceGroupName(); /** - * Gets the inner com.azure.resourcemanager.horizondb.fluent.models.HorizonDbReplicaInner object. + * Gets the inner com.azure.resourcemanager.horizondb.fluent.models.ChangeDataCaptureConfigurationInner object. * * @return the inner object. */ - HorizonDbReplicaInner innerModel(); + ChangeDataCaptureConfigurationInner innerModel(); /** - * The entirety of the HorizonDbReplica definition. + * The entirety of the ChangeDataCaptureConfiguration definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } /** - * The HorizonDbReplica definition stages. + * The ChangeDataCaptureConfiguration definition stages. */ interface DefinitionStages { /** - * The first stage of the HorizonDbReplica definition. + * The first stage of the ChangeDataCaptureConfiguration definition. */ interface Blank extends WithParentResource { } /** - * The stage of the HorizonDbReplica definition allowing to specify parent resource. + * The stage of the ChangeDataCaptureConfiguration definition allowing to specify parent resource. */ interface WithParentResource { /** - * Specifies resourceGroupName, clusterName, poolName. + * Specifies resourceGroupName, clusterName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. * @return the next definition stage. */ - WithCreate withExistingPool(String resourceGroupName, String clusterName, String poolName); + WithCreate withExistingCluster(String resourceGroupName, String clusterName); } /** - * The stage of the HorizonDbReplica 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. + * The stage of the ChangeDataCaptureConfiguration 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 { /** @@ -103,7 +112,7 @@ interface WithCreate extends DefinitionStages.WithProperties { * * @return the created resource. */ - HorizonDbReplica create(); + ChangeDataCaptureConfiguration create(); /** * Executes the create request. @@ -111,11 +120,11 @@ interface WithCreate extends DefinitionStages.WithProperties { * @param context The context to associate with this operation. * @return the created resource. */ - HorizonDbReplica create(Context context); + ChangeDataCaptureConfiguration create(Context context); } /** - * The stage of the HorizonDbReplica definition allowing to specify properties. + * The stage of the ChangeDataCaptureConfiguration definition allowing to specify properties. */ interface WithProperties { /** @@ -124,19 +133,19 @@ interface WithProperties { * @param properties The resource-specific properties for this resource. * @return the next definition stage. */ - WithCreate withProperties(HorizonDbReplicaProperties properties); + WithCreate withProperties(ChangeDataCaptureConfigurationProperties properties); } } /** - * Begins update for the HorizonDbReplica resource. + * Begins update for the ChangeDataCaptureConfiguration resource. * * @return the stage of resource update. */ - HorizonDbReplica.Update update(); + ChangeDataCaptureConfiguration.Update update(); /** - * The template for HorizonDbReplica update. + * The template for ChangeDataCaptureConfiguration update. */ interface Update extends UpdateStages.WithProperties { /** @@ -144,7 +153,7 @@ interface Update extends UpdateStages.WithProperties { * * @return the updated resource. */ - HorizonDbReplica apply(); + ChangeDataCaptureConfiguration apply(); /** * Executes the update request. @@ -152,24 +161,24 @@ interface Update extends UpdateStages.WithProperties { * @param context The context to associate with this operation. * @return the updated resource. */ - HorizonDbReplica apply(Context context); + ChangeDataCaptureConfiguration apply(Context context); } /** - * The HorizonDbReplica update stages. + * The ChangeDataCaptureConfiguration update stages. */ interface UpdateStages { /** - * The stage of the HorizonDbReplica update allowing to specify properties. + * The stage of the ChangeDataCaptureConfiguration update allowing to specify properties. */ interface WithProperties { /** - * Specifies the properties property: Properties of a HorizonDB replica for update operations.. + * Specifies the properties property: The configuration properties to update.. * - * @param properties Properties of a HorizonDB replica for update operations. + * @param properties The configuration properties to update. * @return the next definition stage. */ - Update withProperties(HorizonDbReplicaPropertiesForPatchUpdate properties); + Update withProperties(ChangeDataCaptureConfigurationPropertiesForPatchUpdate properties); } } @@ -178,7 +187,7 @@ interface WithProperties { * * @return the refreshed resource. */ - HorizonDbReplica refresh(); + ChangeDataCaptureConfiguration refresh(); /** * Refreshes the resource to sync with Azure. @@ -186,5 +195,5 @@ interface WithProperties { * @param context The context to associate with this operation. * @return the refreshed resource. */ - HorizonDbReplica refresh(Context context); + ChangeDataCaptureConfiguration refresh(Context context); } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureConfigurationForPatchUpdate.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureConfigurationForPatchUpdate.java new file mode 100644 index 0000000000000..50dc5ec8eb05b --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureConfigurationForPatchUpdate.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.horizondb.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A sparse update request for a change data capture configuration. + */ +@Fluent +public final class ChangeDataCaptureConfigurationForPatchUpdate + implements JsonSerializable { + /* + * The configuration properties to update. + */ + private ChangeDataCaptureConfigurationPropertiesForPatchUpdate properties; + + /** + * Creates an instance of ChangeDataCaptureConfigurationForPatchUpdate class. + */ + public ChangeDataCaptureConfigurationForPatchUpdate() { + } + + /** + * Get the properties property: The configuration properties to update. + * + * @return the properties value. + */ + public ChangeDataCaptureConfigurationPropertiesForPatchUpdate properties() { + return this.properties; + } + + /** + * Set the properties property: The configuration properties to update. + * + * @param properties the properties value to set. + * @return the ChangeDataCaptureConfigurationForPatchUpdate object itself. + */ + public ChangeDataCaptureConfigurationForPatchUpdate + withProperties(ChangeDataCaptureConfigurationPropertiesForPatchUpdate 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 ChangeDataCaptureConfigurationForPatchUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChangeDataCaptureConfigurationForPatchUpdate 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 ChangeDataCaptureConfigurationForPatchUpdate. + */ + public static ChangeDataCaptureConfigurationForPatchUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChangeDataCaptureConfigurationForPatchUpdate deserializedChangeDataCaptureConfigurationForPatchUpdate + = new ChangeDataCaptureConfigurationForPatchUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedChangeDataCaptureConfigurationForPatchUpdate.properties + = ChangeDataCaptureConfigurationPropertiesForPatchUpdate.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedChangeDataCaptureConfigurationForPatchUpdate; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureConfigurationProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureConfigurationProperties.java new file mode 100644 index 0000000000000..966a2895bff6d --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureConfigurationProperties.java @@ -0,0 +1,301 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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 properties of a Microsoft Fabric Mirroring configuration. + */ +@Fluent +public final class ChangeDataCaptureConfigurationProperties + implements JsonSerializable { + /* + * The exact PostgreSQL database name enrolled in this logical stream. This value is immutable. + */ + private String databaseName; + + /* + * The immutable usage profile. API version 2026-10-01-preview accepts Mirroring only. + */ + private ChangeDataCaptureUsageProfile usageProfile; + + /* + * The immutable resource ID of an enabled change data capture destination under the same cluster. + */ + private String destinationResourceId; + + /* + * A service-generated identifier for the logical stream, represented as an RFC 4122 GUID. This value remains stable + * when a writer role moves and the service materializes a replacement ARM resource under the new writer cluster. + */ + private String logicalStreamId; + + /* + * The requested configuration state. + */ + private ChangeDataCaptureDesiredState desiredState; + + /* + * The current effective configuration state. + */ + private ChangeDataCaptureEffectiveState effectiveState; + + /* + * The provisioning state of the latest configuration mutation. + */ + private ProvisioningState provisioningState; + + /* + * The change data capture extension state for the enrolled database. + */ + private ChangeDataCaptureExtensionStatus extension; + + /* + * The known status of the destination-owned replication session. + */ + private ChangeDataCaptureReplicationStatus replication; + + /* + * The current writer-topology binding for this logical stream. + */ + private ChangeDataCaptureTopologyBindingStatus topology; + + /* + * Customer-safe health information for the configuration. + */ + private ChangeDataCaptureStatus status; + + /** + * Creates an instance of ChangeDataCaptureConfigurationProperties class. + */ + public ChangeDataCaptureConfigurationProperties() { + } + + /** + * Get the databaseName property: The exact PostgreSQL database name enrolled in this logical stream. This value is + * immutable. + * + * @return the databaseName value. + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Set the databaseName property: The exact PostgreSQL database name enrolled in this logical stream. This value is + * immutable. + * + * @param databaseName the databaseName value to set. + * @return the ChangeDataCaptureConfigurationProperties object itself. + */ + public ChangeDataCaptureConfigurationProperties withDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Get the usageProfile property: The immutable usage profile. API version 2026-10-01-preview accepts Mirroring + * only. + * + * @return the usageProfile value. + */ + public ChangeDataCaptureUsageProfile usageProfile() { + return this.usageProfile; + } + + /** + * Set the usageProfile property: The immutable usage profile. API version 2026-10-01-preview accepts Mirroring + * only. + * + * @param usageProfile the usageProfile value to set. + * @return the ChangeDataCaptureConfigurationProperties object itself. + */ + public ChangeDataCaptureConfigurationProperties withUsageProfile(ChangeDataCaptureUsageProfile usageProfile) { + this.usageProfile = usageProfile; + return this; + } + + /** + * Get the destinationResourceId property: The immutable resource ID of an enabled change data capture destination + * under the same cluster. + * + * @return the destinationResourceId value. + */ + public String destinationResourceId() { + return this.destinationResourceId; + } + + /** + * Set the destinationResourceId property: The immutable resource ID of an enabled change data capture destination + * under the same cluster. + * + * @param destinationResourceId the destinationResourceId value to set. + * @return the ChangeDataCaptureConfigurationProperties object itself. + */ + public ChangeDataCaptureConfigurationProperties withDestinationResourceId(String destinationResourceId) { + this.destinationResourceId = destinationResourceId; + return this; + } + + /** + * Get the logicalStreamId property: A service-generated identifier for the logical stream, represented as an RFC + * 4122 GUID. This value remains stable when a writer role moves and the service materializes a replacement ARM + * resource under the new writer cluster. + * + * @return the logicalStreamId value. + */ + public String logicalStreamId() { + return this.logicalStreamId; + } + + /** + * Get the desiredState property: The requested configuration state. + * + * @return the desiredState value. + */ + public ChangeDataCaptureDesiredState desiredState() { + return this.desiredState; + } + + /** + * Set the desiredState property: The requested configuration state. + * + * @param desiredState the desiredState value to set. + * @return the ChangeDataCaptureConfigurationProperties object itself. + */ + public ChangeDataCaptureConfigurationProperties withDesiredState(ChangeDataCaptureDesiredState desiredState) { + this.desiredState = desiredState; + return this; + } + + /** + * Get the effectiveState property: The current effective configuration state. + * + * @return the effectiveState value. + */ + public ChangeDataCaptureEffectiveState effectiveState() { + return this.effectiveState; + } + + /** + * Get the provisioningState property: The provisioning state of the latest configuration mutation. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the extension property: The change data capture extension state for the enrolled database. + * + * @return the extension value. + */ + public ChangeDataCaptureExtensionStatus extension() { + return this.extension; + } + + /** + * Get the replication property: The known status of the destination-owned replication session. + * + * @return the replication value. + */ + public ChangeDataCaptureReplicationStatus replication() { + return this.replication; + } + + /** + * Get the topology property: The current writer-topology binding for this logical stream. + * + * @return the topology value. + */ + public ChangeDataCaptureTopologyBindingStatus topology() { + return this.topology; + } + + /** + * Get the status property: Customer-safe health information for the configuration. + * + * @return the status value. + */ + public ChangeDataCaptureStatus status() { + return this.status; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("databaseName", this.databaseName); + jsonWriter.writeStringField("usageProfile", this.usageProfile == null ? null : this.usageProfile.toString()); + jsonWriter.writeStringField("destinationResourceId", this.destinationResourceId); + jsonWriter.writeStringField("desiredState", this.desiredState == null ? null : this.desiredState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ChangeDataCaptureConfigurationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChangeDataCaptureConfigurationProperties 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 ChangeDataCaptureConfigurationProperties. + */ + public static ChangeDataCaptureConfigurationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChangeDataCaptureConfigurationProperties deserializedChangeDataCaptureConfigurationProperties + = new ChangeDataCaptureConfigurationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("databaseName".equals(fieldName)) { + deserializedChangeDataCaptureConfigurationProperties.databaseName = reader.getString(); + } else if ("usageProfile".equals(fieldName)) { + deserializedChangeDataCaptureConfigurationProperties.usageProfile + = ChangeDataCaptureUsageProfile.fromString(reader.getString()); + } else if ("destinationResourceId".equals(fieldName)) { + deserializedChangeDataCaptureConfigurationProperties.destinationResourceId = reader.getString(); + } else if ("logicalStreamId".equals(fieldName)) { + deserializedChangeDataCaptureConfigurationProperties.logicalStreamId = reader.getString(); + } else if ("desiredState".equals(fieldName)) { + deserializedChangeDataCaptureConfigurationProperties.desiredState + = ChangeDataCaptureDesiredState.fromString(reader.getString()); + } else if ("effectiveState".equals(fieldName)) { + deserializedChangeDataCaptureConfigurationProperties.effectiveState + = ChangeDataCaptureEffectiveState.fromString(reader.getString()); + } else if ("extension".equals(fieldName)) { + deserializedChangeDataCaptureConfigurationProperties.extension + = ChangeDataCaptureExtensionStatus.fromJson(reader); + } else if ("replication".equals(fieldName)) { + deserializedChangeDataCaptureConfigurationProperties.replication + = ChangeDataCaptureReplicationStatus.fromJson(reader); + } else if ("topology".equals(fieldName)) { + deserializedChangeDataCaptureConfigurationProperties.topology + = ChangeDataCaptureTopologyBindingStatus.fromJson(reader); + } else if ("status".equals(fieldName)) { + deserializedChangeDataCaptureConfigurationProperties.status + = ChangeDataCaptureStatus.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedChangeDataCaptureConfigurationProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedChangeDataCaptureConfigurationProperties; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureConfigurationPropertiesForPatchUpdate.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureConfigurationPropertiesForPatchUpdate.java new file mode 100644 index 0000000000000..9e0e42e6b8e85 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureConfigurationPropertiesForPatchUpdate.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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; + +/** + * Properties for updating a change data capture configuration. Omitted properties preserve their current values. + */ +@Fluent +public final class ChangeDataCaptureConfigurationPropertiesForPatchUpdate + implements JsonSerializable { + /* + * The requested configuration state. + */ + private ChangeDataCaptureDesiredState desiredState; + + /** + * Creates an instance of ChangeDataCaptureConfigurationPropertiesForPatchUpdate class. + */ + public ChangeDataCaptureConfigurationPropertiesForPatchUpdate() { + } + + /** + * Get the desiredState property: The requested configuration state. + * + * @return the desiredState value. + */ + public ChangeDataCaptureDesiredState desiredState() { + return this.desiredState; + } + + /** + * Set the desiredState property: The requested configuration state. + * + * @param desiredState the desiredState value to set. + * @return the ChangeDataCaptureConfigurationPropertiesForPatchUpdate object itself. + */ + public ChangeDataCaptureConfigurationPropertiesForPatchUpdate + withDesiredState(ChangeDataCaptureDesiredState desiredState) { + this.desiredState = desiredState; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("desiredState", this.desiredState == null ? null : this.desiredState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ChangeDataCaptureConfigurationPropertiesForPatchUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChangeDataCaptureConfigurationPropertiesForPatchUpdate 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 ChangeDataCaptureConfigurationPropertiesForPatchUpdate. + */ + public static ChangeDataCaptureConfigurationPropertiesForPatchUpdate fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ChangeDataCaptureConfigurationPropertiesForPatchUpdate deserializedChangeDataCaptureConfigurationPropertiesForPatchUpdate + = new ChangeDataCaptureConfigurationPropertiesForPatchUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("desiredState".equals(fieldName)) { + deserializedChangeDataCaptureConfigurationPropertiesForPatchUpdate.desiredState + = ChangeDataCaptureDesiredState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedChangeDataCaptureConfigurationPropertiesForPatchUpdate; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbAdministrators.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureConfigurations.java similarity index 60% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbAdministrators.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureConfigurations.java index 1a8aa2c1852d7..d4670eae81a1d 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbAdministrators.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureConfigurations.java @@ -9,76 +9,83 @@ import com.azure.core.util.Context; /** - * Resource collection API of HorizonDbAdministrators. + * Resource collection API of ChangeDataCaptureConfigurations. */ -public interface HorizonDbAdministrators { +public interface ChangeDataCaptureConfigurations { /** - * Gets information about a HorizonDB administrator. + * Gets a change data capture configuration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB administrator along with {@link Response}. + * @return a change data capture configuration along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String clusterName, String objectId, - Context context); + Response getWithResponse(String resourceGroupName, String clusterName, + String configurationName, Context context); /** - * Gets information about a HorizonDB administrator. + * Gets a change data capture configuration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB administrator. + * @return a change data capture configuration. */ - HorizonDbAdministrator get(String resourceGroupName, String clusterName, String objectId); + ChangeDataCaptureConfiguration get(String resourceGroupName, String clusterName, String configurationName); /** - * Deletes a HorizonDB administrator. + * Deletes a change data capture configuration after destination-side replication has been stopped or detached. This + * operation never deletes the Microsoft Fabric mirrored-database item. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 clusterName, String objectId); + void delete(String resourceGroupName, String clusterName, String configurationName); /** - * Deletes a HorizonDB administrator. + * Deletes a change data capture configuration after destination-side replication has been stopped or detached. This + * operation never deletes the Microsoft Fabric mirrored-database item. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param objectId The Entra ID object identifier of the principal (an RFC 4122 GUID). + * @param configurationName The caller-selected ARM-safe name of the change data capture configuration. The exact + * PostgreSQL database name is stored in properties.databaseName. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 clusterName, String objectId, Context context); + void delete(String resourceGroupName, String clusterName, String configurationName, Context context); /** - * Lists all HorizonDB administrators in a cluster. + * Lists change data capture configurations in a HorizonDB cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB 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 HorizonDbAdministrator list operation as paginated response with {@link PagedIterable}. + * @return the response of a ChangeDataCaptureConfiguration list operation as paginated response with + * {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String clusterName); + PagedIterable list(String resourceGroupName, String clusterName); /** - * Lists all HorizonDB administrators in a cluster. + * Lists change data capture configurations in a HorizonDB cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -86,35 +93,37 @@ Response getWithResponse(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbAdministrator list operation as paginated response with {@link PagedIterable}. + * @return the response of a ChangeDataCaptureConfiguration list operation as paginated response with + * {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String clusterName, Context context); + PagedIterable list(String resourceGroupName, String clusterName, Context context); /** - * Gets information about a HorizonDB administrator. + * Gets a change data capture configuration. * * @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 information about a HorizonDB administrator along with {@link Response}. + * @return a change data capture configuration along with {@link Response}. */ - HorizonDbAdministrator getById(String id); + ChangeDataCaptureConfiguration getById(String id); /** - * Gets information about a HorizonDB administrator. + * Gets a change data capture configuration. * * @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 information about a HorizonDB administrator along with {@link Response}. + * @return a change data capture configuration along with {@link Response}. */ - Response getByIdWithResponse(String id, Context context); + Response getByIdWithResponse(String id, Context context); /** - * Deletes a HorizonDB administrator. + * Deletes a change data capture configuration after destination-side replication has been stopped or detached. This + * operation never deletes the Microsoft Fabric mirrored-database item. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -124,7 +133,8 @@ Response getWithResponse(String resourceGroupName, Strin void deleteById(String id); /** - * Deletes a HorizonDB administrator. + * Deletes a change data capture configuration after destination-side replication has been stopped or detached. This + * operation never deletes the Microsoft Fabric mirrored-database item. * * @param id the resource ID. * @param context The context to associate with this operation. @@ -135,10 +145,10 @@ Response getWithResponse(String resourceGroupName, Strin void deleteByIdWithResponse(String id, Context context); /** - * Begins definition for a new HorizonDbAdministrator resource. + * Begins definition for a new ChangeDataCaptureConfiguration resource. * * @param name resource name. - * @return the first stage of the new HorizonDbAdministrator definition. + * @return the first stage of the new ChangeDataCaptureConfiguration definition. */ - HorizonDbAdministrator.DefinitionStages.Blank define(String name); + ChangeDataCaptureConfiguration.DefinitionStages.Blank define(String name); } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDesiredState.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDesiredState.java new file mode 100644 index 0000000000000..22a7c4b636d0c --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDesiredState.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The requested state of a HorizonDB change data capture capability, destination, or configuration. + */ +public final class ChangeDataCaptureDesiredState extends ExpandableStringEnum { + /** + * The resource should be enabled. + */ + public static final ChangeDataCaptureDesiredState ENABLED = fromString("Enabled"); + + /** + * The resource should be disabled. + */ + public static final ChangeDataCaptureDesiredState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of ChangeDataCaptureDesiredState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ChangeDataCaptureDesiredState() { + } + + /** + * Creates or finds a ChangeDataCaptureDesiredState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ChangeDataCaptureDesiredState. + */ + public static ChangeDataCaptureDesiredState fromString(String name) { + return fromString(name, ChangeDataCaptureDesiredState.class); + } + + /** + * Gets known ChangeDataCaptureDesiredState values. + * + * @return known ChangeDataCaptureDesiredState values. + */ + public static Collection values() { + return values(ChangeDataCaptureDesiredState.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbFirewallRule.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestination.java similarity index 58% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbFirewallRule.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestination.java index 120b8795cd0ce..15eb662826065 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbFirewallRule.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestination.java @@ -6,12 +6,12 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbFirewallRuleInner; +import com.azure.resourcemanager.horizondb.fluent.models.ChangeDataCaptureDestinationInner; /** - * An immutable client-side representation of HorizonDbFirewallRule. + * An immutable client-side representation of ChangeDataCaptureDestination. */ -public interface HorizonDbFirewallRule { +public interface ChangeDataCaptureDestination { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -38,7 +38,17 @@ public interface HorizonDbFirewallRule { * * @return the properties value. */ - HorizonDbFirewallRuleProperties properties(); + ChangeDataCaptureDestinationProperties properties(); + + /** + * Gets the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + String eTag(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -55,47 +65,46 @@ public interface HorizonDbFirewallRule { String resourceGroupName(); /** - * Gets the inner com.azure.resourcemanager.horizondb.fluent.models.HorizonDbFirewallRuleInner object. + * Gets the inner com.azure.resourcemanager.horizondb.fluent.models.ChangeDataCaptureDestinationInner object. * * @return the inner object. */ - HorizonDbFirewallRuleInner innerModel(); + ChangeDataCaptureDestinationInner innerModel(); /** - * The entirety of the HorizonDbFirewallRule definition. + * The entirety of the ChangeDataCaptureDestination definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } /** - * The HorizonDbFirewallRule definition stages. + * The ChangeDataCaptureDestination definition stages. */ interface DefinitionStages { /** - * The first stage of the HorizonDbFirewallRule definition. + * The first stage of the ChangeDataCaptureDestination definition. */ interface Blank extends WithParentResource { } /** - * The stage of the HorizonDbFirewallRule definition allowing to specify parent resource. + * The stage of the ChangeDataCaptureDestination definition allowing to specify parent resource. */ interface WithParentResource { /** - * Specifies resourceGroupName, clusterName, poolName. + * Specifies resourceGroupName, clusterName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. * @return the next definition stage. */ - WithCreate withExistingPool(String resourceGroupName, String clusterName, String poolName); + WithCreate withExistingCluster(String resourceGroupName, String clusterName); } /** - * The stage of the HorizonDbFirewallRule 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. + * The stage of the ChangeDataCaptureDestination 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 { /** @@ -103,7 +112,7 @@ interface WithCreate extends DefinitionStages.WithProperties { * * @return the created resource. */ - HorizonDbFirewallRule create(); + ChangeDataCaptureDestination create(); /** * Executes the create request. @@ -111,11 +120,11 @@ interface WithCreate extends DefinitionStages.WithProperties { * @param context The context to associate with this operation. * @return the created resource. */ - HorizonDbFirewallRule create(Context context); + ChangeDataCaptureDestination create(Context context); } /** - * The stage of the HorizonDbFirewallRule definition allowing to specify properties. + * The stage of the ChangeDataCaptureDestination definition allowing to specify properties. */ interface WithProperties { /** @@ -124,19 +133,19 @@ interface WithProperties { * @param properties The resource-specific properties for this resource. * @return the next definition stage. */ - WithCreate withProperties(HorizonDbFirewallRuleProperties properties); + WithCreate withProperties(ChangeDataCaptureDestinationProperties properties); } } /** - * Begins update for the HorizonDbFirewallRule resource. + * Begins update for the ChangeDataCaptureDestination resource. * * @return the stage of resource update. */ - HorizonDbFirewallRule.Update update(); + ChangeDataCaptureDestination.Update update(); /** - * The template for HorizonDbFirewallRule update. + * The template for ChangeDataCaptureDestination update. */ interface Update extends UpdateStages.WithProperties { /** @@ -144,7 +153,7 @@ interface Update extends UpdateStages.WithProperties { * * @return the updated resource. */ - HorizonDbFirewallRule apply(); + ChangeDataCaptureDestination apply(); /** * Executes the update request. @@ -152,24 +161,24 @@ interface Update extends UpdateStages.WithProperties { * @param context The context to associate with this operation. * @return the updated resource. */ - HorizonDbFirewallRule apply(Context context); + ChangeDataCaptureDestination apply(Context context); } /** - * The HorizonDbFirewallRule update stages. + * The ChangeDataCaptureDestination update stages. */ interface UpdateStages { /** - * The stage of the HorizonDbFirewallRule update allowing to specify properties. + * The stage of the ChangeDataCaptureDestination update allowing to specify properties. */ interface WithProperties { /** - * Specifies the properties property: The resource-specific properties for this resource.. + * Specifies the properties property: The destination properties to update.. * - * @param properties The resource-specific properties for this resource. + * @param properties The destination properties to update. * @return the next definition stage. */ - Update withProperties(HorizonDbFirewallRuleProperties properties); + Update withProperties(ChangeDataCaptureDestinationPropertiesForPatchUpdate properties); } } @@ -178,7 +187,7 @@ interface WithProperties { * * @return the refreshed resource. */ - HorizonDbFirewallRule refresh(); + ChangeDataCaptureDestination refresh(); /** * Refreshes the resource to sync with Azure. @@ -186,5 +195,5 @@ interface WithProperties { * @param context The context to associate with this operation. * @return the refreshed resource. */ - HorizonDbFirewallRule refresh(Context context); + ChangeDataCaptureDestination refresh(Context context); } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestinationDetails.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestinationDetails.java new file mode 100644 index 0000000000000..45dc244f7e792 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestinationDetails.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.horizondb.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; + +/** + * Destination-specific settings discriminated by destinationType. + */ +@Fluent +public class ChangeDataCaptureDestinationDetails implements JsonSerializable { + /* + * The destination family. + */ + private ChangeDataCaptureDestinationType destinationType + = ChangeDataCaptureDestinationType.fromString("ChangeDataCaptureDestinationDetails"); + + /* + * The protocol used to communicate with the destination. + */ + private ChangeDataCaptureProtocol protocol; + + /** + * Creates an instance of ChangeDataCaptureDestinationDetails class. + */ + public ChangeDataCaptureDestinationDetails() { + } + + /** + * Get the destinationType property: The destination family. + * + * @return the destinationType value. + */ + public ChangeDataCaptureDestinationType destinationType() { + return this.destinationType; + } + + /** + * Get the protocol property: The protocol used to communicate with the destination. + * + * @return the protocol value. + */ + public ChangeDataCaptureProtocol protocol() { + return this.protocol; + } + + /** + * Set the protocol property: The protocol used to communicate with the destination. + * + * @param protocol the protocol value to set. + * @return the ChangeDataCaptureDestinationDetails object itself. + */ + public ChangeDataCaptureDestinationDetails withProtocol(ChangeDataCaptureProtocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("protocol", this.protocol == null ? null : this.protocol.toString()); + jsonWriter.writeStringField("destinationType", + this.destinationType == null ? null : this.destinationType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ChangeDataCaptureDestinationDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChangeDataCaptureDestinationDetails 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 ChangeDataCaptureDestinationDetails. + */ + public static ChangeDataCaptureDestinationDetails 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 ("destinationType".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("Fabric".equals(discriminatorValue)) { + return FabricDestinationDetails.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static ChangeDataCaptureDestinationDetails fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChangeDataCaptureDestinationDetails deserializedChangeDataCaptureDestinationDetails + = new ChangeDataCaptureDestinationDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("protocol".equals(fieldName)) { + deserializedChangeDataCaptureDestinationDetails.protocol + = ChangeDataCaptureProtocol.fromString(reader.getString()); + } else if ("destinationType".equals(fieldName)) { + deserializedChangeDataCaptureDestinationDetails.destinationType + = ChangeDataCaptureDestinationType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedChangeDataCaptureDestinationDetails; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestinationEffectiveState.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestinationEffectiveState.java new file mode 100644 index 0000000000000..ad1ffea270d2a --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestinationEffectiveState.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The effective state of a HorizonDB change data capture destination. + */ +public final class ChangeDataCaptureDestinationEffectiveState + extends ExpandableStringEnum { + /** + * The destination is waiting for a validated active identity assignment. + */ + public static final ChangeDataCaptureDestinationEffectiveState WAITING_FOR_IDENTITY + = fromString("WaitingForIdentity"); + + /** + * The destination is being enabled. + */ + public static final ChangeDataCaptureDestinationEffectiveState ENABLING = fromString("Enabling"); + + /** + * The destination is enabled. + */ + public static final ChangeDataCaptureDestinationEffectiveState ENABLED = fromString("Enabled"); + + /** + * The destination is being disabled. + */ + public static final ChangeDataCaptureDestinationEffectiveState DISABLING = fromString("Disabling"); + + /** + * The destination is disabled. + */ + public static final ChangeDataCaptureDestinationEffectiveState DISABLED = fromString("Disabled"); + + /** + * The destination is available with reduced functionality or impaired health. + */ + public static final ChangeDataCaptureDestinationEffectiveState DEGRADED = fromString("Degraded"); + + /** + * The destination is not operational because reconciliation failed. + */ + public static final ChangeDataCaptureDestinationEffectiveState FAILED = fromString("Failed"); + + /** + * Creates a new instance of ChangeDataCaptureDestinationEffectiveState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ChangeDataCaptureDestinationEffectiveState() { + } + + /** + * Creates or finds a ChangeDataCaptureDestinationEffectiveState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ChangeDataCaptureDestinationEffectiveState. + */ + public static ChangeDataCaptureDestinationEffectiveState fromString(String name) { + return fromString(name, ChangeDataCaptureDestinationEffectiveState.class); + } + + /** + * Gets known ChangeDataCaptureDestinationEffectiveState values. + * + * @return known ChangeDataCaptureDestinationEffectiveState values. + */ + public static Collection values() { + return values(ChangeDataCaptureDestinationEffectiveState.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestinationForPatchUpdate.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestinationForPatchUpdate.java new file mode 100644 index 0000000000000..8411e097d9ffc --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestinationForPatchUpdate.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.horizondb.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A sparse update request for a change data capture destination. + */ +@Fluent +public final class ChangeDataCaptureDestinationForPatchUpdate + implements JsonSerializable { + /* + * The destination properties to update. + */ + private ChangeDataCaptureDestinationPropertiesForPatchUpdate properties; + + /** + * Creates an instance of ChangeDataCaptureDestinationForPatchUpdate class. + */ + public ChangeDataCaptureDestinationForPatchUpdate() { + } + + /** + * Get the properties property: The destination properties to update. + * + * @return the properties value. + */ + public ChangeDataCaptureDestinationPropertiesForPatchUpdate properties() { + return this.properties; + } + + /** + * Set the properties property: The destination properties to update. + * + * @param properties the properties value to set. + * @return the ChangeDataCaptureDestinationForPatchUpdate object itself. + */ + public ChangeDataCaptureDestinationForPatchUpdate + withProperties(ChangeDataCaptureDestinationPropertiesForPatchUpdate 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 ChangeDataCaptureDestinationForPatchUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChangeDataCaptureDestinationForPatchUpdate 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 ChangeDataCaptureDestinationForPatchUpdate. + */ + public static ChangeDataCaptureDestinationForPatchUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChangeDataCaptureDestinationForPatchUpdate deserializedChangeDataCaptureDestinationForPatchUpdate + = new ChangeDataCaptureDestinationForPatchUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedChangeDataCaptureDestinationForPatchUpdate.properties + = ChangeDataCaptureDestinationPropertiesForPatchUpdate.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedChangeDataCaptureDestinationForPatchUpdate; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestinationProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestinationProperties.java new file mode 100644 index 0000000000000..aec3920d02f42 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestinationProperties.java @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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 properties of a Microsoft Fabric change data capture destination. + */ +@Fluent +public final class ChangeDataCaptureDestinationProperties + implements JsonSerializable { + /* + * The immutable Microsoft Fabric destination settings. Resubmitting the same values is accepted; changing them + * requires deleting and recreating the destination. + */ + private ChangeDataCaptureDestinationDetails destination; + + /* + * The requested destination state. + */ + private ChangeDataCaptureDesiredState desiredState; + + /* + * The current effective destination state. + */ + private ChangeDataCaptureDestinationEffectiveState effectiveState; + + /* + * The provisioning state of the latest destination mutation. + */ + private ProvisioningState provisioningState; + + /* + * The resource ID of the currently active identity assignment, if one is active. + */ + private String activeIdentityAssignmentResourceId; + + /* + * The number of change data capture configurations that reference this destination. + */ + private int configurationCount; + + /* + * Customer-safe health information for the destination. + */ + private ChangeDataCaptureStatus status; + + /** + * Creates an instance of ChangeDataCaptureDestinationProperties class. + */ + public ChangeDataCaptureDestinationProperties() { + } + + /** + * Get the destination property: The immutable Microsoft Fabric destination settings. Resubmitting the same values + * is accepted; changing them requires deleting and recreating the destination. + * + * @return the destination value. + */ + public ChangeDataCaptureDestinationDetails destination() { + return this.destination; + } + + /** + * Set the destination property: The immutable Microsoft Fabric destination settings. Resubmitting the same values + * is accepted; changing them requires deleting and recreating the destination. + * + * @param destination the destination value to set. + * @return the ChangeDataCaptureDestinationProperties object itself. + */ + public ChangeDataCaptureDestinationProperties withDestination(ChangeDataCaptureDestinationDetails destination) { + this.destination = destination; + return this; + } + + /** + * Get the desiredState property: The requested destination state. + * + * @return the desiredState value. + */ + public ChangeDataCaptureDesiredState desiredState() { + return this.desiredState; + } + + /** + * Set the desiredState property: The requested destination state. + * + * @param desiredState the desiredState value to set. + * @return the ChangeDataCaptureDestinationProperties object itself. + */ + public ChangeDataCaptureDestinationProperties withDesiredState(ChangeDataCaptureDesiredState desiredState) { + this.desiredState = desiredState; + return this; + } + + /** + * Get the effectiveState property: The current effective destination state. + * + * @return the effectiveState value. + */ + public ChangeDataCaptureDestinationEffectiveState effectiveState() { + return this.effectiveState; + } + + /** + * Get the provisioningState property: The provisioning state of the latest destination mutation. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the activeIdentityAssignmentResourceId property: The resource ID of the currently active identity assignment, + * if one is active. + * + * @return the activeIdentityAssignmentResourceId value. + */ + public String activeIdentityAssignmentResourceId() { + return this.activeIdentityAssignmentResourceId; + } + + /** + * Get the configurationCount property: The number of change data capture configurations that reference this + * destination. + * + * @return the configurationCount value. + */ + public int configurationCount() { + return this.configurationCount; + } + + /** + * Get the status property: Customer-safe health information for the destination. + * + * @return the status value. + */ + public ChangeDataCaptureStatus status() { + return this.status; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("destination", this.destination); + jsonWriter.writeStringField("desiredState", this.desiredState == null ? null : this.desiredState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ChangeDataCaptureDestinationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChangeDataCaptureDestinationProperties 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 ChangeDataCaptureDestinationProperties. + */ + public static ChangeDataCaptureDestinationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChangeDataCaptureDestinationProperties deserializedChangeDataCaptureDestinationProperties + = new ChangeDataCaptureDestinationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("destination".equals(fieldName)) { + deserializedChangeDataCaptureDestinationProperties.destination + = ChangeDataCaptureDestinationDetails.fromJson(reader); + } else if ("desiredState".equals(fieldName)) { + deserializedChangeDataCaptureDestinationProperties.desiredState + = ChangeDataCaptureDesiredState.fromString(reader.getString()); + } else if ("effectiveState".equals(fieldName)) { + deserializedChangeDataCaptureDestinationProperties.effectiveState + = ChangeDataCaptureDestinationEffectiveState.fromString(reader.getString()); + } else if ("configurationCount".equals(fieldName)) { + deserializedChangeDataCaptureDestinationProperties.configurationCount = reader.getInt(); + } else if ("status".equals(fieldName)) { + deserializedChangeDataCaptureDestinationProperties.status + = ChangeDataCaptureStatus.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedChangeDataCaptureDestinationProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("activeIdentityAssignmentResourceId".equals(fieldName)) { + deserializedChangeDataCaptureDestinationProperties.activeIdentityAssignmentResourceId + = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedChangeDataCaptureDestinationProperties; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestinationPropertiesForPatchUpdate.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestinationPropertiesForPatchUpdate.java new file mode 100644 index 0000000000000..d6e109a44a3a0 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestinationPropertiesForPatchUpdate.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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; + +/** + * Properties for updating a change data capture destination. Omitted properties preserve their current values. + */ +@Fluent +public final class ChangeDataCaptureDestinationPropertiesForPatchUpdate + implements JsonSerializable { + /* + * The requested destination state. + */ + private ChangeDataCaptureDesiredState desiredState; + + /** + * Creates an instance of ChangeDataCaptureDestinationPropertiesForPatchUpdate class. + */ + public ChangeDataCaptureDestinationPropertiesForPatchUpdate() { + } + + /** + * Get the desiredState property: The requested destination state. + * + * @return the desiredState value. + */ + public ChangeDataCaptureDesiredState desiredState() { + return this.desiredState; + } + + /** + * Set the desiredState property: The requested destination state. + * + * @param desiredState the desiredState value to set. + * @return the ChangeDataCaptureDestinationPropertiesForPatchUpdate object itself. + */ + public ChangeDataCaptureDestinationPropertiesForPatchUpdate + withDesiredState(ChangeDataCaptureDesiredState desiredState) { + this.desiredState = desiredState; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("desiredState", this.desiredState == null ? null : this.desiredState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ChangeDataCaptureDestinationPropertiesForPatchUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChangeDataCaptureDestinationPropertiesForPatchUpdate 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 ChangeDataCaptureDestinationPropertiesForPatchUpdate. + */ + public static ChangeDataCaptureDestinationPropertiesForPatchUpdate fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ChangeDataCaptureDestinationPropertiesForPatchUpdate deserializedChangeDataCaptureDestinationPropertiesForPatchUpdate + = new ChangeDataCaptureDestinationPropertiesForPatchUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("desiredState".equals(fieldName)) { + deserializedChangeDataCaptureDestinationPropertiesForPatchUpdate.desiredState + = ChangeDataCaptureDesiredState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedChangeDataCaptureDestinationPropertiesForPatchUpdate; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestinationType.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestinationType.java new file mode 100644 index 0000000000000..009c8efe3f679 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestinationType.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The destination type supported by this API version. + */ +public final class ChangeDataCaptureDestinationType extends ExpandableStringEnum { + /** + * A Microsoft Fabric destination. + */ + public static final ChangeDataCaptureDestinationType FABRIC = fromString("Fabric"); + + /** + * Creates a new instance of ChangeDataCaptureDestinationType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ChangeDataCaptureDestinationType() { + } + + /** + * Creates or finds a ChangeDataCaptureDestinationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ChangeDataCaptureDestinationType. + */ + public static ChangeDataCaptureDestinationType fromString(String name) { + return fromString(name, ChangeDataCaptureDestinationType.class); + } + + /** + * Gets known ChangeDataCaptureDestinationType values. + * + * @return known ChangeDataCaptureDestinationType values. + */ + public static Collection values() { + return values(ChangeDataCaptureDestinationType.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestinations.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestinations.java new file mode 100644 index 0000000000000..dea47f54c167b --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestinations.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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 ChangeDataCaptureDestinations. + */ +public interface ChangeDataCaptureDestinations { + /** + * Gets a change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a change data capture destination along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String clusterName, + String destinationName, Context context); + + /** + * Gets a change data capture destination. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a change data capture destination. + */ + ChangeDataCaptureDestination get(String resourceGroupName, String clusterName, String destinationName); + + /** + * Deletes a change data capture destination after all referencing configurations and identity assignments have been + * removed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 clusterName, String destinationName); + + /** + * Deletes a change data capture destination after all referencing configurations and identity assignments have been + * removed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 clusterName, String destinationName, Context context); + + /** + * Lists change data capture destinations in a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 ChangeDataCaptureDestination list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String clusterName); + + /** + * Lists change data capture destinations in a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 ChangeDataCaptureDestination list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String clusterName, Context context); + + /** + * Atomically activates a validated identity assignment for this destination. If-Match is evaluated against the + * destination entity tag. Activating the already-active assignment succeeds idempotently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ifMatch The destination entity tag. The action proceeds only when this value matches the destination's + * current entity tag. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 completed result of activating a change data capture destination identity. + */ + ActivateChangeDataCaptureIdentityResult activateIdentity(String resourceGroupName, String ifMatch, + String clusterName, String destinationName, ActivateChangeDataCaptureIdentityRequest body); + + /** + * Atomically activates a validated identity assignment for this destination. If-Match is evaluated against the + * destination entity tag. Activating the already-active assignment succeeds idempotently. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param ifMatch The destination entity tag. The action proceeds only when this value matches the destination's + * current entity tag. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @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 completed result of activating a change data capture destination identity. + */ + ActivateChangeDataCaptureIdentityResult activateIdentity(String resourceGroupName, String ifMatch, + String clusterName, String destinationName, ActivateChangeDataCaptureIdentityRequest body, Context context); + + /** + * Gets a change data capture destination. + * + * @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 change data capture destination along with {@link Response}. + */ + ChangeDataCaptureDestination getById(String id); + + /** + * Gets a change data capture destination. + * + * @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 change data capture destination along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a change data capture destination after all referencing configurations and identity assignments have been + * removed. + * + * @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); + + /** + * Deletes a change data capture destination after all referencing configurations and identity assignments have been + * removed. + * + * @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 ChangeDataCaptureDestination resource. + * + * @param name resource name. + * @return the first stage of the new ChangeDataCaptureDestination definition. + */ + ChangeDataCaptureDestination.DefinitionStages.Blank define(String name); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureEffectiveState.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureEffectiveState.java new file mode 100644 index 0000000000000..8b194424bb82a --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureEffectiveState.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The effective state of a HorizonDB change data capture capability or configuration. + */ +public final class ChangeDataCaptureEffectiveState extends ExpandableStringEnum { + /** + * The resource is being enabled. + */ + public static final ChangeDataCaptureEffectiveState ENABLING = fromString("Enabling"); + + /** + * The resource is enabled. + */ + public static final ChangeDataCaptureEffectiveState ENABLED = fromString("Enabled"); + + /** + * The resource is being disabled. + */ + public static final ChangeDataCaptureEffectiveState DISABLING = fromString("Disabling"); + + /** + * The resource is disabled. + */ + public static final ChangeDataCaptureEffectiveState DISABLED = fromString("Disabled"); + + /** + * The resource is available with reduced functionality or impaired health. + */ + public static final ChangeDataCaptureEffectiveState DEGRADED = fromString("Degraded"); + + /** + * The resource is not operational because reconciliation failed. + */ + public static final ChangeDataCaptureEffectiveState FAILED = fromString("Failed"); + + /** + * Creates a new instance of ChangeDataCaptureEffectiveState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ChangeDataCaptureEffectiveState() { + } + + /** + * Creates or finds a ChangeDataCaptureEffectiveState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ChangeDataCaptureEffectiveState. + */ + public static ChangeDataCaptureEffectiveState fromString(String name) { + return fromString(name, ChangeDataCaptureEffectiveState.class); + } + + /** + * Gets known ChangeDataCaptureEffectiveState values. + * + * @return known ChangeDataCaptureEffectiveState values. + */ + public static Collection values() { + return values(ChangeDataCaptureEffectiveState.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureEngineConfigurationState.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureEngineConfigurationState.java new file mode 100644 index 0000000000000..c17f9db9a7fa0 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureEngineConfigurationState.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The readiness of HorizonDB engine settings required for change data capture. + */ +public final class ChangeDataCaptureEngineConfigurationState + extends ExpandableStringEnum { + /** + * The required engine settings are ready. + */ + public static final ChangeDataCaptureEngineConfigurationState READY = fromString("Ready"); + + /** + * One or more required engine settings are not ready. + */ + public static final ChangeDataCaptureEngineConfigurationState NOT_READY = fromString("NotReady"); + + /** + * The service is reconciling required engine settings. + */ + public static final ChangeDataCaptureEngineConfigurationState RECONCILING = fromString("Reconciling"); + + /** + * Engine-setting reconciliation failed. + */ + public static final ChangeDataCaptureEngineConfigurationState FAILED = fromString("Failed"); + + /** + * Creates a new instance of ChangeDataCaptureEngineConfigurationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ChangeDataCaptureEngineConfigurationState() { + } + + /** + * Creates or finds a ChangeDataCaptureEngineConfigurationState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ChangeDataCaptureEngineConfigurationState. + */ + public static ChangeDataCaptureEngineConfigurationState fromString(String name) { + return fromString(name, ChangeDataCaptureEngineConfigurationState.class); + } + + /** + * Gets known ChangeDataCaptureEngineConfigurationState values. + * + * @return known ChangeDataCaptureEngineConfigurationState values. + */ + public static Collection values() { + return values(ChangeDataCaptureEngineConfigurationState.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureExtensionState.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureExtensionState.java new file mode 100644 index 0000000000000..3470310d55429 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureExtensionState.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The lifecycle state of the HorizonDB change data capture extension. + */ +public final class ChangeDataCaptureExtensionState extends ExpandableStringEnum { + /** + * The extension is not installed. + */ + public static final ChangeDataCaptureExtensionState NOT_INSTALLED = fromString("NotInstalled"); + + /** + * The extension is being installed. + */ + public static final ChangeDataCaptureExtensionState INSTALLING = fromString("Installing"); + + /** + * The extension is ready. + */ + public static final ChangeDataCaptureExtensionState READY = fromString("Ready"); + + /** + * The extension is being upgraded. + */ + public static final ChangeDataCaptureExtensionState UPGRADING = fromString("Upgrading"); + + /** + * The extension is being removed. + */ + public static final ChangeDataCaptureExtensionState REMOVING = fromString("Removing"); + + /** + * The extension operation failed. + */ + public static final ChangeDataCaptureExtensionState FAILED = fromString("Failed"); + + /** + * Creates a new instance of ChangeDataCaptureExtensionState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ChangeDataCaptureExtensionState() { + } + + /** + * Creates or finds a ChangeDataCaptureExtensionState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ChangeDataCaptureExtensionState. + */ + public static ChangeDataCaptureExtensionState fromString(String name) { + return fromString(name, ChangeDataCaptureExtensionState.class); + } + + /** + * Gets known ChangeDataCaptureExtensionState values. + * + * @return known ChangeDataCaptureExtensionState values. + */ + public static Collection values() { + return values(ChangeDataCaptureExtensionState.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureExtensionStatus.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureExtensionStatus.java new file mode 100644 index 0000000000000..0b9c442e4a155 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureExtensionStatus.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The installed HorizonDB change data capture extension and its current state. + */ +@Immutable +public final class ChangeDataCaptureExtensionStatus implements JsonSerializable { + /* + * The extension name. + */ + private String name; + + /* + * The installed extension version. + */ + private String version; + + /* + * The current extension lifecycle state. + */ + private ChangeDataCaptureExtensionState state; + + /** + * Creates an instance of ChangeDataCaptureExtensionStatus class. + */ + private ChangeDataCaptureExtensionStatus() { + } + + /** + * Get the name property: The extension name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the version property: The installed extension version. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Get the state property: The current extension lifecycle state. + * + * @return the state value. + */ + public ChangeDataCaptureExtensionState state() { + return this.state; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ChangeDataCaptureExtensionStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChangeDataCaptureExtensionStatus 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 ChangeDataCaptureExtensionStatus. + */ + public static ChangeDataCaptureExtensionStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChangeDataCaptureExtensionStatus deserializedChangeDataCaptureExtensionStatus + = new ChangeDataCaptureExtensionStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedChangeDataCaptureExtensionStatus.name = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedChangeDataCaptureExtensionStatus.version = reader.getString(); + } else if ("state".equals(fieldName)) { + deserializedChangeDataCaptureExtensionStatus.state + = ChangeDataCaptureExtensionState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedChangeDataCaptureExtensionStatus; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureIdentityActivationState.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureIdentityActivationState.java new file mode 100644 index 0000000000000..4e443b0860462 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureIdentityActivationState.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The activation state of a change data capture identity assignment. + */ +public final class ChangeDataCaptureIdentityActivationState + extends ExpandableStringEnum { + /** + * The identity assignment is not active. + */ + public static final ChangeDataCaptureIdentityActivationState INACTIVE = fromString("Inactive"); + + /** + * The identity assignment is being activated. + */ + public static final ChangeDataCaptureIdentityActivationState ACTIVATING = fromString("Activating"); + + /** + * The identity assignment is active. + */ + public static final ChangeDataCaptureIdentityActivationState ACTIVE = fromString("Active"); + + /** + * The identity assignment is being deactivated. + */ + public static final ChangeDataCaptureIdentityActivationState DEACTIVATING = fromString("Deactivating"); + + /** + * The identity activation transition failed. + */ + public static final ChangeDataCaptureIdentityActivationState FAILED = fromString("Failed"); + + /** + * Creates a new instance of ChangeDataCaptureIdentityActivationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ChangeDataCaptureIdentityActivationState() { + } + + /** + * Creates or finds a ChangeDataCaptureIdentityActivationState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ChangeDataCaptureIdentityActivationState. + */ + public static ChangeDataCaptureIdentityActivationState fromString(String name) { + return fromString(name, ChangeDataCaptureIdentityActivationState.class); + } + + /** + * Gets known ChangeDataCaptureIdentityActivationState values. + * + * @return known ChangeDataCaptureIdentityActivationState values. + */ + public static Collection values() { + return values(ChangeDataCaptureIdentityActivationState.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureIdentityAssignmentProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureIdentityAssignmentProperties.java new file mode 100644 index 0000000000000..5494d5699b9c1 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureIdentityAssignmentProperties.java @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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 properties of a change data capture identity assignment. + */ +@Fluent +public final class ChangeDataCaptureIdentityAssignmentProperties + implements JsonSerializable { + /* + * The immutable resource ID of the user-assigned managed identity selected for this destination. The ID must + * exactly match a key in the parent cluster's top-level identity.userAssignedIdentities dictionary; otherwise + * creation is rejected. Attaching the identity to the cluster does not grant destination access, so required role + * assignments must be configured separately. Resubmitting the same value is accepted; changing it requires deleting + * and recreating the assignment. + */ + private String identityResourceId; + + /* + * The current assignment lifecycle state. + */ + private ChangeDataCaptureIdentityAssignmentState effectiveState; + + /* + * The current activation state within the parent destination. + */ + private ChangeDataCaptureIdentityActivationState activationState; + + /* + * The Microsoft Entra principal ID resolved from the user-assigned managed identity, represented as an RFC 4122 + * GUID. + */ + private String principalId; + + /* + * The Microsoft Entra tenant ID resolved from the user-assigned managed identity, represented as an RFC 4122 GUID. + */ + private String tenantId; + + /* + * The provisioning state of the latest identity-assignment mutation. + */ + private ProvisioningState provisioningState; + + /* + * The latest validation result for this identity assignment. + */ + private IdentityValidationStatus validation; + + /* + * Customer-safe health information for the identity assignment. + */ + private ChangeDataCaptureStatus status; + + /** + * Creates an instance of ChangeDataCaptureIdentityAssignmentProperties class. + */ + public ChangeDataCaptureIdentityAssignmentProperties() { + } + + /** + * Get the identityResourceId property: The immutable resource ID of the user-assigned managed identity selected for + * this destination. The ID must exactly match a key in the parent cluster's top-level + * identity.userAssignedIdentities dictionary; otherwise creation is rejected. Attaching the identity to the cluster + * does not grant destination access, so required role assignments must be configured separately. Resubmitting the + * same value is accepted; changing it requires deleting and recreating the assignment. + * + * @return the identityResourceId value. + */ + public String identityResourceId() { + return this.identityResourceId; + } + + /** + * Set the identityResourceId property: The immutable resource ID of the user-assigned managed identity selected for + * this destination. The ID must exactly match a key in the parent cluster's top-level + * identity.userAssignedIdentities dictionary; otherwise creation is rejected. Attaching the identity to the cluster + * does not grant destination access, so required role assignments must be configured separately. Resubmitting the + * same value is accepted; changing it requires deleting and recreating the assignment. + * + * @param identityResourceId the identityResourceId value to set. + * @return the ChangeDataCaptureIdentityAssignmentProperties object itself. + */ + public ChangeDataCaptureIdentityAssignmentProperties withIdentityResourceId(String identityResourceId) { + this.identityResourceId = identityResourceId; + return this; + } + + /** + * Get the effectiveState property: The current assignment lifecycle state. + * + * @return the effectiveState value. + */ + public ChangeDataCaptureIdentityAssignmentState effectiveState() { + return this.effectiveState; + } + + /** + * Get the activationState property: The current activation state within the parent destination. + * + * @return the activationState value. + */ + public ChangeDataCaptureIdentityActivationState activationState() { + return this.activationState; + } + + /** + * Get the principalId property: The Microsoft Entra principal ID resolved from the user-assigned managed identity, + * represented as an RFC 4122 GUID. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the tenantId property: The Microsoft Entra tenant ID resolved from the user-assigned managed identity, + * represented as an RFC 4122 GUID. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Get the provisioningState property: The provisioning state of the latest identity-assignment mutation. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the validation property: The latest validation result for this identity assignment. + * + * @return the validation value. + */ + public IdentityValidationStatus validation() { + return this.validation; + } + + /** + * Get the status property: Customer-safe health information for the identity assignment. + * + * @return the status value. + */ + public ChangeDataCaptureStatus status() { + return this.status; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("identityResourceId", this.identityResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ChangeDataCaptureIdentityAssignmentProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChangeDataCaptureIdentityAssignmentProperties 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 ChangeDataCaptureIdentityAssignmentProperties. + */ + public static ChangeDataCaptureIdentityAssignmentProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChangeDataCaptureIdentityAssignmentProperties deserializedChangeDataCaptureIdentityAssignmentProperties + = new ChangeDataCaptureIdentityAssignmentProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("identityResourceId".equals(fieldName)) { + deserializedChangeDataCaptureIdentityAssignmentProperties.identityResourceId = reader.getString(); + } else if ("effectiveState".equals(fieldName)) { + deserializedChangeDataCaptureIdentityAssignmentProperties.effectiveState + = ChangeDataCaptureIdentityAssignmentState.fromString(reader.getString()); + } else if ("activationState".equals(fieldName)) { + deserializedChangeDataCaptureIdentityAssignmentProperties.activationState + = ChangeDataCaptureIdentityActivationState.fromString(reader.getString()); + } else if ("principalId".equals(fieldName)) { + deserializedChangeDataCaptureIdentityAssignmentProperties.principalId = reader.getString(); + } else if ("tenantId".equals(fieldName)) { + deserializedChangeDataCaptureIdentityAssignmentProperties.tenantId = reader.getString(); + } else if ("validation".equals(fieldName)) { + deserializedChangeDataCaptureIdentityAssignmentProperties.validation + = IdentityValidationStatus.fromJson(reader); + } else if ("status".equals(fieldName)) { + deserializedChangeDataCaptureIdentityAssignmentProperties.status + = ChangeDataCaptureStatus.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedChangeDataCaptureIdentityAssignmentProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedChangeDataCaptureIdentityAssignmentProperties; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureIdentityAssignmentState.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureIdentityAssignmentState.java new file mode 100644 index 0000000000000..faf159b2f5356 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureIdentityAssignmentState.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The lifecycle state of a change data capture identity assignment. + */ +public final class ChangeDataCaptureIdentityAssignmentState + extends ExpandableStringEnum { + /** + * The identity is being assigned. + */ + public static final ChangeDataCaptureIdentityAssignmentState ASSIGNING = fromString("Assigning"); + + /** + * The identity is assigned. + */ + public static final ChangeDataCaptureIdentityAssignmentState ASSIGNED = fromString("Assigned"); + + /** + * The identity assignment is being removed. + */ + public static final ChangeDataCaptureIdentityAssignmentState REMOVING = fromString("Removing"); + + /** + * The identity assignment operation failed. + */ + public static final ChangeDataCaptureIdentityAssignmentState FAILED = fromString("Failed"); + + /** + * Creates a new instance of ChangeDataCaptureIdentityAssignmentState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ChangeDataCaptureIdentityAssignmentState() { + } + + /** + * Creates or finds a ChangeDataCaptureIdentityAssignmentState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ChangeDataCaptureIdentityAssignmentState. + */ + public static ChangeDataCaptureIdentityAssignmentState fromString(String name) { + return fromString(name, ChangeDataCaptureIdentityAssignmentState.class); + } + + /** + * Gets known ChangeDataCaptureIdentityAssignmentState values. + * + * @return known ChangeDataCaptureIdentityAssignmentState values. + */ + public static Collection values() { + return values(ChangeDataCaptureIdentityAssignmentState.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureIdentityValidationState.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureIdentityValidationState.java new file mode 100644 index 0000000000000..9b18afd8c76d4 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureIdentityValidationState.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The validation state of a change data capture identity assignment. + */ +public final class ChangeDataCaptureIdentityValidationState + extends ExpandableStringEnum { + /** + * Identity validation has not started. + */ + public static final ChangeDataCaptureIdentityValidationState NOT_STARTED = fromString("NotStarted"); + + /** + * Identity validation is running. + */ + public static final ChangeDataCaptureIdentityValidationState RUNNING = fromString("Running"); + + /** + * Identity validation succeeded. + */ + public static final ChangeDataCaptureIdentityValidationState SUCCEEDED = fromString("Succeeded"); + + /** + * Identity validation failed. + */ + public static final ChangeDataCaptureIdentityValidationState FAILED = fromString("Failed"); + + /** + * Creates a new instance of ChangeDataCaptureIdentityValidationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ChangeDataCaptureIdentityValidationState() { + } + + /** + * Creates or finds a ChangeDataCaptureIdentityValidationState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ChangeDataCaptureIdentityValidationState. + */ + public static ChangeDataCaptureIdentityValidationState fromString(String name) { + return fromString(name, ChangeDataCaptureIdentityValidationState.class); + } + + /** + * Gets known ChangeDataCaptureIdentityValidationState values. + * + * @return known ChangeDataCaptureIdentityValidationState values. + */ + public static Collection values() { + return values(ChangeDataCaptureIdentityValidationState.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCapturePrerequisiteStatus.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCapturePrerequisiteStatus.java new file mode 100644 index 0000000000000..6bb996781cabf --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCapturePrerequisiteStatus.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.horizondb.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The current readiness of prerequisites shared by change data capture configurations. + */ +@Immutable +public final class ChangeDataCapturePrerequisiteStatus + implements JsonSerializable { + /* + * The readiness of the required engine configuration. + */ + private ChangeDataCaptureEngineConfigurationState engineConfigurationState; + + /* + * The availability of the read-write endpoint required for engine mutations. + */ + private ChangeDataCaptureReadWriteEndpointState readWriteEndpointState; + + /** + * Creates an instance of ChangeDataCapturePrerequisiteStatus class. + */ + private ChangeDataCapturePrerequisiteStatus() { + } + + /** + * Get the engineConfigurationState property: The readiness of the required engine configuration. + * + * @return the engineConfigurationState value. + */ + public ChangeDataCaptureEngineConfigurationState engineConfigurationState() { + return this.engineConfigurationState; + } + + /** + * Get the readWriteEndpointState property: The availability of the read-write endpoint required for engine + * mutations. + * + * @return the readWriteEndpointState value. + */ + public ChangeDataCaptureReadWriteEndpointState readWriteEndpointState() { + return this.readWriteEndpointState; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ChangeDataCapturePrerequisiteStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChangeDataCapturePrerequisiteStatus 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 ChangeDataCapturePrerequisiteStatus. + */ + public static ChangeDataCapturePrerequisiteStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChangeDataCapturePrerequisiteStatus deserializedChangeDataCapturePrerequisiteStatus + = new ChangeDataCapturePrerequisiteStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("engineConfigurationState".equals(fieldName)) { + deserializedChangeDataCapturePrerequisiteStatus.engineConfigurationState + = ChangeDataCaptureEngineConfigurationState.fromString(reader.getString()); + } else if ("readWriteEndpointState".equals(fieldName)) { + deserializedChangeDataCapturePrerequisiteStatus.readWriteEndpointState + = ChangeDataCaptureReadWriteEndpointState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedChangeDataCapturePrerequisiteStatus; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureProtocol.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureProtocol.java new file mode 100644 index 0000000000000..fb019fe6e3282 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureProtocol.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The protocol used to communicate with a change data capture destination. + */ +public final class ChangeDataCaptureProtocol extends ExpandableStringEnum { + /** + * The destination's native protocol. + */ + public static final ChangeDataCaptureProtocol NATIVE = fromString("Native"); + + /** + * Creates a new instance of ChangeDataCaptureProtocol value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ChangeDataCaptureProtocol() { + } + + /** + * Creates or finds a ChangeDataCaptureProtocol from its string representation. + * + * @param name a name to look for. + * @return the corresponding ChangeDataCaptureProtocol. + */ + public static ChangeDataCaptureProtocol fromString(String name) { + return fromString(name, ChangeDataCaptureProtocol.class); + } + + /** + * Gets known ChangeDataCaptureProtocol values. + * + * @return known ChangeDataCaptureProtocol values. + */ + public static Collection values() { + return values(ChangeDataCaptureProtocol.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureReadWriteEndpointState.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureReadWriteEndpointState.java new file mode 100644 index 0000000000000..eaf40b4ee0c0e --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureReadWriteEndpointState.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The availability of a read-write endpoint for change data capture engine mutations. + */ +public final class ChangeDataCaptureReadWriteEndpointState + extends ExpandableStringEnum { + /** + * An eligible read-write endpoint is ready. + */ + public static final ChangeDataCaptureReadWriteEndpointState READY = fromString("Ready"); + + /** + * No eligible read-write endpoint is currently available. + */ + public static final ChangeDataCaptureReadWriteEndpointState UNAVAILABLE = fromString("Unavailable"); + + /** + * Creates a new instance of ChangeDataCaptureReadWriteEndpointState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ChangeDataCaptureReadWriteEndpointState() { + } + + /** + * Creates or finds a ChangeDataCaptureReadWriteEndpointState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ChangeDataCaptureReadWriteEndpointState. + */ + public static ChangeDataCaptureReadWriteEndpointState fromString(String name) { + return fromString(name, ChangeDataCaptureReadWriteEndpointState.class); + } + + /** + * Gets known ChangeDataCaptureReadWriteEndpointState values. + * + * @return known ChangeDataCaptureReadWriteEndpointState values. + */ + public static Collection values() { + return values(ChangeDataCaptureReadWriteEndpointState.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureReplicationArchitecture.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureReplicationArchitecture.java new file mode 100644 index 0000000000000..dbc1592b7a1ff --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureReplicationArchitecture.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The implementation architecture used to capture and publish changes. + */ +public final class ChangeDataCaptureReplicationArchitecture + extends ExpandableStringEnum { + /** + * Change capture runs with the HorizonDB compute layer. + */ + public static final ChangeDataCaptureReplicationArchitecture COMPUTE_BASED = fromString("ComputeBased"); + + /** + * Change capture runs with the HorizonDB storage layer. + */ + public static final ChangeDataCaptureReplicationArchitecture STORAGE_BASED = fromString("StorageBased"); + + /** + * Change capture uses both compute and storage components. + */ + public static final ChangeDataCaptureReplicationArchitecture HYBRID = fromString("Hybrid"); + + /** + * Creates a new instance of ChangeDataCaptureReplicationArchitecture value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ChangeDataCaptureReplicationArchitecture() { + } + + /** + * Creates or finds a ChangeDataCaptureReplicationArchitecture from its string representation. + * + * @param name a name to look for. + * @return the corresponding ChangeDataCaptureReplicationArchitecture. + */ + public static ChangeDataCaptureReplicationArchitecture fromString(String name) { + return fromString(name, ChangeDataCaptureReplicationArchitecture.class); + } + + /** + * Gets known ChangeDataCaptureReplicationArchitecture values. + * + * @return known ChangeDataCaptureReplicationArchitecture values. + */ + public static Collection values() { + return values(ChangeDataCaptureReplicationArchitecture.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureReplicationState.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureReplicationState.java new file mode 100644 index 0000000000000..3ebff4a887ff8 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureReplicationState.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The state of a destination-owned replication session. + */ +public final class ChangeDataCaptureReplicationState extends ExpandableStringEnum { + /** + * A destination session does not apply to the current resource state. + */ + public static final ChangeDataCaptureReplicationState NOT_APPLICABLE = fromString("NotApplicable"); + + /** + * No destination session is connected. + */ + public static final ChangeDataCaptureReplicationState NOT_CONNECTED = fromString("NotConnected"); + + /** + * A destination session is connecting. + */ + public static final ChangeDataCaptureReplicationState CONNECTING = fromString("Connecting"); + + /** + * A destination session is replicating changes. + */ + public static final ChangeDataCaptureReplicationState REPLICATING = fromString("Replicating"); + + /** + * A destination session is reconnecting after an interruption. + */ + public static final ChangeDataCaptureReplicationState RECONNECTING = fromString("Reconnecting"); + + /** + * The destination session is paused. + */ + public static final ChangeDataCaptureReplicationState PAUSED = fromString("Paused"); + + /** + * The destination session is stopping. + */ + public static final ChangeDataCaptureReplicationState STOPPING = fromString("Stopping"); + + /** + * The destination session is operating with impaired health. + */ + public static final ChangeDataCaptureReplicationState DEGRADED = fromString("Degraded"); + + /** + * The destination session failed. + */ + public static final ChangeDataCaptureReplicationState FAILED = fromString("Failed"); + + /** + * Creates a new instance of ChangeDataCaptureReplicationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ChangeDataCaptureReplicationState() { + } + + /** + * Creates or finds a ChangeDataCaptureReplicationState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ChangeDataCaptureReplicationState. + */ + public static ChangeDataCaptureReplicationState fromString(String name) { + return fromString(name, ChangeDataCaptureReplicationState.class); + } + + /** + * Gets known ChangeDataCaptureReplicationState values. + * + * @return known ChangeDataCaptureReplicationState values. + */ + public static Collection values() { + return values(ChangeDataCaptureReplicationState.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureReplicationStatus.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureReplicationStatus.java new file mode 100644 index 0000000000000..a1ba8248d6930 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureReplicationStatus.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.horizondb.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; + +/** + * The destination-owned replication-session status known to HorizonDB. + */ +@Immutable +public final class ChangeDataCaptureReplicationStatus implements JsonSerializable { + /* + * The current replication-session state. + */ + private ChangeDataCaptureReplicationState state; + + /* + * An opaque identifier of a destination-owned artifact, such as a Microsoft Fabric mirrored-database item. + * HorizonDB does not create, update, or delete the identified artifact. + */ + private String externalArtifactId; + + /* + * The date and time, in UTC, when a destination session most recently connected. + */ + private OffsetDateTime lastConnectedAtUtc; + + /** + * Creates an instance of ChangeDataCaptureReplicationStatus class. + */ + private ChangeDataCaptureReplicationStatus() { + } + + /** + * Get the state property: The current replication-session state. + * + * @return the state value. + */ + public ChangeDataCaptureReplicationState state() { + return this.state; + } + + /** + * Get the externalArtifactId property: An opaque identifier of a destination-owned artifact, such as a Microsoft + * Fabric mirrored-database item. HorizonDB does not create, update, or delete the identified artifact. + * + * @return the externalArtifactId value. + */ + public String externalArtifactId() { + return this.externalArtifactId; + } + + /** + * Get the lastConnectedAtUtc property: The date and time, in UTC, when a destination session most recently + * connected. + * + * @return the lastConnectedAtUtc value. + */ + public OffsetDateTime lastConnectedAtUtc() { + return this.lastConnectedAtUtc; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ChangeDataCaptureReplicationStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChangeDataCaptureReplicationStatus 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 ChangeDataCaptureReplicationStatus. + */ + public static ChangeDataCaptureReplicationStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChangeDataCaptureReplicationStatus deserializedChangeDataCaptureReplicationStatus + = new ChangeDataCaptureReplicationStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedChangeDataCaptureReplicationStatus.state + = ChangeDataCaptureReplicationState.fromString(reader.getString()); + } else if ("externalArtifactId".equals(fieldName)) { + deserializedChangeDataCaptureReplicationStatus.externalArtifactId = reader.getString(); + } else if ("lastConnectedAtUtc".equals(fieldName)) { + deserializedChangeDataCaptureReplicationStatus.lastConnectedAtUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedChangeDataCaptureReplicationStatus; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureStatus.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureStatus.java new file mode 100644 index 0000000000000..f9eaf3cd361c3 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureStatus.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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; + +/** + * Customer-safe health information for a HorizonDB change data capture resource. + */ +@Immutable +public final class ChangeDataCaptureStatus implements JsonSerializable { + /* + * A stable machine-readable status code. + */ + private String code; + + /* + * A localized customer-safe description of the current status. + */ + private String message; + + /** + * Creates an instance of ChangeDataCaptureStatus class. + */ + private ChangeDataCaptureStatus() { + } + + /** + * Get the code property: A stable machine-readable status code. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Get the message property: A localized customer-safe description of the current status. + * + * @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 ChangeDataCaptureStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChangeDataCaptureStatus 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 ChangeDataCaptureStatus. + */ + public static ChangeDataCaptureStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChangeDataCaptureStatus deserializedChangeDataCaptureStatus = new ChangeDataCaptureStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("code".equals(fieldName)) { + deserializedChangeDataCaptureStatus.code = reader.getString(); + } else if ("message".equals(fieldName)) { + deserializedChangeDataCaptureStatus.message = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedChangeDataCaptureStatus; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureTopologyBindingState.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureTopologyBindingState.java new file mode 100644 index 0000000000000..cf7cb854c2787 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureTopologyBindingState.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The relationship of a change data capture configuration to the current writer topology. + */ +public final class ChangeDataCaptureTopologyBindingState + extends ExpandableStringEnum { + /** + * The configuration belongs to the current active writer. + */ + public static final ChangeDataCaptureTopologyBindingState ACTIVE = fromString("Active"); + + /** + * The service is reconciling the configuration after a writer change. + */ + public static final ChangeDataCaptureTopologyBindingState RECONCILING = fromString("Reconciling"); + + /** + * The destination session must bind to a replacement configuration resource ID. + */ + public static final ChangeDataCaptureTopologyBindingState REBIND_REQUIRED = fromString("RebindRequired"); + + /** + * The configuration belongs to a former writer and has been replaced. + */ + public static final ChangeDataCaptureTopologyBindingState SUPERSEDED = fromString("Superseded"); + + /** + * Equivalent change data capture state could not be materialized without overwriting unrelated state. + */ + public static final ChangeDataCaptureTopologyBindingState CONFLICT = fromString("Conflict"); + + /** + * Creates a new instance of ChangeDataCaptureTopologyBindingState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ChangeDataCaptureTopologyBindingState() { + } + + /** + * Creates or finds a ChangeDataCaptureTopologyBindingState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ChangeDataCaptureTopologyBindingState. + */ + public static ChangeDataCaptureTopologyBindingState fromString(String name) { + return fromString(name, ChangeDataCaptureTopologyBindingState.class); + } + + /** + * Gets known ChangeDataCaptureTopologyBindingState values. + * + * @return known ChangeDataCaptureTopologyBindingState values. + */ + public static Collection values() { + return values(ChangeDataCaptureTopologyBindingState.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureTopologyBindingStatus.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureTopologyBindingStatus.java new file mode 100644 index 0000000000000..1050ea5c61e18 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureTopologyBindingStatus.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.horizondb.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The current writer-topology binding of a change data capture configuration. + */ +@Immutable +public final class ChangeDataCaptureTopologyBindingStatus + implements JsonSerializable { + /* + * The configuration's relationship to the current writer topology. + */ + private ChangeDataCaptureTopologyBindingState state; + + /* + * A monotonically increasing topology generation for this logical stream. + */ + private long generation; + + /* + * The Azure resource ID of the cluster that currently owns the active configuration projection. + */ + private String activeClusterResourceId; + + /* + * The replacement configuration resource ID when this projection has been superseded or requires rebinding. + */ + private String replacementConfigurationResourceId; + + /** + * Creates an instance of ChangeDataCaptureTopologyBindingStatus class. + */ + private ChangeDataCaptureTopologyBindingStatus() { + } + + /** + * Get the state property: The configuration's relationship to the current writer topology. + * + * @return the state value. + */ + public ChangeDataCaptureTopologyBindingState state() { + return this.state; + } + + /** + * Get the generation property: A monotonically increasing topology generation for this logical stream. + * + * @return the generation value. + */ + public long generation() { + return this.generation; + } + + /** + * Get the activeClusterResourceId property: The Azure resource ID of the cluster that currently owns the active + * configuration projection. + * + * @return the activeClusterResourceId value. + */ + public String activeClusterResourceId() { + return this.activeClusterResourceId; + } + + /** + * Get the replacementConfigurationResourceId property: The replacement configuration resource ID when this + * projection has been superseded or requires rebinding. + * + * @return the replacementConfigurationResourceId value. + */ + public String replacementConfigurationResourceId() { + return this.replacementConfigurationResourceId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ChangeDataCaptureTopologyBindingStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChangeDataCaptureTopologyBindingStatus 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 ChangeDataCaptureTopologyBindingStatus. + */ + public static ChangeDataCaptureTopologyBindingStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChangeDataCaptureTopologyBindingStatus deserializedChangeDataCaptureTopologyBindingStatus + = new ChangeDataCaptureTopologyBindingStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedChangeDataCaptureTopologyBindingStatus.state + = ChangeDataCaptureTopologyBindingState.fromString(reader.getString()); + } else if ("generation".equals(fieldName)) { + deserializedChangeDataCaptureTopologyBindingStatus.generation = reader.getLong(); + } else if ("activeClusterResourceId".equals(fieldName)) { + deserializedChangeDataCaptureTopologyBindingStatus.activeClusterResourceId = reader.getString(); + } else if ("replacementConfigurationResourceId".equals(fieldName)) { + deserializedChangeDataCaptureTopologyBindingStatus.replacementConfigurationResourceId + = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedChangeDataCaptureTopologyBindingStatus; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureUsageProfile.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureUsageProfile.java new file mode 100644 index 0000000000000..cf85d58045fe6 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureUsageProfile.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The reason that a change data capture configuration exists. + */ +public final class ChangeDataCaptureUsageProfile extends ExpandableStringEnum { + /** + * The configuration publishes database changes for Microsoft Fabric Mirroring. + */ + public static final ChangeDataCaptureUsageProfile MIRRORING = fromString("Mirroring"); + + /** + * Creates a new instance of ChangeDataCaptureUsageProfile value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ChangeDataCaptureUsageProfile() { + } + + /** + * Creates or finds a ChangeDataCaptureUsageProfile from its string representation. + * + * @param name a name to look for. + * @return the corresponding ChangeDataCaptureUsageProfile. + */ + public static ChangeDataCaptureUsageProfile fromString(String name) { + return fromString(name, ChangeDataCaptureUsageProfile.class); + } + + /** + * Gets known ChangeDataCaptureUsageProfile values. + * + * @return known ChangeDataCaptureUsageProfile values. + */ + public static Collection values() { + return values(ChangeDataCaptureUsageProfile.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbCluster.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Cluster.java similarity index 62% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbCluster.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Cluster.java index 437a4f41c75a9..282f004f318b2 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbCluster.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Cluster.java @@ -7,13 +7,13 @@ import com.azure.core.management.Region; import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbClusterInner; +import com.azure.resourcemanager.horizondb.fluent.models.ClusterInner; import java.util.Map; /** - * An immutable client-side representation of HorizonDbCluster. + * An immutable client-side representation of Cluster. */ -public interface HorizonDbCluster { +public interface Cluster { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -54,14 +54,17 @@ public interface HorizonDbCluster { * * @return the properties value. */ - HorizonDbClusterProperties properties(); + ClusterProperties properties(); /** - * Gets the identity property: The managed service identities assigned to this resource. + * Gets the identity property: The managed service identities assigned to this resource. Omitting the entire + * identity property from PUT or PATCH preserves all current assignments. When provided, PUT replaces the + * user-assigned identity set and PATCH merges it; null PATCH dictionary entries remove individual identities. + * Setting type to None clears all assignments. * * @return the identity value. */ - ManagedServiceIdentity identity(); + HorizonDbClusterManagedServiceIdentity identity(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -92,31 +95,31 @@ public interface HorizonDbCluster { String resourceGroupName(); /** - * Gets the inner com.azure.resourcemanager.horizondb.fluent.models.HorizonDbClusterInner object. + * Gets the inner com.azure.resourcemanager.horizondb.fluent.models.ClusterInner object. * * @return the inner object. */ - HorizonDbClusterInner innerModel(); + ClusterInner innerModel(); /** - * The entirety of the HorizonDbCluster definition. + * The entirety of the Cluster definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } /** - * The HorizonDbCluster definition stages. + * The Cluster definition stages. */ interface DefinitionStages { /** - * The first stage of the HorizonDbCluster definition. + * The first stage of the Cluster definition. */ interface Blank extends WithLocation { } /** - * The stage of the HorizonDbCluster definition allowing to specify location. + * The stage of the Cluster definition allowing to specify location. */ interface WithLocation { /** @@ -137,7 +140,7 @@ interface WithLocation { } /** - * The stage of the HorizonDbCluster definition allowing to specify parent resource. + * The stage of the Cluster definition allowing to specify parent resource. */ interface WithResourceGroup { /** @@ -150,8 +153,8 @@ interface WithResourceGroup { } /** - * The stage of the HorizonDbCluster 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. + * 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.WithProperties, DefinitionStages.WithIdentity { @@ -160,7 +163,7 @@ interface WithCreate * * @return the created resource. */ - HorizonDbCluster create(); + Cluster create(); /** * Executes the create request. @@ -168,11 +171,11 @@ interface WithCreate * @param context The context to associate with this operation. * @return the created resource. */ - HorizonDbCluster create(Context context); + Cluster create(Context context); } /** - * The stage of the HorizonDbCluster definition allowing to specify tags. + * The stage of the Cluster definition allowing to specify tags. */ interface WithTags { /** @@ -185,7 +188,7 @@ interface WithTags { } /** - * The stage of the HorizonDbCluster definition allowing to specify properties. + * The stage of the Cluster definition allowing to specify properties. */ interface WithProperties { /** @@ -194,32 +197,38 @@ interface WithProperties { * @param properties The resource-specific properties for this resource. * @return the next definition stage. */ - WithCreate withProperties(HorizonDbClusterProperties properties); + WithCreate withProperties(ClusterProperties properties); } /** - * The stage of the HorizonDbCluster definition allowing to specify identity. + * The stage of the Cluster definition allowing to specify identity. */ interface WithIdentity { /** - * Specifies the identity property: The managed service identities assigned to this resource.. + * Specifies the identity property: The managed service identities assigned to this resource. Omitting the + * entire identity property from PUT or PATCH preserves all current assignments. When provided, PUT replaces + * the user-assigned identity set and PATCH merges it; null PATCH dictionary entries remove individual + * identities. Setting type to None clears all assignments.. * - * @param identity The managed service identities assigned to this resource. + * @param identity The managed service identities assigned to this resource. Omitting the entire identity + * property from PUT or PATCH preserves all current assignments. When provided, PUT replaces the + * user-assigned identity set and PATCH merges it; null PATCH dictionary entries remove individual + * identities. Setting type to None clears all assignments. * @return the next definition stage. */ - WithCreate withIdentity(ManagedServiceIdentity identity); + WithCreate withIdentity(HorizonDbClusterManagedServiceIdentity identity); } } /** - * Begins update for the HorizonDbCluster resource. + * Begins update for the Cluster resource. * * @return the stage of resource update. */ - HorizonDbCluster.Update update(); + Cluster.Update update(); /** - * The template for HorizonDbCluster update. + * The template for Cluster update. */ interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithProperties { /** @@ -227,7 +236,7 @@ interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, Updat * * @return the updated resource. */ - HorizonDbCluster apply(); + Cluster apply(); /** * Executes the update request. @@ -235,15 +244,15 @@ interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, Updat * @param context The context to associate with this operation. * @return the updated resource. */ - HorizonDbCluster apply(Context context); + Cluster apply(Context context); } /** - * The HorizonDbCluster update stages. + * The Cluster update stages. */ interface UpdateStages { /** - * The stage of the HorizonDbCluster update allowing to specify tags. + * The stage of the Cluster update allowing to specify tags. */ interface WithTags { /** @@ -256,20 +265,26 @@ interface WithTags { } /** - * The stage of the HorizonDbCluster update allowing to specify identity. + * The stage of the Cluster update allowing to specify identity. */ interface WithIdentity { /** - * Specifies the identity property: The managed service identities assigned to this resource.. + * Specifies the identity property: The managed service identities assigned to this resource. Omitting the + * entire identity property from PUT or PATCH preserves all current assignments. When provided, PUT replaces + * the user-assigned identity set and PATCH merges it; null PATCH dictionary entries remove individual + * identities. Setting type to None clears all assignments.. * - * @param identity The managed service identities assigned to this resource. + * @param identity The managed service identities assigned to this resource. Omitting the entire identity + * property from PUT or PATCH preserves all current assignments. When provided, PUT replaces the + * user-assigned identity set and PATCH merges it; null PATCH dictionary entries remove individual + * identities. Setting type to None clears all assignments. * @return the next definition stage. */ - Update withIdentity(ManagedServiceIdentity identity); + Update withIdentity(HorizonDbClusterManagedServiceIdentity identity); } /** - * The stage of the HorizonDbCluster update allowing to specify properties. + * The stage of the Cluster update allowing to specify properties. */ interface WithProperties { /** @@ -278,7 +293,7 @@ interface WithProperties { * @param properties The properties that can be updated for a HorizonDB cluster. * @return the next definition stage. */ - Update withProperties(HorizonDbClusterPropertiesForPatchUpdate properties); + Update withProperties(ClusterPropertiesForPatchUpdate properties); } } @@ -287,7 +302,7 @@ interface WithProperties { * * @return the refreshed resource. */ - HorizonDbCluster refresh(); + Cluster refresh(); /** * Refreshes the resource to sync with Azure. @@ -295,59 +310,29 @@ interface WithProperties { * @param context The context to associate with this operation. * @return the refreshed resource. */ - HorizonDbCluster refresh(Context context); + Cluster refresh(Context context); /** - * Starts a stopped HorizonDB cluster. + * Triggers failover within the cluster's designated read-write pool. HorizonDB selects the replacement node using + * the same eligibility and node-selection rules as automatic failover. The request fails with 409 Conflict when the + * designated pool is not eligible for failover or another conflicting operation is in progress. * * @throws com.azure.core.management.exception.ManagementException thrown 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 start(); + Cluster failover(); /** - * Starts a stopped HorizonDB cluster. + * Triggers failover within the cluster's designated read-write pool. HorizonDB selects the replacement node using + * the same eligibility and node-selection rules as automatic failover. The request fails with 409 Conflict when the + * designated pool is not eligible for failover or another conflicting operation is in progress. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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 start(Context context); - - /** - * Stops a running HorizonDB cluster. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void stop(); - - /** - * Stops a running HorizonDB 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. - */ - void stop(Context context); - - /** - * Restarts a HorizonDB cluster. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void restart(); - - /** - * Restarts a HorizonDB 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. - */ - void restart(Context context); + Cluster failover(Context context); } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ClusterCapability.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ClusterCapability.java new file mode 100644 index 0000000000000..1e704e26a5378 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ClusterCapability.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.horizondb.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; + +/** + * The HorizonDB Cluster capabilities available in a location. + */ +@Immutable +public final class ClusterCapability implements JsonSerializable { + /* + * The PostgreSQL major version recommended for clients to select for HorizonDB Clusters in the region. This + * recommendation does not describe backend behavior when the PostgreSQL version is omitted from a request. + */ + private PostgreSqlCapabilityVersion recommendedPostgreSqlVersion; + + /* + * The PostgreSQL major versions supported by Clusters in the region. + */ + private List supportedPostgreSqlVersions; + + /* + * Additional Cluster features supported in the region. + */ + private List supportedFeatures; + + /** + * Creates an instance of ClusterCapability class. + */ + private ClusterCapability() { + } + + /** + * Get the recommendedPostgreSqlVersion property: The PostgreSQL major version recommended for clients to select for + * HorizonDB Clusters in the region. This recommendation does not describe backend behavior when the PostgreSQL + * version is omitted from a request. + * + * @return the recommendedPostgreSqlVersion value. + */ + public PostgreSqlCapabilityVersion recommendedPostgreSqlVersion() { + return this.recommendedPostgreSqlVersion; + } + + /** + * Get the supportedPostgreSqlVersions property: The PostgreSQL major versions supported by Clusters in the region. + * + * @return the supportedPostgreSqlVersions value. + */ + public List supportedPostgreSqlVersions() { + return this.supportedPostgreSqlVersions; + } + + /** + * Get the supportedFeatures property: Additional Cluster features supported in the region. + * + * @return the supportedFeatures value. + */ + public List supportedFeatures() { + return this.supportedFeatures; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClusterCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClusterCapability 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 ClusterCapability. + */ + public static ClusterCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClusterCapability deserializedClusterCapability = new ClusterCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("recommendedPostgreSqlVersion".equals(fieldName)) { + deserializedClusterCapability.recommendedPostgreSqlVersion + = PostgreSqlCapabilityVersion.fromString(reader.getString()); + } else if ("supportedPostgreSqlVersions".equals(fieldName)) { + List supportedPostgreSqlVersions + = reader.readArray(reader1 -> PostgreSqlVersionCapability.fromJson(reader1)); + deserializedClusterCapability.supportedPostgreSqlVersions = supportedPostgreSqlVersions; + } else if ("supportedFeatures".equals(fieldName)) { + List supportedFeatures + = reader.readArray(reader1 -> ClusterFeatureCapability.fromJson(reader1)); + deserializedClusterCapability.supportedFeatures = supportedFeatures; + } else { + reader.skipChildren(); + } + } + + return deserializedClusterCapability; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ClusterCreateMode.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ClusterCreateMode.java new file mode 100644 index 0000000000000..8c8b3d0eb70aa --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ClusterCreateMode.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Controls how a HorizonDB cluster PUT request is processed. + */ +public final class ClusterCreateMode extends ExpandableStringEnum { + /** + * Process the request as a normal cluster creation. + */ + public static final ClusterCreateMode CREATE = fromString("Create"); + + /** + * Create the cluster from a point-in-time restore. + */ + public static final ClusterCreateMode POINT_IN_TIME_RESTORE = fromString("PointInTimeRestore"); + + /** + * Creates a new instance of ClusterCreateMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ClusterCreateMode() { + } + + /** + * Creates or finds a ClusterCreateMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClusterCreateMode. + */ + public static ClusterCreateMode fromString(String name) { + return fromString(name, ClusterCreateMode.class); + } + + /** + * Gets known ClusterCreateMode values. + * + * @return known ClusterCreateMode values. + */ + public static Collection values() { + return values(ClusterCreateMode.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ClusterFeatureCapability.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ClusterFeatureCapability.java new file mode 100644 index 0000000000000..d0e108bb2616b --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ClusterFeatureCapability.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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; + +/** + * A HorizonDB Cluster feature supported in a location. + */ +@Immutable +public final class ClusterFeatureCapability implements JsonSerializable { + /* + * The name of the Cluster feature. + */ + private String name; + + /** + * Creates an instance of ClusterFeatureCapability class. + */ + private ClusterFeatureCapability() { + } + + /** + * Get the name property: The name of the Cluster feature. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClusterFeatureCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClusterFeatureCapability 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 ClusterFeatureCapability. + */ + public static ClusterFeatureCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClusterFeatureCapability deserializedClusterFeatureCapability = new ClusterFeatureCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedClusterFeatureCapability.name = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedClusterFeatureCapability; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterForPatchUpdate.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ClusterForPatchUpdate.java similarity index 54% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterForPatchUpdate.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ClusterForPatchUpdate.java index f9b0e352fd782..f1499c2017d13 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterForPatchUpdate.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ClusterForPatchUpdate.java @@ -16,26 +16,28 @@ * HorizonDB cluster for update operations. */ @Fluent -public final class HorizonDbClusterForPatchUpdate implements JsonSerializable { +public final class ClusterForPatchUpdate implements JsonSerializable { /* * Resource tags. */ private Map tags; /* - * The managed service identities assigned to this resource. + * The managed service identities assigned to this resource. Omitting the entire identity property from PUT or PATCH + * preserves all current assignments. When provided, PUT replaces the user-assigned identity set and PATCH merges + * it; null PATCH dictionary entries remove individual identities. Setting type to None clears all assignments. */ - private ManagedServiceIdentity identity; + private HorizonDbClusterManagedServiceIdentity identity; /* * The properties that can be updated for a HorizonDB cluster. */ - private HorizonDbClusterPropertiesForPatchUpdate properties; + private ClusterPropertiesForPatchUpdate properties; /** - * Creates an instance of HorizonDbClusterForPatchUpdate class. + * Creates an instance of ClusterForPatchUpdate class. */ - public HorizonDbClusterForPatchUpdate() { + public ClusterForPatchUpdate() { } /** @@ -51,29 +53,35 @@ public Map tags() { * Set the tags property: Resource tags. * * @param tags the tags value to set. - * @return the HorizonDbClusterForPatchUpdate object itself. + * @return the ClusterForPatchUpdate object itself. */ - public HorizonDbClusterForPatchUpdate withTags(Map tags) { + public ClusterForPatchUpdate withTags(Map tags) { this.tags = tags; return this; } /** - * Get the identity property: The managed service identities assigned to this resource. + * Get the identity property: The managed service identities assigned to this resource. Omitting the entire identity + * property from PUT or PATCH preserves all current assignments. When provided, PUT replaces the user-assigned + * identity set and PATCH merges it; null PATCH dictionary entries remove individual identities. Setting type to + * None clears all assignments. * * @return the identity value. */ - public ManagedServiceIdentity identity() { + public HorizonDbClusterManagedServiceIdentity identity() { return this.identity; } /** - * Set the identity property: The managed service identities assigned to this resource. + * Set the identity property: The managed service identities assigned to this resource. Omitting the entire identity + * property from PUT or PATCH preserves all current assignments. When provided, PUT replaces the user-assigned + * identity set and PATCH merges it; null PATCH dictionary entries remove individual identities. Setting type to + * None clears all assignments. * * @param identity the identity value to set. - * @return the HorizonDbClusterForPatchUpdate object itself. + * @return the ClusterForPatchUpdate object itself. */ - public HorizonDbClusterForPatchUpdate withIdentity(ManagedServiceIdentity identity) { + public ClusterForPatchUpdate withIdentity(HorizonDbClusterManagedServiceIdentity identity) { this.identity = identity; return this; } @@ -83,7 +91,7 @@ public HorizonDbClusterForPatchUpdate withIdentity(ManagedServiceIdentity identi * * @return the properties value. */ - public HorizonDbClusterPropertiesForPatchUpdate properties() { + public ClusterPropertiesForPatchUpdate properties() { return this.properties; } @@ -91,9 +99,9 @@ public HorizonDbClusterPropertiesForPatchUpdate properties() { * Set the properties property: The properties that can be updated for a HorizonDB cluster. * * @param properties the properties value to set. - * @return the HorizonDbClusterForPatchUpdate object itself. + * @return the ClusterForPatchUpdate object itself. */ - public HorizonDbClusterForPatchUpdate withProperties(HorizonDbClusterPropertiesForPatchUpdate properties) { + public ClusterForPatchUpdate withProperties(ClusterPropertiesForPatchUpdate properties) { this.properties = properties; return this; } @@ -111,35 +119,34 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of HorizonDbClusterForPatchUpdate from the JsonReader. + * Reads an instance of ClusterForPatchUpdate from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbClusterForPatchUpdate 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 HorizonDbClusterForPatchUpdate. + * @return An instance of ClusterForPatchUpdate 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 ClusterForPatchUpdate. */ - public static HorizonDbClusterForPatchUpdate fromJson(JsonReader jsonReader) throws IOException { + public static ClusterForPatchUpdate fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - HorizonDbClusterForPatchUpdate deserializedHorizonDbClusterForPatchUpdate - = new HorizonDbClusterForPatchUpdate(); + ClusterForPatchUpdate deserializedClusterForPatchUpdate = new ClusterForPatchUpdate(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedHorizonDbClusterForPatchUpdate.tags = tags; + deserializedClusterForPatchUpdate.tags = tags; } else if ("identity".equals(fieldName)) { - deserializedHorizonDbClusterForPatchUpdate.identity = ManagedServiceIdentity.fromJson(reader); + deserializedClusterForPatchUpdate.identity + = HorizonDbClusterManagedServiceIdentity.fromJson(reader); } else if ("properties".equals(fieldName)) { - deserializedHorizonDbClusterForPatchUpdate.properties - = HorizonDbClusterPropertiesForPatchUpdate.fromJson(reader); + deserializedClusterForPatchUpdate.properties = ClusterPropertiesForPatchUpdate.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedHorizonDbClusterForPatchUpdate; + return deserializedClusterForPatchUpdate; }); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ClusterProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ClusterProperties.java new file mode 100644 index 0000000000000..02be7ff56c5e3 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ClusterProperties.java @@ -0,0 +1,442 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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.time.format.DateTimeFormatter; + +/** + * Properties of a HorizonDB cluster. + */ +@Fluent +public final class ClusterProperties implements JsonSerializable { + /* + * The PostgreSQL major version used by the HorizonDB cluster. API version 2026-10-01-preview supports versions 17 + * and 18. For ordinary cluster creation, the version is supplied in the request and is immutable after creation. + * For point-in-time restore, the service obtains the version from the source backup metadata and the request must + * omit this property. This API version does not support in-place PostgreSQL major-version upgrades. + */ + private PostgreSqlVersion postgreSqlVersion; + + /* + * The mode used to create the cluster. When this property is omitted while creating a new cluster, the service + * records Create. PointInTimeRestore creates a new cluster from an available backup; pointInTimeUtc and + * creationSourceClusterResourceId are then required, postgreSqlVersion must be omitted because it is obtained from + * the backup metadata, and creationSourceClusterLocation is required when the source and target cluster locations + * differ. This property is immutable and is returned as creation provenance. On replacement, omission preserves the + * recorded value, resubmitting the same value is accepted, and changing it is rejected. + */ + private ClusterCreateMode creationMode; + + /* + * The requested point in time, in UTC. This property is required in every PointInTimeRestore request. For a + * same-location restore, the service restores the latest backup available at or before this value. For a + * cross-location restore, the service requires but ignores this value and restores the latest available backup; + * cross-location responses omit this property. This property must be absent for other creation modes or when + * creationMode is omitted and can only be specified during resource creation. + */ + private OffsetDateTime pointInTimeUtc; + + /* + * The Azure resource ID of the source HorizonDB cluster used by the selected creation mode. This property is + * required for PointInTimeRestore and other source-based creation modes, and must be absent when creationMode is + * Create or omitted. A source cluster does not need to have a pool to be restored, provided an available backup + * exists. This immutable creation-provenance value does not change after creation. + */ + private String creationSourceClusterResourceId; + + /* + * The Azure location of the source HorizonDB cluster used for point-in-time restore. This property is optional when + * the source and target cluster locations are the same. It is required when the source cluster location differs + * from the target cluster location and must identify the source cluster's location. This property must be absent + * for creation modes other than PointInTimeRestore or when creationMode is omitted. This immutable + * creation-provenance value does not change after creation. + */ + private String creationSourceClusterLocation; + + /* + * The network configuration for the cluster. When this object is omitted, the service defaults it to publicAccess + * Disabled. + */ + private Network network; + + /* + * The backup configuration for the cluster. + */ + private BackupProperties backup; + + /* + * The data encryption configuration for the cluster. When omitted during initial cluster creation, the service uses + * SystemManaged encryption. When supplied during initial cluster creation, type is required. For PUT updates of an + * existing cluster, type may be omitted; if provided, it must match the existing encryption type. The encryption + * type is selected at cluster creation; switching between SystemManaged and AzureKeyVault after creation is not + * supported. + */ + private HorizonDbClusterDataEncryption dataEncryption; + + /* + * Specifies whether AI Model Management is enabled for the cluster. + */ + private AiModelManagementStatus aiModelManagement; + + /* + * Current state of the cluster. + */ + private ClusterState state; + + /* + * The provisioning state of the cluster. + */ + private ProvisioningState provisioningState; + + /* + * The pool currently designated to host the cluster's read-write node. + */ + private ReadWritePoolProperties readWritePool; + + /** + * Creates an instance of ClusterProperties class. + */ + public ClusterProperties() { + } + + /** + * Get the postgreSqlVersion property: The PostgreSQL major version used by the HorizonDB cluster. API version + * 2026-10-01-preview supports versions 17 and 18. For ordinary cluster creation, the version is supplied in the + * request and is immutable after creation. For point-in-time restore, the service obtains the version from the + * source backup metadata and the request must omit this property. This API version does not support in-place + * PostgreSQL major-version upgrades. + * + * @return the postgreSqlVersion value. + */ + public PostgreSqlVersion postgreSqlVersion() { + return this.postgreSqlVersion; + } + + /** + * Set the postgreSqlVersion property: The PostgreSQL major version used by the HorizonDB cluster. API version + * 2026-10-01-preview supports versions 17 and 18. For ordinary cluster creation, the version is supplied in the + * request and is immutable after creation. For point-in-time restore, the service obtains the version from the + * source backup metadata and the request must omit this property. This API version does not support in-place + * PostgreSQL major-version upgrades. + * + * @param postgreSqlVersion the postgreSqlVersion value to set. + * @return the ClusterProperties object itself. + */ + public ClusterProperties withPostgreSqlVersion(PostgreSqlVersion postgreSqlVersion) { + this.postgreSqlVersion = postgreSqlVersion; + return this; + } + + /** + * Get the creationMode property: The mode used to create the cluster. When this property is omitted while creating + * a new cluster, the service records Create. PointInTimeRestore creates a new cluster from an available backup; + * pointInTimeUtc and creationSourceClusterResourceId are then required, postgreSqlVersion must be omitted because + * it is obtained from the backup metadata, and creationSourceClusterLocation is required when the source and target + * cluster locations differ. This property is immutable and is returned as creation provenance. On replacement, + * omission preserves the recorded value, resubmitting the same value is accepted, and changing it is rejected. + * + * @return the creationMode value. + */ + public ClusterCreateMode creationMode() { + return this.creationMode; + } + + /** + * Set the creationMode property: The mode used to create the cluster. When this property is omitted while creating + * a new cluster, the service records Create. PointInTimeRestore creates a new cluster from an available backup; + * pointInTimeUtc and creationSourceClusterResourceId are then required, postgreSqlVersion must be omitted because + * it is obtained from the backup metadata, and creationSourceClusterLocation is required when the source and target + * cluster locations differ. This property is immutable and is returned as creation provenance. On replacement, + * omission preserves the recorded value, resubmitting the same value is accepted, and changing it is rejected. + * + * @param creationMode the creationMode value to set. + * @return the ClusterProperties object itself. + */ + public ClusterProperties withCreationMode(ClusterCreateMode creationMode) { + this.creationMode = creationMode; + return this; + } + + /** + * Get the pointInTimeUtc property: The requested point in time, in UTC. This property is required in every + * PointInTimeRestore request. For a same-location restore, the service restores the latest backup available at or + * before this value. For a cross-location restore, the service requires but ignores this value and restores the + * latest available backup; cross-location responses omit this property. This property must be absent for other + * creation modes or when creationMode is omitted and can only be specified during resource creation. + * + * @return the pointInTimeUtc value. + */ + public OffsetDateTime pointInTimeUtc() { + return this.pointInTimeUtc; + } + + /** + * Set the pointInTimeUtc property: The requested point in time, in UTC. This property is required in every + * PointInTimeRestore request. For a same-location restore, the service restores the latest backup available at or + * before this value. For a cross-location restore, the service requires but ignores this value and restores the + * latest available backup; cross-location responses omit this property. This property must be absent for other + * creation modes or when creationMode is omitted and can only be specified during resource creation. + * + * @param pointInTimeUtc the pointInTimeUtc value to set. + * @return the ClusterProperties object itself. + */ + public ClusterProperties withPointInTimeUtc(OffsetDateTime pointInTimeUtc) { + this.pointInTimeUtc = pointInTimeUtc; + return this; + } + + /** + * Get the creationSourceClusterResourceId property: The Azure resource ID of the source HorizonDB cluster used by + * the selected creation mode. This property is required for PointInTimeRestore and other source-based creation + * modes, and must be absent when creationMode is Create or omitted. A source cluster does not need to have a pool + * to be restored, provided an available backup exists. This immutable creation-provenance value does not change + * after creation. + * + * @return the creationSourceClusterResourceId value. + */ + public String creationSourceClusterResourceId() { + return this.creationSourceClusterResourceId; + } + + /** + * Set the creationSourceClusterResourceId property: The Azure resource ID of the source HorizonDB cluster used by + * the selected creation mode. This property is required for PointInTimeRestore and other source-based creation + * modes, and must be absent when creationMode is Create or omitted. A source cluster does not need to have a pool + * to be restored, provided an available backup exists. This immutable creation-provenance value does not change + * after creation. + * + * @param creationSourceClusterResourceId the creationSourceClusterResourceId value to set. + * @return the ClusterProperties object itself. + */ + public ClusterProperties withCreationSourceClusterResourceId(String creationSourceClusterResourceId) { + this.creationSourceClusterResourceId = creationSourceClusterResourceId; + return this; + } + + /** + * Get the creationSourceClusterLocation property: The Azure location of the source HorizonDB cluster used for + * point-in-time restore. This property is optional when the source and target cluster locations are the same. It is + * required when the source cluster location differs from the target cluster location and must identify the source + * cluster's location. This property must be absent for creation modes other than PointInTimeRestore or when + * creationMode is omitted. This immutable creation-provenance value does not change after creation. + * + * @return the creationSourceClusterLocation value. + */ + public String creationSourceClusterLocation() { + return this.creationSourceClusterLocation; + } + + /** + * Set the creationSourceClusterLocation property: The Azure location of the source HorizonDB cluster used for + * point-in-time restore. This property is optional when the source and target cluster locations are the same. It is + * required when the source cluster location differs from the target cluster location and must identify the source + * cluster's location. This property must be absent for creation modes other than PointInTimeRestore or when + * creationMode is omitted. This immutable creation-provenance value does not change after creation. + * + * @param creationSourceClusterLocation the creationSourceClusterLocation value to set. + * @return the ClusterProperties object itself. + */ + public ClusterProperties withCreationSourceClusterLocation(String creationSourceClusterLocation) { + this.creationSourceClusterLocation = creationSourceClusterLocation; + return this; + } + + /** + * Get the network property: The network configuration for the cluster. When this object is omitted, the service + * defaults it to publicAccess Disabled. + * + * @return the network value. + */ + public Network network() { + return this.network; + } + + /** + * Set the network property: The network configuration for the cluster. When this object is omitted, the service + * defaults it to publicAccess Disabled. + * + * @param network the network value to set. + * @return the ClusterProperties object itself. + */ + public ClusterProperties withNetwork(Network network) { + this.network = network; + return this; + } + + /** + * Get the backup property: The backup configuration for the cluster. + * + * @return the backup value. + */ + public BackupProperties backup() { + return this.backup; + } + + /** + * Set the backup property: The backup configuration for the cluster. + * + * @param backup the backup value to set. + * @return the ClusterProperties object itself. + */ + public ClusterProperties withBackup(BackupProperties backup) { + this.backup = backup; + return this; + } + + /** + * Get the dataEncryption property: The data encryption configuration for the cluster. When omitted during initial + * cluster creation, the service uses SystemManaged encryption. When supplied during initial cluster creation, type + * is required. For PUT updates of an existing cluster, type may be omitted; if provided, it must match the existing + * encryption type. The encryption type is selected at cluster creation; switching between SystemManaged and + * AzureKeyVault after creation is not supported. + * + * @return the dataEncryption value. + */ + public HorizonDbClusterDataEncryption dataEncryption() { + return this.dataEncryption; + } + + /** + * Set the dataEncryption property: The data encryption configuration for the cluster. When omitted during initial + * cluster creation, the service uses SystemManaged encryption. When supplied during initial cluster creation, type + * is required. For PUT updates of an existing cluster, type may be omitted; if provided, it must match the existing + * encryption type. The encryption type is selected at cluster creation; switching between SystemManaged and + * AzureKeyVault after creation is not supported. + * + * @param dataEncryption the dataEncryption value to set. + * @return the ClusterProperties object itself. + */ + public ClusterProperties withDataEncryption(HorizonDbClusterDataEncryption dataEncryption) { + this.dataEncryption = dataEncryption; + return this; + } + + /** + * Get the aiModelManagement property: Specifies whether AI Model Management is enabled for the cluster. + * + * @return the aiModelManagement value. + */ + public AiModelManagementStatus aiModelManagement() { + return this.aiModelManagement; + } + + /** + * Set the aiModelManagement property: Specifies whether AI Model Management is enabled for the cluster. + * + * @param aiModelManagement the aiModelManagement value to set. + * @return the ClusterProperties object itself. + */ + public ClusterProperties withAiModelManagement(AiModelManagementStatus aiModelManagement) { + this.aiModelManagement = aiModelManagement; + return this; + } + + /** + * Get the state property: Current state of the cluster. + * + * @return the state value. + */ + public ClusterState state() { + return this.state; + } + + /** + * Get the provisioningState property: The provisioning state of the cluster. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the readWritePool property: The pool currently designated to host the cluster's read-write node. + * + * @return the readWritePool value. + */ + public ReadWritePoolProperties readWritePool() { + return this.readWritePool; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("postgreSqlVersion", + this.postgreSqlVersion == null ? null : this.postgreSqlVersion.toString()); + jsonWriter.writeStringField("creationMode", this.creationMode == null ? null : this.creationMode.toString()); + jsonWriter.writeStringField("pointInTimeUtc", + this.pointInTimeUtc == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.pointInTimeUtc)); + jsonWriter.writeStringField("creationSourceClusterResourceId", this.creationSourceClusterResourceId); + jsonWriter.writeStringField("creationSourceClusterLocation", this.creationSourceClusterLocation); + jsonWriter.writeJsonField("network", this.network); + jsonWriter.writeJsonField("backup", this.backup); + jsonWriter.writeJsonField("dataEncryption", this.dataEncryption); + jsonWriter.writeStringField("aiModelManagement", + this.aiModelManagement == null ? null : this.aiModelManagement.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClusterProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClusterProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ClusterProperties. + */ + public static ClusterProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClusterProperties deserializedClusterProperties = new ClusterProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedClusterProperties.state = ClusterState.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedClusterProperties.provisioningState = ProvisioningState.fromString(reader.getString()); + } else if ("readWritePool".equals(fieldName)) { + deserializedClusterProperties.readWritePool = ReadWritePoolProperties.fromJson(reader); + } else if ("postgreSqlVersion".equals(fieldName)) { + deserializedClusterProperties.postgreSqlVersion = PostgreSqlVersion.fromString(reader.getString()); + } else if ("creationMode".equals(fieldName)) { + deserializedClusterProperties.creationMode = ClusterCreateMode.fromString(reader.getString()); + } else if ("pointInTimeUtc".equals(fieldName)) { + deserializedClusterProperties.pointInTimeUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("creationSourceClusterResourceId".equals(fieldName)) { + deserializedClusterProperties.creationSourceClusterResourceId = reader.getString(); + } else if ("creationSourceClusterLocation".equals(fieldName)) { + deserializedClusterProperties.creationSourceClusterLocation = reader.getString(); + } else if ("network".equals(fieldName)) { + deserializedClusterProperties.network = Network.fromJson(reader); + } else if ("backup".equals(fieldName)) { + deserializedClusterProperties.backup = BackupProperties.fromJson(reader); + } else if ("dataEncryption".equals(fieldName)) { + deserializedClusterProperties.dataEncryption = HorizonDbClusterDataEncryption.fromJson(reader); + } else if ("aiModelManagement".equals(fieldName)) { + deserializedClusterProperties.aiModelManagement + = AiModelManagementStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedClusterProperties; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ClusterPropertiesForPatchUpdate.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ClusterPropertiesForPatchUpdate.java new file mode 100644 index 0000000000000..554dc615e3fd3 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ClusterPropertiesForPatchUpdate.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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; + +/** + * Properties of a HorizonDB cluster for update operations. + */ +@Fluent +public final class ClusterPropertiesForPatchUpdate implements JsonSerializable { + /* + * The network configuration to update for the cluster. + */ + private NetworkForPatchUpdate network; + + /* + * The backup configuration for the cluster. + */ + private BackupPropertiesForPatchUpdate backup; + + /* + * The data encryption configuration to update for the cluster. Omitted properties preserve their current values. + * Updates can modify settings within the existing encryption type, but switching between SystemManaged and + * AzureKeyVault after cluster creation is not supported. + */ + private HorizonDbClusterDataEncryptionForPatchUpdate dataEncryption; + + /* + * Specifies whether AI Model Management is enabled for the cluster. + */ + private AiModelManagementStatus aiModelManagement; + + /** + * Creates an instance of ClusterPropertiesForPatchUpdate class. + */ + public ClusterPropertiesForPatchUpdate() { + } + + /** + * Get the network property: The network configuration to update for the cluster. + * + * @return the network value. + */ + public NetworkForPatchUpdate network() { + return this.network; + } + + /** + * Set the network property: The network configuration to update for the cluster. + * + * @param network the network value to set. + * @return the ClusterPropertiesForPatchUpdate object itself. + */ + public ClusterPropertiesForPatchUpdate withNetwork(NetworkForPatchUpdate network) { + this.network = network; + return this; + } + + /** + * Get the backup property: The backup configuration for the cluster. + * + * @return the backup value. + */ + public BackupPropertiesForPatchUpdate backup() { + return this.backup; + } + + /** + * Set the backup property: The backup configuration for the cluster. + * + * @param backup the backup value to set. + * @return the ClusterPropertiesForPatchUpdate object itself. + */ + public ClusterPropertiesForPatchUpdate withBackup(BackupPropertiesForPatchUpdate backup) { + this.backup = backup; + return this; + } + + /** + * Get the dataEncryption property: The data encryption configuration to update for the cluster. Omitted properties + * preserve their current values. Updates can modify settings within the existing encryption type, but switching + * between SystemManaged and AzureKeyVault after cluster creation is not supported. + * + * @return the dataEncryption value. + */ + public HorizonDbClusterDataEncryptionForPatchUpdate dataEncryption() { + return this.dataEncryption; + } + + /** + * Set the dataEncryption property: The data encryption configuration to update for the cluster. Omitted properties + * preserve their current values. Updates can modify settings within the existing encryption type, but switching + * between SystemManaged and AzureKeyVault after cluster creation is not supported. + * + * @param dataEncryption the dataEncryption value to set. + * @return the ClusterPropertiesForPatchUpdate object itself. + */ + public ClusterPropertiesForPatchUpdate + withDataEncryption(HorizonDbClusterDataEncryptionForPatchUpdate dataEncryption) { + this.dataEncryption = dataEncryption; + return this; + } + + /** + * Get the aiModelManagement property: Specifies whether AI Model Management is enabled for the cluster. + * + * @return the aiModelManagement value. + */ + public AiModelManagementStatus aiModelManagement() { + return this.aiModelManagement; + } + + /** + * Set the aiModelManagement property: Specifies whether AI Model Management is enabled for the cluster. + * + * @param aiModelManagement the aiModelManagement value to set. + * @return the ClusterPropertiesForPatchUpdate object itself. + */ + public ClusterPropertiesForPatchUpdate withAiModelManagement(AiModelManagementStatus aiModelManagement) { + this.aiModelManagement = aiModelManagement; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("network", this.network); + jsonWriter.writeJsonField("backup", this.backup); + jsonWriter.writeJsonField("dataEncryption", this.dataEncryption); + jsonWriter.writeStringField("aiModelManagement", + this.aiModelManagement == null ? null : this.aiModelManagement.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClusterPropertiesForPatchUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClusterPropertiesForPatchUpdate 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 ClusterPropertiesForPatchUpdate. + */ + public static ClusterPropertiesForPatchUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClusterPropertiesForPatchUpdate deserializedClusterPropertiesForPatchUpdate + = new ClusterPropertiesForPatchUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("network".equals(fieldName)) { + deserializedClusterPropertiesForPatchUpdate.network = NetworkForPatchUpdate.fromJson(reader); + } else if ("backup".equals(fieldName)) { + deserializedClusterPropertiesForPatchUpdate.backup + = BackupPropertiesForPatchUpdate.fromJson(reader); + } else if ("dataEncryption".equals(fieldName)) { + deserializedClusterPropertiesForPatchUpdate.dataEncryption + = HorizonDbClusterDataEncryptionForPatchUpdate.fromJson(reader); + } else if ("aiModelManagement".equals(fieldName)) { + deserializedClusterPropertiesForPatchUpdate.aiModelManagement + = AiModelManagementStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedClusterPropertiesForPatchUpdate; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ClusterState.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ClusterState.java new file mode 100644 index 0000000000000..32a64c3c5ed8c --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ClusterState.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Current state of a HorizonDB cluster. + */ +public final class ClusterState extends ExpandableStringEnum { + /** + * Is ready and operational. + */ + public static final ClusterState READY = fromString("Ready"); + + /** + * Is provisioning. + */ + public static final ClusterState PROVISIONING = fromString("Provisioning"); + + /** + * Is being deleted. + */ + public static final ClusterState DELETING = fromString("Deleting"); + + /** + * Is inaccessible. + */ + public static final ClusterState INACCESSIBLE = fromString("Inaccessible"); + + /** + * Is being updated. + */ + public static final ClusterState UPDATING = fromString("Updating"); + + /** + * Creates a new instance of ClusterState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ClusterState() { + } + + /** + * Creates or finds a ClusterState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClusterState. + */ + public static ClusterState fromString(String name) { + return fromString(name, ClusterState.class); + } + + /** + * Gets known ClusterState values. + * + * @return known ClusterState values. + */ + public static Collection values() { + return values(ClusterState.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusters.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Clusters.java similarity index 64% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusters.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Clusters.java index 7f2a6b1bfd34f..cc57c4a181784 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusters.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Clusters.java @@ -9,9 +9,9 @@ import com.azure.core.util.Context; /** - * Resource collection API of HorizonDbClusters. + * Resource collection API of Clusters. */ -public interface HorizonDbClusters { +public interface Clusters { /** * Gets information about a HorizonDB cluster. * @@ -23,8 +23,7 @@ public interface HorizonDbClusters { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return information about a HorizonDB cluster along with {@link Response}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, - Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, Context context); /** * Gets information about a HorizonDB cluster. @@ -36,10 +35,12 @@ Response getByResourceGroupWithResponse(String resourceGroupNa * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return information about a HorizonDB cluster. */ - HorizonDbCluster getByResourceGroup(String resourceGroupName, String clusterName); + Cluster getByResourceGroup(String resourceGroupName, String clusterName); /** - * Deletes a HorizonDB cluster. + * Deletes a HorizonDB cluster, its Cluster-scoped Endpoint, and all remaining child resources. For an accepted + * deletion, the long-running operation remains nonterminal until physical deletion completes and point GET returns + * 404 Not Found. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -50,7 +51,9 @@ Response getByResourceGroupWithResponse(String resourceGroupNa void deleteByResourceGroup(String resourceGroupName, String clusterName); /** - * Deletes a HorizonDB cluster. + * Deletes a HorizonDB cluster, its Cluster-scoped Endpoint, and all remaining child resources. For an accepted + * deletion, the long-running operation remains nonterminal until physical deletion completes and point GET returns + * 404 Not Found. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -68,9 +71,9 @@ Response getByResourceGroupWithResponse(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 the response of a HorizonDbCluster list operation as paginated response with {@link PagedIterable}. + * @return the response of a Cluster list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + PagedIterable listByResourceGroup(String resourceGroupName); /** * Lists all HorizonDB clusters in a resource group. @@ -80,18 +83,18 @@ Response getByResourceGroupWithResponse(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 the response of a HorizonDbCluster list operation as paginated response with {@link PagedIterable}. + * @return the response of a Cluster list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** * Lists all HorizonDB 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 the response of a HorizonDbCluster list operation as paginated response with {@link PagedIterable}. + * @return the response of a Cluster list operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(); + PagedIterable list(); /** * Lists all HorizonDB clusters in a subscription. @@ -100,23 +103,28 @@ Response getByResourceGroupWithResponse(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 the response of a HorizonDbCluster list operation as paginated response with {@link PagedIterable}. + * @return the response of a Cluster list operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(Context context); + PagedIterable list(Context context); /** - * Starts a stopped HorizonDB cluster. + * Triggers failover within the cluster's designated read-write pool. HorizonDB selects the replacement node using + * the same eligibility and node-selection rules as automatic failover. The request fails with 409 Conflict when the + * designated pool is not eligible for failover or another conflicting operation is in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB 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. */ - void start(String resourceGroupName, String clusterName); + Cluster failover(String resourceGroupName, String clusterName); /** - * Starts a stopped HorizonDB cluster. + * Triggers failover within the cluster's designated read-write pool. HorizonDB selects the replacement node using + * the same eligibility and node-selection rules as automatic failover. The request fails with 409 Conflict when the + * designated pool is not eligible for failover or another conflicting operation is in progress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. @@ -124,54 +132,9 @@ Response getByResourceGroupWithResponse(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 the response. */ - void start(String resourceGroupName, String clusterName, Context context); - - /** - * Stops a running HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB 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 stop(String resourceGroupName, String clusterName); - - /** - * Stops a running HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB 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. - */ - void stop(String resourceGroupName, String clusterName, Context context); - - /** - * Restarts a HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB 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 restart(String resourceGroupName, String clusterName); - - /** - * Restarts a HorizonDB cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB 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. - */ - void restart(String resourceGroupName, String clusterName, Context context); + Cluster failover(String resourceGroupName, String clusterName, Context context); /** * Gets information about a HorizonDB cluster. @@ -182,7 +145,7 @@ Response getByResourceGroupWithResponse(String resourceGroupNa * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return information about a HorizonDB cluster along with {@link Response}. */ - HorizonDbCluster getById(String id); + Cluster getById(String id); /** * Gets information about a HorizonDB cluster. @@ -194,10 +157,12 @@ Response getByResourceGroupWithResponse(String resourceGroupNa * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return information about a HorizonDB cluster along with {@link Response}. */ - Response getByIdWithResponse(String id, Context context); + Response getByIdWithResponse(String id, Context context); /** - * Deletes a HorizonDB cluster. + * Deletes a HorizonDB cluster, its Cluster-scoped Endpoint, and all remaining child resources. For an accepted + * deletion, the long-running operation remains nonterminal until physical deletion completes and point GET returns + * 404 Not Found. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -207,7 +172,9 @@ Response getByResourceGroupWithResponse(String resourceGroupNa void deleteById(String id); /** - * Deletes a HorizonDB cluster. + * Deletes a HorizonDB cluster, its Cluster-scoped Endpoint, and all remaining child resources. For an accepted + * deletion, the long-running operation remains nonterminal until physical deletion completes and point GET returns + * 404 Not Found. * * @param id the resource ID. * @param context The context to associate with this operation. @@ -218,10 +185,10 @@ Response getByResourceGroupWithResponse(String resourceGroupNa void deleteByIdWithResponse(String id, Context context); /** - * Begins definition for a new HorizonDbCluster resource. + * Begins definition for a new Cluster resource. * * @param name resource name. - * @return the first stage of the new HorizonDbCluster definition. + * @return the first stage of the new Cluster definition. */ - HorizonDbCluster.DefinitionStages.Blank define(String name); + Cluster.DefinitionStages.Blank define(String name); } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ComputeGenerationCapability.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ComputeGenerationCapability.java new file mode 100644 index 0000000000000..398a9c4d18824 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ComputeGenerationCapability.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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; + +/** + * The capabilities of a HorizonDB compute generation. + */ +@Immutable +public final class ComputeGenerationCapability implements JsonSerializable { + /* + * The numeric compute generation used when configuring a HorizonDB pool. + */ + private int computeGeneration; + + /* + * The compute model type recommended for clients to select for this compute generation. This recommendation does + * not describe backend behavior when the compute model type is omitted from a request. + */ + private PoolComputeModelType recommendedComputeModelType; + + /* + * The compute models supported by the compute generation. + */ + private List supportedComputeModels; + + /** + * Creates an instance of ComputeGenerationCapability class. + */ + private ComputeGenerationCapability() { + } + + /** + * Get the computeGeneration property: The numeric compute generation used when configuring a HorizonDB pool. + * + * @return the computeGeneration value. + */ + public int computeGeneration() { + return this.computeGeneration; + } + + /** + * Get the recommendedComputeModelType property: The compute model type recommended for clients to select for this + * compute generation. This recommendation does not describe backend behavior when the compute model type is omitted + * from a request. + * + * @return the recommendedComputeModelType value. + */ + public PoolComputeModelType recommendedComputeModelType() { + return this.recommendedComputeModelType; + } + + /** + * Get the supportedComputeModels property: The compute models supported by the compute generation. + * + * @return the supportedComputeModels value. + */ + public List supportedComputeModels() { + return this.supportedComputeModels; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ComputeGenerationCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ComputeGenerationCapability 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 ComputeGenerationCapability. + */ + public static ComputeGenerationCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ComputeGenerationCapability deserializedComputeGenerationCapability = new ComputeGenerationCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("computeGeneration".equals(fieldName)) { + deserializedComputeGenerationCapability.computeGeneration = reader.getInt(); + } else if ("recommendedComputeModelType".equals(fieldName)) { + deserializedComputeGenerationCapability.recommendedComputeModelType + = PoolComputeModelType.fromString(reader.getString()); + } else if ("supportedComputeModels".equals(fieldName)) { + List supportedComputeModels + = reader.readArray(reader1 -> ComputeModelCapability.fromJson(reader1)); + deserializedComputeGenerationCapability.supportedComputeModels = supportedComputeModels; + } else { + reader.skipChildren(); + } + } + + return deserializedComputeGenerationCapability; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ComputeModelCapability.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ComputeModelCapability.java new file mode 100644 index 0000000000000..dae5c6d3982f7 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ComputeModelCapability.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.horizondb.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The capabilities of a HorizonDB compute model. + */ +@Immutable +public class ComputeModelCapability implements JsonSerializable { + /* + * The compute model represented by these capabilities. + */ + private PoolComputeModelType type = PoolComputeModelType.fromString("ComputeModelCapability"); + + /** + * Creates an instance of ComputeModelCapability class. + */ + protected ComputeModelCapability() { + } + + /** + * Get the type property: The compute model represented by these capabilities. + * + * @return the type value. + */ + public PoolComputeModelType type() { + return this.type; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ComputeModelCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ComputeModelCapability 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 ComputeModelCapability. + */ + public static ComputeModelCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("type".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("Provisioned".equals(discriminatorValue)) { + return ProvisionedComputeModelCapability.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static ComputeModelCapability fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ComputeModelCapability deserializedComputeModelCapability = new ComputeModelCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedComputeModelCapability.type = PoolComputeModelType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedComputeModelCapability; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ComputeProcessorCapability.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ComputeProcessorCapability.java new file mode 100644 index 0000000000000..603a5a4f31e1d --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ComputeProcessorCapability.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.horizondb.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; + +/** + * The capabilities of a processor family supported by HorizonDB. + */ +@Immutable +public final class ComputeProcessorCapability implements JsonSerializable { + /* + * The name of the processor family. + */ + private ComputeProcessorType name; + + /* + * The compute generations supported by the processor family. + */ + private List supportedGenerations; + + /** + * Creates an instance of ComputeProcessorCapability class. + */ + private ComputeProcessorCapability() { + } + + /** + * Get the name property: The name of the processor family. + * + * @return the name value. + */ + public ComputeProcessorType name() { + return this.name; + } + + /** + * Get the supportedGenerations property: The compute generations supported by the processor family. + * + * @return the supportedGenerations value. + */ + public List supportedGenerations() { + return this.supportedGenerations; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ComputeProcessorCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ComputeProcessorCapability 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 ComputeProcessorCapability. + */ + public static ComputeProcessorCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ComputeProcessorCapability deserializedComputeProcessorCapability = new ComputeProcessorCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedComputeProcessorCapability.name = ComputeProcessorType.fromString(reader.getString()); + } else if ("supportedGenerations".equals(fieldName)) { + List supportedGenerations + = reader.readArray(reader1 -> ComputeGenerationCapability.fromJson(reader1)); + deserializedComputeProcessorCapability.supportedGenerations = supportedGenerations; + } else { + reader.skipChildren(); + } + } + + return deserializedComputeProcessorCapability; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ComputeProcessorType.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ComputeProcessorType.java new file mode 100644 index 0000000000000..f6fae268982f6 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ComputeProcessorType.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The compute processor type. + */ +public final class ComputeProcessorType extends ExpandableStringEnum { + /** + * Intel processor. + */ + public static final ComputeProcessorType INTEL = fromString("Intel"); + + /** + * AMD processor. + */ + public static final ComputeProcessorType AMD = fromString("AMD"); + + /** + * Creates a new instance of ComputeProcessorType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ComputeProcessorType() { + } + + /** + * Creates or finds a ComputeProcessorType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ComputeProcessorType. + */ + public static ComputeProcessorType fromString(String name) { + return fromString(name, ComputeProcessorType.class); + } + + /** + * Gets known ComputeProcessorType values. + * + * @return known ComputeProcessorType values. + */ + public static Collection values() { + return values(ComputeProcessorType.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ComputeSizeCapability.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ComputeSizeCapability.java new file mode 100644 index 0000000000000..f925f459f58cf --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ComputeSizeCapability.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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; + +/** + * A vCore configuration supported by a HorizonDB processor generation. + */ +@Immutable +public final class ComputeSizeCapability implements JsonSerializable { + /* + * The number of vCores in the configuration. + */ + private int vCores; + + /* + * The memory in megabytes available for each vCore. + */ + private long memoryPerVCoreInMb; + + /** + * Creates an instance of ComputeSizeCapability class. + */ + private ComputeSizeCapability() { + } + + /** + * Get the vCores property: The number of vCores in the configuration. + * + * @return the vCores value. + */ + public int vCores() { + return this.vCores; + } + + /** + * Get the memoryPerVCoreInMb property: The memory in megabytes available for each vCore. + * + * @return the memoryPerVCoreInMb value. + */ + public long memoryPerVCoreInMb() { + return this.memoryPerVCoreInMb; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ComputeSizeCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ComputeSizeCapability 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 ComputeSizeCapability. + */ + public static ComputeSizeCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ComputeSizeCapability deserializedComputeSizeCapability = new ComputeSizeCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("vCores".equals(fieldName)) { + deserializedComputeSizeCapability.vCores = reader.getInt(); + } else if ("memoryPerVCoreInMb".equals(fieldName)) { + deserializedComputeSizeCapability.memoryPerVCoreInMb = reader.getLong(); + } else { + reader.skipChildren(); + } + } + + return deserializedComputeSizeCapability; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/CreateModeCluster.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/CreateModeCluster.java deleted file mode 100644 index 7218314fad360..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/CreateModeCluster.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The mode to create a new HorizonDB cluster. - */ -public final class CreateModeCluster extends ExpandableStringEnum { - /** - * Create a new cluster. - */ - public static final CreateModeCluster CREATE = fromString("Create"); - - /** - * Update an existing cluster. - */ - public static final CreateModeCluster UPDATE = fromString("Update"); - - /** - * Create cluster from point-in-time restore. - */ - public static final CreateModeCluster POINT_IN_TIME_RESTORE = fromString("PointInTimeRestore"); - - /** - * Creates a new instance of CreateModeCluster value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public CreateModeCluster() { - } - - /** - * Creates or finds a CreateModeCluster from its string representation. - * - * @param name a name to look for. - * @return the corresponding CreateModeCluster. - */ - public static CreateModeCluster fromString(String name) { - return fromString(name, CreateModeCluster.class); - } - - /** - * Gets known CreateModeCluster values. - * - * @return known CreateModeCluster values. - */ - public static Collection values() { - return values(CreateModeCluster.class); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/CreateModePool.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/CreateModePool.java deleted file mode 100644 index fd3d827060482..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/CreateModePool.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The mode to create a new HorizonDB cluster. - */ -public final class CreateModePool extends ExpandableStringEnum { - /** - * Create a new pool. - */ - public static final CreateModePool CREATE = fromString("Create"); - - /** - * Update an existing pool. - */ - public static final CreateModePool UPDATE = fromString("Update"); - - /** - * Creates a new instance of CreateModePool value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public CreateModePool() { - } - - /** - * Creates or finds a CreateModePool from its string representation. - * - * @param name a name to look for. - * @return the corresponding CreateModePool. - */ - public static CreateModePool fromString(String name) { - return fromString(name, CreateModePool.class); - } - - /** - * Gets known CreateModePool values. - * - * @return known CreateModePool values. - */ - public static Collection values() { - return values(CreateModePool.class); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/DefaultParameterGroup.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/DefaultParameterGroup.java new file mode 100644 index 0000000000000..b1d40dd506dd1 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/DefaultParameterGroup.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.horizondb.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.horizondb.fluent.models.DefaultParameterGroupInner; + +/** + * An immutable client-side representation of DefaultParameterGroup. + */ +public interface DefaultParameterGroup { + /** + * 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. + */ + DefaultParameterGroupProperties 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.horizondb.fluent.models.DefaultParameterGroupInner object. + * + * @return the inner object. + */ + DefaultParameterGroupInner innerModel(); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/DefaultParameterGroupProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/DefaultParameterGroupProperties.java new file mode 100644 index 0000000000000..1c6e20c3f6cd4 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/DefaultParameterGroupProperties.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.horizondb.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; + +/** + * Properties of a default parameter group. + */ +@Immutable +public final class DefaultParameterGroupProperties implements JsonSerializable { + /* + * The provisioning state of the default parameter group. + */ + private ProvisioningState provisioningState; + + /* + * Engine-defined parameters in the default parameter group. Service and other non-engine entries are excluded. + */ + private List parameters; + + /* + * Description of the default parameter group. + */ + private String description; + + /* + * PostgreSQL version for which this default parameter group is valid. + */ + private PostgreSqlVersion postgreSqlVersion; + + /** + * Creates an instance of DefaultParameterGroupProperties class. + */ + private DefaultParameterGroupProperties() { + } + + /** + * Get the provisioningState property: The provisioning state of the default parameter group. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the parameters property: Engine-defined parameters in the default parameter group. Service and other + * non-engine entries are excluded. + * + * @return the parameters value. + */ + public List parameters() { + return this.parameters; + } + + /** + * Get the description property: Description of the default parameter group. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Get the postgreSqlVersion property: PostgreSQL version for which this default parameter group is valid. + * + * @return the postgreSqlVersion value. + */ + public PostgreSqlVersion postgreSqlVersion() { + return this.postgreSqlVersion; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("parameters", this.parameters, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("postgreSqlVersion", + this.postgreSqlVersion == null ? null : this.postgreSqlVersion.toString()); + jsonWriter.writeStringField("description", this.description); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DefaultParameterGroupProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DefaultParameterGroupProperties 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 DefaultParameterGroupProperties. + */ + public static DefaultParameterGroupProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DefaultParameterGroupProperties deserializedDefaultParameterGroupProperties + = new DefaultParameterGroupProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("parameters".equals(fieldName)) { + List parameters + = reader.readArray(reader1 -> ParameterProperties.fromJson(reader1)); + deserializedDefaultParameterGroupProperties.parameters = parameters; + } else if ("postgreSqlVersion".equals(fieldName)) { + deserializedDefaultParameterGroupProperties.postgreSqlVersion + = PostgreSqlVersion.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedDefaultParameterGroupProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedDefaultParameterGroupProperties.description = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDefaultParameterGroupProperties; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/DefaultParameterGroups.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/DefaultParameterGroups.java new file mode 100644 index 0000000000000..addd2bc6c869d --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/DefaultParameterGroups.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.horizondb.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 DefaultParameterGroups. + */ +public interface DefaultParameterGroups { + /** + * Lists default parameter groups available for a subscription in a specific region. The response contains at most + * one default parameter group for each PostgreSQL version. + * + * @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 DefaultParameterGroup list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listBySubscriptionAndRegion(String location); + + /** + * Lists default parameter groups available for a subscription in a specific region. The response contains at most + * one default parameter group for each PostgreSQL version. + * + * @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 DefaultParameterGroup list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listBySubscriptionAndRegion(String location, Context context); + + /** + * Gets a default parameter group available for a subscription in a specific region. Each PostgreSQL version has at + * most one default parameter group in a location. + * + * @param location The name of the Azure region. + * @param name The name of the DefaultParameterGroup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a default parameter group available for a subscription in a specific region along with {@link Response}. + */ + Response getWithResponse(String location, String name, Context context); + + /** + * Gets a default parameter group available for a subscription in a specific region. Each PostgreSQL version has at + * most one default parameter group in a location. + * + * @param location The name of the Azure region. + * @param name The name of the DefaultParameterGroup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a default parameter group available for a subscription in a specific region. + */ + DefaultParameterGroup get(String location, String name); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Endpoint.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Endpoint.java new file mode 100644 index 0000000000000..624cf9b651460 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Endpoint.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.horizondb.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.horizondb.fluent.models.EndpointInner; + +/** + * An immutable client-side representation of Endpoint. + */ +public interface Endpoint { + /** + * 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. + */ + EndpointProperties 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.horizondb.fluent.models.EndpointInner object. + * + * @return the inner object. + */ + EndpointInner innerModel(); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/EndpointProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/EndpointProperties.java new file mode 100644 index 0000000000000..7f409ba70edeb --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/EndpointProperties.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.horizondb.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; + +/** + * Properties of a service-generated HorizonDB endpoint. + */ +@Immutable +public final class EndpointProperties implements JsonSerializable { + /* + * The scope of the endpoint. Cluster-scoped Endpoints provide the cluster connection, and Pool-scoped Endpoints + * provide read-only connections to eligible nodes in one pool. + */ + private EndpointScope scope; + + /* + * The Azure resource ID of the Endpoint's lifecycle owner. For Cluster scope, this identifies the parent Cluster + * with which the Endpoint is created and deleted. For Pool scope, this identifies the Pool with which the Endpoint + * is created and deleted; the Pool must be a child of the Endpoint's parent Cluster. + */ + private String associatedResourceId; + + /* + * The service-generated fully qualified domain name of the endpoint. A Cluster-scoped Endpoint uses + * ...horizondb.azure.com. A Pool-scoped Endpoint uses + * ....horizondb.azure.com. + */ + private String fullyQualifiedDomainName; + + /* + * The routing role of the endpoint. A Cluster-scoped Endpoint normally has the ReadWrite role. Pool-scoped + * Endpoints have the ReadOnly role and route only to allocated nodes in the associated Pool that are not currently + * playing the read-write role. A Pool-scoped ReadOnly Endpoint has no routing destination unless at least one such + * node exists, including when the Pool is Stopped, has zero allocated nodes, or has only one allocated node and + * that node is playing the read-write role. + */ + private EndpointRole role; + + /** + * Creates an instance of EndpointProperties class. + */ + private EndpointProperties() { + } + + /** + * Get the scope property: The scope of the endpoint. Cluster-scoped Endpoints provide the cluster connection, and + * Pool-scoped Endpoints provide read-only connections to eligible nodes in one pool. + * + * @return the scope value. + */ + public EndpointScope scope() { + return this.scope; + } + + /** + * Get the associatedResourceId property: The Azure resource ID of the Endpoint's lifecycle owner. For Cluster + * scope, this identifies the parent Cluster with which the Endpoint is created and deleted. For Pool scope, this + * identifies the Pool with which the Endpoint is created and deleted; the Pool must be a child of the Endpoint's + * parent Cluster. + * + * @return the associatedResourceId value. + */ + public String associatedResourceId() { + return this.associatedResourceId; + } + + /** + * Get the fullyQualifiedDomainName property: The service-generated fully qualified domain name of the endpoint. A + * Cluster-scoped Endpoint uses <cluster>.<clusterid>.<region>.horizondb.azure.com. A Pool-scoped + * Endpoint uses <poolid>.<cluster>.<clusterid>.<region>.horizondb.azure.com. + * + * @return the fullyQualifiedDomainName value. + */ + public String fullyQualifiedDomainName() { + return this.fullyQualifiedDomainName; + } + + /** + * Get the role property: The routing role of the endpoint. A Cluster-scoped Endpoint normally has the ReadWrite + * role. Pool-scoped Endpoints have the ReadOnly role and route only to allocated nodes in the associated Pool that + * are not currently playing the read-write role. A Pool-scoped ReadOnly Endpoint has no routing destination unless + * at least one such node exists, including when the Pool is Stopped, has zero allocated nodes, or has only one + * allocated node and that node is playing the read-write role. + * + * @return the role value. + */ + public EndpointRole role() { + return this.role; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointProperties 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 EndpointProperties. + */ + public static EndpointProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointProperties deserializedEndpointProperties = new EndpointProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("scope".equals(fieldName)) { + deserializedEndpointProperties.scope = EndpointScope.fromString(reader.getString()); + } else if ("associatedResourceId".equals(fieldName)) { + deserializedEndpointProperties.associatedResourceId = reader.getString(); + } else if ("fullyQualifiedDomainName".equals(fieldName)) { + deserializedEndpointProperties.fullyQualifiedDomainName = reader.getString(); + } else if ("role".equals(fieldName)) { + deserializedEndpointProperties.role = EndpointRole.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointProperties; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/EndpointRole.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/EndpointRole.java new file mode 100644 index 0000000000000..1fb0f70a4b037 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/EndpointRole.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Role of the endpoint. + */ +public final class EndpointRole extends ExpandableStringEnum { + /** + * The Endpoint accepts read-only traffic. This applies to Pool-scoped Endpoints and may apply to other endpoint + * scenarios introduced by later API versions. + */ + public static final EndpointRole READ_ONLY = fromString("ReadOnly"); + + /** + * The Cluster-scoped Endpoint accepts read and write traffic. + */ + public static final EndpointRole READ_WRITE = fromString("ReadWrite"); + + /** + * Creates a new instance of EndpointRole value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EndpointRole() { + } + + /** + * Creates or finds a EndpointRole from its string representation. + * + * @param name a name to look for. + * @return the corresponding EndpointRole. + */ + public static EndpointRole fromString(String name) { + return fromString(name, EndpointRole.class); + } + + /** + * Gets known EndpointRole values. + * + * @return known EndpointRole values. + */ + public static Collection values() { + return values(EndpointRole.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/EndpointScope.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/EndpointScope.java new file mode 100644 index 0000000000000..11939d0e14501 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/EndpointScope.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The scope of a HorizonDB endpoint. + */ +public final class EndpointScope extends ExpandableStringEnum { + /** + * The Endpoint is associated with its parent Cluster. + */ + public static final EndpointScope CLUSTER = fromString("Cluster"); + + /** + * The Endpoint is associated with a Pool under its parent Cluster and has the ReadOnly role. + */ + public static final EndpointScope POOL = fromString("Pool"); + + /** + * Creates a new instance of EndpointScope value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EndpointScope() { + } + + /** + * Creates or finds a EndpointScope from its string representation. + * + * @param name a name to look for. + * @return the corresponding EndpointScope. + */ + public static EndpointScope fromString(String name) { + return fromString(name, EndpointScope.class); + } + + /** + * Gets known EndpointScope values. + * + * @return known EndpointScope values. + */ + public static Collection values() { + return values(EndpointScope.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Endpoints.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Endpoints.java new file mode 100644 index 0000000000000..de4b38860f777 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Endpoints.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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 Endpoints. + */ +public interface Endpoints { + /** + * Gets information about a service-generated HorizonDB Cluster- or Pool-scoped Endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param endpointName The platform-assigned name of the HorizonDB endpoint. A Cluster-scoped ReadWrite Endpoint has + * exactly the same name as its associated Cluster. A Pool-scoped Endpoint has exactly the same name as its + * associated Pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a service-generated HorizonDB Cluster- or Pool-scoped Endpoint along with + * {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String clusterName, String endpointName, + Context context); + + /** + * Gets information about a service-generated HorizonDB Cluster- or Pool-scoped Endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param endpointName The platform-assigned name of the HorizonDB endpoint. A Cluster-scoped ReadWrite Endpoint has + * exactly the same name as its associated Cluster. A Pool-scoped Endpoint has exactly the same name as its + * associated Pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a service-generated HorizonDB Cluster- or Pool-scoped Endpoint. + */ + Endpoint get(String resourceGroupName, String clusterName, String endpointName); + + /** + * Lists the service-generated Endpoints in a cluster. The collection contains the Cluster-scoped Endpoint named + * cluster and one Pool-scoped Endpoint for each pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Endpoint list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String clusterName); + + /** + * Lists the service-generated Endpoints in a cluster. The collection contains the Cluster-scoped Endpoint named + * cluster and one Pool-scoped Endpoint for each pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Endpoint list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String clusterName, Context context); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/FabricDestinationDetails.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/FabricDestinationDetails.java new file mode 100644 index 0000000000000..3c20cd9f90419 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/FabricDestinationDetails.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Settings for a Microsoft Fabric destination. + */ +@Fluent +public final class FabricDestinationDetails extends ChangeDataCaptureDestinationDetails { + /* + * The destination family. + */ + private ChangeDataCaptureDestinationType destinationType = ChangeDataCaptureDestinationType.FABRIC; + + /* + * Specifies the Microsoft Fabric native destination protocol. + */ + private final ChangeDataCaptureProtocol protocol = ChangeDataCaptureProtocol.NATIVE; + + /* + * The opaque identifier of the Microsoft Fabric workspace that owns the destination artifact. + */ + private String workspaceId; + + /** + * Creates an instance of FabricDestinationDetails class. + */ + public FabricDestinationDetails() { + } + + /** + * Get the destinationType property: The destination family. + * + * @return the destinationType value. + */ + @Override + public ChangeDataCaptureDestinationType destinationType() { + return this.destinationType; + } + + /** + * Get the protocol property: Specifies the Microsoft Fabric native destination protocol. + * + * @return the protocol value. + */ + public ChangeDataCaptureProtocol protocol() { + return this.protocol; + } + + /** + * Get the workspaceId property: The opaque identifier of the Microsoft Fabric workspace that owns the destination + * artifact. + * + * @return the workspaceId value. + */ + public String workspaceId() { + return this.workspaceId; + } + + /** + * Set the workspaceId property: The opaque identifier of the Microsoft Fabric workspace that owns the destination + * artifact. + * + * @param workspaceId the workspaceId value to set. + * @return the FabricDestinationDetails object itself. + */ + public FabricDestinationDetails withWorkspaceId(String workspaceId) { + this.workspaceId = workspaceId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("protocol", this.protocol == null ? null : this.protocol.toString()); + jsonWriter.writeStringField("workspaceId", this.workspaceId); + jsonWriter.writeStringField("destinationType", + this.destinationType == null ? null : this.destinationType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FabricDestinationDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FabricDestinationDetails 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 FabricDestinationDetails. + */ + public static FabricDestinationDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FabricDestinationDetails deserializedFabricDestinationDetails = new FabricDestinationDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("workspaceId".equals(fieldName)) { + deserializedFabricDestinationDetails.workspaceId = reader.getString(); + } else if ("destinationType".equals(fieldName)) { + deserializedFabricDestinationDetails.destinationType + = ChangeDataCaptureDestinationType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedFabricDestinationDetails; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/FirewallRule.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/FirewallRule.java new file mode 100644 index 0000000000000..54cec5e55e1ed --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/FirewallRule.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.horizondb.fluent.models.FirewallRuleInner; + +/** + * An immutable client-side representation of FirewallRule. + */ +public interface FirewallRule { + /** + * 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. + */ + FirewallRuleProperties 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.horizondb.fluent.models.FirewallRuleInner object. + * + * @return the inner object. + */ + FirewallRuleInner innerModel(); + + /** + * The entirety of the FirewallRule definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The FirewallRule definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the FirewallRule definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the FirewallRule definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, clusterName, poolName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @return the next definition stage. + */ + WithCreate withExistingPool(String resourceGroupName, String clusterName, String poolName); + } + + /** + * The stage of the FirewallRule 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. + */ + FirewallRule create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + FirewallRule create(Context context); + } + + /** + * The stage of the FirewallRule 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(FirewallRuleProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + FirewallRule refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + FirewallRule refresh(Context context); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbFirewallRuleProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/FirewallRuleProperties.java similarity index 57% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbFirewallRuleProperties.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/FirewallRuleProperties.java index fb9663944a977..2ff43b8d9b589 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbFirewallRuleProperties.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/FirewallRuleProperties.java @@ -15,19 +15,20 @@ * Properties of a HorizonDB firewall rule. */ @Fluent -public final class HorizonDbFirewallRuleProperties implements JsonSerializable { +public final class FirewallRuleProperties implements JsonSerializable { /* - * The start IP address of the firewall rule (IPv4). + * The start IPv4 address of the firewall rule in dotted-decimal notation. */ private String startIpAddress; /* - * The end IP address of the firewall rule (IPv4). + * The end IPv4 address of the firewall rule in dotted-decimal notation. This address must be numerically greater + * than or equal to startIpAddress. */ private String endIpAddress; /* - * The description of the HorizonDB firewall rule. + * The description of the HorizonDB firewall rule. The maximum length is 1024 characters. */ private String description; @@ -37,13 +38,13 @@ public final class HorizonDbFirewallRuleProperties implements JsonSerializable { - HorizonDbFirewallRuleProperties deserializedHorizonDbFirewallRuleProperties - = new HorizonDbFirewallRuleProperties(); + FirewallRuleProperties deserializedFirewallRuleProperties = new FirewallRuleProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("startIpAddress".equals(fieldName)) { - deserializedHorizonDbFirewallRuleProperties.startIpAddress = reader.getString(); + deserializedFirewallRuleProperties.startIpAddress = reader.getString(); } else if ("endIpAddress".equals(fieldName)) { - deserializedHorizonDbFirewallRuleProperties.endIpAddress = reader.getString(); + deserializedFirewallRuleProperties.endIpAddress = reader.getString(); } else if ("description".equals(fieldName)) { - deserializedHorizonDbFirewallRuleProperties.description = reader.getString(); + deserializedFirewallRuleProperties.description = reader.getString(); } else if ("provisioningState".equals(fieldName)) { - deserializedHorizonDbFirewallRuleProperties.provisioningState + deserializedFirewallRuleProperties.provisioningState = ProvisioningState.fromString(reader.getString()); } else { reader.skipChildren(); } } - return deserializedHorizonDbFirewallRuleProperties; + return deserializedFirewallRuleProperties; }); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbFirewallRules.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/FirewallRules.java similarity index 73% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbFirewallRules.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/FirewallRules.java index d96a2a27d75c2..cd192589ebe8a 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbFirewallRules.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/FirewallRules.java @@ -9,38 +9,38 @@ import com.azure.core.util.Context; /** - * Resource collection API of HorizonDbFirewallRules. + * Resource collection API of FirewallRules. */ -public interface HorizonDbFirewallRules { +public interface FirewallRules { /** - * Gets information about a HorizonDB firewall rule. + * Gets information about a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB firewall rule along with {@link Response}. + * @return information about a HorizonDB pool firewall rule along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String clusterName, String poolName, + Response getWithResponse(String resourceGroupName, String clusterName, String poolName, String firewallRuleName, Context context); /** - * Gets information about a HorizonDB firewall rule. + * Gets information about a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB firewall rule. + * @return information about a HorizonDB pool firewall rule. */ - HorizonDbFirewallRule get(String resourceGroupName, String clusterName, String poolName, String firewallRuleName); + FirewallRule get(String resourceGroupName, String clusterName, String poolName, String firewallRuleName); /** * Lists all HorizonDB firewall rules in a pool. @@ -51,9 +51,9 @@ Response getWithResponse(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 response of a HorizonDbFirewallRule list operation as paginated response with {@link PagedIterable}. + * @return the response of a FirewallRule list operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String clusterName, String poolName); + PagedIterable list(String resourceGroupName, String clusterName, String poolName); /** * Lists all HorizonDB firewall rules in a pool. @@ -65,18 +65,17 @@ Response getWithResponse(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 response of a HorizonDbFirewallRule list operation as paginated response with {@link PagedIterable}. + * @return the response of a FirewallRule list operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String clusterName, String poolName, - Context context); + PagedIterable list(String resourceGroupName, String clusterName, String poolName, Context context); /** - * Deletes a HorizonDB firewall rule. + * Deletes a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -84,12 +83,12 @@ PagedIterable list(String resourceGroupName, String clust void delete(String resourceGroupName, String clusterName, String poolName, String firewallRuleName); /** - * Deletes a HorizonDB firewall rule. + * Deletes a HorizonDB pool firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. - * @param firewallRuleName The name of the HorizonDB firewall rule. + * @param firewallRuleName The name of the HorizonDB pool firewall rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -99,30 +98,30 @@ void delete(String resourceGroupName, String clusterName, String poolName, Strin Context context); /** - * Gets information about a HorizonDB firewall rule. + * Gets information about a HorizonDB pool firewall rule. * * @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 information about a HorizonDB firewall rule along with {@link Response}. + * @return information about a HorizonDB pool firewall rule along with {@link Response}. */ - HorizonDbFirewallRule getById(String id); + FirewallRule getById(String id); /** - * Gets information about a HorizonDB firewall rule. + * Gets information about a HorizonDB pool firewall rule. * * @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 information about a HorizonDB firewall rule along with {@link Response}. + * @return information about a HorizonDB pool firewall rule along with {@link Response}. */ - Response getByIdWithResponse(String id, Context context); + Response getByIdWithResponse(String id, Context context); /** - * Deletes a HorizonDB firewall rule. + * Deletes a HorizonDB pool firewall rule. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -132,7 +131,7 @@ void delete(String resourceGroupName, String clusterName, String poolName, Strin void deleteById(String id); /** - * Deletes a HorizonDB firewall rule. + * Deletes a HorizonDB pool firewall rule. * * @param id the resource ID. * @param context The context to associate with this operation. @@ -143,10 +142,10 @@ void delete(String resourceGroupName, String clusterName, String poolName, Strin void deleteByIdWithResponse(String id, Context context); /** - * Begins definition for a new HorizonDbFirewallRule resource. + * Begins definition for a new FirewallRule resource. * * @param name resource name. - * @return the first stage of the new HorizonDbFirewallRule definition. + * @return the first stage of the new FirewallRule definition. */ - HorizonDbFirewallRule.DefinitionStages.Blank define(String name); + FirewallRule.DefinitionStages.Blank define(String name); } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/GeoRedundancyState.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/GeoRedundancyState.java new file mode 100644 index 0000000000000..6271b10107b5d --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/GeoRedundancyState.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates the geo-redundancy state. + */ +public final class GeoRedundancyState extends ExpandableStringEnum { + /** + * Geo-redundancy is enabled. This value is not supported when dataEncryption.type is AzureKeyVault. + */ + public static final GeoRedundancyState ENABLED = fromString("Enabled"); + + /** + * Geo-redundancy is disabled. + */ + public static final GeoRedundancyState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of GeoRedundancyState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public GeoRedundancyState() { + } + + /** + * Creates or finds a GeoRedundancyState from its string representation. + * + * @param name a name to look for. + * @return the corresponding GeoRedundancyState. + */ + public static GeoRedundancyState fromString(String name) { + return fromString(name, GeoRedundancyState.class); + } + + /** + * Gets known GeoRedundancyState values. + * + * @return known GeoRedundancyState values. + */ + public static Collection values() { + return values(GeoRedundancyState.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbAdministrator.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbAdministrator.java deleted file mode 100644 index a22ddc0656121..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbAdministrator.java +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbAdministratorInner; - -/** - * An immutable client-side representation of HorizonDbAdministrator. - */ -public interface HorizonDbAdministrator { - /** - * 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. - */ - HorizonDbAdministratorProperties 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.horizondb.fluent.models.HorizonDbAdministratorInner object. - * - * @return the inner object. - */ - HorizonDbAdministratorInner innerModel(); - - /** - * The entirety of the HorizonDbAdministrator definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, DefinitionStages.WithCreate { - } - - /** - * The HorizonDbAdministrator definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the HorizonDbAdministrator definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the HorizonDbAdministrator definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, clusterName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB cluster. - * @return the next definition stage. - */ - WithProperties withExistingCluster(String resourceGroupName, String clusterName); - } - - /** - * The stage of the HorizonDbAdministrator definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The properties for adding a HorizonDB administrator.. - * - * @param properties The properties for adding a HorizonDB administrator. - * @return the next definition stage. - */ - WithCreate withProperties(HorizonDbAdministratorPropertiesForAdd properties); - } - - /** - * The stage of the HorizonDbAdministrator 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 { - /** - * Executes the create request. - * - * @return the created resource. - */ - HorizonDbAdministrator create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - HorizonDbAdministrator create(Context context); - } - } - - /** - * Begins update for the HorizonDbAdministrator resource. - * - * @return the stage of resource update. - */ - HorizonDbAdministrator.Update update(); - - /** - * The template for HorizonDbAdministrator update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - HorizonDbAdministrator apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - HorizonDbAdministrator apply(Context context); - } - - /** - * The HorizonDbAdministrator update stages. - */ - interface UpdateStages { - /** - * The stage of the HorizonDbAdministrator update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The properties for adding a HorizonDB administrator.. - * - * @param properties The properties for adding a HorizonDB administrator. - * @return the next definition stage. - */ - Update withProperties(HorizonDbAdministratorPropertiesForAdd properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - HorizonDbAdministrator refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - HorizonDbAdministrator refresh(Context context); -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbAdministratorAdd.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbAdministratorAdd.java deleted file mode 100644 index 403af356389f6..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbAdministratorAdd.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.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 request body for adding a HorizonDB administrator. - */ -@Fluent -public final class HorizonDbAdministratorAdd implements JsonSerializable { - /* - * The properties for adding a HorizonDB administrator. - */ - private HorizonDbAdministratorPropertiesForAdd properties; - - /** - * Creates an instance of HorizonDbAdministratorAdd class. - */ - public HorizonDbAdministratorAdd() { - } - - /** - * Get the properties property: The properties for adding a HorizonDB administrator. - * - * @return the properties value. - */ - public HorizonDbAdministratorPropertiesForAdd properties() { - return this.properties; - } - - /** - * Set the properties property: The properties for adding a HorizonDB administrator. - * - * @param properties the properties value to set. - * @return the HorizonDbAdministratorAdd object itself. - */ - public HorizonDbAdministratorAdd withProperties(HorizonDbAdministratorPropertiesForAdd 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 HorizonDbAdministratorAdd from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbAdministratorAdd 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 HorizonDbAdministratorAdd. - */ - public static HorizonDbAdministratorAdd fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HorizonDbAdministratorAdd deserializedHorizonDbAdministratorAdd = new HorizonDbAdministratorAdd(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedHorizonDbAdministratorAdd.properties - = HorizonDbAdministratorPropertiesForAdd.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedHorizonDbAdministratorAdd; - }); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbAdministratorProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbAdministratorProperties.java deleted file mode 100644 index 6af1101ddeae8..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbAdministratorProperties.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.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; - -/** - * Properties of a HorizonDB administrator. - */ -@Immutable -public final class HorizonDbAdministratorProperties implements JsonSerializable { - /* - * The display name or UPN of the Entra ID principal. For users, typically the User Principal Name (e.g., - * admin@contoso.com). For groups, the group display name. For service principals, the application display name. - */ - private String principalName; - - /* - * The type of the Entra ID principal. - */ - private PrincipalTypes principalType; - - /* - * The Entra ID object identifier of the principal (an RFC 4122 GUID). On PUT requests, this value comes from the - * URI path parameter. - */ - private String objectId; - - /* - * The Entra ID tenant identifier (an RFC 4122 GUID). If omitted, defaults to the tenant of the subscription. - */ - private String tenantId; - - /* - * The provisioning state of the administrator. - */ - private ProvisioningState provisioningState; - - /** - * Creates an instance of HorizonDbAdministratorProperties class. - */ - private HorizonDbAdministratorProperties() { - } - - /** - * Get the principalName property: The display name or UPN of the Entra ID principal. For users, typically the User - * Principal Name (e.g., admin@contoso.com). For groups, the group display name. For service principals, the - * application display name. - * - * @return the principalName value. - */ - public String principalName() { - return this.principalName; - } - - /** - * Get the principalType property: The type of the Entra ID principal. - * - * @return the principalType value. - */ - public PrincipalTypes principalType() { - return this.principalType; - } - - /** - * Get the objectId property: The Entra ID object identifier of the principal (an RFC 4122 GUID). On PUT requests, - * this value comes from the URI path parameter. - * - * @return the objectId value. - */ - public String objectId() { - return this.objectId; - } - - /** - * Get the tenantId property: The Entra ID tenant identifier (an RFC 4122 GUID). If omitted, defaults to the tenant - * of the subscription. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the provisioningState property: The provisioning state of the administrator. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("principalName", this.principalName); - jsonWriter.writeStringField("principalType", this.principalType == null ? null : this.principalType.toString()); - jsonWriter.writeStringField("tenantId", this.tenantId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HorizonDbAdministratorProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbAdministratorProperties 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 HorizonDbAdministratorProperties. - */ - public static HorizonDbAdministratorProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HorizonDbAdministratorProperties deserializedHorizonDbAdministratorProperties - = new HorizonDbAdministratorProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("principalName".equals(fieldName)) { - deserializedHorizonDbAdministratorProperties.principalName = reader.getString(); - } else if ("principalType".equals(fieldName)) { - deserializedHorizonDbAdministratorProperties.principalType - = PrincipalTypes.fromString(reader.getString()); - } else if ("objectId".equals(fieldName)) { - deserializedHorizonDbAdministratorProperties.objectId = reader.getString(); - } else if ("tenantId".equals(fieldName)) { - deserializedHorizonDbAdministratorProperties.tenantId = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedHorizonDbAdministratorProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedHorizonDbAdministratorProperties; - }); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbAdministratorPropertiesForAdd.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbAdministratorPropertiesForAdd.java deleted file mode 100644 index d275288e61a41..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbAdministratorPropertiesForAdd.java +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.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 properties for adding a HorizonDB administrator. - */ -@Fluent -public final class HorizonDbAdministratorPropertiesForAdd - implements JsonSerializable { - /* - * The display name or UPN of the Entra ID principal. For users, typically the User Principal Name (e.g., - * admin@contoso.com). For groups, the group display name. For service principals, the application display name. - */ - private String principalName; - - /* - * The type of the Entra ID principal. - */ - private PrincipalTypes principalType; - - /* - * The Entra ID tenant identifier (an RFC 4122 GUID). If omitted, defaults to the tenant of the subscription. - */ - private String tenantId; - - /** - * Creates an instance of HorizonDbAdministratorPropertiesForAdd class. - */ - public HorizonDbAdministratorPropertiesForAdd() { - } - - /** - * Get the principalName property: The display name or UPN of the Entra ID principal. For users, typically the User - * Principal Name (e.g., admin@contoso.com). For groups, the group display name. For service principals, the - * application display name. - * - * @return the principalName value. - */ - public String principalName() { - return this.principalName; - } - - /** - * Set the principalName property: The display name or UPN of the Entra ID principal. For users, typically the User - * Principal Name (e.g., admin@contoso.com). For groups, the group display name. For service principals, the - * application display name. - * - * @param principalName the principalName value to set. - * @return the HorizonDbAdministratorPropertiesForAdd object itself. - */ - public HorizonDbAdministratorPropertiesForAdd withPrincipalName(String principalName) { - this.principalName = principalName; - return this; - } - - /** - * Get the principalType property: The type of the Entra ID principal. - * - * @return the principalType value. - */ - public PrincipalTypes principalType() { - return this.principalType; - } - - /** - * Set the principalType property: The type of the Entra ID principal. - * - * @param principalType the principalType value to set. - * @return the HorizonDbAdministratorPropertiesForAdd object itself. - */ - public HorizonDbAdministratorPropertiesForAdd withPrincipalType(PrincipalTypes principalType) { - this.principalType = principalType; - return this; - } - - /** - * Get the tenantId property: The Entra ID tenant identifier (an RFC 4122 GUID). If omitted, defaults to the tenant - * of the subscription. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Set the tenantId property: The Entra ID tenant identifier (an RFC 4122 GUID). If omitted, defaults to the tenant - * of the subscription. - * - * @param tenantId the tenantId value to set. - * @return the HorizonDbAdministratorPropertiesForAdd object itself. - */ - public HorizonDbAdministratorPropertiesForAdd withTenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("principalName", this.principalName); - jsonWriter.writeStringField("principalType", this.principalType == null ? null : this.principalType.toString()); - jsonWriter.writeStringField("tenantId", this.tenantId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HorizonDbAdministratorPropertiesForAdd from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbAdministratorPropertiesForAdd 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 HorizonDbAdministratorPropertiesForAdd. - */ - public static HorizonDbAdministratorPropertiesForAdd fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HorizonDbAdministratorPropertiesForAdd deserializedHorizonDbAdministratorPropertiesForAdd - = new HorizonDbAdministratorPropertiesForAdd(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("principalName".equals(fieldName)) { - deserializedHorizonDbAdministratorPropertiesForAdd.principalName = reader.getString(); - } else if ("principalType".equals(fieldName)) { - deserializedHorizonDbAdministratorPropertiesForAdd.principalType - = PrincipalTypes.fromString(reader.getString()); - } else if ("tenantId".equals(fieldName)) { - deserializedHorizonDbAdministratorPropertiesForAdd.tenantId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHorizonDbAdministratorPropertiesForAdd; - }); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterAuthConfig.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterAuthConfig.java deleted file mode 100644 index 13a1757c69347..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterAuthConfig.java +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.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; - -/** - * Authentication configuration for a HorizonDB cluster. - */ -@Fluent -public final class HorizonDbClusterAuthConfig implements JsonSerializable { - /* - * Indicates whether Microsoft Entra ID authentication is enabled or disabled. - */ - private AuthenticationState entraIdAuth; - - /* - * The Microsoft Entra tenant ID. - */ - private String tenantId; - - /* - * Indicates whether password authentication is enabled or disabled. - */ - private AuthenticationState passwordAuth; - - /** - * Creates an instance of HorizonDbClusterAuthConfig class. - */ - public HorizonDbClusterAuthConfig() { - } - - /** - * Get the entraIdAuth property: Indicates whether Microsoft Entra ID authentication is enabled or disabled. - * - * @return the entraIdAuth value. - */ - public AuthenticationState entraIdAuth() { - return this.entraIdAuth; - } - - /** - * Set the entraIdAuth property: Indicates whether Microsoft Entra ID authentication is enabled or disabled. - * - * @param entraIdAuth the entraIdAuth value to set. - * @return the HorizonDbClusterAuthConfig object itself. - */ - public HorizonDbClusterAuthConfig withEntraIdAuth(AuthenticationState entraIdAuth) { - this.entraIdAuth = entraIdAuth; - return this; - } - - /** - * Get the tenantId property: The Microsoft Entra tenant ID. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Set the tenantId property: The Microsoft Entra tenant ID. - * - * @param tenantId the tenantId value to set. - * @return the HorizonDbClusterAuthConfig object itself. - */ - public HorizonDbClusterAuthConfig withTenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Get the passwordAuth property: Indicates whether password authentication is enabled or disabled. - * - * @return the passwordAuth value. - */ - public AuthenticationState passwordAuth() { - return this.passwordAuth; - } - - /** - * Set the passwordAuth property: Indicates whether password authentication is enabled or disabled. - * - * @param passwordAuth the passwordAuth value to set. - * @return the HorizonDbClusterAuthConfig object itself. - */ - public HorizonDbClusterAuthConfig withPasswordAuth(AuthenticationState passwordAuth) { - this.passwordAuth = passwordAuth; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("entraIdAuth", this.entraIdAuth == null ? null : this.entraIdAuth.toString()); - jsonWriter.writeStringField("tenantId", this.tenantId); - jsonWriter.writeStringField("passwordAuth", this.passwordAuth == null ? null : this.passwordAuth.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HorizonDbClusterAuthConfig from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbClusterAuthConfig 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 HorizonDbClusterAuthConfig. - */ - public static HorizonDbClusterAuthConfig fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HorizonDbClusterAuthConfig deserializedHorizonDbClusterAuthConfig = new HorizonDbClusterAuthConfig(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("entraIdAuth".equals(fieldName)) { - deserializedHorizonDbClusterAuthConfig.entraIdAuth - = AuthenticationState.fromString(reader.getString()); - } else if ("tenantId".equals(fieldName)) { - deserializedHorizonDbClusterAuthConfig.tenantId = reader.getString(); - } else if ("passwordAuth".equals(fieldName)) { - deserializedHorizonDbClusterAuthConfig.passwordAuth - = AuthenticationState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedHorizonDbClusterAuthConfig; - }); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterDataEncryption.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterDataEncryption.java new file mode 100644 index 0000000000000..782177e3a6b25 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterDataEncryption.java @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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 Cluster-level data encryption configuration. The encryption type is selected at cluster creation; switching + * between SystemManaged and AzureKeyVault after creation is not supported. For AzureKeyVault encryption, primaryKeyUri + * and primaryUserAssignedIdentityId are required, and backup.geoRedundancy must be Disabled. Both primaryKeyUri and + * primaryUserAssignedIdentityId can be provided during initial cluster creation. For updates to an existing cluster + * through PUT or PATCH, only one of these properties can change per request, and that update must complete before + * submitting a separate update to change the other property. Customer-managed key identities must also be assigned to + * the Cluster through its top-level identity property. Only versionless Azure Key Vault key URIs are supported; key + * version paths are rejected. For SystemManaged encryption, key and identity properties must be omitted. + */ +@Fluent +public final class HorizonDbClusterDataEncryption implements JsonSerializable { + /* + * The type of data encryption used by the cluster. When the data encryption configuration is supplied during + * initial cluster creation, this property is required. For PUT updates of an existing cluster, this property may be + * omitted; if provided, it must match the existing encryption type. This value is selected at cluster creation and + * cannot later be changed from SystemManaged to AzureKeyVault or from AzureKeyVault to SystemManaged. + */ + private HorizonDbClusterDataEncryptionType type; + + /* + * The versionless Azure Key Vault key URI used to encrypt the cluster's primary storage. Key version paths are not + * supported. During initial cluster creation, this property can be provided together with + * primaryUserAssignedIdentityId. For updates to an existing cluster through PUT or PATCH, this property and + * primaryUserAssignedIdentityId cannot both change in the same request; the first update must complete before + * submitting a separate update for the other property. + */ + private String primaryKeyUri; + + /* + * The Azure resource ID of the user-assigned managed identity used to access the primary encryption key. The + * identity must also be assigned to the Cluster through its top-level identity property. During initial cluster + * creation, this property can be provided together with primaryKeyUri. For updates to an existing cluster through + * PUT or PATCH, this property and primaryKeyUri cannot both change in the same request; the first update must + * complete before submitting a separate update for the other property. + */ + private String primaryUserAssignedIdentityId; + + /* + * The validation status of the primary encryption key. This property is returned for AzureKeyVault encryption and + * is absent for SystemManaged encryption. + */ + private HorizonDbClusterEncryptionKeyStatus primaryEncryptionKeyStatus; + + /* + * The current version of the primary encryption key used by the cluster. This property is returned for + * AzureKeyVault encryption and is absent for SystemManaged encryption. + */ + private String primaryEncryptionKeyCurrentVersion; + + /** + * Creates an instance of HorizonDbClusterDataEncryption class. + */ + public HorizonDbClusterDataEncryption() { + } + + /** + * Get the type property: The type of data encryption used by the cluster. When the data encryption configuration is + * supplied during initial cluster creation, this property is required. For PUT updates of an existing cluster, this + * property may be omitted; if provided, it must match the existing encryption type. This value is selected at + * cluster creation and cannot later be changed from SystemManaged to AzureKeyVault or from AzureKeyVault to + * SystemManaged. + * + * @return the type value. + */ + public HorizonDbClusterDataEncryptionType type() { + return this.type; + } + + /** + * Set the type property: The type of data encryption used by the cluster. When the data encryption configuration is + * supplied during initial cluster creation, this property is required. For PUT updates of an existing cluster, this + * property may be omitted; if provided, it must match the existing encryption type. This value is selected at + * cluster creation and cannot later be changed from SystemManaged to AzureKeyVault or from AzureKeyVault to + * SystemManaged. + * + * @param type the type value to set. + * @return the HorizonDbClusterDataEncryption object itself. + */ + public HorizonDbClusterDataEncryption withType(HorizonDbClusterDataEncryptionType type) { + this.type = type; + return this; + } + + /** + * Get the primaryKeyUri property: The versionless Azure Key Vault key URI used to encrypt the cluster's primary + * storage. Key version paths are not supported. During initial cluster creation, this property can be provided + * together with primaryUserAssignedIdentityId. For updates to an existing cluster through PUT or PATCH, this + * property and primaryUserAssignedIdentityId cannot both change in the same request; the first update must complete + * before submitting a separate update for the other property. + * + * @return the primaryKeyUri value. + */ + public String primaryKeyUri() { + return this.primaryKeyUri; + } + + /** + * Set the primaryKeyUri property: The versionless Azure Key Vault key URI used to encrypt the cluster's primary + * storage. Key version paths are not supported. During initial cluster creation, this property can be provided + * together with primaryUserAssignedIdentityId. For updates to an existing cluster through PUT or PATCH, this + * property and primaryUserAssignedIdentityId cannot both change in the same request; the first update must complete + * before submitting a separate update for the other property. + * + * @param primaryKeyUri the primaryKeyUri value to set. + * @return the HorizonDbClusterDataEncryption object itself. + */ + public HorizonDbClusterDataEncryption withPrimaryKeyUri(String primaryKeyUri) { + this.primaryKeyUri = primaryKeyUri; + return this; + } + + /** + * Get the primaryUserAssignedIdentityId property: The Azure resource ID of the user-assigned managed identity used + * to access the primary encryption key. The identity must also be assigned to the Cluster through its top-level + * identity property. During initial cluster creation, this property can be provided together with primaryKeyUri. + * For updates to an existing cluster through PUT or PATCH, this property and primaryKeyUri cannot both change in + * the same request; the first update must complete before submitting a separate update for the other property. + * + * @return the primaryUserAssignedIdentityId value. + */ + public String primaryUserAssignedIdentityId() { + return this.primaryUserAssignedIdentityId; + } + + /** + * Set the primaryUserAssignedIdentityId property: The Azure resource ID of the user-assigned managed identity used + * to access the primary encryption key. The identity must also be assigned to the Cluster through its top-level + * identity property. During initial cluster creation, this property can be provided together with primaryKeyUri. + * For updates to an existing cluster through PUT or PATCH, this property and primaryKeyUri cannot both change in + * the same request; the first update must complete before submitting a separate update for the other property. + * + * @param primaryUserAssignedIdentityId the primaryUserAssignedIdentityId value to set. + * @return the HorizonDbClusterDataEncryption object itself. + */ + public HorizonDbClusterDataEncryption withPrimaryUserAssignedIdentityId(String primaryUserAssignedIdentityId) { + this.primaryUserAssignedIdentityId = primaryUserAssignedIdentityId; + return this; + } + + /** + * Get the primaryEncryptionKeyStatus property: The validation status of the primary encryption key. This property + * is returned for AzureKeyVault encryption and is absent for SystemManaged encryption. + * + * @return the primaryEncryptionKeyStatus value. + */ + public HorizonDbClusterEncryptionKeyStatus primaryEncryptionKeyStatus() { + return this.primaryEncryptionKeyStatus; + } + + /** + * Get the primaryEncryptionKeyCurrentVersion property: The current version of the primary encryption key used by + * the cluster. This property is returned for AzureKeyVault encryption and is absent for SystemManaged encryption. + * + * @return the primaryEncryptionKeyCurrentVersion value. + */ + public String primaryEncryptionKeyCurrentVersion() { + return this.primaryEncryptionKeyCurrentVersion; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("primaryKeyUri", this.primaryKeyUri); + jsonWriter.writeStringField("primaryUserAssignedIdentityId", this.primaryUserAssignedIdentityId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HorizonDbClusterDataEncryption from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HorizonDbClusterDataEncryption 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 HorizonDbClusterDataEncryption. + */ + public static HorizonDbClusterDataEncryption fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HorizonDbClusterDataEncryption deserializedHorizonDbClusterDataEncryption + = new HorizonDbClusterDataEncryption(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedHorizonDbClusterDataEncryption.type + = HorizonDbClusterDataEncryptionType.fromString(reader.getString()); + } else if ("primaryKeyUri".equals(fieldName)) { + deserializedHorizonDbClusterDataEncryption.primaryKeyUri = reader.getString(); + } else if ("primaryUserAssignedIdentityId".equals(fieldName)) { + deserializedHorizonDbClusterDataEncryption.primaryUserAssignedIdentityId = reader.getString(); + } else if ("primaryEncryptionKeyStatus".equals(fieldName)) { + deserializedHorizonDbClusterDataEncryption.primaryEncryptionKeyStatus + = HorizonDbClusterEncryptionKeyStatus.fromString(reader.getString()); + } else if ("primaryEncryptionKeyCurrentVersion".equals(fieldName)) { + deserializedHorizonDbClusterDataEncryption.primaryEncryptionKeyCurrentVersion = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedHorizonDbClusterDataEncryption; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterDataEncryptionForPatchUpdate.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterDataEncryptionForPatchUpdate.java new file mode 100644 index 0000000000000..977fea26919fb --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterDataEncryptionForPatchUpdate.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.horizondb.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; + +/** + * Properties for sparsely updating Cluster-level data encryption. Omitted properties preserve their current values. + * Updates can modify settings within the existing encryption type, such as the primary Azure Key Vault key URI, but + * switching between SystemManaged and AzureKeyVault after cluster creation is not supported. AzureKeyVault encryption + * is not supported when backup.geoRedundancy is Enabled. An update can change only one of primaryKeyUri or + * primaryUserAssignedIdentityId; that update must complete before submitting a separate update to change the other + * property. + */ +@Fluent +public final class HorizonDbClusterDataEncryptionForPatchUpdate + implements JsonSerializable { + /* + * The existing data encryption type used by the cluster. PATCH is a sparse update, so this property may be omitted. + * If provided, it must match the existing encryption type. This value cannot be changed from SystemManaged to + * AzureKeyVault or from AzureKeyVault to SystemManaged after cluster creation. + */ + private HorizonDbClusterDataEncryptionType type; + + /* + * The versionless Azure Key Vault key URI used to encrypt the cluster's primary storage. Key version paths are not + * supported. This property and primaryUserAssignedIdentityId cannot both change in the same update; the first + * update must complete before submitting a separate update for the other property. + */ + private String primaryKeyUri; + + /* + * The Azure resource ID of the user-assigned managed identity used to access the primary encryption key. The + * identity must also be assigned to the Cluster through its top-level identity property. This property and + * primaryKeyUri cannot both change in the same update; the first update must complete before submitting a separate + * update for the other property. + */ + private String primaryUserAssignedIdentityId; + + /** + * Creates an instance of HorizonDbClusterDataEncryptionForPatchUpdate class. + */ + public HorizonDbClusterDataEncryptionForPatchUpdate() { + } + + /** + * Get the type property: The existing data encryption type used by the cluster. PATCH is a sparse update, so this + * property may be omitted. If provided, it must match the existing encryption type. This value cannot be changed + * from SystemManaged to AzureKeyVault or from AzureKeyVault to SystemManaged after cluster creation. + * + * @return the type value. + */ + public HorizonDbClusterDataEncryptionType type() { + return this.type; + } + + /** + * Set the type property: The existing data encryption type used by the cluster. PATCH is a sparse update, so this + * property may be omitted. If provided, it must match the existing encryption type. This value cannot be changed + * from SystemManaged to AzureKeyVault or from AzureKeyVault to SystemManaged after cluster creation. + * + * @param type the type value to set. + * @return the HorizonDbClusterDataEncryptionForPatchUpdate object itself. + */ + public HorizonDbClusterDataEncryptionForPatchUpdate withType(HorizonDbClusterDataEncryptionType type) { + this.type = type; + return this; + } + + /** + * Get the primaryKeyUri property: The versionless Azure Key Vault key URI used to encrypt the cluster's primary + * storage. Key version paths are not supported. This property and primaryUserAssignedIdentityId cannot both change + * in the same update; the first update must complete before submitting a separate update for the other property. + * + * @return the primaryKeyUri value. + */ + public String primaryKeyUri() { + return this.primaryKeyUri; + } + + /** + * Set the primaryKeyUri property: The versionless Azure Key Vault key URI used to encrypt the cluster's primary + * storage. Key version paths are not supported. This property and primaryUserAssignedIdentityId cannot both change + * in the same update; the first update must complete before submitting a separate update for the other property. + * + * @param primaryKeyUri the primaryKeyUri value to set. + * @return the HorizonDbClusterDataEncryptionForPatchUpdate object itself. + */ + public HorizonDbClusterDataEncryptionForPatchUpdate withPrimaryKeyUri(String primaryKeyUri) { + this.primaryKeyUri = primaryKeyUri; + return this; + } + + /** + * Get the primaryUserAssignedIdentityId property: The Azure resource ID of the user-assigned managed identity used + * to access the primary encryption key. The identity must also be assigned to the Cluster through its top-level + * identity property. This property and primaryKeyUri cannot both change in the same update; the first update must + * complete before submitting a separate update for the other property. + * + * @return the primaryUserAssignedIdentityId value. + */ + public String primaryUserAssignedIdentityId() { + return this.primaryUserAssignedIdentityId; + } + + /** + * Set the primaryUserAssignedIdentityId property: The Azure resource ID of the user-assigned managed identity used + * to access the primary encryption key. The identity must also be assigned to the Cluster through its top-level + * identity property. This property and primaryKeyUri cannot both change in the same update; the first update must + * complete before submitting a separate update for the other property. + * + * @param primaryUserAssignedIdentityId the primaryUserAssignedIdentityId value to set. + * @return the HorizonDbClusterDataEncryptionForPatchUpdate object itself. + */ + public HorizonDbClusterDataEncryptionForPatchUpdate + withPrimaryUserAssignedIdentityId(String primaryUserAssignedIdentityId) { + this.primaryUserAssignedIdentityId = primaryUserAssignedIdentityId; + 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("primaryKeyUri", this.primaryKeyUri); + jsonWriter.writeStringField("primaryUserAssignedIdentityId", this.primaryUserAssignedIdentityId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HorizonDbClusterDataEncryptionForPatchUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HorizonDbClusterDataEncryptionForPatchUpdate 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 HorizonDbClusterDataEncryptionForPatchUpdate. + */ + public static HorizonDbClusterDataEncryptionForPatchUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HorizonDbClusterDataEncryptionForPatchUpdate deserializedHorizonDbClusterDataEncryptionForPatchUpdate + = new HorizonDbClusterDataEncryptionForPatchUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedHorizonDbClusterDataEncryptionForPatchUpdate.type + = HorizonDbClusterDataEncryptionType.fromString(reader.getString()); + } else if ("primaryKeyUri".equals(fieldName)) { + deserializedHorizonDbClusterDataEncryptionForPatchUpdate.primaryKeyUri = reader.getString(); + } else if ("primaryUserAssignedIdentityId".equals(fieldName)) { + deserializedHorizonDbClusterDataEncryptionForPatchUpdate.primaryUserAssignedIdentityId + = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedHorizonDbClusterDataEncryptionForPatchUpdate; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterDataEncryptionType.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterDataEncryptionType.java new file mode 100644 index 0000000000000..f2186486c3fee --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterDataEncryptionType.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of data encryption used by a HorizonDB cluster. The type is selected at cluster creation; switching between + * SystemManaged and AzureKeyVault after creation is not supported. + */ +public final class HorizonDbClusterDataEncryptionType extends ExpandableStringEnum { + /** + * Data encryption is managed by Azure using platform-managed keys. + */ + public static final HorizonDbClusterDataEncryptionType SYSTEM_MANAGED = fromString("SystemManaged"); + + /** + * Data encryption uses customer-managed keys stored in Azure Key Vault. + */ + public static final HorizonDbClusterDataEncryptionType AZURE_KEY_VAULT = fromString("AzureKeyVault"); + + /** + * Creates a new instance of HorizonDbClusterDataEncryptionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public HorizonDbClusterDataEncryptionType() { + } + + /** + * Creates or finds a HorizonDbClusterDataEncryptionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding HorizonDbClusterDataEncryptionType. + */ + public static HorizonDbClusterDataEncryptionType fromString(String name) { + return fromString(name, HorizonDbClusterDataEncryptionType.class); + } + + /** + * Gets known HorizonDbClusterDataEncryptionType values. + * + * @return known HorizonDbClusterDataEncryptionType values. + */ + public static Collection values() { + return values(HorizonDbClusterDataEncryptionType.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterEncryptionKeyStatus.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterEncryptionKeyStatus.java new file mode 100644 index 0000000000000..b0e33263d784d --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterEncryptionKeyStatus.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The validation status of a customer-managed encryption key used by a HorizonDB cluster. + */ +public final class HorizonDbClusterEncryptionKeyStatus + extends ExpandableStringEnum { + /** + * The encryption key is valid and accessible to the configured user-assigned managed identity. + */ + public static final HorizonDbClusterEncryptionKeyStatus VALID = fromString("Valid"); + + /** + * The encryption key is invalid or inaccessible to the configured user-assigned managed identity. + */ + public static final HorizonDbClusterEncryptionKeyStatus INVALID = fromString("Invalid"); + + /** + * Creates a new instance of HorizonDbClusterEncryptionKeyStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public HorizonDbClusterEncryptionKeyStatus() { + } + + /** + * Creates or finds a HorizonDbClusterEncryptionKeyStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding HorizonDbClusterEncryptionKeyStatus. + */ + public static HorizonDbClusterEncryptionKeyStatus fromString(String name) { + return fromString(name, HorizonDbClusterEncryptionKeyStatus.class); + } + + /** + * Gets known HorizonDbClusterEncryptionKeyStatus values. + * + * @return known HorizonDbClusterEncryptionKeyStatus values. + */ + public static Collection values() { + return values(HorizonDbClusterEncryptionKeyStatus.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterIdentityType.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterIdentityType.java new file mode 100644 index 0000000000000..bdc1151d652e5 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterIdentityType.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The managed identity types supported by a HorizonDB cluster. + */ +public final class HorizonDbClusterIdentityType extends ExpandableStringEnum { + /** + * No managed identity is assigned. Setting type to None clears all managed identity assignments. + */ + public static final HorizonDbClusterIdentityType NONE = fromString("None"); + + /** + * User-assigned managed identities are assigned. + */ + public static final HorizonDbClusterIdentityType USER_ASSIGNED = fromString("UserAssigned"); + + /** + * Creates a new instance of HorizonDbClusterIdentityType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public HorizonDbClusterIdentityType() { + } + + /** + * Creates or finds a HorizonDbClusterIdentityType from its string representation. + * + * @param name a name to look for. + * @return the corresponding HorizonDbClusterIdentityType. + */ + public static HorizonDbClusterIdentityType fromString(String name) { + return fromString(name, HorizonDbClusterIdentityType.class); + } + + /** + * Gets known HorizonDbClusterIdentityType values. + * + * @return known HorizonDbClusterIdentityType values. + */ + public static Collection values() { + return values(HorizonDbClusterIdentityType.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterManagedServiceIdentity.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterManagedServiceIdentity.java new file mode 100644 index 0000000000000..f6fc7637110fd --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterManagedServiceIdentity.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.horizondb.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.Map; + +/** + * The user-assigned managed identities assigned to a HorizonDB cluster. Omitting the entire top-level identity property + * from PUT or PATCH preserves all current assignments. When userAssignedIdentities is supplied, PUT replaces the + * complete set and PATCH merges the supplied entries with the existing set; a null PATCH entry removes that individual + * identity. Setting type to None clears all assignments. Removing an identity referenced by a change data capture + * identity assignment is rejected until the referencing assignment is deleted. + */ +@Fluent +public final class HorizonDbClusterManagedServiceIdentity + implements JsonSerializable { + /* + * The managed identity type assigned to the cluster. Setting this property to None clears all managed identity + * assignments. + */ + private HorizonDbClusterIdentityType type; + + /* + * The user-assigned managed identities associated with the cluster. When supplied on PUT, this dictionary replaces + * the complete set of assignments. When supplied on PATCH, entries are merged with the existing set and a null + * value removes the corresponding identity. Each dictionary key must be the full Azure resource ID of a + * Microsoft.ManagedIdentity/userAssignedIdentities resource. Non-null request values can be empty objects; response + * values contain the service-populated clientId and principalId. Assigning an identity does not grant it access to + * destination resources; required role assignments must be configured separately. + */ + private Map userAssignedIdentities; + + /** + * Creates an instance of HorizonDbClusterManagedServiceIdentity class. + */ + public HorizonDbClusterManagedServiceIdentity() { + } + + /** + * Get the type property: The managed identity type assigned to the cluster. Setting this property to None clears + * all managed identity assignments. + * + * @return the type value. + */ + public HorizonDbClusterIdentityType type() { + return this.type; + } + + /** + * Set the type property: The managed identity type assigned to the cluster. Setting this property to None clears + * all managed identity assignments. + * + * @param type the type value to set. + * @return the HorizonDbClusterManagedServiceIdentity object itself. + */ + public HorizonDbClusterManagedServiceIdentity withType(HorizonDbClusterIdentityType type) { + this.type = type; + return this; + } + + /** + * Get the userAssignedIdentities property: The user-assigned managed identities associated with the cluster. When + * supplied on PUT, this dictionary replaces the complete set of assignments. When supplied on PATCH, entries are + * merged with the existing set and a null value removes the corresponding identity. Each dictionary key must be the + * full Azure resource ID of a Microsoft.ManagedIdentity/userAssignedIdentities resource. Non-null request values + * can be empty objects; response values contain the service-populated clientId and principalId. Assigning an + * identity does not grant it access to destination resources; required role assignments must be configured + * separately. + * + * @return the userAssignedIdentities value. + */ + public Map userAssignedIdentities() { + return this.userAssignedIdentities; + } + + /** + * Set the userAssignedIdentities property: The user-assigned managed identities associated with the cluster. When + * supplied on PUT, this dictionary replaces the complete set of assignments. When supplied on PATCH, entries are + * merged with the existing set and a null value removes the corresponding identity. Each dictionary key must be the + * full Azure resource ID of a Microsoft.ManagedIdentity/userAssignedIdentities resource. Non-null request values + * can be empty objects; response values contain the service-populated clientId and principalId. Assigning an + * identity does not grant it access to destination resources; required role assignments must be configured + * separately. + * + * @param userAssignedIdentities the userAssignedIdentities value to set. + * @return the HorizonDbClusterManagedServiceIdentity object itself. + */ + public HorizonDbClusterManagedServiceIdentity + withUserAssignedIdentities(Map userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HorizonDbClusterManagedServiceIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HorizonDbClusterManagedServiceIdentity 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 HorizonDbClusterManagedServiceIdentity. + */ + public static HorizonDbClusterManagedServiceIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HorizonDbClusterManagedServiceIdentity deserializedHorizonDbClusterManagedServiceIdentity + = new HorizonDbClusterManagedServiceIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedHorizonDbClusterManagedServiceIdentity.type + = HorizonDbClusterIdentityType.fromString(reader.getString()); + } else if ("userAssignedIdentities".equals(fieldName)) { + Map userAssignedIdentities + = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1)); + deserializedHorizonDbClusterManagedServiceIdentity.userAssignedIdentities = userAssignedIdentities; + } else { + reader.skipChildren(); + } + } + + return deserializedHorizonDbClusterManagedServiceIdentity; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterMirroring.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterMirroring.java deleted file mode 100644 index 29807e1747eb2..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterMirroring.java +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.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; - -/** - * Mirroring configuration for a HorizonDB cluster. - */ -@Fluent -public final class HorizonDbClusterMirroring implements JsonSerializable { - /* - * The names of the databases to mirror. - */ - private List databaseNames; - - /* - * The resource ID of the user-assigned managed identity used for mirroring. - */ - private String userAssignedIdentityId; - - /** - * Creates an instance of HorizonDbClusterMirroring class. - */ - public HorizonDbClusterMirroring() { - } - - /** - * Get the databaseNames property: The names of the databases to mirror. - * - * @return the databaseNames value. - */ - public List databaseNames() { - return this.databaseNames; - } - - /** - * Set the databaseNames property: The names of the databases to mirror. - * - * @param databaseNames the databaseNames value to set. - * @return the HorizonDbClusterMirroring object itself. - */ - public HorizonDbClusterMirroring withDatabaseNames(List databaseNames) { - this.databaseNames = databaseNames; - return this; - } - - /** - * Get the userAssignedIdentityId property: The resource ID of the user-assigned managed identity used for - * mirroring. - * - * @return the userAssignedIdentityId value. - */ - public String userAssignedIdentityId() { - return this.userAssignedIdentityId; - } - - /** - * Set the userAssignedIdentityId property: The resource ID of the user-assigned managed identity used for - * mirroring. - * - * @param userAssignedIdentityId the userAssignedIdentityId value to set. - * @return the HorizonDbClusterMirroring object itself. - */ - public HorizonDbClusterMirroring withUserAssignedIdentityId(String userAssignedIdentityId) { - this.userAssignedIdentityId = userAssignedIdentityId; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("databaseNames", this.databaseNames, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("userAssignedIdentityId", this.userAssignedIdentityId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HorizonDbClusterMirroring from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbClusterMirroring 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 HorizonDbClusterMirroring. - */ - public static HorizonDbClusterMirroring fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HorizonDbClusterMirroring deserializedHorizonDbClusterMirroring = new HorizonDbClusterMirroring(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("databaseNames".equals(fieldName)) { - List databaseNames = reader.readArray(reader1 -> reader1.getString()); - deserializedHorizonDbClusterMirroring.databaseNames = databaseNames; - } else if ("userAssignedIdentityId".equals(fieldName)) { - deserializedHorizonDbClusterMirroring.userAssignedIdentityId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHorizonDbClusterMirroring; - }); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterParameterGroupConnectionProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterParameterGroupConnectionProperties.java deleted file mode 100644 index 2ab88152e2138..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterParameterGroupConnectionProperties.java +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.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; - -/** - * Connection information for HorizonDB parameter group. - */ -@Fluent -public final class HorizonDbClusterParameterGroupConnectionProperties - implements JsonSerializable { - /* - * The resource ID of the connected parameter group. - */ - private String id; - - /* - * Indication of if parameter group is applied on HorizonDB resource. - */ - private String syncStatus; - - /* - * Indicates whether the parameters should be applied immediately. - */ - private Boolean applyImmediately; - - /** - * Creates an instance of HorizonDbClusterParameterGroupConnectionProperties class. - */ - public HorizonDbClusterParameterGroupConnectionProperties() { - } - - /** - * Get the id property: The resource ID of the connected parameter group. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The resource ID of the connected parameter group. - * - * @param id the id value to set. - * @return the HorizonDbClusterParameterGroupConnectionProperties object itself. - */ - public HorizonDbClusterParameterGroupConnectionProperties withId(String id) { - this.id = id; - return this; - } - - /** - * Get the syncStatus property: Indication of if parameter group is applied on HorizonDB resource. - * - * @return the syncStatus value. - */ - public String syncStatus() { - return this.syncStatus; - } - - /** - * Get the applyImmediately property: Indicates whether the parameters should be applied immediately. - * - * @return the applyImmediately value. - */ - public Boolean applyImmediately() { - return this.applyImmediately; - } - - /** - * Set the applyImmediately property: Indicates whether the parameters should be applied immediately. - * - * @param applyImmediately the applyImmediately value to set. - * @return the HorizonDbClusterParameterGroupConnectionProperties object itself. - */ - public HorizonDbClusterParameterGroupConnectionProperties withApplyImmediately(Boolean applyImmediately) { - this.applyImmediately = applyImmediately; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", this.id); - jsonWriter.writeBooleanField("applyImmediately", this.applyImmediately); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HorizonDbClusterParameterGroupConnectionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbClusterParameterGroupConnectionProperties 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 HorizonDbClusterParameterGroupConnectionProperties. - */ - public static HorizonDbClusterParameterGroupConnectionProperties fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - HorizonDbClusterParameterGroupConnectionProperties deserializedHorizonDbClusterParameterGroupConnectionProperties - = new HorizonDbClusterParameterGroupConnectionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedHorizonDbClusterParameterGroupConnectionProperties.id = reader.getString(); - } else if ("syncStatus".equals(fieldName)) { - deserializedHorizonDbClusterParameterGroupConnectionProperties.syncStatus = reader.getString(); - } else if ("applyImmediately".equals(fieldName)) { - deserializedHorizonDbClusterParameterGroupConnectionProperties.applyImmediately - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedHorizonDbClusterParameterGroupConnectionProperties; - }); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterProperties.java deleted file mode 100644 index 93c4bb0cc650b..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterProperties.java +++ /dev/null @@ -1,581 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.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.time.format.DateTimeFormatter; - -/** - * Properties of a HorizonDB cluster. - */ -@Fluent -public final class HorizonDbClusterProperties implements JsonSerializable { - /* - * The administrator login name. - */ - private String administratorLogin; - - /* - * The administrator login password. - */ - private String administratorLoginPassword; - - /* - * The version of the HorizonDB cluster. - */ - private String version; - - /* - * The mode to create a new HorizonDB cluster. - */ - private CreateModeCluster createMode; - - /* - * Restore point creation time specifying the time to restore from. - */ - private OffsetDateTime pointInTimeUTC; - - /* - * The source cluster resource ID for restore or replica creation. - */ - private String sourceClusterResourceId; - - /* - * The pool name for restore or replica operations. - */ - private String poolName; - - /* - * Number of replicas. - */ - private Integer replicaCount; - - /* - * Number of vCores. - */ - private Integer vCores; - - /* - * The processor type for the HorizonDB cluster. - */ - private String processorType; - - /* - * The network related info. - */ - private Network network; - - /* - * Current state of the cluster. - */ - private State state; - - /* - * The fully qualified domain name of the cluster. - */ - private String fullyQualifiedDomainName; - - /* - * The fully qualified domain name used for readonly endpoint for the cluster. - */ - private String readonlyEndpoint; - - /* - * The provisioning state of the cluster. - */ - private ProvisioningState provisioningState; - - /* - * Defines how replicas are placed across availability zones. - */ - private ZonePlacementPolicy zonePlacementPolicy; - - /* - * Defines connection to a parameter group. - */ - private HorizonDbClusterParameterGroupConnectionProperties parameterGroup; - - /* - * Authentication configuration for the HorizonDB cluster. - */ - private HorizonDbClusterAuthConfig authConfig; - - /* - * The compute model for the cluster. - */ - private HorizonDbComputeModel computeModel; - - /* - * Mirroring configuration for the HorizonDB cluster. - */ - private HorizonDbClusterMirroring mirroring; - - /** - * Creates an instance of HorizonDbClusterProperties class. - */ - public HorizonDbClusterProperties() { - } - - /** - * Get the administratorLogin property: The administrator login name. - * - * @return the administratorLogin value. - */ - public String administratorLogin() { - return this.administratorLogin; - } - - /** - * Set the administratorLogin property: The administrator login name. - * - * @param administratorLogin the administratorLogin value to set. - * @return the HorizonDbClusterProperties object itself. - */ - public HorizonDbClusterProperties withAdministratorLogin(String administratorLogin) { - this.administratorLogin = administratorLogin; - return this; - } - - /** - * Get the administratorLoginPassword property: The administrator login password. - * - * @return the administratorLoginPassword value. - */ - public String administratorLoginPassword() { - return this.administratorLoginPassword; - } - - /** - * Set the administratorLoginPassword property: The administrator login password. - * - * @param administratorLoginPassword the administratorLoginPassword value to set. - * @return the HorizonDbClusterProperties object itself. - */ - public HorizonDbClusterProperties withAdministratorLoginPassword(String administratorLoginPassword) { - this.administratorLoginPassword = administratorLoginPassword; - return this; - } - - /** - * Get the version property: The version of the HorizonDB cluster. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: The version of the HorizonDB cluster. - * - * @param version the version value to set. - * @return the HorizonDbClusterProperties object itself. - */ - public HorizonDbClusterProperties withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the createMode property: The mode to create a new HorizonDB cluster. - * - * @return the createMode value. - */ - public CreateModeCluster createMode() { - return this.createMode; - } - - /** - * Set the createMode property: The mode to create a new HorizonDB cluster. - * - * @param createMode the createMode value to set. - * @return the HorizonDbClusterProperties object itself. - */ - public HorizonDbClusterProperties withCreateMode(CreateModeCluster createMode) { - this.createMode = createMode; - return this; - } - - /** - * Get the pointInTimeUTC property: Restore point creation time specifying the time to restore from. - * - * @return the pointInTimeUTC value. - */ - public OffsetDateTime pointInTimeUTC() { - return this.pointInTimeUTC; - } - - /** - * Set the pointInTimeUTC property: Restore point creation time specifying the time to restore from. - * - * @param pointInTimeUTC the pointInTimeUTC value to set. - * @return the HorizonDbClusterProperties object itself. - */ - public HorizonDbClusterProperties withPointInTimeUTC(OffsetDateTime pointInTimeUTC) { - this.pointInTimeUTC = pointInTimeUTC; - return this; - } - - /** - * Get the sourceClusterResourceId property: The source cluster resource ID for restore or replica creation. - * - * @return the sourceClusterResourceId value. - */ - public String sourceClusterResourceId() { - return this.sourceClusterResourceId; - } - - /** - * Set the sourceClusterResourceId property: The source cluster resource ID for restore or replica creation. - * - * @param sourceClusterResourceId the sourceClusterResourceId value to set. - * @return the HorizonDbClusterProperties object itself. - */ - public HorizonDbClusterProperties withSourceClusterResourceId(String sourceClusterResourceId) { - this.sourceClusterResourceId = sourceClusterResourceId; - return this; - } - - /** - * Get the poolName property: The pool name for restore or replica operations. - * - * @return the poolName value. - */ - public String poolName() { - return this.poolName; - } - - /** - * Set the poolName property: The pool name for restore or replica operations. - * - * @param poolName the poolName value to set. - * @return the HorizonDbClusterProperties object itself. - */ - public HorizonDbClusterProperties withPoolName(String poolName) { - this.poolName = poolName; - return this; - } - - /** - * Get the replicaCount property: Number of replicas. - * - * @return the replicaCount value. - */ - public Integer replicaCount() { - return this.replicaCount; - } - - /** - * Set the replicaCount property: Number of replicas. - * - * @param replicaCount the replicaCount value to set. - * @return the HorizonDbClusterProperties object itself. - */ - public HorizonDbClusterProperties withReplicaCount(Integer replicaCount) { - this.replicaCount = replicaCount; - return this; - } - - /** - * Get the vCores property: Number of vCores. - * - * @return the vCores value. - */ - public Integer vCores() { - return this.vCores; - } - - /** - * Set the vCores property: Number of vCores. - * - * @param vCores the vCores value to set. - * @return the HorizonDbClusterProperties object itself. - */ - public HorizonDbClusterProperties withVCores(Integer vCores) { - this.vCores = vCores; - return this; - } - - /** - * Get the processorType property: The processor type for the HorizonDB cluster. - * - * @return the processorType value. - */ - public String processorType() { - return this.processorType; - } - - /** - * Set the processorType property: The processor type for the HorizonDB cluster. - * - * @param processorType the processorType value to set. - * @return the HorizonDbClusterProperties object itself. - */ - public HorizonDbClusterProperties withProcessorType(String processorType) { - this.processorType = processorType; - return this; - } - - /** - * Get the network property: The network related info. - * - * @return the network value. - */ - public Network network() { - return this.network; - } - - /** - * Set the network property: The network related info. - * - * @param network the network value to set. - * @return the HorizonDbClusterProperties object itself. - */ - public HorizonDbClusterProperties withNetwork(Network network) { - this.network = network; - return this; - } - - /** - * Get the state property: Current state of the cluster. - * - * @return the state value. - */ - public State state() { - return this.state; - } - - /** - * Get the fullyQualifiedDomainName property: The fully qualified domain name of the cluster. - * - * @return the fullyQualifiedDomainName value. - */ - public String fullyQualifiedDomainName() { - return this.fullyQualifiedDomainName; - } - - /** - * Get the readonlyEndpoint property: The fully qualified domain name used for readonly endpoint for the cluster. - * - * @return the readonlyEndpoint value. - */ - public String readonlyEndpoint() { - return this.readonlyEndpoint; - } - - /** - * Get the provisioningState property: The provisioning state of the cluster. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the zonePlacementPolicy property: Defines how replicas are placed across availability zones. - * - * @return the zonePlacementPolicy value. - */ - public ZonePlacementPolicy zonePlacementPolicy() { - return this.zonePlacementPolicy; - } - - /** - * Set the zonePlacementPolicy property: Defines how replicas are placed across availability zones. - * - * @param zonePlacementPolicy the zonePlacementPolicy value to set. - * @return the HorizonDbClusterProperties object itself. - */ - public HorizonDbClusterProperties withZonePlacementPolicy(ZonePlacementPolicy zonePlacementPolicy) { - this.zonePlacementPolicy = zonePlacementPolicy; - return this; - } - - /** - * Get the parameterGroup property: Defines connection to a parameter group. - * - * @return the parameterGroup value. - */ - public HorizonDbClusterParameterGroupConnectionProperties parameterGroup() { - return this.parameterGroup; - } - - /** - * Set the parameterGroup property: Defines connection to a parameter group. - * - * @param parameterGroup the parameterGroup value to set. - * @return the HorizonDbClusterProperties object itself. - */ - public HorizonDbClusterProperties - withParameterGroup(HorizonDbClusterParameterGroupConnectionProperties parameterGroup) { - this.parameterGroup = parameterGroup; - return this; - } - - /** - * Get the authConfig property: Authentication configuration for the HorizonDB cluster. - * - * @return the authConfig value. - */ - public HorizonDbClusterAuthConfig authConfig() { - return this.authConfig; - } - - /** - * Set the authConfig property: Authentication configuration for the HorizonDB cluster. - * - * @param authConfig the authConfig value to set. - * @return the HorizonDbClusterProperties object itself. - */ - public HorizonDbClusterProperties withAuthConfig(HorizonDbClusterAuthConfig authConfig) { - this.authConfig = authConfig; - return this; - } - - /** - * Get the computeModel property: The compute model for the cluster. - * - * @return the computeModel value. - */ - public HorizonDbComputeModel computeModel() { - return this.computeModel; - } - - /** - * Set the computeModel property: The compute model for the cluster. - * - * @param computeModel the computeModel value to set. - * @return the HorizonDbClusterProperties object itself. - */ - public HorizonDbClusterProperties withComputeModel(HorizonDbComputeModel computeModel) { - this.computeModel = computeModel; - return this; - } - - /** - * Get the mirroring property: Mirroring configuration for the HorizonDB cluster. - * - * @return the mirroring value. - */ - public HorizonDbClusterMirroring mirroring() { - return this.mirroring; - } - - /** - * Set the mirroring property: Mirroring configuration for the HorizonDB cluster. - * - * @param mirroring the mirroring value to set. - * @return the HorizonDbClusterProperties object itself. - */ - public HorizonDbClusterProperties withMirroring(HorizonDbClusterMirroring mirroring) { - this.mirroring = mirroring; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("administratorLogin", this.administratorLogin); - jsonWriter.writeStringField("administratorLoginPassword", this.administratorLoginPassword); - jsonWriter.writeStringField("version", this.version); - jsonWriter.writeStringField("createMode", this.createMode == null ? null : this.createMode.toString()); - jsonWriter.writeStringField("pointInTimeUTC", - this.pointInTimeUTC == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.pointInTimeUTC)); - jsonWriter.writeStringField("sourceClusterResourceId", this.sourceClusterResourceId); - jsonWriter.writeStringField("poolName", this.poolName); - jsonWriter.writeNumberField("replicaCount", this.replicaCount); - jsonWriter.writeNumberField("vCores", this.vCores); - jsonWriter.writeStringField("processorType", this.processorType); - jsonWriter.writeJsonField("network", this.network); - jsonWriter.writeStringField("zonePlacementPolicy", - this.zonePlacementPolicy == null ? null : this.zonePlacementPolicy.toString()); - jsonWriter.writeJsonField("parameterGroup", this.parameterGroup); - jsonWriter.writeJsonField("authConfig", this.authConfig); - jsonWriter.writeJsonField("computeModel", this.computeModel); - jsonWriter.writeJsonField("mirroring", this.mirroring); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HorizonDbClusterProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbClusterProperties 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 HorizonDbClusterProperties. - */ - public static HorizonDbClusterProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HorizonDbClusterProperties deserializedHorizonDbClusterProperties = new HorizonDbClusterProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("administratorLogin".equals(fieldName)) { - deserializedHorizonDbClusterProperties.administratorLogin = reader.getString(); - } else if ("administratorLoginPassword".equals(fieldName)) { - deserializedHorizonDbClusterProperties.administratorLoginPassword = reader.getString(); - } else if ("version".equals(fieldName)) { - deserializedHorizonDbClusterProperties.version = reader.getString(); - } else if ("createMode".equals(fieldName)) { - deserializedHorizonDbClusterProperties.createMode - = CreateModeCluster.fromString(reader.getString()); - } else if ("pointInTimeUTC".equals(fieldName)) { - deserializedHorizonDbClusterProperties.pointInTimeUTC = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("sourceClusterResourceId".equals(fieldName)) { - deserializedHorizonDbClusterProperties.sourceClusterResourceId = reader.getString(); - } else if ("poolName".equals(fieldName)) { - deserializedHorizonDbClusterProperties.poolName = reader.getString(); - } else if ("replicaCount".equals(fieldName)) { - deserializedHorizonDbClusterProperties.replicaCount = reader.getNullable(JsonReader::getInt); - } else if ("vCores".equals(fieldName)) { - deserializedHorizonDbClusterProperties.vCores = reader.getNullable(JsonReader::getInt); - } else if ("processorType".equals(fieldName)) { - deserializedHorizonDbClusterProperties.processorType = reader.getString(); - } else if ("network".equals(fieldName)) { - deserializedHorizonDbClusterProperties.network = Network.fromJson(reader); - } else if ("state".equals(fieldName)) { - deserializedHorizonDbClusterProperties.state = State.fromString(reader.getString()); - } else if ("fullyQualifiedDomainName".equals(fieldName)) { - deserializedHorizonDbClusterProperties.fullyQualifiedDomainName = reader.getString(); - } else if ("readonlyEndpoint".equals(fieldName)) { - deserializedHorizonDbClusterProperties.readonlyEndpoint = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedHorizonDbClusterProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else if ("zonePlacementPolicy".equals(fieldName)) { - deserializedHorizonDbClusterProperties.zonePlacementPolicy - = ZonePlacementPolicy.fromString(reader.getString()); - } else if ("parameterGroup".equals(fieldName)) { - deserializedHorizonDbClusterProperties.parameterGroup - = HorizonDbClusterParameterGroupConnectionProperties.fromJson(reader); - } else if ("authConfig".equals(fieldName)) { - deserializedHorizonDbClusterProperties.authConfig = HorizonDbClusterAuthConfig.fromJson(reader); - } else if ("computeModel".equals(fieldName)) { - deserializedHorizonDbClusterProperties.computeModel = HorizonDbComputeModel.fromJson(reader); - } else if ("mirroring".equals(fieldName)) { - deserializedHorizonDbClusterProperties.mirroring = HorizonDbClusterMirroring.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedHorizonDbClusterProperties; - }); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterPropertiesForPatchUpdate.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterPropertiesForPatchUpdate.java deleted file mode 100644 index 7c374898ee1c4..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterPropertiesForPatchUpdate.java +++ /dev/null @@ -1,234 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.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; - -/** - * Properties of a HorizonDB cluster for update operations. - */ -@Fluent -public final class HorizonDbClusterPropertiesForPatchUpdate - implements JsonSerializable { - /* - * The administrator login password. - */ - private String administratorLoginPassword; - - /* - * Number of vCores. - */ - private Integer vCores; - - /* - * Defines connection to a parameter group. - */ - private HorizonDbClusterParameterGroupConnectionProperties parameterGroup; - - /* - * Authentication configuration for the HorizonDB cluster. - */ - private HorizonDbClusterAuthConfig authConfig; - - /* - * The compute model for the cluster. - */ - private HorizonDbComputeModel computeModel; - - /* - * Mirroring configuration for the HorizonDB cluster. - */ - private HorizonDbClusterMirroring mirroring; - - /** - * Creates an instance of HorizonDbClusterPropertiesForPatchUpdate class. - */ - public HorizonDbClusterPropertiesForPatchUpdate() { - } - - /** - * Get the administratorLoginPassword property: The administrator login password. - * - * @return the administratorLoginPassword value. - */ - public String administratorLoginPassword() { - return this.administratorLoginPassword; - } - - /** - * Set the administratorLoginPassword property: The administrator login password. - * - * @param administratorLoginPassword the administratorLoginPassword value to set. - * @return the HorizonDbClusterPropertiesForPatchUpdate object itself. - */ - public HorizonDbClusterPropertiesForPatchUpdate withAdministratorLoginPassword(String administratorLoginPassword) { - this.administratorLoginPassword = administratorLoginPassword; - return this; - } - - /** - * Get the vCores property: Number of vCores. - * - * @return the vCores value. - */ - public Integer vCores() { - return this.vCores; - } - - /** - * Set the vCores property: Number of vCores. - * - * @param vCores the vCores value to set. - * @return the HorizonDbClusterPropertiesForPatchUpdate object itself. - */ - public HorizonDbClusterPropertiesForPatchUpdate withVCores(Integer vCores) { - this.vCores = vCores; - return this; - } - - /** - * Get the parameterGroup property: Defines connection to a parameter group. - * - * @return the parameterGroup value. - */ - public HorizonDbClusterParameterGroupConnectionProperties parameterGroup() { - return this.parameterGroup; - } - - /** - * Set the parameterGroup property: Defines connection to a parameter group. - * - * @param parameterGroup the parameterGroup value to set. - * @return the HorizonDbClusterPropertiesForPatchUpdate object itself. - */ - public HorizonDbClusterPropertiesForPatchUpdate - withParameterGroup(HorizonDbClusterParameterGroupConnectionProperties parameterGroup) { - this.parameterGroup = parameterGroup; - return this; - } - - /** - * Get the authConfig property: Authentication configuration for the HorizonDB cluster. - * - * @return the authConfig value. - */ - public HorizonDbClusterAuthConfig authConfig() { - return this.authConfig; - } - - /** - * Set the authConfig property: Authentication configuration for the HorizonDB cluster. - * - * @param authConfig the authConfig value to set. - * @return the HorizonDbClusterPropertiesForPatchUpdate object itself. - */ - public HorizonDbClusterPropertiesForPatchUpdate withAuthConfig(HorizonDbClusterAuthConfig authConfig) { - this.authConfig = authConfig; - return this; - } - - /** - * Get the computeModel property: The compute model for the cluster. - * - * @return the computeModel value. - */ - public HorizonDbComputeModel computeModel() { - return this.computeModel; - } - - /** - * Set the computeModel property: The compute model for the cluster. - * - * @param computeModel the computeModel value to set. - * @return the HorizonDbClusterPropertiesForPatchUpdate object itself. - */ - public HorizonDbClusterPropertiesForPatchUpdate withComputeModel(HorizonDbComputeModel computeModel) { - this.computeModel = computeModel; - return this; - } - - /** - * Get the mirroring property: Mirroring configuration for the HorizonDB cluster. - * - * @return the mirroring value. - */ - public HorizonDbClusterMirroring mirroring() { - return this.mirroring; - } - - /** - * Set the mirroring property: Mirroring configuration for the HorizonDB cluster. - * - * @param mirroring the mirroring value to set. - * @return the HorizonDbClusterPropertiesForPatchUpdate object itself. - */ - public HorizonDbClusterPropertiesForPatchUpdate withMirroring(HorizonDbClusterMirroring mirroring) { - this.mirroring = mirroring; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("administratorLoginPassword", this.administratorLoginPassword); - jsonWriter.writeNumberField("vCores", this.vCores); - jsonWriter.writeJsonField("parameterGroup", this.parameterGroup); - jsonWriter.writeJsonField("authConfig", this.authConfig); - jsonWriter.writeJsonField("computeModel", this.computeModel); - jsonWriter.writeJsonField("mirroring", this.mirroring); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HorizonDbClusterPropertiesForPatchUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbClusterPropertiesForPatchUpdate 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 HorizonDbClusterPropertiesForPatchUpdate. - */ - public static HorizonDbClusterPropertiesForPatchUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HorizonDbClusterPropertiesForPatchUpdate deserializedHorizonDbClusterPropertiesForPatchUpdate - = new HorizonDbClusterPropertiesForPatchUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("administratorLoginPassword".equals(fieldName)) { - deserializedHorizonDbClusterPropertiesForPatchUpdate.administratorLoginPassword - = reader.getString(); - } else if ("vCores".equals(fieldName)) { - deserializedHorizonDbClusterPropertiesForPatchUpdate.vCores - = reader.getNullable(JsonReader::getInt); - } else if ("parameterGroup".equals(fieldName)) { - deserializedHorizonDbClusterPropertiesForPatchUpdate.parameterGroup - = HorizonDbClusterParameterGroupConnectionProperties.fromJson(reader); - } else if ("authConfig".equals(fieldName)) { - deserializedHorizonDbClusterPropertiesForPatchUpdate.authConfig - = HorizonDbClusterAuthConfig.fromJson(reader); - } else if ("computeModel".equals(fieldName)) { - deserializedHorizonDbClusterPropertiesForPatchUpdate.computeModel - = HorizonDbComputeModel.fromJson(reader); - } else if ("mirroring".equals(fieldName)) { - deserializedHorizonDbClusterPropertiesForPatchUpdate.mirroring - = HorizonDbClusterMirroring.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedHorizonDbClusterPropertiesForPatchUpdate; - }); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbComputeModel.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbComputeModel.java deleted file mode 100644 index 6ea0375bd2c2b..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbComputeModel.java +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.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 compute model for a HorizonDB cluster. - */ -@Fluent -public final class HorizonDbComputeModel implements JsonSerializable { - /* - * The compute model type. Supported values: 'Provisioned', 'Serverless'. - */ - private HorizonDbComputeModelType type; - - /* - * The fixed vCore count for Provisioned compute. - */ - private Integer vCores; - - /* - * The minimum vCores for Serverless compute. Defines the lower autoscaling bound. - */ - private Double minvCores; - - /* - * The maximum vCores for Serverless compute. Defines the upper autoscaling bound. - */ - private Double maxvCores; - - /** - * Creates an instance of HorizonDbComputeModel class. - */ - public HorizonDbComputeModel() { - } - - /** - * Get the type property: The compute model type. Supported values: 'Provisioned', 'Serverless'. - * - * @return the type value. - */ - public HorizonDbComputeModelType type() { - return this.type; - } - - /** - * Set the type property: The compute model type. Supported values: 'Provisioned', 'Serverless'. - * - * @param type the type value to set. - * @return the HorizonDbComputeModel object itself. - */ - public HorizonDbComputeModel withType(HorizonDbComputeModelType type) { - this.type = type; - return this; - } - - /** - * Get the vCores property: The fixed vCore count for Provisioned compute. - * - * @return the vCores value. - */ - public Integer vCores() { - return this.vCores; - } - - /** - * Set the vCores property: The fixed vCore count for Provisioned compute. - * - * @param vCores the vCores value to set. - * @return the HorizonDbComputeModel object itself. - */ - public HorizonDbComputeModel withVCores(Integer vCores) { - this.vCores = vCores; - return this; - } - - /** - * Get the minvCores property: The minimum vCores for Serverless compute. Defines the lower autoscaling bound. - * - * @return the minvCores value. - */ - public Double minvCores() { - return this.minvCores; - } - - /** - * Set the minvCores property: The minimum vCores for Serverless compute. Defines the lower autoscaling bound. - * - * @param minvCores the minvCores value to set. - * @return the HorizonDbComputeModel object itself. - */ - public HorizonDbComputeModel withMinvCores(Double minvCores) { - this.minvCores = minvCores; - return this; - } - - /** - * Get the maxvCores property: The maximum vCores for Serverless compute. Defines the upper autoscaling bound. - * - * @return the maxvCores value. - */ - public Double maxvCores() { - return this.maxvCores; - } - - /** - * Set the maxvCores property: The maximum vCores for Serverless compute. Defines the upper autoscaling bound. - * - * @param maxvCores the maxvCores value to set. - * @return the HorizonDbComputeModel object itself. - */ - public HorizonDbComputeModel withMaxvCores(Double maxvCores) { - this.maxvCores = maxvCores; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeNumberField("vCores", this.vCores); - jsonWriter.writeNumberField("minvCores", this.minvCores); - jsonWriter.writeNumberField("maxvCores", this.maxvCores); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HorizonDbComputeModel from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbComputeModel 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 HorizonDbComputeModel. - */ - public static HorizonDbComputeModel fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HorizonDbComputeModel deserializedHorizonDbComputeModel = new HorizonDbComputeModel(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedHorizonDbComputeModel.type = HorizonDbComputeModelType.fromString(reader.getString()); - } else if ("vCores".equals(fieldName)) { - deserializedHorizonDbComputeModel.vCores = reader.getNullable(JsonReader::getInt); - } else if ("minvCores".equals(fieldName)) { - deserializedHorizonDbComputeModel.minvCores = reader.getNullable(JsonReader::getDouble); - } else if ("maxvCores".equals(fieldName)) { - deserializedHorizonDbComputeModel.maxvCores = reader.getNullable(JsonReader::getDouble); - } else { - reader.skipChildren(); - } - } - - return deserializedHorizonDbComputeModel; - }); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbComputeModelType.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbComputeModelType.java deleted file mode 100644 index adbb8b198a852..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbComputeModelType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The compute model type. - */ -public final class HorizonDbComputeModelType extends ExpandableStringEnum { - /** - * Provisioned compute. - */ - public static final HorizonDbComputeModelType PROVISIONED = fromString("Provisioned"); - - /** - * Serverless compute. - */ - public static final HorizonDbComputeModelType SERVERLESS = fromString("Serverless"); - - /** - * Creates a new instance of HorizonDbComputeModelType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public HorizonDbComputeModelType() { - } - - /** - * Creates or finds a HorizonDbComputeModelType from its string representation. - * - * @param name a name to look for. - * @return the corresponding HorizonDbComputeModelType. - */ - public static HorizonDbComputeModelType fromString(String name) { - return fromString(name, HorizonDbComputeModelType.class); - } - - /** - * Gets known HorizonDbComputeModelType values. - * - * @return known HorizonDbComputeModelType values. - */ - public static Collection values() { - return values(HorizonDbComputeModelType.class); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbParameterGroupConnectionProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbParameterGroupConnectionProperties.java deleted file mode 100644 index 4f5f20f6392a6..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbParameterGroupConnectionProperties.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.models; - -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbParameterGroupConnectionPropertiesInner; - -/** - * An immutable client-side representation of HorizonDbParameterGroupConnectionProperties. - */ -public interface HorizonDbParameterGroupConnectionProperties { - /** - * Gets the name property: The name of the connected resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the id property: The resource ID of the connected resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the inner com.azure.resourcemanager.horizondb.fluent.models.HorizonDbParameterGroupConnectionPropertiesInner - * object. - * - * @return the inner object. - */ - HorizonDbParameterGroupConnectionPropertiesInner innerModel(); -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbParameterGroupProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbParameterGroupProperties.java deleted file mode 100644 index bee15ff56e22d..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbParameterGroupProperties.java +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.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; - -/** - * Properties of a HorizonDB parameter group. - */ -@Fluent -public final class HorizonDbParameterGroupProperties implements JsonSerializable { - /* - * Parameters in the parameter group. - */ - private List parameters; - - /* - * Description of the parameter group. - */ - private String description; - - /* - * PostgreSQL version for the parameter group. - */ - private Integer pgVersion; - - /* - * Current version of the parameter group. - */ - private Integer version; - - /* - * Indicates whether the parameters should be applied immediately. - */ - private Boolean applyImmediately; - - /* - * The provisioning state of the parameter group. - */ - private ProvisioningState provisioningState; - - /** - * Creates an instance of HorizonDbParameterGroupProperties class. - */ - public HorizonDbParameterGroupProperties() { - } - - /** - * Get the parameters property: Parameters in the parameter group. - * - * @return the parameters value. - */ - public List parameters() { - return this.parameters; - } - - /** - * Set the parameters property: Parameters in the parameter group. - * - * @param parameters the parameters value to set. - * @return the HorizonDbParameterGroupProperties object itself. - */ - public HorizonDbParameterGroupProperties withParameters(List parameters) { - this.parameters = parameters; - return this; - } - - /** - * Get the description property: Description of the parameter group. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Description of the parameter group. - * - * @param description the description value to set. - * @return the HorizonDbParameterGroupProperties object itself. - */ - public HorizonDbParameterGroupProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the pgVersion property: PostgreSQL version for the parameter group. - * - * @return the pgVersion value. - */ - public Integer pgVersion() { - return this.pgVersion; - } - - /** - * Set the pgVersion property: PostgreSQL version for the parameter group. - * - * @param pgVersion the pgVersion value to set. - * @return the HorizonDbParameterGroupProperties object itself. - */ - public HorizonDbParameterGroupProperties withPgVersion(Integer pgVersion) { - this.pgVersion = pgVersion; - return this; - } - - /** - * Get the version property: Current version of the parameter group. - * - * @return the version value. - */ - public Integer version() { - return this.version; - } - - /** - * Get the applyImmediately property: Indicates whether the parameters should be applied immediately. - * - * @return the applyImmediately value. - */ - public Boolean applyImmediately() { - return this.applyImmediately; - } - - /** - * Set the applyImmediately property: Indicates whether the parameters should be applied immediately. - * - * @param applyImmediately the applyImmediately value to set. - * @return the HorizonDbParameterGroupProperties object itself. - */ - public HorizonDbParameterGroupProperties withApplyImmediately(Boolean applyImmediately) { - this.applyImmediately = applyImmediately; - return this; - } - - /** - * Get the provisioningState property: The provisioning state of the parameter group. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("parameters", this.parameters, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeNumberField("pgVersion", this.pgVersion); - jsonWriter.writeBooleanField("applyImmediately", this.applyImmediately); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HorizonDbParameterGroupProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbParameterGroupProperties 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 HorizonDbParameterGroupProperties. - */ - public static HorizonDbParameterGroupProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HorizonDbParameterGroupProperties deserializedHorizonDbParameterGroupProperties - = new HorizonDbParameterGroupProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("parameters".equals(fieldName)) { - List parameters - = reader.readArray(reader1 -> ParameterProperties.fromJson(reader1)); - deserializedHorizonDbParameterGroupProperties.parameters = parameters; - } else if ("description".equals(fieldName)) { - deserializedHorizonDbParameterGroupProperties.description = reader.getString(); - } else if ("pgVersion".equals(fieldName)) { - deserializedHorizonDbParameterGroupProperties.pgVersion = reader.getNullable(JsonReader::getInt); - } else if ("version".equals(fieldName)) { - deserializedHorizonDbParameterGroupProperties.version = reader.getNullable(JsonReader::getInt); - } else if ("applyImmediately".equals(fieldName)) { - deserializedHorizonDbParameterGroupProperties.applyImmediately - = reader.getNullable(JsonReader::getBoolean); - } else if ("provisioningState".equals(fieldName)) { - deserializedHorizonDbParameterGroupProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedHorizonDbParameterGroupProperties; - }); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbParameterGroupPropertiesForPatchUpdate.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbParameterGroupPropertiesForPatchUpdate.java deleted file mode 100644 index 86665fe7582ac..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbParameterGroupPropertiesForPatchUpdate.java +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.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; - -/** - * Properties of a HorizonDB parameter group for update operations. - */ -@Fluent -public final class HorizonDbParameterGroupPropertiesForPatchUpdate - implements JsonSerializable { - /* - * Parameters in the parameter group. - */ - private List parameters; - - /* - * Description of the parameter group. - */ - private String description; - - /* - * Indicates whether the parameters should be applied immediately. - */ - private Boolean applyImmediately; - - /** - * Creates an instance of HorizonDbParameterGroupPropertiesForPatchUpdate class. - */ - public HorizonDbParameterGroupPropertiesForPatchUpdate() { - } - - /** - * Get the parameters property: Parameters in the parameter group. - * - * @return the parameters value. - */ - public List parameters() { - return this.parameters; - } - - /** - * Set the parameters property: Parameters in the parameter group. - * - * @param parameters the parameters value to set. - * @return the HorizonDbParameterGroupPropertiesForPatchUpdate object itself. - */ - public HorizonDbParameterGroupPropertiesForPatchUpdate withParameters(List parameters) { - this.parameters = parameters; - return this; - } - - /** - * Get the description property: Description of the parameter group. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Description of the parameter group. - * - * @param description the description value to set. - * @return the HorizonDbParameterGroupPropertiesForPatchUpdate object itself. - */ - public HorizonDbParameterGroupPropertiesForPatchUpdate withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the applyImmediately property: Indicates whether the parameters should be applied immediately. - * - * @return the applyImmediately value. - */ - public Boolean applyImmediately() { - return this.applyImmediately; - } - - /** - * Set the applyImmediately property: Indicates whether the parameters should be applied immediately. - * - * @param applyImmediately the applyImmediately value to set. - * @return the HorizonDbParameterGroupPropertiesForPatchUpdate object itself. - */ - public HorizonDbParameterGroupPropertiesForPatchUpdate withApplyImmediately(Boolean applyImmediately) { - this.applyImmediately = applyImmediately; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("parameters", this.parameters, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeBooleanField("applyImmediately", this.applyImmediately); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HorizonDbParameterGroupPropertiesForPatchUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbParameterGroupPropertiesForPatchUpdate 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 HorizonDbParameterGroupPropertiesForPatchUpdate. - */ - public static HorizonDbParameterGroupPropertiesForPatchUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HorizonDbParameterGroupPropertiesForPatchUpdate deserializedHorizonDbParameterGroupPropertiesForPatchUpdate - = new HorizonDbParameterGroupPropertiesForPatchUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("parameters".equals(fieldName)) { - List parameters - = reader.readArray(reader1 -> ParameterProperties.fromJson(reader1)); - deserializedHorizonDbParameterGroupPropertiesForPatchUpdate.parameters = parameters; - } else if ("description".equals(fieldName)) { - deserializedHorizonDbParameterGroupPropertiesForPatchUpdate.description = reader.getString(); - } else if ("applyImmediately".equals(fieldName)) { - deserializedHorizonDbParameterGroupPropertiesForPatchUpdate.applyImmediately - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedHorizonDbParameterGroupPropertiesForPatchUpdate; - }); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbPoolProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbPoolProperties.java deleted file mode 100644 index 193c2e4c610fa..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbPoolProperties.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.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; - -/** - * Properties of a HorizonDB pool. - */ -@Immutable -public final class HorizonDbPoolProperties implements JsonSerializable { - /* - * The location of the HorizonDB pool. - */ - private String location; - - /* - * Current state of the pool. - */ - private State state; - - /* - * Number of replicas in the pool. - */ - private Integer replicaCount; - - /* - * The version of the HorizonDB pool. - */ - private String version; - - /* - * The create mode for the pool. - */ - private CreateModePool createMode; - - /* - * The provisioning state of the pool. - */ - private ProvisioningState provisioningState; - - /** - * Creates an instance of HorizonDbPoolProperties class. - */ - private HorizonDbPoolProperties() { - } - - /** - * Get the location property: The location of the HorizonDB pool. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Get the state property: Current state of the pool. - * - * @return the state value. - */ - public State state() { - return this.state; - } - - /** - * Get the replicaCount property: Number of replicas in the pool. - * - * @return the replicaCount value. - */ - public Integer replicaCount() { - return this.replicaCount; - } - - /** - * Get the version property: The version of the HorizonDB pool. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Get the createMode property: The create mode for the pool. - * - * @return the createMode value. - */ - public CreateModePool createMode() { - return this.createMode; - } - - /** - * Get the provisioningState property: The provisioning state of the pool. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", this.location); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HorizonDbPoolProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbPoolProperties 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 HorizonDbPoolProperties. - */ - public static HorizonDbPoolProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HorizonDbPoolProperties deserializedHorizonDbPoolProperties = new HorizonDbPoolProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("location".equals(fieldName)) { - deserializedHorizonDbPoolProperties.location = reader.getString(); - } else if ("state".equals(fieldName)) { - deserializedHorizonDbPoolProperties.state = State.fromString(reader.getString()); - } else if ("replicaCount".equals(fieldName)) { - deserializedHorizonDbPoolProperties.replicaCount = reader.getNullable(JsonReader::getInt); - } else if ("version".equals(fieldName)) { - deserializedHorizonDbPoolProperties.version = reader.getString(); - } else if ("createMode".equals(fieldName)) { - deserializedHorizonDbPoolProperties.createMode = CreateModePool.fromString(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedHorizonDbPoolProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedHorizonDbPoolProperties; - }); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbReplicaProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbReplicaProperties.java deleted file mode 100644 index 1b3b1ec15fb77..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbReplicaProperties.java +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.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; - -/** - * Properties of a HorizonDB replica. - */ -@Fluent -public final class HorizonDbReplicaProperties implements JsonSerializable { - /* - * Role of the replica. - */ - private ReplicaRole role; - - /* - * Current status of the replica. - */ - private State status; - - /* - * The fully qualified domain name of the replica. - */ - private String fullyQualifiedDomainName; - - /* - * The availability zone of the replica. - */ - private String availabilityZone; - - /* - * The provisioning state of the replica. - */ - private ProvisioningState provisioningState; - - /** - * Creates an instance of HorizonDbReplicaProperties class. - */ - public HorizonDbReplicaProperties() { - } - - /** - * Get the role property: Role of the replica. - * - * @return the role value. - */ - public ReplicaRole role() { - return this.role; - } - - /** - * Set the role property: Role of the replica. - * - * @param role the role value to set. - * @return the HorizonDbReplicaProperties object itself. - */ - public HorizonDbReplicaProperties withRole(ReplicaRole role) { - this.role = role; - return this; - } - - /** - * Get the status property: Current status of the replica. - * - * @return the status value. - */ - public State status() { - return this.status; - } - - /** - * Get the fullyQualifiedDomainName property: The fully qualified domain name of the replica. - * - * @return the fullyQualifiedDomainName value. - */ - public String fullyQualifiedDomainName() { - return this.fullyQualifiedDomainName; - } - - /** - * Get the availabilityZone property: The availability zone of the replica. - * - * @return the availabilityZone value. - */ - public String availabilityZone() { - return this.availabilityZone; - } - - /** - * Set the availabilityZone property: The availability zone of the replica. - * - * @param availabilityZone the availabilityZone value to set. - * @return the HorizonDbReplicaProperties object itself. - */ - public HorizonDbReplicaProperties withAvailabilityZone(String availabilityZone) { - this.availabilityZone = availabilityZone; - return this; - } - - /** - * Get the provisioningState property: The provisioning state of the replica. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("role", this.role == null ? null : this.role.toString()); - jsonWriter.writeStringField("availabilityZone", this.availabilityZone); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HorizonDbReplicaProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbReplicaProperties 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 HorizonDbReplicaProperties. - */ - public static HorizonDbReplicaProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HorizonDbReplicaProperties deserializedHorizonDbReplicaProperties = new HorizonDbReplicaProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("role".equals(fieldName)) { - deserializedHorizonDbReplicaProperties.role = ReplicaRole.fromString(reader.getString()); - } else if ("status".equals(fieldName)) { - deserializedHorizonDbReplicaProperties.status = State.fromString(reader.getString()); - } else if ("fullyQualifiedDomainName".equals(fieldName)) { - deserializedHorizonDbReplicaProperties.fullyQualifiedDomainName = reader.getString(); - } else if ("availabilityZone".equals(fieldName)) { - deserializedHorizonDbReplicaProperties.availabilityZone = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedHorizonDbReplicaProperties.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedHorizonDbReplicaProperties; - }); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbReplicaPropertiesForPatchUpdate.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbReplicaPropertiesForPatchUpdate.java deleted file mode 100644 index 6fbdc3ef4a24e..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbReplicaPropertiesForPatchUpdate.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.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; - -/** - * Properties of a HorizonDB replica for update operations. - */ -@Fluent -public final class HorizonDbReplicaPropertiesForPatchUpdate - implements JsonSerializable { - /* - * Role of the replica. - */ - private ReplicaRole role; - - /** - * Creates an instance of HorizonDbReplicaPropertiesForPatchUpdate class. - */ - public HorizonDbReplicaPropertiesForPatchUpdate() { - } - - /** - * Get the role property: Role of the replica. - * - * @return the role value. - */ - public ReplicaRole role() { - return this.role; - } - - /** - * Set the role property: Role of the replica. - * - * @param role the role value to set. - * @return the HorizonDbReplicaPropertiesForPatchUpdate object itself. - */ - public HorizonDbReplicaPropertiesForPatchUpdate withRole(ReplicaRole role) { - this.role = role; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("role", this.role == null ? null : this.role.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HorizonDbReplicaPropertiesForPatchUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbReplicaPropertiesForPatchUpdate 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 HorizonDbReplicaPropertiesForPatchUpdate. - */ - public static HorizonDbReplicaPropertiesForPatchUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HorizonDbReplicaPropertiesForPatchUpdate deserializedHorizonDbReplicaPropertiesForPatchUpdate - = new HorizonDbReplicaPropertiesForPatchUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("role".equals(fieldName)) { - deserializedHorizonDbReplicaPropertiesForPatchUpdate.role - = ReplicaRole.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedHorizonDbReplicaPropertiesForPatchUpdate; - }); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/IdentityAssignment.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/IdentityAssignment.java new file mode 100644 index 0000000000000..bf8bf580db52c --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/IdentityAssignment.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.horizondb.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.horizondb.fluent.models.IdentityAssignmentInner; + +/** + * An immutable client-side representation of IdentityAssignment. + */ +public interface IdentityAssignment { + /** + * 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. + */ + ChangeDataCaptureIdentityAssignmentProperties properties(); + + /** + * Gets the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + String eTag(); + + /** + * 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.horizondb.fluent.models.IdentityAssignmentInner object. + * + * @return the inner object. + */ + IdentityAssignmentInner innerModel(); + + /** + * The entirety of the IdentityAssignment definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The IdentityAssignment definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the IdentityAssignment definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the IdentityAssignment definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, clusterName, destinationName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param destinationName The caller-selected name of the change data capture destination. + * @return the next definition stage. + */ + WithCreate withExistingChangeDataCaptureDestination(String resourceGroupName, String clusterName, + String destinationName); + } + + /** + * The stage of the IdentityAssignment 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. + */ + IdentityAssignment create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + IdentityAssignment create(Context context); + } + + /** + * The stage of the IdentityAssignment 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(ChangeDataCaptureIdentityAssignmentProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + IdentityAssignment refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + IdentityAssignment refresh(Context context); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbReplicas.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/IdentityAssignments.java similarity index 62% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbReplicas.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/IdentityAssignments.java index 9b9819f769329..4d061503c1975 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbReplicas.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/IdentityAssignments.java @@ -9,119 +9,120 @@ import com.azure.core.util.Context; /** - * Resource collection API of HorizonDbReplicas. + * Resource collection API of IdentityAssignments. */ -public interface HorizonDbReplicas { +public interface IdentityAssignments { /** - * Gets information about a HorizonDB replica. + * Gets a change data capture identity assignment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB replica along with {@link Response}. + * @return a change data capture identity assignment along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String clusterName, String poolName, - String replicaName, Context context); + Response getWithResponse(String resourceGroupName, String clusterName, String destinationName, + String assignmentName, Context context); /** - * Gets information about a HorizonDB replica. + * Gets a change data capture identity assignment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB replica. + * @return a change data capture identity assignment. */ - HorizonDbReplica get(String resourceGroupName, String clusterName, String poolName, String replicaName); + IdentityAssignment get(String resourceGroupName, String clusterName, String destinationName, String assignmentName); /** - * Lists all HorizonDB replicas in a pool. + * Deletes an inactive change data capture identity assignment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbReplica list operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String clusterName, String poolName); + void delete(String resourceGroupName, String clusterName, String destinationName, String assignmentName); /** - * Lists all HorizonDB replicas in a pool. + * Deletes an inactive change data capture identity assignment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. + * @param destinationName The caller-selected name of the change data capture destination. + * @param assignmentName The caller-selected name of the identity assignment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbReplica list operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String clusterName, String poolName, + void delete(String resourceGroupName, String clusterName, String destinationName, String assignmentName, Context context); /** - * Deletes a HorizonDB replica. + * Lists identity assignments for a change data capture destination. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. + * @param destinationName The caller-selected name of the change data capture destination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a IdentityAssignment list operation as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String clusterName, String poolName, String replicaName); + PagedIterable list(String resourceGroupName, String clusterName, String destinationName); /** - * Deletes a HorizonDB replica. + * Lists identity assignments for a change data capture destination. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. - * @param poolName The name of the HorizonDB pool. - * @param replicaName The name of the HorizonDB replica. + * @param destinationName The caller-selected name of the change data capture destination. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a IdentityAssignment list operation as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String clusterName, String poolName, String replicaName, Context context); + PagedIterable list(String resourceGroupName, String clusterName, String destinationName, + Context context); /** - * Gets information about a HorizonDB replica. + * Gets a change data capture identity assignment. * * @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 information about a HorizonDB replica along with {@link Response}. + * @return a change data capture identity assignment along with {@link Response}. */ - HorizonDbReplica getById(String id); + IdentityAssignment getById(String id); /** - * Gets information about a HorizonDB replica. + * Gets a change data capture identity assignment. * * @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 information about a HorizonDB replica along with {@link Response}. + * @return a change data capture identity assignment along with {@link Response}. */ - Response getByIdWithResponse(String id, Context context); + Response getByIdWithResponse(String id, Context context); /** - * Deletes a HorizonDB replica. + * Deletes an inactive change data capture identity assignment. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -131,7 +132,7 @@ PagedIterable list(String resourceGroupName, String clusterNam void deleteById(String id); /** - * Deletes a HorizonDB replica. + * Deletes an inactive change data capture identity assignment. * * @param id the resource ID. * @param context The context to associate with this operation. @@ -142,10 +143,10 @@ PagedIterable list(String resourceGroupName, String clusterNam void deleteByIdWithResponse(String id, Context context); /** - * Begins definition for a new HorizonDbReplica resource. + * Begins definition for a new IdentityAssignment resource. * * @param name resource name. - * @return the first stage of the new HorizonDbReplica definition. + * @return the first stage of the new IdentityAssignment definition. */ - HorizonDbReplica.DefinitionStages.Blank define(String name); + IdentityAssignment.DefinitionStages.Blank define(String name); } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/IdentityValidationStatus.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/IdentityValidationStatus.java new file mode 100644 index 0000000000000..530aa0a8acdaa --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/IdentityValidationStatus.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.horizondb.models; + +import com.azure.core.annotation.Immutable; +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; + +/** + * The current validation result for a change data capture identity assignment. + */ +@Immutable +public final class IdentityValidationStatus implements JsonSerializable { + /* + * The current validation state. + */ + private ChangeDataCaptureIdentityValidationState state; + + /* + * The date and time, in UTC, when validation most recently completed. + */ + private OffsetDateTime validatedAtUtc; + + /* + * The customer-safe validation error when validation failed. + */ + private ManagementError error; + + /** + * Creates an instance of IdentityValidationStatus class. + */ + private IdentityValidationStatus() { + } + + /** + * Get the state property: The current validation state. + * + * @return the state value. + */ + public ChangeDataCaptureIdentityValidationState state() { + return this.state; + } + + /** + * Get the validatedAtUtc property: The date and time, in UTC, when validation most recently completed. + * + * @return the validatedAtUtc value. + */ + public OffsetDateTime validatedAtUtc() { + return this.validatedAtUtc; + } + + /** + * Get the error property: The customer-safe validation error when validation failed. + * + * @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 IdentityValidationStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IdentityValidationStatus 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 IdentityValidationStatus. + */ + public static IdentityValidationStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IdentityValidationStatus deserializedIdentityValidationStatus = new IdentityValidationStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedIdentityValidationStatus.state + = ChangeDataCaptureIdentityValidationState.fromString(reader.getString()); + } else if ("validatedAtUtc".equals(fieldName)) { + deserializedIdentityValidationStatus.validatedAtUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("error".equals(fieldName)) { + deserializedIdentityValidationStatus.error = ManagementError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedIdentityValidationStatus; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogCaptureConfiguration.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogCaptureConfiguration.java new file mode 100644 index 0000000000000..9a68a757a12c0 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogCaptureConfiguration.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.horizondb.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.horizondb.fluent.models.LogCaptureConfigurationInner; + +/** + * An immutable client-side representation of LogCaptureConfiguration. + */ +public interface LogCaptureConfiguration { + /** + * 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. + */ + LogCaptureConfigurationProperties 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.horizondb.fluent.models.LogCaptureConfigurationInner object. + * + * @return the inner object. + */ + LogCaptureConfigurationInner innerModel(); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogCaptureConfigurationForPatchUpdate.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogCaptureConfigurationForPatchUpdate.java new file mode 100644 index 0000000000000..a479da9e79e07 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogCaptureConfigurationForPatchUpdate.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.horizondb.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A sparse update request for a log capture configuration. + */ +@Fluent +public final class LogCaptureConfigurationForPatchUpdate + implements JsonSerializable { + /* + * The log capture properties to update. + */ + private LogCaptureConfigurationPropertiesForPatchUpdate properties; + + /** + * Creates an instance of LogCaptureConfigurationForPatchUpdate class. + */ + public LogCaptureConfigurationForPatchUpdate() { + } + + /** + * Get the properties property: The log capture properties to update. + * + * @return the properties value. + */ + public LogCaptureConfigurationPropertiesForPatchUpdate properties() { + return this.properties; + } + + /** + * Set the properties property: The log capture properties to update. + * + * @param properties the properties value to set. + * @return the LogCaptureConfigurationForPatchUpdate object itself. + */ + public LogCaptureConfigurationForPatchUpdate + withProperties(LogCaptureConfigurationPropertiesForPatchUpdate 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 LogCaptureConfigurationForPatchUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LogCaptureConfigurationForPatchUpdate 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 LogCaptureConfigurationForPatchUpdate. + */ + public static LogCaptureConfigurationForPatchUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LogCaptureConfigurationForPatchUpdate deserializedLogCaptureConfigurationForPatchUpdate + = new LogCaptureConfigurationForPatchUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedLogCaptureConfigurationForPatchUpdate.properties + = LogCaptureConfigurationPropertiesForPatchUpdate.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedLogCaptureConfigurationForPatchUpdate; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogCaptureConfigurationProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogCaptureConfigurationProperties.java new file mode 100644 index 0000000000000..7ba49174708a0 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogCaptureConfigurationProperties.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The settings for capturing a specific type of HorizonDB log. + */ +@Immutable +public final class LogCaptureConfigurationProperties implements JsonSerializable { + /* + * Specifies whether HorizonDB captures this type of log. Disabling capture stops the production of new log files; + * existing files remain available until their retention period expires. + */ + private LogCaptureState state; + + /* + * The number of days captured log files are retained. + */ + private int retentionDays; + + /* + * The provisioning state of the log capture configuration. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of LogCaptureConfigurationProperties class. + */ + private LogCaptureConfigurationProperties() { + } + + /** + * Get the state property: Specifies whether HorizonDB captures this type of log. Disabling capture stops the + * production of new log files; existing files remain available until their retention period expires. + * + * @return the state value. + */ + public LogCaptureState state() { + return this.state; + } + + /** + * Get the retentionDays property: The number of days captured log files are retained. + * + * @return the retentionDays value. + */ + public int retentionDays() { + return this.retentionDays; + } + + /** + * Get the provisioningState property: The provisioning state of the log capture configuration. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + jsonWriter.writeIntField("retentionDays", this.retentionDays); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LogCaptureConfigurationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LogCaptureConfigurationProperties 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 LogCaptureConfigurationProperties. + */ + public static LogCaptureConfigurationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LogCaptureConfigurationProperties deserializedLogCaptureConfigurationProperties + = new LogCaptureConfigurationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedLogCaptureConfigurationProperties.state + = LogCaptureState.fromString(reader.getString()); + } else if ("retentionDays".equals(fieldName)) { + deserializedLogCaptureConfigurationProperties.retentionDays = reader.getInt(); + } else if ("provisioningState".equals(fieldName)) { + deserializedLogCaptureConfigurationProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedLogCaptureConfigurationProperties; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogCaptureConfigurationPropertiesForPatchUpdate.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogCaptureConfigurationPropertiesForPatchUpdate.java new file mode 100644 index 0000000000000..42e4d799528af --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogCaptureConfigurationPropertiesForPatchUpdate.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.horizondb.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; + +/** + * Properties for updating the log capture configuration. Omitted properties preserve their current values. + */ +@Fluent +public final class LogCaptureConfigurationPropertiesForPatchUpdate + implements JsonSerializable { + /* + * Specifies whether HorizonDB captures this type of log. Disabling capture stops the production of new log files; + * existing files remain available until their retention period expires. + */ + private LogCaptureState state; + + /* + * The number of days captured log files are retained. + */ + private Integer retentionDays; + + /** + * Creates an instance of LogCaptureConfigurationPropertiesForPatchUpdate class. + */ + public LogCaptureConfigurationPropertiesForPatchUpdate() { + } + + /** + * Get the state property: Specifies whether HorizonDB captures this type of log. Disabling capture stops the + * production of new log files; existing files remain available until their retention period expires. + * + * @return the state value. + */ + public LogCaptureState state() { + return this.state; + } + + /** + * Set the state property: Specifies whether HorizonDB captures this type of log. Disabling capture stops the + * production of new log files; existing files remain available until their retention period expires. + * + * @param state the state value to set. + * @return the LogCaptureConfigurationPropertiesForPatchUpdate object itself. + */ + public LogCaptureConfigurationPropertiesForPatchUpdate withState(LogCaptureState state) { + this.state = state; + return this; + } + + /** + * Get the retentionDays property: The number of days captured log files are retained. + * + * @return the retentionDays value. + */ + public Integer retentionDays() { + return this.retentionDays; + } + + /** + * Set the retentionDays property: The number of days captured log files are retained. + * + * @param retentionDays the retentionDays value to set. + * @return the LogCaptureConfigurationPropertiesForPatchUpdate object itself. + */ + public LogCaptureConfigurationPropertiesForPatchUpdate withRetentionDays(Integer retentionDays) { + this.retentionDays = retentionDays; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + jsonWriter.writeNumberField("retentionDays", this.retentionDays); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LogCaptureConfigurationPropertiesForPatchUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LogCaptureConfigurationPropertiesForPatchUpdate 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 LogCaptureConfigurationPropertiesForPatchUpdate. + */ + public static LogCaptureConfigurationPropertiesForPatchUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LogCaptureConfigurationPropertiesForPatchUpdate deserializedLogCaptureConfigurationPropertiesForPatchUpdate + = new LogCaptureConfigurationPropertiesForPatchUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedLogCaptureConfigurationPropertiesForPatchUpdate.state + = LogCaptureState.fromString(reader.getString()); + } else if ("retentionDays".equals(fieldName)) { + deserializedLogCaptureConfigurationPropertiesForPatchUpdate.retentionDays + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedLogCaptureConfigurationPropertiesForPatchUpdate; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogCaptureConfigurations.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogCaptureConfigurations.java new file mode 100644 index 0000000000000..ce5a9380738ab --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogCaptureConfigurations.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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 LogCaptureConfigurations. + */ +public interface LogCaptureConfigurations { + /** + * Gets a log capture configuration for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logCaptureConfigurationName The name of the LogCaptureConfiguration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a log capture configuration for a HorizonDB cluster along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String clusterName, + String logCaptureConfigurationName, Context context); + + /** + * Gets a log capture configuration for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logCaptureConfigurationName The name of the LogCaptureConfiguration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a log capture configuration for a HorizonDB cluster. + */ + LogCaptureConfiguration get(String resourceGroupName, String clusterName, String logCaptureConfigurationName); + + /** + * Updates a log capture configuration. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logCaptureConfigurationName The name of the LogCaptureConfiguration. + * @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 a predefined log capture configuration created by the service for a HorizonDB cluster. + */ + LogCaptureConfiguration update(String resourceGroupName, String clusterName, String logCaptureConfigurationName, + LogCaptureConfigurationForPatchUpdate properties); + + /** + * Updates a log capture configuration. Omitted properties preserve their current values. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logCaptureConfigurationName The name of the LogCaptureConfiguration. + * @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 a predefined log capture configuration created by the service for a HorizonDB cluster. + */ + LogCaptureConfiguration update(String resourceGroupName, String clusterName, String logCaptureConfigurationName, + LogCaptureConfigurationForPatchUpdate properties, Context context); + + /** + * Lists the log capture configurations for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 LogCaptureConfiguration list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String clusterName); + + /** + * Lists the log capture configurations for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 LogCaptureConfiguration list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String clusterName, Context context); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogCaptureState.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogCaptureState.java new file mode 100644 index 0000000000000..bbe2d193a68d3 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogCaptureState.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies whether HorizonDB captures log files. + */ +public final class LogCaptureState extends ExpandableStringEnum { + /** + * Log capture is enabled. + */ + public static final LogCaptureState ENABLED = fromString("Enabled"); + + /** + * Log capture is disabled. + */ + public static final LogCaptureState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of LogCaptureState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LogCaptureState() { + } + + /** + * Creates or finds a LogCaptureState from its string representation. + * + * @param name a name to look for. + * @return the corresponding LogCaptureState. + */ + public static LogCaptureState fromString(String name) { + return fromString(name, LogCaptureState.class); + } + + /** + * Gets known LogCaptureState values. + * + * @return known LogCaptureState values. + */ + public static Collection values() { + return values(LogCaptureState.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogFile.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogFile.java new file mode 100644 index 0000000000000..ebf19a75898d5 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogFile.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.horizondb.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.horizondb.fluent.models.LogFileInner; + +/** + * An immutable client-side representation of LogFile. + */ +public interface LogFile { + /** + * 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. + */ + LogFileProperties 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.horizondb.fluent.models.LogFileInner object. + * + * @return the inner object. + */ + LogFileInner innerModel(); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogFileDownloadUrl.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogFileDownloadUrl.java new file mode 100644 index 0000000000000..95baca9aaa0d4 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogFileDownloadUrl.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.horizondb.models; + +import com.azure.resourcemanager.horizondb.fluent.models.LogFileDownloadUrlInner; +import java.time.OffsetDateTime; + +/** + * An immutable client-side representation of LogFileDownloadUrl. + */ +public interface LogFileDownloadUrl { + /** + * Gets the downloadUri property: A short-lived signed URL from which the original log file can be downloaded. + * + * @return the downloadUri value. + */ + String downloadUri(); + + /** + * Gets the expiresAtUtc property: The date and time when the signed download URL expires, in UTC. + * + * @return the expiresAtUtc value. + */ + OffsetDateTime expiresAtUtc(); + + /** + * Gets the inner com.azure.resourcemanager.horizondb.fluent.models.LogFileDownloadUrlInner object. + * + * @return the inner object. + */ + LogFileDownloadUrlInner innerModel(); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogFileProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogFileProperties.java new file mode 100644 index 0000000000000..a2e4d4cbd37c4 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogFileProperties.java @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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; + +/** + * Metadata for a service-generated HorizonDB log file. + */ +@Immutable +public final class LogFileProperties implements JsonSerializable { + /* + * The type of the captured log file. + */ + private LogFileType logType; + + /* + * The date and time when the log file was created, in UTC. + */ + private OffsetDateTime createdAtUtc; + + /* + * The date and time when the log file was last modified, in UTC. + */ + private OffsetDateTime lastModifiedAtUtc; + + /* + * The date and time when the log file expires according to its retention period, in UTC. + */ + private OffsetDateTime retentionExpiresAtUtc; + + /* + * Whether the platform can still append to or otherwise modify the log file. + */ + private boolean isMutable; + + /* + * The size of the log file in kilobytes, where one kilobyte is 1024 bytes. + */ + private long sizeInKilobytes; + + /* + * The name of the HorizonDB pool that the node generating the log file belongs to. + */ + private String pool; + + /* + * The node that generated the log file in the HorizonDB cluster. + */ + private String node; + + /* + * The role performed by the node that generated the log file. + */ + private NodeRole role; + + /** + * Creates an instance of LogFileProperties class. + */ + private LogFileProperties() { + } + + /** + * Get the logType property: The type of the captured log file. + * + * @return the logType value. + */ + public LogFileType logType() { + return this.logType; + } + + /** + * Get the createdAtUtc property: The date and time when the log file was created, in UTC. + * + * @return the createdAtUtc value. + */ + public OffsetDateTime createdAtUtc() { + return this.createdAtUtc; + } + + /** + * Get the lastModifiedAtUtc property: The date and time when the log file was last modified, in UTC. + * + * @return the lastModifiedAtUtc value. + */ + public OffsetDateTime lastModifiedAtUtc() { + return this.lastModifiedAtUtc; + } + + /** + * Get the retentionExpiresAtUtc property: The date and time when the log file expires according to its retention + * period, in UTC. + * + * @return the retentionExpiresAtUtc value. + */ + public OffsetDateTime retentionExpiresAtUtc() { + return this.retentionExpiresAtUtc; + } + + /** + * Get the isMutable property: Whether the platform can still append to or otherwise modify the log file. + * + * @return the isMutable value. + */ + public boolean isMutable() { + return this.isMutable; + } + + /** + * Get the sizeInKilobytes property: The size of the log file in kilobytes, where one kilobyte is 1024 bytes. + * + * @return the sizeInKilobytes value. + */ + public long sizeInKilobytes() { + return this.sizeInKilobytes; + } + + /** + * Get the pool property: The name of the HorizonDB pool that the node generating the log file belongs to. + * + * @return the pool value. + */ + public String pool() { + return this.pool; + } + + /** + * Get the node property: The node that generated the log file in the HorizonDB cluster. + * + * @return the node value. + */ + public String node() { + return this.node; + } + + /** + * Get the role property: The role performed by the node that generated the log file. + * + * @return the role value. + */ + public NodeRole role() { + return this.role; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LogFileProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LogFileProperties 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 LogFileProperties. + */ + public static LogFileProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LogFileProperties deserializedLogFileProperties = new LogFileProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("logType".equals(fieldName)) { + deserializedLogFileProperties.logType = LogFileType.fromString(reader.getString()); + } else if ("createdAtUtc".equals(fieldName)) { + deserializedLogFileProperties.createdAtUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastModifiedAtUtc".equals(fieldName)) { + deserializedLogFileProperties.lastModifiedAtUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("retentionExpiresAtUtc".equals(fieldName)) { + deserializedLogFileProperties.retentionExpiresAtUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("isMutable".equals(fieldName)) { + deserializedLogFileProperties.isMutable = reader.getBoolean(); + } else if ("sizeInKilobytes".equals(fieldName)) { + deserializedLogFileProperties.sizeInKilobytes = reader.getLong(); + } else if ("pool".equals(fieldName)) { + deserializedLogFileProperties.pool = reader.getString(); + } else if ("node".equals(fieldName)) { + deserializedLogFileProperties.node = reader.getString(); + } else if ("role".equals(fieldName)) { + deserializedLogFileProperties.role = NodeRole.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedLogFileProperties; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogFileType.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogFileType.java new file mode 100644 index 0000000000000..85625bc5f7868 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogFileType.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of a captured HorizonDB log file. + */ +public final class LogFileType extends ExpandableStringEnum { + /** + * A PostgreSQL server log file. + */ + public static final LogFileType POSTGRE_SQL_SERVER = fromString("PostgreSqlServer"); + + /** + * Creates a new instance of LogFileType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LogFileType() { + } + + /** + * Creates or finds a LogFileType from its string representation. + * + * @param name a name to look for. + * @return the corresponding LogFileType. + */ + public static LogFileType fromString(String name) { + return fromString(name, LogFileType.class); + } + + /** + * Gets known LogFileType values. + * + * @return known LogFileType values. + */ + public static Collection values() { + return values(LogFileType.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogFiles.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogFiles.java new file mode 100644 index 0000000000000..b0ef01c3e5cdc --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/LogFiles.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.horizondb.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 LogFiles. + */ +public interface LogFiles { + /** + * Gets metadata for a captured HorizonDB log file. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logFileName The name of the LogFile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return metadata for a captured HorizonDB log file along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String clusterName, String logFileName, + Context context); + + /** + * Gets metadata for a captured HorizonDB log file. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logFileName The name of the LogFile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return metadata for a captured HorizonDB log file. + */ + LogFile get(String resourceGroupName, String clusterName, String logFileName); + + /** + * Lists captured log files for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 LogFile list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String clusterName); + + /** + * Lists captured log files for a HorizonDB cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 LogFile list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String clusterName, Context context); + + /** + * Gets a short-lived signed URL for downloading a captured log file. The signed URL is returned only by this action + * so routine resource GET and LIST responses do not expose bearer credentials. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logFileName The name of the LogFile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a short-lived signed URL for downloading a captured log file along with {@link Response}. + */ + Response listDownloadUrlsWithResponse(String resourceGroupName, String clusterName, + String logFileName, Context context); + + /** + * Gets a short-lived signed URL for downloading a captured log file. The signed URL is returned only by this action + * so routine resource GET and LIST responses do not expose bearer credentials. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param logFileName The name of the LogFile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a short-lived signed URL for downloading a captured log file. + */ + LogFileDownloadUrl listDownloadUrls(String resourceGroupName, String clusterName, String logFileName); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MaintenanceEvent.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MaintenanceEvent.java new file mode 100644 index 0000000000000..38cbd27ca43b7 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MaintenanceEvent.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.horizondb.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.horizondb.fluent.models.MaintenanceEventInner; + +/** + * An immutable client-side representation of MaintenanceEvent. + */ +public interface MaintenanceEvent { + /** + * 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. + */ + MaintenanceEventProperties 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.horizondb.fluent.models.MaintenanceEventInner object. + * + * @return the inner object. + */ + MaintenanceEventInner innerModel(); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MaintenanceEventActionResponse.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MaintenanceEventActionResponse.java new file mode 100644 index 0000000000000..287ca1a829cd2 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MaintenanceEventActionResponse.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.horizondb.models; + +import com.azure.resourcemanager.horizondb.fluent.models.MaintenanceEventActionResponseInner; +import java.time.OffsetDateTime; + +/** + * An immutable client-side representation of MaintenanceEventActionResponse. + */ +public interface MaintenanceEventActionResponse { + /** + * Gets the maintenanceEventId property: The maintenance event identifier. + * + * @return the maintenanceEventId value. + */ + String maintenanceEventId(); + + /** + * Gets the poolResourceId property: The full Azure resource ID of the HorizonDB pool. + * + * @return the poolResourceId value. + */ + String poolResourceId(); + + /** + * Gets the status property: The status of the maintenance event. + * + * @return the status value. + */ + MaintenanceEventStatus status(); + + /** + * Gets the plannedStartTimeUtc property: The planned start time of the maintenance event in UTC. + * + * @return the plannedStartTimeUtc value. + */ + OffsetDateTime plannedStartTimeUtc(); + + /** + * Gets the plannedEndTimeUtc property: The planned end time of the maintenance event in UTC. + * + * @return the plannedEndTimeUtc value. + */ + OffsetDateTime plannedEndTimeUtc(); + + /** + * Gets the appliedNow property: Indicates whether the maintenance event was requested to be applied immediately. + * The value is true for apply-now and false for reschedule. + * + * @return the appliedNow value. + */ + Boolean appliedNow(); + + /** + * Gets the lastUpdatedTimeUtc property: The time when this maintenance event record was last updated, in UTC. + * + * @return the lastUpdatedTimeUtc value. + */ + OffsetDateTime lastUpdatedTimeUtc(); + + /** + * Gets the inner com.azure.resourcemanager.horizondb.fluent.models.MaintenanceEventActionResponseInner object. + * + * @return the inner object. + */ + MaintenanceEventActionResponseInner innerModel(); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MaintenanceEventProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MaintenanceEventProperties.java new file mode 100644 index 0000000000000..715d5a2fc36cb --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MaintenanceEventProperties.java @@ -0,0 +1,271 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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.Duration; +import java.time.OffsetDateTime; + +/** + * Properties of a maintenance event resource. + */ +@Immutable +public final class MaintenanceEventProperties implements JsonSerializable { + /* + * A service-generated identifier for this maintenance event, assigned by the platform. The format is not + * contractual, and clients should not attempt to parse or construct this value. + */ + private String maintenanceEventId; + + /* + * The maintenance type. + */ + private MaintenanceType maintenanceType; + + /* + * The human-readable description of the maintenance event. + */ + private String description; + + /* + * The customer-facing status of the maintenance event. + */ + private MaintenanceEventStatus status; + + /* + * The scheduled start time of the maintenance event in UTC. + */ + private OffsetDateTime startTimeUtc; + + /* + * The scheduled end time of the maintenance event in UTC. + */ + private OffsetDateTime endTimeUtc; + + /* + * The estimated downtime as an ISO 8601 duration string, for example, 'PT60S' for 60 seconds. + */ + private Duration estimatedDowntime; + + /* + * Indicates whether the customer can reschedule this maintenance event. + */ + private boolean deferrable; + + /* + * The latest date and time to which this maintenance event can be postponed, in UTC. This property is present only + * when deferrable is true. + */ + private OffsetDateTime deferralDeadlineUtc; + + /* + * The scheduled start time before the most recent reschedule, in UTC. This property is absent if the event has + * never been rescheduled. + */ + private OffsetDateTime rescheduledFromUtc; + + /* + * The time when this maintenance event record was last updated, in UTC. + */ + private OffsetDateTime lastUpdatedTimeUtc; + + /* + * The initially scheduled start time before any reschedule, in UTC. This value equals startTimeUtc when the event + * has never been rescheduled. + */ + private OffsetDateTime originalStartTimeUtc; + + /** + * Creates an instance of MaintenanceEventProperties class. + */ + private MaintenanceEventProperties() { + } + + /** + * Get the maintenanceEventId property: A service-generated identifier for this maintenance event, assigned by the + * platform. The format is not contractual, and clients should not attempt to parse or construct this value. + * + * @return the maintenanceEventId value. + */ + public String maintenanceEventId() { + return this.maintenanceEventId; + } + + /** + * Get the maintenanceType property: The maintenance type. + * + * @return the maintenanceType value. + */ + public MaintenanceType maintenanceType() { + return this.maintenanceType; + } + + /** + * Get the description property: The human-readable description of the maintenance event. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Get the status property: The customer-facing status of the maintenance event. + * + * @return the status value. + */ + public MaintenanceEventStatus status() { + return this.status; + } + + /** + * Get the startTimeUtc property: The scheduled start time of the maintenance event in UTC. + * + * @return the startTimeUtc value. + */ + public OffsetDateTime startTimeUtc() { + return this.startTimeUtc; + } + + /** + * Get the endTimeUtc property: The scheduled end time of the maintenance event in UTC. + * + * @return the endTimeUtc value. + */ + public OffsetDateTime endTimeUtc() { + return this.endTimeUtc; + } + + /** + * Get the estimatedDowntime property: The estimated downtime as an ISO 8601 duration string, for example, 'PT60S' + * for 60 seconds. + * + * @return the estimatedDowntime value. + */ + public Duration estimatedDowntime() { + return this.estimatedDowntime; + } + + /** + * Get the deferrable property: Indicates whether the customer can reschedule this maintenance event. + * + * @return the deferrable value. + */ + public boolean deferrable() { + return this.deferrable; + } + + /** + * Get the deferralDeadlineUtc property: The latest date and time to which this maintenance event can be postponed, + * in UTC. This property is present only when deferrable is true. + * + * @return the deferralDeadlineUtc value. + */ + public OffsetDateTime deferralDeadlineUtc() { + return this.deferralDeadlineUtc; + } + + /** + * Get the rescheduledFromUtc property: The scheduled start time before the most recent reschedule, in UTC. This + * property is absent if the event has never been rescheduled. + * + * @return the rescheduledFromUtc value. + */ + public OffsetDateTime rescheduledFromUtc() { + return this.rescheduledFromUtc; + } + + /** + * Get the lastUpdatedTimeUtc property: The time when this maintenance event record was last updated, in UTC. + * + * @return the lastUpdatedTimeUtc value. + */ + public OffsetDateTime lastUpdatedTimeUtc() { + return this.lastUpdatedTimeUtc; + } + + /** + * Get the originalStartTimeUtc property: The initially scheduled start time before any reschedule, in UTC. This + * value equals startTimeUtc when the event has never been rescheduled. + * + * @return the originalStartTimeUtc value. + */ + public OffsetDateTime originalStartTimeUtc() { + return this.originalStartTimeUtc; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceEventProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceEventProperties 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 MaintenanceEventProperties. + */ + public static MaintenanceEventProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceEventProperties deserializedMaintenanceEventProperties = new MaintenanceEventProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("maintenanceType".equals(fieldName)) { + deserializedMaintenanceEventProperties.maintenanceType + = MaintenanceType.fromString(reader.getString()); + } else if ("status".equals(fieldName)) { + deserializedMaintenanceEventProperties.status + = MaintenanceEventStatus.fromString(reader.getString()); + } else if ("startTimeUtc".equals(fieldName)) { + deserializedMaintenanceEventProperties.startTimeUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTimeUtc".equals(fieldName)) { + deserializedMaintenanceEventProperties.endTimeUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("deferrable".equals(fieldName)) { + deserializedMaintenanceEventProperties.deferrable = reader.getBoolean(); + } else if ("originalStartTimeUtc".equals(fieldName)) { + deserializedMaintenanceEventProperties.originalStartTimeUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("maintenanceEventId".equals(fieldName)) { + deserializedMaintenanceEventProperties.maintenanceEventId = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedMaintenanceEventProperties.description = reader.getString(); + } else if ("estimatedDowntime".equals(fieldName)) { + deserializedMaintenanceEventProperties.estimatedDowntime + = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); + } else if ("deferralDeadlineUtc".equals(fieldName)) { + deserializedMaintenanceEventProperties.deferralDeadlineUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("rescheduledFromUtc".equals(fieldName)) { + deserializedMaintenanceEventProperties.rescheduledFromUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastUpdatedTimeUtc".equals(fieldName)) { + deserializedMaintenanceEventProperties.lastUpdatedTimeUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceEventProperties; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MaintenanceEventRescheduleRequest.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MaintenanceEventRescheduleRequest.java new file mode 100644 index 0000000000000..335f2f9a42b86 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MaintenanceEventRescheduleRequest.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.horizondb.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.time.format.DateTimeFormatter; + +/** + * Parameters for rescheduling a maintenance event. + */ +@Fluent +public final class MaintenanceEventRescheduleRequest implements JsonSerializable { + /* + * The new start time in RFC 3339 format. + */ + private OffsetDateTime postponeToDateTimeUtc; + + /** + * Creates an instance of MaintenanceEventRescheduleRequest class. + */ + public MaintenanceEventRescheduleRequest() { + } + + /** + * Get the postponeToDateTimeUtc property: The new start time in RFC 3339 format. + * + * @return the postponeToDateTimeUtc value. + */ + public OffsetDateTime postponeToDateTimeUtc() { + return this.postponeToDateTimeUtc; + } + + /** + * Set the postponeToDateTimeUtc property: The new start time in RFC 3339 format. + * + * @param postponeToDateTimeUtc the postponeToDateTimeUtc value to set. + * @return the MaintenanceEventRescheduleRequest object itself. + */ + public MaintenanceEventRescheduleRequest withPostponeToDateTimeUtc(OffsetDateTime postponeToDateTimeUtc) { + this.postponeToDateTimeUtc = postponeToDateTimeUtc; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("postponeToDateTimeUtc", + this.postponeToDateTimeUtc == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.postponeToDateTimeUtc)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MaintenanceEventRescheduleRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MaintenanceEventRescheduleRequest 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 MaintenanceEventRescheduleRequest. + */ + public static MaintenanceEventRescheduleRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MaintenanceEventRescheduleRequest deserializedMaintenanceEventRescheduleRequest + = new MaintenanceEventRescheduleRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("postponeToDateTimeUtc".equals(fieldName)) { + deserializedMaintenanceEventRescheduleRequest.postponeToDateTimeUtc = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedMaintenanceEventRescheduleRequest; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MaintenanceEventStatus.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MaintenanceEventStatus.java new file mode 100644 index 0000000000000..7eb0c9711ebbe --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MaintenanceEventStatus.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The status of a maintenance event. + */ +public final class MaintenanceEventStatus extends ExpandableStringEnum { + /** + * The maintenance event is scheduled and has not yet started. + */ + public static final MaintenanceEventStatus PLANNED = fromString("Planned"); + + /** + * The maintenance event is currently in progress. + */ + public static final MaintenanceEventStatus IN_PROGRESS = fromString("InProgress"); + + /** + * The maintenance event completed successfully. + */ + public static final MaintenanceEventStatus COMPLETE = fromString("Complete"); + + /** + * The customer rescheduled the maintenance event. + */ + public static final MaintenanceEventStatus RESCHEDULED = fromString("Rescheduled"); + + /** + * The maintenance event was canceled, failed, or timed out. + */ + public static final MaintenanceEventStatus CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of MaintenanceEventStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MaintenanceEventStatus() { + } + + /** + * Creates or finds a MaintenanceEventStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding MaintenanceEventStatus. + */ + public static MaintenanceEventStatus fromString(String name) { + return fromString(name, MaintenanceEventStatus.class); + } + + /** + * Gets known MaintenanceEventStatus values. + * + * @return known MaintenanceEventStatus values. + */ + public static Collection values() { + return values(MaintenanceEventStatus.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MaintenanceEvents.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MaintenanceEvents.java new file mode 100644 index 0000000000000..ecc8ff66fb285 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MaintenanceEvents.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.horizondb.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 MaintenanceEvents. + */ +public interface MaintenanceEvents { + /** + * Gets information about a maintenance event for a HorizonDB pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a maintenance event for a HorizonDB pool along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String clusterName, String poolName, + String maintenanceEventId, Context context); + + /** + * Gets information about a maintenance event for a HorizonDB pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a maintenance event for a HorizonDB pool. + */ + MaintenanceEvent get(String resourceGroupName, String clusterName, String poolName, String maintenanceEventId); + + /** + * Lists maintenance events for a HorizonDB pool. Use the OData $filter query parameter to filter by + * properties/status with the eq and or operators. For example, properties/status eq 'Planned' or properties/status + * eq 'InProgress' returns upcoming events. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceEvent list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String clusterName, String poolName); + + /** + * Lists maintenance events for a HorizonDB pool. Use the OData $filter query parameter to filter by + * properties/status with the eq and or operators. For example, properties/status eq 'Planned' or properties/status + * eq 'InProgress' returns upcoming events. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param filter The OData filter expression to apply to the list operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a MaintenanceEvent list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String clusterName, String poolName, String filter, + Context context); + + /** + * Reschedules a maintenance event to a new date and time. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @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 from a maintenance event reschedule or apply-now action. + */ + MaintenanceEventActionResponse reschedule(String resourceGroupName, String clusterName, String poolName, + String maintenanceEventId, MaintenanceEventRescheduleRequest body); + + /** + * Reschedules a maintenance event to a new date and time. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @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 from a maintenance event reschedule or apply-now action. + */ + MaintenanceEventActionResponse reschedule(String resourceGroupName, String clusterName, String poolName, + String maintenanceEventId, MaintenanceEventRescheduleRequest body, Context context); + + /** + * Applies the maintenance event immediately. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from a maintenance event reschedule or apply-now action. + */ + MaintenanceEventActionResponse applyNow(String resourceGroupName, String clusterName, String poolName, + String maintenanceEventId); + + /** + * Applies the maintenance event immediately. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param maintenanceEventId The identifier of the maintenance event. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response from a maintenance event reschedule or apply-now action. + */ + MaintenanceEventActionResponse applyNow(String resourceGroupName, String clusterName, String poolName, + String maintenanceEventId, Context context); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MaintenanceType.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MaintenanceType.java new file mode 100644 index 0000000000000..426b54f1908c1 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MaintenanceType.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of a maintenance event. + */ +public final class MaintenanceType extends ExpandableStringEnum { + /** + * A planned maintenance event. + */ + public static final MaintenanceType PLANNED_MAINTENANCE = fromString("PlannedMaintenance"); + + /** + * Creates a new instance of MaintenanceType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MaintenanceType() { + } + + /** + * Creates or finds a MaintenanceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding MaintenanceType. + */ + public static MaintenanceType fromString(String name) { + return fromString(name, MaintenanceType.class); + } + + /** + * Gets known MaintenanceType values. + * + * @return known MaintenanceType values. + */ + public static Collection values() { + return values(MaintenanceType.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ManagedServiceIdentity.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ManagedServiceIdentity.java deleted file mode 100644 index 47743d33059fa..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ManagedServiceIdentity.java +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.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.Map; - -/** - * Managed service identity (system assigned and/or user assigned identities). - */ -@Fluent -public final class ManagedServiceIdentity implements JsonSerializable { - /* - * The service principal ID of the system assigned identity. This property will only be provided for a system - * assigned identity. - */ - private String principalId; - - /* - * The tenant ID of the system assigned identity. This property will only be provided for a system assigned - * identity. - */ - private String tenantId; - - /* - * The type of managed identity assigned to this resource. - */ - private ManagedServiceIdentityType type; - - /* - * The identities assigned to this resource by the user. - */ - private Map userAssignedIdentities; - - /** - * Creates an instance of ManagedServiceIdentity class. - */ - public ManagedServiceIdentity() { - } - - /** - * 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.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.tenantId; - } - - /** - * Get the type property: The type of managed identity assigned to this resource. - * - * @return the type value. - */ - public ManagedServiceIdentityType type() { - return this.type; - } - - /** - * 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. - */ - public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { - this.type = 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.userAssignedIdentities; - } - - /** - * 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. - */ - public ManagedServiceIdentity withUserAssignedIdentities(Map userAssignedIdentities) { - this.userAssignedIdentities = userAssignedIdentities; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedServiceIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedServiceIdentity 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 ManagedServiceIdentity. - */ - public static ManagedServiceIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedServiceIdentity deserializedManagedServiceIdentity = new ManagedServiceIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedManagedServiceIdentity.type = ManagedServiceIdentityType.fromString(reader.getString()); - } else if ("principalId".equals(fieldName)) { - deserializedManagedServiceIdentity.principalId = reader.getString(); - } else if ("tenantId".equals(fieldName)) { - deserializedManagedServiceIdentity.tenantId = reader.getString(); - } else if ("userAssignedIdentities".equals(fieldName)) { - Map userAssignedIdentities - = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1)); - deserializedManagedServiceIdentity.userAssignedIdentities = userAssignedIdentities; - } else { - reader.skipChildren(); - } - } - - return deserializedManagedServiceIdentity; - }); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ManagedServiceIdentityType.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ManagedServiceIdentityType.java deleted file mode 100644 index 92a725b0a3116..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ManagedServiceIdentityType.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - */ -public final class ManagedServiceIdentityType extends ExpandableStringEnum { - /** - * No managed identity. - */ - public static final ManagedServiceIdentityType NONE = fromString("None"); - - /** - * System assigned managed identity. - */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); - - /** - * User assigned managed identity. - */ - public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); - - /** - * System and user assigned managed identity. - */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED - = fromString("SystemAssigned,UserAssigned"); - - /** - * Creates a new instance of ManagedServiceIdentityType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ManagedServiceIdentityType() { - } - - /** - * Creates or finds a ManagedServiceIdentityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ManagedServiceIdentityType. - */ - public static ManagedServiceIdentityType fromString(String name) { - return fromString(name, ManagedServiceIdentityType.class); - } - - /** - * Gets known ManagedServiceIdentityType values. - * - * @return known ManagedServiceIdentityType values. - */ - public static Collection values() { - return values(ManagedServiceIdentityType.class); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAdministrator.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAdministrator.java new file mode 100644 index 0000000000000..3c2261dfdbc42 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAdministrator.java @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.horizondb.fluent.models.MicrosoftEntraAdministratorInner; + +/** + * An immutable client-side representation of MicrosoftEntraAdministrator. + */ +public interface MicrosoftEntraAdministrator { + /** + * 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. + */ + MicrosoftEntraAdministratorProperties 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.horizondb.fluent.models.MicrosoftEntraAdministratorInner object. + * + * @return the inner object. + */ + MicrosoftEntraAdministratorInner innerModel(); + + /** + * The entirety of the MicrosoftEntraAdministrator definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * The MicrosoftEntraAdministrator definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the MicrosoftEntraAdministrator definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the MicrosoftEntraAdministrator definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, clusterName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @return the next definition stage. + */ + WithProperties withExistingCluster(String resourceGroupName, String clusterName); + } + + /** + * The stage of the MicrosoftEntraAdministrator definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The PostgreSQL role and Microsoft Entra principal mapping properties.. + * + * @param properties The PostgreSQL role and Microsoft Entra principal mapping properties. + * @return the next definition stage. + */ + WithCreate withProperties(MicrosoftEntraAdministratorPropertiesForAdd properties); + } + + /** + * The stage of the MicrosoftEntraAdministrator 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 { + /** + * Executes the create request. + * + * @return the created resource. + */ + MicrosoftEntraAdministrator create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + MicrosoftEntraAdministrator create(Context context); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + MicrosoftEntraAdministrator refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + MicrosoftEntraAdministrator refresh(Context context); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbReplicaForPatchUpdate.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAdministratorAdd.java similarity index 51% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbReplicaForPatchUpdate.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAdministratorAdd.java index e6d26b868bd7f..49ef600198b7d 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbReplicaForPatchUpdate.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAdministratorAdd.java @@ -12,37 +12,38 @@ import java.io.IOException; /** - * HorizonDB replica for update operations. + * The request body for creating or updating a PostgreSQL role that is a member of azure_pg_admin and mapped to a + * Microsoft Entra principal. */ @Fluent -public final class HorizonDbReplicaForPatchUpdate implements JsonSerializable { +public final class MicrosoftEntraAdministratorAdd implements JsonSerializable { /* - * Properties of a HorizonDB replica for update operations. + * The PostgreSQL role and Microsoft Entra principal mapping properties. */ - private HorizonDbReplicaPropertiesForPatchUpdate properties; + private MicrosoftEntraAdministratorPropertiesForAdd properties; /** - * Creates an instance of HorizonDbReplicaForPatchUpdate class. + * Creates an instance of MicrosoftEntraAdministratorAdd class. */ - public HorizonDbReplicaForPatchUpdate() { + public MicrosoftEntraAdministratorAdd() { } /** - * Get the properties property: Properties of a HorizonDB replica for update operations. + * Get the properties property: The PostgreSQL role and Microsoft Entra principal mapping properties. * * @return the properties value. */ - public HorizonDbReplicaPropertiesForPatchUpdate properties() { + public MicrosoftEntraAdministratorPropertiesForAdd properties() { return this.properties; } /** - * Set the properties property: Properties of a HorizonDB replica for update operations. + * Set the properties property: The PostgreSQL role and Microsoft Entra principal mapping properties. * * @param properties the properties value to set. - * @return the HorizonDbReplicaForPatchUpdate object itself. + * @return the MicrosoftEntraAdministratorAdd object itself. */ - public HorizonDbReplicaForPatchUpdate withProperties(HorizonDbReplicaPropertiesForPatchUpdate properties) { + public MicrosoftEntraAdministratorAdd withProperties(MicrosoftEntraAdministratorPropertiesForAdd properties) { this.properties = properties; return this; } @@ -58,30 +59,31 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of HorizonDbReplicaForPatchUpdate from the JsonReader. + * Reads an instance of MicrosoftEntraAdministratorAdd from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbReplicaForPatchUpdate if the JsonReader was pointing to an instance of it, or + * @return An instance of MicrosoftEntraAdministratorAdd 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 HorizonDbReplicaForPatchUpdate. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MicrosoftEntraAdministratorAdd. */ - public static HorizonDbReplicaForPatchUpdate fromJson(JsonReader jsonReader) throws IOException { + public static MicrosoftEntraAdministratorAdd fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - HorizonDbReplicaForPatchUpdate deserializedHorizonDbReplicaForPatchUpdate - = new HorizonDbReplicaForPatchUpdate(); + MicrosoftEntraAdministratorAdd deserializedMicrosoftEntraAdministratorAdd + = new MicrosoftEntraAdministratorAdd(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("properties".equals(fieldName)) { - deserializedHorizonDbReplicaForPatchUpdate.properties - = HorizonDbReplicaPropertiesForPatchUpdate.fromJson(reader); + deserializedMicrosoftEntraAdministratorAdd.properties + = MicrosoftEntraAdministratorPropertiesForAdd.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedHorizonDbReplicaForPatchUpdate; + return deserializedMicrosoftEntraAdministratorAdd; }); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAdministratorProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAdministratorProperties.java new file mode 100644 index 0000000000000..1f7fc1e595ab4 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAdministratorProperties.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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; + +/** + * Properties of a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra principal. + */ +@Immutable +public final class MicrosoftEntraAdministratorProperties + implements JsonSerializable { + /* + * The display name or user principal name of the Microsoft Entra principal mapped to the PostgreSQL role. For + * users, this is typically the user principal name, such as admin@contoso.com. For groups, this is the group + * display name. For service principals, this is the application display name. + */ + private String principalName; + + /* + * The type of Microsoft Entra principal mapped to the PostgreSQL role. + */ + private PrincipalTypes principalType; + + /* + * The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented as an RFC 4122 + * GUID. On PUT requests, this value comes from the URI path parameter. + */ + private String objectId; + + /* + * The identifier of the Microsoft Entra tenant containing the mapped principal, represented as an RFC 4122 GUID. If + * omitted, this value defaults to the tenant of the subscription. + */ + private String tenantId; + + /* + * The provisioning state of the PostgreSQL role and Microsoft Entra principal mapping. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of MicrosoftEntraAdministratorProperties class. + */ + private MicrosoftEntraAdministratorProperties() { + } + + /** + * Get the principalName property: The display name or user principal name of the Microsoft Entra principal mapped + * to the PostgreSQL role. For users, this is typically the user principal name, such as admin@contoso.com. For + * groups, this is the group display name. For service principals, this is the application display name. + * + * @return the principalName value. + */ + public String principalName() { + return this.principalName; + } + + /** + * Get the principalType property: The type of Microsoft Entra principal mapped to the PostgreSQL role. + * + * @return the principalType value. + */ + public PrincipalTypes principalType() { + return this.principalType; + } + + /** + * Get the objectId property: The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, + * represented as an RFC 4122 GUID. On PUT requests, this value comes from the URI path parameter. + * + * @return the objectId value. + */ + public String objectId() { + return this.objectId; + } + + /** + * Get the tenantId property: The identifier of the Microsoft Entra tenant containing the mapped principal, + * represented as an RFC 4122 GUID. If omitted, this value defaults to the tenant of the subscription. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Get the provisioningState property: The provisioning state of the PostgreSQL role and Microsoft Entra principal + * mapping. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("principalName", this.principalName); + jsonWriter.writeStringField("principalType", this.principalType == null ? null : this.principalType.toString()); + jsonWriter.writeStringField("tenantId", this.tenantId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MicrosoftEntraAdministratorProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MicrosoftEntraAdministratorProperties 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 MicrosoftEntraAdministratorProperties. + */ + public static MicrosoftEntraAdministratorProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MicrosoftEntraAdministratorProperties deserializedMicrosoftEntraAdministratorProperties + = new MicrosoftEntraAdministratorProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalName".equals(fieldName)) { + deserializedMicrosoftEntraAdministratorProperties.principalName = reader.getString(); + } else if ("principalType".equals(fieldName)) { + deserializedMicrosoftEntraAdministratorProperties.principalType + = PrincipalTypes.fromString(reader.getString()); + } else if ("objectId".equals(fieldName)) { + deserializedMicrosoftEntraAdministratorProperties.objectId = reader.getString(); + } else if ("tenantId".equals(fieldName)) { + deserializedMicrosoftEntraAdministratorProperties.tenantId = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedMicrosoftEntraAdministratorProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedMicrosoftEntraAdministratorProperties; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAdministratorPropertiesForAdd.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAdministratorPropertiesForAdd.java new file mode 100644 index 0000000000000..4d8cd8a03bdb5 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAdministratorPropertiesForAdd.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.horizondb.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; + +/** + * Properties for creating or updating a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft + * Entra principal. + */ +@Fluent +public final class MicrosoftEntraAdministratorPropertiesForAdd + implements JsonSerializable { + /* + * The display name or user principal name of the Microsoft Entra principal to map to the PostgreSQL role. For + * users, this is typically the user principal name, such as admin@contoso.com. For groups, this is the group + * display name. For service principals, this is the application display name. + */ + private String principalName; + + /* + * The type of Microsoft Entra principal to map to the PostgreSQL role. + */ + private PrincipalTypes principalType; + + /* + * The identifier of the Microsoft Entra tenant containing the principal to map, represented as an RFC 4122 GUID. If + * omitted, this value defaults to the tenant of the subscription. + */ + private String tenantId; + + /** + * Creates an instance of MicrosoftEntraAdministratorPropertiesForAdd class. + */ + public MicrosoftEntraAdministratorPropertiesForAdd() { + } + + /** + * Get the principalName property: The display name or user principal name of the Microsoft Entra principal to map + * to the PostgreSQL role. For users, this is typically the user principal name, such as admin@contoso.com. For + * groups, this is the group display name. For service principals, this is the application display name. + * + * @return the principalName value. + */ + public String principalName() { + return this.principalName; + } + + /** + * Set the principalName property: The display name or user principal name of the Microsoft Entra principal to map + * to the PostgreSQL role. For users, this is typically the user principal name, such as admin@contoso.com. For + * groups, this is the group display name. For service principals, this is the application display name. + * + * @param principalName the principalName value to set. + * @return the MicrosoftEntraAdministratorPropertiesForAdd object itself. + */ + public MicrosoftEntraAdministratorPropertiesForAdd withPrincipalName(String principalName) { + this.principalName = principalName; + return this; + } + + /** + * Get the principalType property: The type of Microsoft Entra principal to map to the PostgreSQL role. + * + * @return the principalType value. + */ + public PrincipalTypes principalType() { + return this.principalType; + } + + /** + * Set the principalType property: The type of Microsoft Entra principal to map to the PostgreSQL role. + * + * @param principalType the principalType value to set. + * @return the MicrosoftEntraAdministratorPropertiesForAdd object itself. + */ + public MicrosoftEntraAdministratorPropertiesForAdd withPrincipalType(PrincipalTypes principalType) { + this.principalType = principalType; + return this; + } + + /** + * Get the tenantId property: The identifier of the Microsoft Entra tenant containing the principal to map, + * represented as an RFC 4122 GUID. If omitted, this value defaults to the tenant of the subscription. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: The identifier of the Microsoft Entra tenant containing the principal to map, + * represented as an RFC 4122 GUID. If omitted, this value defaults to the tenant of the subscription. + * + * @param tenantId the tenantId value to set. + * @return the MicrosoftEntraAdministratorPropertiesForAdd object itself. + */ + public MicrosoftEntraAdministratorPropertiesForAdd withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("principalName", this.principalName); + jsonWriter.writeStringField("principalType", this.principalType == null ? null : this.principalType.toString()); + jsonWriter.writeStringField("tenantId", this.tenantId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MicrosoftEntraAdministratorPropertiesForAdd from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MicrosoftEntraAdministratorPropertiesForAdd 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 MicrosoftEntraAdministratorPropertiesForAdd. + */ + public static MicrosoftEntraAdministratorPropertiesForAdd fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MicrosoftEntraAdministratorPropertiesForAdd deserializedMicrosoftEntraAdministratorPropertiesForAdd + = new MicrosoftEntraAdministratorPropertiesForAdd(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalName".equals(fieldName)) { + deserializedMicrosoftEntraAdministratorPropertiesForAdd.principalName = reader.getString(); + } else if ("principalType".equals(fieldName)) { + deserializedMicrosoftEntraAdministratorPropertiesForAdd.principalType + = PrincipalTypes.fromString(reader.getString()); + } else if ("tenantId".equals(fieldName)) { + deserializedMicrosoftEntraAdministratorPropertiesForAdd.tenantId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMicrosoftEntraAdministratorPropertiesForAdd; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAdministrators.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAdministrators.java new file mode 100644 index 0000000000000..f9d6c9a8ee16b --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAdministrators.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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 MicrosoftEntraAdministrators. + */ +public interface MicrosoftEntraAdministrators { + /** + * Gets information about a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String clusterName, String objectId, + Context context); + + /** + * Gets information about a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. + */ + MicrosoftEntraAdministrator get(String resourceGroupName, String clusterName, String objectId); + + /** + * Deletes a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 clusterName, String objectId); + + /** + * Deletes a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param objectId The Microsoft Entra object identifier of the principal mapped to the PostgreSQL role, represented + * as an RFC 4122 GUID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 clusterName, String objectId, Context context); + + /** + * Lists the PostgreSQL roles in a cluster that are members of azure_pg_admin and mapped to Microsoft Entra + * principals. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 MicrosoftEntraAdministrator list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String clusterName); + + /** + * Lists the PostgreSQL roles in a cluster that are members of azure_pg_admin and mapped to Microsoft Entra + * principals. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 MicrosoftEntraAdministrator list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String clusterName, Context context); + + /** + * Gets information about a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. + * + * @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 information about a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal along with {@link Response}. + */ + MicrosoftEntraAdministrator getById(String id); + + /** + * Gets information about a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal. + * + * @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 information about a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra + * principal along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra principal. + * + * @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); + + /** + * Deletes a PostgreSQL role that is a member of azure_pg_admin and mapped to a Microsoft Entra principal. + * + * @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 MicrosoftEntraAdministrator resource. + * + * @param name resource name. + * @return the first stage of the new MicrosoftEntraAdministrator definition. + */ + MicrosoftEntraAdministrator.DefinitionStages.Blank define(String name); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAuthentication.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAuthentication.java new file mode 100644 index 0000000000000..96a2531cb04e7 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAuthentication.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.horizondb.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.horizondb.fluent.models.MicrosoftEntraAuthenticationInner; + +/** + * An immutable client-side representation of MicrosoftEntraAuthentication. + */ +public interface MicrosoftEntraAuthentication { + /** + * 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. + */ + MicrosoftEntraAuthenticationProperties 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.horizondb.fluent.models.MicrosoftEntraAuthenticationInner object. + * + * @return the inner object. + */ + MicrosoftEntraAuthenticationInner innerModel(); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAuthenticationForPatchUpdate.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAuthenticationForPatchUpdate.java new file mode 100644 index 0000000000000..8adc3f1f58b84 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAuthenticationForPatchUpdate.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.horizondb.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A sparse update request for Microsoft Entra authentication. + */ +@Fluent +public final class MicrosoftEntraAuthenticationForPatchUpdate + implements JsonSerializable { + /* + * The Microsoft Entra authentication properties to update. + */ + private MicrosoftEntraAuthenticationPropertiesForPatchUpdate properties; + + /** + * Creates an instance of MicrosoftEntraAuthenticationForPatchUpdate class. + */ + public MicrosoftEntraAuthenticationForPatchUpdate() { + } + + /** + * Get the properties property: The Microsoft Entra authentication properties to update. + * + * @return the properties value. + */ + public MicrosoftEntraAuthenticationPropertiesForPatchUpdate properties() { + return this.properties; + } + + /** + * Set the properties property: The Microsoft Entra authentication properties to update. + * + * @param properties the properties value to set. + * @return the MicrosoftEntraAuthenticationForPatchUpdate object itself. + */ + public MicrosoftEntraAuthenticationForPatchUpdate + withProperties(MicrosoftEntraAuthenticationPropertiesForPatchUpdate 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 MicrosoftEntraAuthenticationForPatchUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MicrosoftEntraAuthenticationForPatchUpdate 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 MicrosoftEntraAuthenticationForPatchUpdate. + */ + public static MicrosoftEntraAuthenticationForPatchUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MicrosoftEntraAuthenticationForPatchUpdate deserializedMicrosoftEntraAuthenticationForPatchUpdate + = new MicrosoftEntraAuthenticationForPatchUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedMicrosoftEntraAuthenticationForPatchUpdate.properties + = MicrosoftEntraAuthenticationPropertiesForPatchUpdate.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMicrosoftEntraAuthenticationForPatchUpdate; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAuthenticationProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAuthenticationProperties.java new file mode 100644 index 0000000000000..5021c388547fa --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAuthenticationProperties.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.horizondb.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; + +/** + * Properties of the service-created Microsoft Entra authentication method. + */ +@Fluent +public final class MicrosoftEntraAuthenticationProperties + implements JsonSerializable { + /* + * The state of Microsoft Entra authentication. + */ + private AuthenticationState state; + + /* + * The provisioning state of the Microsoft Entra authentication method. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of MicrosoftEntraAuthenticationProperties class. + */ + public MicrosoftEntraAuthenticationProperties() { + } + + /** + * Get the state property: The state of Microsoft Entra authentication. + * + * @return the state value. + */ + public AuthenticationState state() { + return this.state; + } + + /** + * Set the state property: The state of Microsoft Entra authentication. + * + * @param state the state value to set. + * @return the MicrosoftEntraAuthenticationProperties object itself. + */ + public MicrosoftEntraAuthenticationProperties withState(AuthenticationState state) { + this.state = state; + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the Microsoft Entra authentication method. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MicrosoftEntraAuthenticationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MicrosoftEntraAuthenticationProperties 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 MicrosoftEntraAuthenticationProperties. + */ + public static MicrosoftEntraAuthenticationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MicrosoftEntraAuthenticationProperties deserializedMicrosoftEntraAuthenticationProperties + = new MicrosoftEntraAuthenticationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedMicrosoftEntraAuthenticationProperties.state + = AuthenticationState.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedMicrosoftEntraAuthenticationProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedMicrosoftEntraAuthenticationProperties; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAuthenticationPropertiesForPatchUpdate.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAuthenticationPropertiesForPatchUpdate.java new file mode 100644 index 0000000000000..6dadcd9cd31f7 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAuthenticationPropertiesForPatchUpdate.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.horizondb.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; + +/** + * Properties for updating Microsoft Entra authentication. State Enabled enables the feature and State Disabled disables + * it. Disabling Microsoft Entra authentication does not remove or modify database roles or users previously created + * through the MicrosoftEntraAdministrators control-plane API or directly through pgaadauth extension functions. + */ +@Fluent +public final class MicrosoftEntraAuthenticationPropertiesForPatchUpdate + implements JsonSerializable { + /* + * The target Microsoft Entra authentication state. Omission preserves the current state. + */ + private AuthenticationState state; + + /** + * Creates an instance of MicrosoftEntraAuthenticationPropertiesForPatchUpdate class. + */ + public MicrosoftEntraAuthenticationPropertiesForPatchUpdate() { + } + + /** + * Get the state property: The target Microsoft Entra authentication state. Omission preserves the current state. + * + * @return the state value. + */ + public AuthenticationState state() { + return this.state; + } + + /** + * Set the state property: The target Microsoft Entra authentication state. Omission preserves the current state. + * + * @param state the state value to set. + * @return the MicrosoftEntraAuthenticationPropertiesForPatchUpdate object itself. + */ + public MicrosoftEntraAuthenticationPropertiesForPatchUpdate withState(AuthenticationState state) { + this.state = state; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MicrosoftEntraAuthenticationPropertiesForPatchUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MicrosoftEntraAuthenticationPropertiesForPatchUpdate 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 MicrosoftEntraAuthenticationPropertiesForPatchUpdate. + */ + public static MicrosoftEntraAuthenticationPropertiesForPatchUpdate fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + MicrosoftEntraAuthenticationPropertiesForPatchUpdate deserializedMicrosoftEntraAuthenticationPropertiesForPatchUpdate + = new MicrosoftEntraAuthenticationPropertiesForPatchUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedMicrosoftEntraAuthenticationPropertiesForPatchUpdate.state + = AuthenticationState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedMicrosoftEntraAuthenticationPropertiesForPatchUpdate; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAuthentications.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAuthentications.java new file mode 100644 index 0000000000000..5f15a07d769cf --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAuthentications.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.horizondb.fluent.models.MicrosoftEntraAuthenticationInner; + +/** + * Resource collection API of MicrosoftEntraAuthentications. + */ +public interface MicrosoftEntraAuthentications { + /** + * Gets the service-created Microsoft Entra authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 service-created Microsoft Entra authentication method along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String clusterName, + Context context); + + /** + * Gets the service-created Microsoft Entra authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 service-created Microsoft Entra authentication method. + */ + MicrosoftEntraAuthentication get(String resourceGroupName, String clusterName); + + /** + * Creates or replaces the service-created Microsoft Entra authentication method. State Enabled enables the feature + * and State Disabled disables it; no additional properties are required. Repeating the same request is idempotent. + * Disabling the feature does not remove or modify database roles or users previously created through the + * MicrosoftEntraAdministrators control-plane API or directly through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created Microsoft Entra authentication method for a HorizonDB cluster. + */ + MicrosoftEntraAuthentication createOrReplace(String resourceGroupName, String clusterName, + MicrosoftEntraAuthenticationInner resource); + + /** + * Creates or replaces the service-created Microsoft Entra authentication method. State Enabled enables the feature + * and State Disabled disables it; no additional properties are required. Repeating the same request is idempotent. + * Disabling the feature does not remove or modify database roles or users previously created through the + * MicrosoftEntraAdministrators control-plane API or directly through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created Microsoft Entra authentication method for a HorizonDB cluster. + */ + MicrosoftEntraAuthentication createOrReplace(String resourceGroupName, String clusterName, + MicrosoftEntraAuthenticationInner resource, Context context); + + /** + * Updates the service-created Microsoft Entra authentication method. State Enabled enables the feature and State + * Disabled disables it; no additional properties are required. Disabling the feature does not remove or modify + * database roles or users previously created through the MicrosoftEntraAdministrators control-plane API or directly + * through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created Microsoft Entra authentication method for a HorizonDB cluster. + */ + MicrosoftEntraAuthentication update(String resourceGroupName, String clusterName, + MicrosoftEntraAuthenticationForPatchUpdate properties); + + /** + * Updates the service-created Microsoft Entra authentication method. State Enabled enables the feature and State + * Disabled disables it; no additional properties are required. Disabling the feature does not remove or modify + * database roles or users previously created through the MicrosoftEntraAdministrators control-plane API or directly + * through pgaadauth extension functions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created Microsoft Entra authentication method for a HorizonDB cluster. + */ + MicrosoftEntraAuthentication update(String resourceGroupName, String clusterName, + MicrosoftEntraAuthenticationForPatchUpdate properties, Context context); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Network.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Network.java index aa84d3a8a64c8..e6faf0f3ad485 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Network.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Network.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.horizondb.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,12 +14,13 @@ /** * Network properties. */ -@Immutable +@Fluent public final class Network implements JsonSerializable { /* - * The flag indicating whether public ip is requested. + * Specifies whether public access is enabled for the cluster. The service defaults to Disabled when this property + * is omitted. */ - private PublicNetworkAccessState publicNetworkAccess; + private PublicNetworkAccessState publicAccess; /** * Creates an instance of Network class. @@ -28,12 +29,25 @@ public Network() { } /** - * Get the publicNetworkAccess property: The flag indicating whether public ip is requested. + * Get the publicAccess property: Specifies whether public access is enabled for the cluster. The service defaults + * to Disabled when this property is omitted. * - * @return the publicNetworkAccess value. + * @return the publicAccess value. */ - public PublicNetworkAccessState publicNetworkAccess() { - return this.publicNetworkAccess; + public PublicNetworkAccessState publicAccess() { + return this.publicAccess; + } + + /** + * Set the publicAccess property: Specifies whether public access is enabled for the cluster. The service defaults + * to Disabled when this property is omitted. + * + * @param publicAccess the publicAccess value to set. + * @return the Network object itself. + */ + public Network withPublicAccess(PublicNetworkAccessState publicAccess) { + this.publicAccess = publicAccess; + return this; } /** @@ -42,6 +56,7 @@ public PublicNetworkAccessState publicNetworkAccess() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("publicAccess", this.publicAccess == null ? null : this.publicAccess.toString()); return jsonWriter.writeEndObject(); } @@ -60,8 +75,8 @@ public static Network fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("publicNetworkAccess".equals(fieldName)) { - deserializedNetwork.publicNetworkAccess = PublicNetworkAccessState.fromString(reader.getString()); + if ("publicAccess".equals(fieldName)) { + deserializedNetwork.publicAccess = PublicNetworkAccessState.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/NetworkForPatchUpdate.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/NetworkForPatchUpdate.java new file mode 100644 index 0000000000000..92d4bd755ff07 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/NetworkForPatchUpdate.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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; + +/** + * Network properties for updating a HorizonDB cluster. + */ +@Fluent +public final class NetworkForPatchUpdate implements JsonSerializable { + /* + * Specifies whether public access is enabled for the cluster. Omission preserves the current value. + */ + private PublicNetworkAccessState publicAccess; + + /** + * Creates an instance of NetworkForPatchUpdate class. + */ + public NetworkForPatchUpdate() { + } + + /** + * Get the publicAccess property: Specifies whether public access is enabled for the cluster. Omission preserves the + * current value. + * + * @return the publicAccess value. + */ + public PublicNetworkAccessState publicAccess() { + return this.publicAccess; + } + + /** + * Set the publicAccess property: Specifies whether public access is enabled for the cluster. Omission preserves the + * current value. + * + * @param publicAccess the publicAccess value to set. + * @return the NetworkForPatchUpdate object itself. + */ + public NetworkForPatchUpdate withPublicAccess(PublicNetworkAccessState publicAccess) { + this.publicAccess = publicAccess; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("publicAccess", this.publicAccess == null ? null : this.publicAccess.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkForPatchUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkForPatchUpdate 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 NetworkForPatchUpdate. + */ + public static NetworkForPatchUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkForPatchUpdate deserializedNetworkForPatchUpdate = new NetworkForPatchUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("publicAccess".equals(fieldName)) { + deserializedNetworkForPatchUpdate.publicAccess + = PublicNetworkAccessState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkForPatchUpdate; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Node.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Node.java new file mode 100644 index 0000000000000..b63c9ab3b9eaa --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Node.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.horizondb.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.horizondb.fluent.models.NodeInner; + +/** + * An immutable client-side representation of Node. + */ +public interface Node { + /** + * 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. + */ + NodeProperties 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.horizondb.fluent.models.NodeInner object. + * + * @return the inner object. + */ + NodeInner innerModel(); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/NodeProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/NodeProperties.java new file mode 100644 index 0000000000000..b55cf40f0fe3c --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/NodeProperties.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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; + +/** + * Properties of a service-managed HorizonDB node. + */ +@Immutable +public final class NodeProperties implements JsonSerializable { + /* + * The current role performed by the node within its pool. + */ + private NodeRole role; + + /* + * The availability zone in which the node is deployed. + */ + private String availabilityZone; + + /** + * Creates an instance of NodeProperties class. + */ + private NodeProperties() { + } + + /** + * Get the role property: The current role performed by the node within its pool. + * + * @return the role value. + */ + public NodeRole role() { + return this.role; + } + + /** + * Get the availabilityZone property: The availability zone in which the node is deployed. + * + * @return the availabilityZone value. + */ + public String availabilityZone() { + return this.availabilityZone; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NodeProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NodeProperties 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 NodeProperties. + */ + public static NodeProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NodeProperties deserializedNodeProperties = new NodeProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("role".equals(fieldName)) { + deserializedNodeProperties.role = NodeRole.fromString(reader.getString()); + } else if ("availabilityZone".equals(fieldName)) { + deserializedNodeProperties.availabilityZone = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNodeProperties; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/NodeRole.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/NodeRole.java new file mode 100644 index 0000000000000..a387c973282af --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/NodeRole.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The role performed by a node within its HorizonDB pool. + */ +public final class NodeRole extends ExpandableStringEnum { + /** + * The node accepts read and write traffic for its cluster. + */ + public static final NodeRole READ_WRITE = fromString("ReadWrite"); + + /** + * The node accepts read-only traffic. + */ + public static final NodeRole READ_ONLY = fromString("ReadOnly"); + + /** + * The node is not currently assigned a read-write or read-only role. + */ + public static final NodeRole UNASSIGNED = fromString("Unassigned"); + + /** + * Creates a new instance of NodeRole value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NodeRole() { + } + + /** + * Creates or finds a NodeRole from its string representation. + * + * @param name a name to look for. + * @return the corresponding NodeRole. + */ + public static NodeRole fromString(String name) { + return fromString(name, NodeRole.class); + } + + /** + * Gets known NodeRole values. + * + * @return known NodeRole values. + */ + public static Collection values() { + return values(NodeRole.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbPools.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Nodes.java similarity index 67% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbPools.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Nodes.java index d989762fc5159..bbd7547032e56 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbPools.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Nodes.java @@ -9,59 +9,63 @@ import com.azure.core.util.Context; /** - * Resource collection API of HorizonDbPools. + * Resource collection API of Nodes. */ -public interface HorizonDbPools { +public interface Nodes { /** - * Gets information about a HorizonDB pool. + * Gets a node allocated to a HorizonDB pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. + * @param nodeName The name of the Node. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB pool along with {@link Response}. + * @return a node allocated to a HorizonDB pool along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String clusterName, String poolName, + Response getWithResponse(String resourceGroupName, String clusterName, String poolName, String nodeName, Context context); /** - * Gets information about a HorizonDB pool. + * Gets a node allocated to a HorizonDB pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param poolName The name of the HorizonDB pool. + * @param nodeName The name of the Node. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a HorizonDB pool. + * @return a node allocated to a HorizonDB pool. */ - HorizonDbPool get(String resourceGroupName, String clusterName, String poolName); + Node get(String resourceGroupName, String clusterName, String poolName, String nodeName); /** - * Lists all HorizonDB pools in a cluster. + * Lists the nodes allocated to a HorizonDB pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbPool list operation as paginated response with {@link PagedIterable}. + * @return the response of a Node list operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String clusterName); + PagedIterable list(String resourceGroupName, String clusterName, String poolName); /** - * Lists all HorizonDB pools in a cluster. + * Lists the nodes allocated to a HorizonDB pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbPool list operation as paginated response with {@link PagedIterable}. + * @return the response of a Node list operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String clusterName, Context context); + PagedIterable list(String resourceGroupName, String clusterName, String poolName, Context context); } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ParameterApplyMethod.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ParameterApplyMethod.java new file mode 100644 index 0000000000000..e43d2ebe418d7 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ParameterApplyMethod.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Controls when dynamic parameter changes become effective. Static parameter changes always become effective only after + * a customer-initiated pool Restart. Stop followed by Start and scheduled maintenance do not apply pending parameter + * changes. + */ +public final class ParameterApplyMethod extends ExpandableStringEnum { + /** + * Apply dynamic parameter changes immediately. Static parameter changes remain pending until a customer-initiated + * pool Restart. + */ + public static final ParameterApplyMethod IMMEDIATE = fromString("Immediate"); + + /** + * Keep dynamic and static parameter changes pending until a customer-initiated pool Restart. Stop followed by Start + * and scheduled maintenance do not apply them. + */ + public static final ParameterApplyMethod PENDING_REBOOT = fromString("PendingReboot"); + + /** + * Creates a new instance of ParameterApplyMethod value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ParameterApplyMethod() { + } + + /** + * Creates or finds a ParameterApplyMethod from its string representation. + * + * @param name a name to look for. + * @return the corresponding ParameterApplyMethod. + */ + public static ParameterApplyMethod fromString(String name) { + return fromString(name, ParameterApplyMethod.class); + } + + /** + * Gets known ParameterApplyMethod values. + * + * @return known ParameterApplyMethod values. + */ + public static Collection values() { + return values(ParameterApplyMethod.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbParameterGroup.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ParameterGroup.java similarity index 75% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbParameterGroup.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ParameterGroup.java index 0b1c995f93de9..f02da85592754 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbParameterGroup.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ParameterGroup.java @@ -7,13 +7,13 @@ import com.azure.core.management.Region; import com.azure.core.management.SystemData; import com.azure.core.util.Context; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbParameterGroupInner; +import com.azure.resourcemanager.horizondb.fluent.models.ParameterGroupInner; import java.util.Map; /** - * An immutable client-side representation of HorizonDbParameterGroup. + * An immutable client-side representation of ParameterGroup. */ -public interface HorizonDbParameterGroup { +public interface ParameterGroup { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -54,7 +54,7 @@ public interface HorizonDbParameterGroup { * * @return the properties value. */ - HorizonDbParameterGroupProperties properties(); + ParameterGroupProperties properties(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -85,31 +85,31 @@ public interface HorizonDbParameterGroup { String resourceGroupName(); /** - * Gets the inner com.azure.resourcemanager.horizondb.fluent.models.HorizonDbParameterGroupInner object. + * Gets the inner com.azure.resourcemanager.horizondb.fluent.models.ParameterGroupInner object. * * @return the inner object. */ - HorizonDbParameterGroupInner innerModel(); + ParameterGroupInner innerModel(); /** - * The entirety of the HorizonDbParameterGroup definition. + * The entirety of the ParameterGroup definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } /** - * The HorizonDbParameterGroup definition stages. + * The ParameterGroup definition stages. */ interface DefinitionStages { /** - * The first stage of the HorizonDbParameterGroup definition. + * The first stage of the ParameterGroup definition. */ interface Blank extends WithLocation { } /** - * The stage of the HorizonDbParameterGroup definition allowing to specify location. + * The stage of the ParameterGroup definition allowing to specify location. */ interface WithLocation { /** @@ -130,7 +130,7 @@ interface WithLocation { } /** - * The stage of the HorizonDbParameterGroup definition allowing to specify parent resource. + * The stage of the ParameterGroup definition allowing to specify parent resource. */ interface WithResourceGroup { /** @@ -143,8 +143,8 @@ interface WithResourceGroup { } /** - * The stage of the HorizonDbParameterGroup 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. + * The stage of the ParameterGroup 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 { /** @@ -152,7 +152,7 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithPro * * @return the created resource. */ - HorizonDbParameterGroup create(); + ParameterGroup create(); /** * Executes the create request. @@ -160,11 +160,11 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithPro * @param context The context to associate with this operation. * @return the created resource. */ - HorizonDbParameterGroup create(Context context); + ParameterGroup create(Context context); } /** - * The stage of the HorizonDbParameterGroup definition allowing to specify tags. + * The stage of the ParameterGroup definition allowing to specify tags. */ interface WithTags { /** @@ -177,7 +177,7 @@ interface WithTags { } /** - * The stage of the HorizonDbParameterGroup definition allowing to specify properties. + * The stage of the ParameterGroup definition allowing to specify properties. */ interface WithProperties { /** @@ -186,19 +186,19 @@ interface WithProperties { * @param properties The resource-specific properties for this resource. * @return the next definition stage. */ - WithCreate withProperties(HorizonDbParameterGroupProperties properties); + WithCreate withProperties(ParameterGroupProperties properties); } } /** - * Begins update for the HorizonDbParameterGroup resource. + * Begins update for the ParameterGroup resource. * * @return the stage of resource update. */ - HorizonDbParameterGroup.Update update(); + ParameterGroup.Update update(); /** - * The template for HorizonDbParameterGroup update. + * The template for ParameterGroup update. */ interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { /** @@ -206,7 +206,7 @@ interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { * * @return the updated resource. */ - HorizonDbParameterGroup apply(); + ParameterGroup apply(); /** * Executes the update request. @@ -214,15 +214,15 @@ interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { * @param context The context to associate with this operation. * @return the updated resource. */ - HorizonDbParameterGroup apply(Context context); + ParameterGroup apply(Context context); } /** - * The HorizonDbParameterGroup update stages. + * The ParameterGroup update stages. */ interface UpdateStages { /** - * The stage of the HorizonDbParameterGroup update allowing to specify tags. + * The stage of the ParameterGroup update allowing to specify tags. */ interface WithTags { /** @@ -235,7 +235,7 @@ interface WithTags { } /** - * The stage of the HorizonDbParameterGroup update allowing to specify properties. + * The stage of the ParameterGroup update allowing to specify properties. */ interface WithProperties { /** @@ -244,7 +244,7 @@ interface WithProperties { * @param properties The properties that can be updated for a HorizonDB parameter group. * @return the next definition stage. */ - Update withProperties(HorizonDbParameterGroupPropertiesForPatchUpdate properties); + Update withProperties(ParameterGroupPropertiesForPatchUpdate properties); } } @@ -253,7 +253,7 @@ interface WithProperties { * * @return the refreshed resource. */ - HorizonDbParameterGroup refresh(); + ParameterGroup refresh(); /** * Refreshes the resource to sync with Azure. @@ -261,5 +261,5 @@ interface WithProperties { * @param context The context to associate with this operation. * @return the refreshed resource. */ - HorizonDbParameterGroup refresh(Context context); + ParameterGroup refresh(Context context); } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ParameterGroupConnectionProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ParameterGroupConnectionProperties.java new file mode 100644 index 0000000000000..8459ffc9a8937 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ParameterGroupConnectionProperties.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.horizondb.models; + +import com.azure.resourcemanager.horizondb.fluent.models.ParameterGroupConnectionPropertiesInner; + +/** + * An immutable client-side representation of ParameterGroupConnectionProperties. + */ +public interface ParameterGroupConnectionProperties { + /** + * Gets the poolResourceId property: The Azure resource ID of the connected HorizonDB pool. + * + * @return the poolResourceId value. + */ + String poolResourceId(); + + /** + * Gets the inner com.azure.resourcemanager.horizondb.fluent.models.ParameterGroupConnectionPropertiesInner object. + * + * @return the inner object. + */ + ParameterGroupConnectionPropertiesInner innerModel(); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbParameterGroupForPatchUpdate.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ParameterGroupForPatchUpdate.java similarity index 60% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbParameterGroupForPatchUpdate.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ParameterGroupForPatchUpdate.java index 204d5bbf7603a..c025c5de97c94 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbParameterGroupForPatchUpdate.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ParameterGroupForPatchUpdate.java @@ -16,8 +16,7 @@ * HorizonDB parameter group for update operations. */ @Fluent -public final class HorizonDbParameterGroupForPatchUpdate - implements JsonSerializable { +public final class ParameterGroupForPatchUpdate implements JsonSerializable { /* * Resource tags. */ @@ -26,12 +25,12 @@ public final class HorizonDbParameterGroupForPatchUpdate /* * The properties that can be updated for a HorizonDB parameter group. */ - private HorizonDbParameterGroupPropertiesForPatchUpdate properties; + private ParameterGroupPropertiesForPatchUpdate properties; /** - * Creates an instance of HorizonDbParameterGroupForPatchUpdate class. + * Creates an instance of ParameterGroupForPatchUpdate class. */ - public HorizonDbParameterGroupForPatchUpdate() { + public ParameterGroupForPatchUpdate() { } /** @@ -47,9 +46,9 @@ public Map tags() { * Set the tags property: Resource tags. * * @param tags the tags value to set. - * @return the HorizonDbParameterGroupForPatchUpdate object itself. + * @return the ParameterGroupForPatchUpdate object itself. */ - public HorizonDbParameterGroupForPatchUpdate withTags(Map tags) { + public ParameterGroupForPatchUpdate withTags(Map tags) { this.tags = tags; return this; } @@ -59,7 +58,7 @@ public HorizonDbParameterGroupForPatchUpdate withTags(Map tags) * * @return the properties value. */ - public HorizonDbParameterGroupPropertiesForPatchUpdate properties() { + public ParameterGroupPropertiesForPatchUpdate properties() { return this.properties; } @@ -67,10 +66,9 @@ public HorizonDbParameterGroupPropertiesForPatchUpdate properties() { * Set the properties property: The properties that can be updated for a HorizonDB parameter group. * * @param properties the properties value to set. - * @return the HorizonDbParameterGroupForPatchUpdate object itself. + * @return the ParameterGroupForPatchUpdate object itself. */ - public HorizonDbParameterGroupForPatchUpdate - withProperties(HorizonDbParameterGroupPropertiesForPatchUpdate properties) { + public ParameterGroupForPatchUpdate withProperties(ParameterGroupPropertiesForPatchUpdate properties) { this.properties = properties; return this; } @@ -87,33 +85,32 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of HorizonDbParameterGroupForPatchUpdate from the JsonReader. + * Reads an instance of ParameterGroupForPatchUpdate from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of HorizonDbParameterGroupForPatchUpdate 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 HorizonDbParameterGroupForPatchUpdate. + * @return An instance of ParameterGroupForPatchUpdate 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 ParameterGroupForPatchUpdate. */ - public static HorizonDbParameterGroupForPatchUpdate fromJson(JsonReader jsonReader) throws IOException { + public static ParameterGroupForPatchUpdate fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - HorizonDbParameterGroupForPatchUpdate deserializedHorizonDbParameterGroupForPatchUpdate - = new HorizonDbParameterGroupForPatchUpdate(); + ParameterGroupForPatchUpdate deserializedParameterGroupForPatchUpdate = new ParameterGroupForPatchUpdate(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedHorizonDbParameterGroupForPatchUpdate.tags = tags; + deserializedParameterGroupForPatchUpdate.tags = tags; } else if ("properties".equals(fieldName)) { - deserializedHorizonDbParameterGroupForPatchUpdate.properties - = HorizonDbParameterGroupPropertiesForPatchUpdate.fromJson(reader); + deserializedParameterGroupForPatchUpdate.properties + = ParameterGroupPropertiesForPatchUpdate.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedHorizonDbParameterGroupForPatchUpdate; + return deserializedParameterGroupForPatchUpdate; }); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ParameterGroupProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ParameterGroupProperties.java new file mode 100644 index 0000000000000..43f824cfb6661 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ParameterGroupProperties.java @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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; + +/** + * Properties of a HorizonDB parameter group. + */ +@Fluent +public final class ParameterGroupProperties implements JsonSerializable { + /* + * Parameters in the parameter group. + */ + private List parameters; + + /* + * Description of the parameter group. The maximum length is 1024 characters. + */ + private String description; + + /* + * The PostgreSQL major version for the parameter group. This property is required during creation and is immutable + * thereafter. The service selects the unique location-scoped default parameter group for this version in the + * resource location. The DefaultParameterGroups APIs return at most one default parameter group for each PostgreSQL + * version in a location, so this selection is unambiguous. + */ + private PostgreSqlVersion postgreSqlVersion; + + /* + * The provisioning state of the parameter group. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of ParameterGroupProperties class. + */ + public ParameterGroupProperties() { + } + + /** + * Get the parameters property: Parameters in the parameter group. + * + * @return the parameters value. + */ + public List parameters() { + return this.parameters; + } + + /** + * Set the parameters property: Parameters in the parameter group. + * + * @param parameters the parameters value to set. + * @return the ParameterGroupProperties object itself. + */ + public ParameterGroupProperties withParameters(List parameters) { + this.parameters = parameters; + return this; + } + + /** + * Get the description property: Description of the parameter group. The maximum length is 1024 characters. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the parameter group. The maximum length is 1024 characters. + * + * @param description the description value to set. + * @return the ParameterGroupProperties object itself. + */ + public ParameterGroupProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the postgreSqlVersion property: The PostgreSQL major version for the parameter group. This property is + * required during creation and is immutable thereafter. The service selects the unique location-scoped default + * parameter group for this version in the resource location. The DefaultParameterGroups APIs return at most one + * default parameter group for each PostgreSQL version in a location, so this selection is unambiguous. + * + * @return the postgreSqlVersion value. + */ + public PostgreSqlVersion postgreSqlVersion() { + return this.postgreSqlVersion; + } + + /** + * Set the postgreSqlVersion property: The PostgreSQL major version for the parameter group. This property is + * required during creation and is immutable thereafter. The service selects the unique location-scoped default + * parameter group for this version in the resource location. The DefaultParameterGroups APIs return at most one + * default parameter group for each PostgreSQL version in a location, so this selection is unambiguous. + * + * @param postgreSqlVersion the postgreSqlVersion value to set. + * @return the ParameterGroupProperties object itself. + */ + public ParameterGroupProperties withPostgreSqlVersion(PostgreSqlVersion postgreSqlVersion) { + this.postgreSqlVersion = postgreSqlVersion; + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the parameter group. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("postgreSqlVersion", + this.postgreSqlVersion == null ? null : this.postgreSqlVersion.toString()); + jsonWriter.writeArrayField("parameters", this.parameters, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("description", this.description); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ParameterGroupProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ParameterGroupProperties 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 ParameterGroupProperties. + */ + public static ParameterGroupProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ParameterGroupProperties deserializedParameterGroupProperties = new ParameterGroupProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("postgreSqlVersion".equals(fieldName)) { + deserializedParameterGroupProperties.postgreSqlVersion + = PostgreSqlVersion.fromString(reader.getString()); + } else if ("parameters".equals(fieldName)) { + List parameters + = reader.readArray(reader1 -> ParameterProperties.fromJson(reader1)); + deserializedParameterGroupProperties.parameters = parameters; + } else if ("description".equals(fieldName)) { + deserializedParameterGroupProperties.description = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedParameterGroupProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedParameterGroupProperties; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ParameterGroupPropertiesForPatchUpdate.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ParameterGroupPropertiesForPatchUpdate.java new file mode 100644 index 0000000000000..b11cbb7347fa6 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ParameterGroupPropertiesForPatchUpdate.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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; + +/** + * Properties of a HorizonDB parameter group for update operations. + */ +@Fluent +public final class ParameterGroupPropertiesForPatchUpdate + implements JsonSerializable { + /* + * Parameters in the parameter group. + */ + private List parameters; + + /* + * Description of the parameter group. The maximum length is 1024 characters. + */ + private String description; + + /** + * Creates an instance of ParameterGroupPropertiesForPatchUpdate class. + */ + public ParameterGroupPropertiesForPatchUpdate() { + } + + /** + * Get the parameters property: Parameters in the parameter group. + * + * @return the parameters value. + */ + public List parameters() { + return this.parameters; + } + + /** + * Set the parameters property: Parameters in the parameter group. + * + * @param parameters the parameters value to set. + * @return the ParameterGroupPropertiesForPatchUpdate object itself. + */ + public ParameterGroupPropertiesForPatchUpdate withParameters(List parameters) { + this.parameters = parameters; + return this; + } + + /** + * Get the description property: Description of the parameter group. The maximum length is 1024 characters. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the parameter group. The maximum length is 1024 characters. + * + * @param description the description value to set. + * @return the ParameterGroupPropertiesForPatchUpdate object itself. + */ + public ParameterGroupPropertiesForPatchUpdate withDescription(String description) { + this.description = description; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("parameters", this.parameters, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("description", this.description); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ParameterGroupPropertiesForPatchUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ParameterGroupPropertiesForPatchUpdate 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 ParameterGroupPropertiesForPatchUpdate. + */ + public static ParameterGroupPropertiesForPatchUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ParameterGroupPropertiesForPatchUpdate deserializedParameterGroupPropertiesForPatchUpdate + = new ParameterGroupPropertiesForPatchUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("parameters".equals(fieldName)) { + List parameters + = reader.readArray(reader1 -> ParameterProperties.fromJson(reader1)); + deserializedParameterGroupPropertiesForPatchUpdate.parameters = parameters; + } else if ("description".equals(fieldName)) { + deserializedParameterGroupPropertiesForPatchUpdate.description = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedParameterGroupPropertiesForPatchUpdate; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ParameterGroupSyncStatus.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ParameterGroupSyncStatus.java new file mode 100644 index 0000000000000..a2211728f829d --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ParameterGroupSyncStatus.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates synchronization status between a HorizonDB resource and its parameter group. + */ +public final class ParameterGroupSyncStatus extends ExpandableStringEnum { + /** + * Parameter updates are currently being applied. + */ + public static final ParameterGroupSyncStatus APPLYING = fromString("Applying"); + + /** + * Parameter values are synchronized and up to date. + */ + public static final ParameterGroupSyncStatus IN_SYNC = fromString("InSync"); + + /** + * Applying parameter updates failed. + */ + public static final ParameterGroupSyncStatus FAILED_TO_APPLY = fromString("FailedToApply"); + + /** + * Parameter updates are pending and require a customer-initiated pool Restart to take effect. Stop followed by + * Start and scheduled maintenance preserve this status. + */ + public static final ParameterGroupSyncStatus PENDING_REBOOT = fromString("PendingReboot"); + + /** + * Creates a new instance of ParameterGroupSyncStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ParameterGroupSyncStatus() { + } + + /** + * Creates or finds a ParameterGroupSyncStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ParameterGroupSyncStatus. + */ + public static ParameterGroupSyncStatus fromString(String name) { + return fromString(name, ParameterGroupSyncStatus.class); + } + + /** + * Gets known ParameterGroupSyncStatus values. + * + * @return known ParameterGroupSyncStatus values. + */ + public static Collection values() { + return values(ParameterGroupSyncStatus.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbParameterGroups.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ParameterGroups.java similarity index 69% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbParameterGroups.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ParameterGroups.java index 62ad66e22e889..ffdee888852aa 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbParameterGroups.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ParameterGroups.java @@ -9,9 +9,9 @@ import com.azure.core.util.Context; /** - * Resource collection API of HorizonDbParameterGroups. + * Resource collection API of ParameterGroups. */ -public interface HorizonDbParameterGroups { +public interface ParameterGroups { /** * Gets information about a HorizonDB parameter group. * @@ -23,8 +23,8 @@ public interface HorizonDbParameterGroups { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return information about a HorizonDB parameter group along with {@link Response}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, - String parameterGroupName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String parameterGroupName, + Context context); /** * Gets information about a HorizonDB parameter group. @@ -36,10 +36,11 @@ Response getByResourceGroupWithResponse(String resource * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return information about a HorizonDB parameter group. */ - HorizonDbParameterGroup getByResourceGroup(String resourceGroupName, String parameterGroupName); + ParameterGroup getByResourceGroup(String resourceGroupName, String parameterGroupName); /** - * Deletes a HorizonDB parameter group. + * Deletes a HorizonDB parameter group. Deletion fails with a conflict when the parameter group is associated with + * one or more pools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -50,7 +51,8 @@ Response getByResourceGroupWithResponse(String resource void deleteByResourceGroup(String resourceGroupName, String parameterGroupName); /** - * Deletes a HorizonDB parameter group. + * Deletes a HorizonDB parameter group. Deletion fails with a conflict when the parameter group is associated with + * one or more pools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameterGroupName The name of the HorizonDB parameter group. @@ -68,10 +70,9 @@ Response getByResourceGroupWithResponse(String 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 HorizonDbParameterGroup list operation as paginated response with - * {@link PagedIterable}. + * @return the response of a ParameterGroup list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + PagedIterable listByResourceGroup(String resourceGroupName); /** * Lists all HorizonDB parameter groups in a resource group. @@ -81,20 +82,18 @@ Response getByResourceGroupWithResponse(String 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 HorizonDbParameterGroup list operation as paginated response with - * {@link PagedIterable}. + * @return the response of a ParameterGroup list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** * Lists all HorizonDB parameter groups 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 HorizonDbParameterGroup list operation as paginated response with - * {@link PagedIterable}. + * @return the response of a ParameterGroup list operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(); + PagedIterable list(); /** * Lists all HorizonDB parameter groups in a subscription. @@ -103,10 +102,9 @@ Response getByResourceGroupWithResponse(String 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 HorizonDbParameterGroup list operation as paginated response with - * {@link PagedIterable}. + * @return the response of a ParameterGroup list operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(Context context); + PagedIterable list(Context context); /** * Gets all connections to a parameter group. @@ -118,7 +116,7 @@ Response getByResourceGroupWithResponse(String resource * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all connections to a parameter group as paginated response with {@link PagedIterable}. */ - PagedIterable listConnections(String resourceGroupName, + PagedIterable listConnections(String resourceGroupName, String parameterGroupName); /** @@ -132,38 +130,9 @@ PagedIterable listConnections(Strin * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all connections to a parameter group as paginated response with {@link PagedIterable}. */ - PagedIterable listConnections(String resourceGroupName, + PagedIterable listConnections(String resourceGroupName, String parameterGroupName, Context context); - /** - * Lists parameter groups filtered by version number. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param parameterGroupName The name of the HorizonDB parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbParameterGroup list operation as paginated response with - * {@link PagedIterable}. - */ - PagedIterable listVersions(String resourceGroupName, String parameterGroupName); - - /** - * Lists parameter groups filtered by version number. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param parameterGroupName The name of the HorizonDB parameter group. - * @param version The version number to filter by. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbParameterGroup list operation as paginated response with - * {@link PagedIterable}. - */ - PagedIterable listVersions(String resourceGroupName, String parameterGroupName, - Integer version, Context context); - /** * Gets information about a HorizonDB parameter group. * @@ -173,7 +142,7 @@ PagedIterable listVersions(String resourceGroupName, St * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return information about a HorizonDB parameter group along with {@link Response}. */ - HorizonDbParameterGroup getById(String id); + ParameterGroup getById(String id); /** * Gets information about a HorizonDB parameter group. @@ -185,10 +154,11 @@ PagedIterable listVersions(String resourceGroupName, St * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return information about a HorizonDB parameter group along with {@link Response}. */ - Response getByIdWithResponse(String id, Context context); + Response getByIdWithResponse(String id, Context context); /** - * Deletes a HorizonDB parameter group. + * Deletes a HorizonDB parameter group. Deletion fails with a conflict when the parameter group is associated with + * one or more pools. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -198,7 +168,8 @@ PagedIterable listVersions(String resourceGroupName, St void deleteById(String id); /** - * Deletes a HorizonDB parameter group. + * Deletes a HorizonDB parameter group. Deletion fails with a conflict when the parameter group is associated with + * one or more pools. * * @param id the resource ID. * @param context The context to associate with this operation. @@ -209,10 +180,10 @@ PagedIterable listVersions(String resourceGroupName, St void deleteByIdWithResponse(String id, Context context); /** - * Begins definition for a new HorizonDbParameterGroup resource. + * Begins definition for a new ParameterGroup resource. * * @param name resource name. - * @return the first stage of the new HorizonDbParameterGroup definition. + * @return the first stage of the new ParameterGroup definition. */ - HorizonDbParameterGroup.DefinitionStages.Blank define(String name); + ParameterGroup.DefinitionStages.Blank define(String name); } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ParameterProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ParameterProperties.java index 148c100b28b16..edc8ac8320d29 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ParameterProperties.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ParameterProperties.java @@ -12,7 +12,7 @@ import java.io.IOException; /** - * Properties of a HorizonDB parameters. + * Properties of a HorizonDB parameter. */ @Fluent public final class ParameterProperties implements JsonSerializable { @@ -31,6 +31,17 @@ public final class ParameterProperties implements JsonSerializable { + /** + * The effective value is the system-defined default. + */ + public static final ParameterValueSource SYSTEM_DEFAULT = fromString("SystemDefault"); + + /** + * The effective value was explicitly supplied by the user, even when it equals the system-defined default value. + */ + public static final ParameterValueSource USER_OVERRIDE = fromString("UserOverride"); + + /** + * Creates a new instance of ParameterValueSource value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ParameterValueSource() { + } + + /** + * Creates or finds a ParameterValueSource from its string representation. + * + * @param name a name to look for. + * @return the corresponding ParameterValueSource. + */ + public static ParameterValueSource fromString(String name) { + return fromString(name, ParameterValueSource.class); + } + + /** + * Gets known ParameterValueSource values. + * + * @return known ParameterValueSource values. + */ + public static Collection values() { + return values(ParameterValueSource.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PasswordAuthentication.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PasswordAuthentication.java new file mode 100644 index 0000000000000..e436638d6b6f3 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PasswordAuthentication.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.horizondb.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.horizondb.fluent.models.PasswordAuthenticationInner; + +/** + * An immutable client-side representation of PasswordAuthentication. + */ +public interface PasswordAuthentication { + /** + * 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. + */ + PasswordAuthenticationProperties 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.horizondb.fluent.models.PasswordAuthenticationInner object. + * + * @return the inner object. + */ + PasswordAuthenticationInner innerModel(); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PasswordAuthenticationForPatchUpdate.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PasswordAuthenticationForPatchUpdate.java new file mode 100644 index 0000000000000..792aeb3b0d1b5 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PasswordAuthenticationForPatchUpdate.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.horizondb.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A sparse update request for PostgreSQL username-and-password authentication. + */ +@Fluent +public final class PasswordAuthenticationForPatchUpdate + implements JsonSerializable { + /* + * The PostgreSQL username-and-password authentication properties to update. + */ + private PasswordAuthenticationPropertiesForPatchUpdate properties; + + /** + * Creates an instance of PasswordAuthenticationForPatchUpdate class. + */ + public PasswordAuthenticationForPatchUpdate() { + } + + /** + * Get the properties property: The PostgreSQL username-and-password authentication properties to update. + * + * @return the properties value. + */ + public PasswordAuthenticationPropertiesForPatchUpdate properties() { + return this.properties; + } + + /** + * Set the properties property: The PostgreSQL username-and-password authentication properties to update. + * + * @param properties the properties value to set. + * @return the PasswordAuthenticationForPatchUpdate object itself. + */ + public PasswordAuthenticationForPatchUpdate + withProperties(PasswordAuthenticationPropertiesForPatchUpdate 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 PasswordAuthenticationForPatchUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PasswordAuthenticationForPatchUpdate 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 PasswordAuthenticationForPatchUpdate. + */ + public static PasswordAuthenticationForPatchUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PasswordAuthenticationForPatchUpdate deserializedPasswordAuthenticationForPatchUpdate + = new PasswordAuthenticationForPatchUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedPasswordAuthenticationForPatchUpdate.properties + = PasswordAuthenticationPropertiesForPatchUpdate.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPasswordAuthenticationForPatchUpdate; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PasswordAuthenticationProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PasswordAuthenticationProperties.java new file mode 100644 index 0000000000000..0bd1b400468b6 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PasswordAuthenticationProperties.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.horizondb.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; + +/** + * Properties of the service-created PostgreSQL username-and-password authentication method. + */ +@Fluent +public final class PasswordAuthenticationProperties implements JsonSerializable { + /* + * The state of PostgreSQL username-and-password authentication. + */ + private AuthenticationState state; + + /* + * The PostgreSQL administrator login name. This value is not returned in responses. After it is set, renaming is + * not supported. Setting the login requires password authentication state to be Enabled in the same request. + */ + private String administratorLogin; + + /* + * The PostgreSQL administrator password. Setting the password requires password authentication state to be Enabled + * in the same request. + */ + private String administratorLoginPassword; + + /* + * The provisioning state of the PostgreSQL username-and-password authentication method. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of PasswordAuthenticationProperties class. + */ + public PasswordAuthenticationProperties() { + } + + /** + * Get the state property: The state of PostgreSQL username-and-password authentication. + * + * @return the state value. + */ + public AuthenticationState state() { + return this.state; + } + + /** + * Set the state property: The state of PostgreSQL username-and-password authentication. + * + * @param state the state value to set. + * @return the PasswordAuthenticationProperties object itself. + */ + public PasswordAuthenticationProperties withState(AuthenticationState state) { + this.state = state; + return this; + } + + /** + * Get the administratorLogin property: The PostgreSQL administrator login name. This value is not returned in + * responses. After it is set, renaming is not supported. Setting the login requires password authentication state + * to be Enabled in the same request. + * + * @return the administratorLogin value. + */ + public String administratorLogin() { + return this.administratorLogin; + } + + /** + * Set the administratorLogin property: The PostgreSQL administrator login name. This value is not returned in + * responses. After it is set, renaming is not supported. Setting the login requires password authentication state + * to be Enabled in the same request. + * + * @param administratorLogin the administratorLogin value to set. + * @return the PasswordAuthenticationProperties object itself. + */ + public PasswordAuthenticationProperties withAdministratorLogin(String administratorLogin) { + this.administratorLogin = administratorLogin; + return this; + } + + /** + * Get the administratorLoginPassword property: The PostgreSQL administrator password. Setting the password requires + * password authentication state to be Enabled in the same request. + * + * @return the administratorLoginPassword value. + */ + public String administratorLoginPassword() { + return this.administratorLoginPassword; + } + + /** + * Set the administratorLoginPassword property: The PostgreSQL administrator password. Setting the password requires + * password authentication state to be Enabled in the same request. + * + * @param administratorLoginPassword the administratorLoginPassword value to set. + * @return the PasswordAuthenticationProperties object itself. + */ + public PasswordAuthenticationProperties withAdministratorLoginPassword(String administratorLoginPassword) { + this.administratorLoginPassword = administratorLoginPassword; + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the PostgreSQL username-and-password authentication + * method. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + jsonWriter.writeStringField("administratorLogin", this.administratorLogin); + jsonWriter.writeStringField("administratorLoginPassword", this.administratorLoginPassword); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PasswordAuthenticationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PasswordAuthenticationProperties 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 PasswordAuthenticationProperties. + */ + public static PasswordAuthenticationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PasswordAuthenticationProperties deserializedPasswordAuthenticationProperties + = new PasswordAuthenticationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedPasswordAuthenticationProperties.state + = AuthenticationState.fromString(reader.getString()); + } else if ("administratorLogin".equals(fieldName)) { + deserializedPasswordAuthenticationProperties.administratorLogin = reader.getString(); + } else if ("administratorLoginPassword".equals(fieldName)) { + deserializedPasswordAuthenticationProperties.administratorLoginPassword = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedPasswordAuthenticationProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPasswordAuthenticationProperties; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PasswordAuthenticationPropertiesForPatchUpdate.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PasswordAuthenticationPropertiesForPatchUpdate.java new file mode 100644 index 0000000000000..146563dde59ed --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PasswordAuthenticationPropertiesForPatchUpdate.java @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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; + +/** + * Properties for updating PostgreSQL username-and-password authentication. Omitted properties preserve their current + * values. This API version supports enabling or disabling the authentication method, and resetting its password. + * Supported changes can be combined. + */ +@Fluent +public final class PasswordAuthenticationPropertiesForPatchUpdate + implements JsonSerializable { + /* + * The target password-authentication state. Enabled can be combined with administratorLoginPassword to re-enable + * password authentication and reset the password for a cluster that already has an administrator. Disabling + * password authentication does not remove or modify existing database users or roles. Disabled cannot be combined + * with administratorLoginPassword. + */ + private AuthenticationState state; + + /* + * The PostgreSQL administrator password. Supplying this property resets the configured administrator's password. + * When password authentication is currently disabled for a cluster that already has an administrator, this property + * can be combined with state Enabled to re-enable password authentication and reset the password. + */ + private String administratorLoginPassword; + + /** + * Creates an instance of PasswordAuthenticationPropertiesForPatchUpdate class. + */ + public PasswordAuthenticationPropertiesForPatchUpdate() { + } + + /** + * Get the state property: The target password-authentication state. Enabled can be combined with + * administratorLoginPassword to re-enable password authentication and reset the password for a cluster that already + * has an administrator. Disabling password authentication does not remove or modify existing database users or + * roles. Disabled cannot be combined with administratorLoginPassword. + * + * @return the state value. + */ + public AuthenticationState state() { + return this.state; + } + + /** + * Set the state property: The target password-authentication state. Enabled can be combined with + * administratorLoginPassword to re-enable password authentication and reset the password for a cluster that already + * has an administrator. Disabling password authentication does not remove or modify existing database users or + * roles. Disabled cannot be combined with administratorLoginPassword. + * + * @param state the state value to set. + * @return the PasswordAuthenticationPropertiesForPatchUpdate object itself. + */ + public PasswordAuthenticationPropertiesForPatchUpdate withState(AuthenticationState state) { + this.state = state; + return this; + } + + /** + * Get the administratorLoginPassword property: The PostgreSQL administrator password. Supplying this property + * resets the configured administrator's password. When password authentication is currently disabled for a cluster + * that already has an administrator, this property can be combined with state Enabled to re-enable password + * authentication and reset the password. + * + * @return the administratorLoginPassword value. + */ + public String administratorLoginPassword() { + return this.administratorLoginPassword; + } + + /** + * Set the administratorLoginPassword property: The PostgreSQL administrator password. Supplying this property + * resets the configured administrator's password. When password authentication is currently disabled for a cluster + * that already has an administrator, this property can be combined with state Enabled to re-enable password + * authentication and reset the password. + * + * @param administratorLoginPassword the administratorLoginPassword value to set. + * @return the PasswordAuthenticationPropertiesForPatchUpdate object itself. + */ + public PasswordAuthenticationPropertiesForPatchUpdate + withAdministratorLoginPassword(String administratorLoginPassword) { + this.administratorLoginPassword = administratorLoginPassword; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + jsonWriter.writeStringField("administratorLoginPassword", this.administratorLoginPassword); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PasswordAuthenticationPropertiesForPatchUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PasswordAuthenticationPropertiesForPatchUpdate 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 PasswordAuthenticationPropertiesForPatchUpdate. + */ + public static PasswordAuthenticationPropertiesForPatchUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PasswordAuthenticationPropertiesForPatchUpdate deserializedPasswordAuthenticationPropertiesForPatchUpdate + = new PasswordAuthenticationPropertiesForPatchUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedPasswordAuthenticationPropertiesForPatchUpdate.state + = AuthenticationState.fromString(reader.getString()); + } else if ("administratorLoginPassword".equals(fieldName)) { + deserializedPasswordAuthenticationPropertiesForPatchUpdate.administratorLoginPassword + = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPasswordAuthenticationPropertiesForPatchUpdate; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PasswordAuthentications.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PasswordAuthentications.java new file mode 100644 index 0000000000000..2d71679e1d840 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PasswordAuthentications.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.horizondb.fluent.models.PasswordAuthenticationInner; + +/** + * Resource collection API of PasswordAuthentications. + */ +public interface PasswordAuthentications { + /** + * Gets the service-created PostgreSQL username-and-password authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 service-created PostgreSQL username-and-password authentication method along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String clusterName, Context context); + + /** + * Gets the service-created PostgreSQL username-and-password authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 service-created PostgreSQL username-and-password authentication method. + */ + PasswordAuthentication get(String resourceGroupName, String clusterName); + + /** + * Creates or replaces the service-created PostgreSQL username-and-password authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created PostgreSQL username-and-password authentication method for a HorizonDB cluster. + */ + PasswordAuthentication createOrReplace(String resourceGroupName, String clusterName, + PasswordAuthenticationInner resource); + + /** + * Creates or replaces the service-created PostgreSQL username-and-password authentication method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created PostgreSQL username-and-password authentication method for a HorizonDB cluster. + */ + PasswordAuthentication createOrReplace(String resourceGroupName, String clusterName, + PasswordAuthenticationInner resource, Context context); + + /** + * Updates the service-created PostgreSQL username-and-password authentication method. The request is sparse and + * omitted properties preserve their current values. This API version supports enabling the method, disabling the + * method, and resetting its password. For a cluster that already has an administrator but currently has password + * authentication disabled, state Enabled and administratorLoginPassword can be supplied together to re-enable + * password authentication and reset the password. Disabling cannot include credentials and does not remove or + * modify existing database users or roles. Administrator rename is not supported in this API version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created PostgreSQL username-and-password authentication method for a HorizonDB cluster. + */ + PasswordAuthentication update(String resourceGroupName, String clusterName, + PasswordAuthenticationForPatchUpdate properties); + + /** + * Updates the service-created PostgreSQL username-and-password authentication method. The request is sparse and + * omitted properties preserve their current values. This API version supports enabling the method, disabling the + * method, and resetting its password. For a cluster that already has an administrator but currently has password + * authentication disabled, state Enabled and administratorLoginPassword can be supplied together to re-enable + * password authentication and reset the password. Disabling cannot include credentials and does not remove or + * modify existing database users or roles. Administrator rename is not supported in this API version. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @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 service-created PostgreSQL username-and-password authentication method for a HorizonDB cluster. + */ + PasswordAuthentication update(String resourceGroupName, String clusterName, + PasswordAuthenticationForPatchUpdate properties, Context context); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Pool.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Pool.java new file mode 100644 index 0000000000000..df6bd7084287e --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Pool.java @@ -0,0 +1,323 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.horizondb.fluent.models.PoolInner; +import java.util.Map; + +/** + * An immutable client-side representation of Pool. + */ +public interface Pool { + /** + * 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. + */ + PoolProperties properties(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * 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.horizondb.fluent.models.PoolInner object. + * + * @return the inner object. + */ + PoolInner innerModel(); + + /** + * The entirety of the Pool definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The Pool definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the Pool definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the Pool definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, clusterName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @return the next definition stage. + */ + WithCreate withExistingCluster(String resourceGroupName, String clusterName); + } + + /** + * The stage of the Pool 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 { + /** + * Executes the create request. + * + * @return the created resource. + */ + Pool create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Pool create(Context context); + } + + /** + * The stage of the Pool 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 Pool 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(PoolProperties properties); + } + } + + /** + * Begins update for the Pool resource. + * + * @return the stage of resource update. + */ + Pool.Update update(); + + /** + * The template for Pool update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Pool apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Pool apply(Context context); + } + + /** + * The Pool update stages. + */ + interface UpdateStages { + /** + * The stage of the Pool 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 Pool update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The properties that can be updated for a HorizonDB pool.. + * + * @param properties The properties that can be updated for a HorizonDB pool. + * @return the next definition stage. + */ + Update withProperties(PoolPropertiesForPatchUpdate properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Pool refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Pool refresh(Context context); + + /** + * Starts a stopped HorizonDB pool. Power operations are supported only at pool scope in this API version; there is + * no cluster-level start action. Start does not apply pending dynamic or static parameter changes; + * parameterGroup.syncStatus remains PendingReboot until a customer-initiated Restart. When the pool is already + * Ready, the operation succeeds as a true idempotent no-op and likewise leaves pending parameter changes pending. + * The operation is allowed when the pool has no allocated nodes. After the Pool is running, its Pool-scoped + * ReadOnly Endpoint routes only when at least one allocated node is not currently playing the read-write role. The + * request fails with 409 Conflict when another operation is in progress or the pool is in any other incompatible + * state. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool. + */ + Pool start(); + + /** + * Starts a stopped HorizonDB pool. Power operations are supported only at pool scope in this API version; there is + * no cluster-level start action. Start does not apply pending dynamic or static parameter changes; + * parameterGroup.syncStatus remains PendingReboot until a customer-initiated Restart. When the pool is already + * Ready, the operation succeeds as a true idempotent no-op and likewise leaves pending parameter changes pending. + * The operation is allowed when the pool has no allocated nodes. After the Pool is running, its Pool-scoped + * ReadOnly Endpoint routes only when at least one allocated node is not currently playing the read-write role. The + * request fails with 409 Conflict when another operation is in progress or the pool is in any other incompatible + * state. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool. + */ + Pool start(Context context); + + /** + * Stops a running HorizonDB pool and deallocates compute. Power operations are supported only at pool scope in this + * API version; there is no cluster-level stop action. Stop does not apply pending dynamic or static parameter + * changes; parameterGroup.syncStatus remains PendingReboot. A subsequent Start also preserves those pending + * changes. The operation succeeds as an idempotent no-op when the pool is already Stopped. It is allowed when the + * pool has no allocated nodes. The Pool-scoped ReadOnly Endpoint remains discoverable but has no routing + * destination while the Pool is Stopped. The request fails with 409 Conflict when another operation is in progress + * or the pool is in any other incompatible state. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool. + */ + Pool stop(); + + /** + * Stops a running HorizonDB pool and deallocates compute. Power operations are supported only at pool scope in this + * API version; there is no cluster-level stop action. Stop does not apply pending dynamic or static parameter + * changes; parameterGroup.syncStatus remains PendingReboot. A subsequent Start also preserves those pending + * changes. The operation succeeds as an idempotent no-op when the pool is already Stopped. It is allowed when the + * pool has no allocated nodes. The Pool-scoped ReadOnly Endpoint remains discoverable but has no routing + * destination while the Pool is Stopped. The request fails with 409 Conflict when another operation is in progress + * or the pool is in any other incompatible state. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool. + */ + Pool stop(Context context); + + /** + * Restarts the PostgreSQL container on all allocated nodes in a ready HorizonDB pool and applies pending dynamic + * and static parameter changes. This customer-initiated Restart is the only operation that applies static parameter + * changes or dynamic parameter changes requested with PendingReboot; Stop followed by Start and scheduled + * maintenance do not apply them. Power operations are supported only at pool scope in this API version; there is no + * cluster-level restart action. When the pool has no allocated nodes, the operation succeeds without restarting any + * nodes, pending changes are considered applied, parameterGroup.syncStatus becomes InSync, and the resulting + * configuration applies to nodes allocated later. The request fails with 409 Conflict when another operation is in + * progress or the pool is in any other incompatible state. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool. + */ + Pool restart(); + + /** + * Restarts the PostgreSQL container on all allocated nodes in a ready HorizonDB pool and applies pending dynamic + * and static parameter changes. This customer-initiated Restart is the only operation that applies static parameter + * changes or dynamic parameter changes requested with PendingReboot; Stop followed by Start and scheduled + * maintenance do not apply them. Power operations are supported only at pool scope in this API version; there is no + * cluster-level restart action. When the pool has no allocated nodes, the operation succeeds without restarting any + * nodes, pending changes are considered applied, parameterGroup.syncStatus becomes InSync, and the resulting + * configuration applies to nodes allocated later. The request fails with 409 Conflict when another operation is in + * progress or the pool is in any other incompatible state. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool. + */ + Pool restart(Context context); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolCapability.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolCapability.java new file mode 100644 index 0000000000000..77d720067c31f --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolCapability.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.horizondb.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; + +/** + * The HorizonDB Pool capabilities available in a location. + */ +@Immutable +public final class PoolCapability implements JsonSerializable { + /* + * The compute processor recommended for clients to select for HorizonDB Pools in the region. This recommendation + * does not describe backend behavior when the compute processor is omitted from a request. + */ + private ComputeProcessorType recommendedComputeProcessor; + + /* + * The processor families and their compute capabilities supported by Pools in the region. + */ + private List supportedProcessors; + + /* + * Additional Pool features supported in the region independently of a processor, generation, or compute model. + */ + private List supportedFeatures; + + /** + * Creates an instance of PoolCapability class. + */ + private PoolCapability() { + } + + /** + * Get the recommendedComputeProcessor property: The compute processor recommended for clients to select for + * HorizonDB Pools in the region. This recommendation does not describe backend behavior when the compute processor + * is omitted from a request. + * + * @return the recommendedComputeProcessor value. + */ + public ComputeProcessorType recommendedComputeProcessor() { + return this.recommendedComputeProcessor; + } + + /** + * Get the supportedProcessors property: The processor families and their compute capabilities supported by Pools in + * the region. + * + * @return the supportedProcessors value. + */ + public List supportedProcessors() { + return this.supportedProcessors; + } + + /** + * Get the supportedFeatures property: Additional Pool features supported in the region independently of a + * processor, generation, or compute model. + * + * @return the supportedFeatures value. + */ + public List supportedFeatures() { + return this.supportedFeatures; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PoolCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PoolCapability 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 PoolCapability. + */ + public static PoolCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PoolCapability deserializedPoolCapability = new PoolCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("recommendedComputeProcessor".equals(fieldName)) { + deserializedPoolCapability.recommendedComputeProcessor + = ComputeProcessorType.fromString(reader.getString()); + } else if ("supportedProcessors".equals(fieldName)) { + List supportedProcessors + = reader.readArray(reader1 -> ComputeProcessorCapability.fromJson(reader1)); + deserializedPoolCapability.supportedProcessors = supportedProcessors; + } else if ("supportedFeatures".equals(fieldName)) { + List supportedFeatures + = reader.readArray(reader1 -> PoolFeatureCapability.fromJson(reader1)); + deserializedPoolCapability.supportedFeatures = supportedFeatures; + } else { + reader.skipChildren(); + } + } + + return deserializedPoolCapability; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolComputeModel.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolComputeModel.java new file mode 100644 index 0000000000000..f58a62043eaf5 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolComputeModel.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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 compute model for a HorizonDB pool. + */ +@Fluent +public final class PoolComputeModel implements JsonSerializable { + /* + * The type of compute model. + */ + private PoolComputeModelType type; + + /* + * The processor type for the compute model. + */ + private ComputeProcessorType computeProcessor; + + /* + * The compute generation for the compute model. + */ + private int computeGeneration; + + /* + * The number of vCores. Allowed values are 1 through 192. + */ + private int vCores; + + /** + * Creates an instance of PoolComputeModel class. + */ + public PoolComputeModel() { + } + + /** + * Get the type property: The type of compute model. + * + * @return the type value. + */ + public PoolComputeModelType type() { + return this.type; + } + + /** + * Set the type property: The type of compute model. + * + * @param type the type value to set. + * @return the PoolComputeModel object itself. + */ + public PoolComputeModel withType(PoolComputeModelType type) { + this.type = type; + return this; + } + + /** + * Get the computeProcessor property: The processor type for the compute model. + * + * @return the computeProcessor value. + */ + public ComputeProcessorType computeProcessor() { + return this.computeProcessor; + } + + /** + * Set the computeProcessor property: The processor type for the compute model. + * + * @param computeProcessor the computeProcessor value to set. + * @return the PoolComputeModel object itself. + */ + public PoolComputeModel withComputeProcessor(ComputeProcessorType computeProcessor) { + this.computeProcessor = computeProcessor; + return this; + } + + /** + * Get the computeGeneration property: The compute generation for the compute model. + * + * @return the computeGeneration value. + */ + public int computeGeneration() { + return this.computeGeneration; + } + + /** + * Set the computeGeneration property: The compute generation for the compute model. + * + * @param computeGeneration the computeGeneration value to set. + * @return the PoolComputeModel object itself. + */ + public PoolComputeModel withComputeGeneration(int computeGeneration) { + this.computeGeneration = computeGeneration; + return this; + } + + /** + * Get the vCores property: The number of vCores. Allowed values are 1 through 192. + * + * @return the vCores value. + */ + public int vCores() { + return this.vCores; + } + + /** + * Set the vCores property: The number of vCores. Allowed values are 1 through 192. + * + * @param vCores the vCores value to set. + * @return the PoolComputeModel object itself. + */ + public PoolComputeModel withVCores(int vCores) { + this.vCores = vCores; + 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("computeProcessor", + this.computeProcessor == null ? null : this.computeProcessor.toString()); + jsonWriter.writeIntField("computeGeneration", this.computeGeneration); + jsonWriter.writeIntField("vCores", this.vCores); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PoolComputeModel from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PoolComputeModel 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 PoolComputeModel. + */ + public static PoolComputeModel fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PoolComputeModel deserializedPoolComputeModel = new PoolComputeModel(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedPoolComputeModel.type = PoolComputeModelType.fromString(reader.getString()); + } else if ("computeProcessor".equals(fieldName)) { + deserializedPoolComputeModel.computeProcessor = ComputeProcessorType.fromString(reader.getString()); + } else if ("computeGeneration".equals(fieldName)) { + deserializedPoolComputeModel.computeGeneration = reader.getInt(); + } else if ("vCores".equals(fieldName)) { + deserializedPoolComputeModel.vCores = reader.getInt(); + } else { + reader.skipChildren(); + } + } + + return deserializedPoolComputeModel; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolComputeModelForPatchUpdate.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolComputeModelForPatchUpdate.java new file mode 100644 index 0000000000000..c4c22454588f9 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolComputeModelForPatchUpdate.java @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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 compute model properties of a HorizonDB pool that can be updated. The object is recursively mergeable: omitted + * properties preserve their current values. Properties that do not apply to the current or target compute model type + * are rejected. When type changes, the request must include the complete target compute model. Subtype-specific + * constraints are validated against the effective merged configuration; invalid requests are rejected without changing + * the resource. + */ +@Fluent +public final class PoolComputeModelForPatchUpdate implements JsonSerializable { + /* + * The compute model type. Omit this property to retain the current type. Resubmitting the current type succeeds as + * an idempotent no-op. To change the type, supply all common properties and all properties required by the target + * type. + */ + private PoolComputeModelType type; + + /* + * The processor type for the compute model. Omission preserves the current processor type. + */ + private ComputeProcessorType computeProcessor; + + /* + * The compute generation for the compute model. Omission preserves the current compute generation. + */ + private Integer computeGeneration; + + /* + * The number of provisioned vCores. Allowed values are 1 through 192. This property applies only to a Provisioned + * compute model. Omission preserves the current value. + */ + private Integer vCores; + + /** + * Creates an instance of PoolComputeModelForPatchUpdate class. + */ + public PoolComputeModelForPatchUpdate() { + } + + /** + * Get the type property: The compute model type. Omit this property to retain the current type. Resubmitting the + * current type succeeds as an idempotent no-op. To change the type, supply all common properties and all properties + * required by the target type. + * + * @return the type value. + */ + public PoolComputeModelType type() { + return this.type; + } + + /** + * Set the type property: The compute model type. Omit this property to retain the current type. Resubmitting the + * current type succeeds as an idempotent no-op. To change the type, supply all common properties and all properties + * required by the target type. + * + * @param type the type value to set. + * @return the PoolComputeModelForPatchUpdate object itself. + */ + public PoolComputeModelForPatchUpdate withType(PoolComputeModelType type) { + this.type = type; + return this; + } + + /** + * Get the computeProcessor property: The processor type for the compute model. Omission preserves the current + * processor type. + * + * @return the computeProcessor value. + */ + public ComputeProcessorType computeProcessor() { + return this.computeProcessor; + } + + /** + * Set the computeProcessor property: The processor type for the compute model. Omission preserves the current + * processor type. + * + * @param computeProcessor the computeProcessor value to set. + * @return the PoolComputeModelForPatchUpdate object itself. + */ + public PoolComputeModelForPatchUpdate withComputeProcessor(ComputeProcessorType computeProcessor) { + this.computeProcessor = computeProcessor; + return this; + } + + /** + * Get the computeGeneration property: The compute generation for the compute model. Omission preserves the current + * compute generation. + * + * @return the computeGeneration value. + */ + public Integer computeGeneration() { + return this.computeGeneration; + } + + /** + * Set the computeGeneration property: The compute generation for the compute model. Omission preserves the current + * compute generation. + * + * @param computeGeneration the computeGeneration value to set. + * @return the PoolComputeModelForPatchUpdate object itself. + */ + public PoolComputeModelForPatchUpdate withComputeGeneration(Integer computeGeneration) { + this.computeGeneration = computeGeneration; + return this; + } + + /** + * Get the vCores property: The number of provisioned vCores. Allowed values are 1 through 192. This property + * applies only to a Provisioned compute model. Omission preserves the current value. + * + * @return the vCores value. + */ + public Integer vCores() { + return this.vCores; + } + + /** + * Set the vCores property: The number of provisioned vCores. Allowed values are 1 through 192. This property + * applies only to a Provisioned compute model. Omission preserves the current value. + * + * @param vCores the vCores value to set. + * @return the PoolComputeModelForPatchUpdate object itself. + */ + public PoolComputeModelForPatchUpdate withVCores(Integer vCores) { + this.vCores = vCores; + 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("computeProcessor", + this.computeProcessor == null ? null : this.computeProcessor.toString()); + jsonWriter.writeNumberField("computeGeneration", this.computeGeneration); + jsonWriter.writeNumberField("vCores", this.vCores); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PoolComputeModelForPatchUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PoolComputeModelForPatchUpdate 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 PoolComputeModelForPatchUpdate. + */ + public static PoolComputeModelForPatchUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PoolComputeModelForPatchUpdate deserializedPoolComputeModelForPatchUpdate + = new PoolComputeModelForPatchUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedPoolComputeModelForPatchUpdate.type + = PoolComputeModelType.fromString(reader.getString()); + } else if ("computeProcessor".equals(fieldName)) { + deserializedPoolComputeModelForPatchUpdate.computeProcessor + = ComputeProcessorType.fromString(reader.getString()); + } else if ("computeGeneration".equals(fieldName)) { + deserializedPoolComputeModelForPatchUpdate.computeGeneration + = reader.getNullable(JsonReader::getInt); + } else if ("vCores".equals(fieldName)) { + deserializedPoolComputeModelForPatchUpdate.vCores = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedPoolComputeModelForPatchUpdate; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolComputeModelType.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolComputeModelType.java new file mode 100644 index 0000000000000..699f4910c96e7 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolComputeModelType.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The compute model type. + */ +public final class PoolComputeModelType extends ExpandableStringEnum { + /** + * Provisioned compute model. + */ + public static final PoolComputeModelType PROVISIONED = fromString("Provisioned"); + + /** + * Creates a new instance of PoolComputeModelType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PoolComputeModelType() { + } + + /** + * Creates or finds a PoolComputeModelType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PoolComputeModelType. + */ + public static PoolComputeModelType fromString(String name) { + return fromString(name, PoolComputeModelType.class); + } + + /** + * Gets known PoolComputeModelType values. + * + * @return known PoolComputeModelType values. + */ + public static Collection values() { + return values(PoolComputeModelType.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolFeatureCapability.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolFeatureCapability.java new file mode 100644 index 0000000000000..8850f9f344836 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolFeatureCapability.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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; + +/** + * A HorizonDB Pool feature supported in a location. + */ +@Immutable +public final class PoolFeatureCapability implements JsonSerializable { + /* + * The name of the Pool feature. + */ + private String name; + + /** + * Creates an instance of PoolFeatureCapability class. + */ + private PoolFeatureCapability() { + } + + /** + * Get the name property: The name of the Pool feature. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PoolFeatureCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PoolFeatureCapability 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 PoolFeatureCapability. + */ + public static PoolFeatureCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PoolFeatureCapability deserializedPoolFeatureCapability = new PoolFeatureCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedPoolFeatureCapability.name = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPoolFeatureCapability; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolForPatchUpdate.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolForPatchUpdate.java new file mode 100644 index 0000000000000..e292a1c8cd4e7 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolForPatchUpdate.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.horizondb.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.Map; + +/** + * HorizonDB pool for update operations. + */ +@Fluent +public final class PoolForPatchUpdate implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + + /* + * The properties that can be updated for a HorizonDB pool. + */ + private PoolPropertiesForPatchUpdate properties; + + /** + * Creates an instance of PoolForPatchUpdate class. + */ + public PoolForPatchUpdate() { + } + + /** + * 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 PoolForPatchUpdate object itself. + */ + public PoolForPatchUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties property: The properties that can be updated for a HorizonDB pool. + * + * @return the properties value. + */ + public PoolPropertiesForPatchUpdate properties() { + return this.properties; + } + + /** + * Set the properties property: The properties that can be updated for a HorizonDB pool. + * + * @param properties the properties value to set. + * @return the PoolForPatchUpdate object itself. + */ + public PoolForPatchUpdate withProperties(PoolPropertiesForPatchUpdate properties) { + this.properties = properties; + 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("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PoolForPatchUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PoolForPatchUpdate 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 PoolForPatchUpdate. + */ + public static PoolForPatchUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PoolForPatchUpdate deserializedPoolForPatchUpdate = new PoolForPatchUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedPoolForPatchUpdate.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedPoolForPatchUpdate.properties = PoolPropertiesForPatchUpdate.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPoolForPatchUpdate; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolHighAvailability.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolHighAvailability.java new file mode 100644 index 0000000000000..34df62ff27d3d --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolHighAvailability.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.horizondb.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 high-availability configuration for a HorizonDB pool. + */ +@Fluent +public final class PoolHighAvailability implements JsonSerializable { + /* + * The high-availability mode. Disabled is required when nodeCount is 1. AnyZone or ZoneRedundant is required when + * nodeCount is 2 through 16. + */ + private PoolHighAvailabilityMode mode; + + /** + * Creates an instance of PoolHighAvailability class. + */ + public PoolHighAvailability() { + } + + /** + * Get the mode property: The high-availability mode. Disabled is required when nodeCount is 1. AnyZone or + * ZoneRedundant is required when nodeCount is 2 through 16. + * + * @return the mode value. + */ + public PoolHighAvailabilityMode mode() { + return this.mode; + } + + /** + * Set the mode property: The high-availability mode. Disabled is required when nodeCount is 1. AnyZone or + * ZoneRedundant is required when nodeCount is 2 through 16. + * + * @param mode the mode value to set. + * @return the PoolHighAvailability object itself. + */ + public PoolHighAvailability withMode(PoolHighAvailabilityMode mode) { + this.mode = mode; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PoolHighAvailability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PoolHighAvailability 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 PoolHighAvailability. + */ + public static PoolHighAvailability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PoolHighAvailability deserializedPoolHighAvailability = new PoolHighAvailability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("mode".equals(fieldName)) { + deserializedPoolHighAvailability.mode = PoolHighAvailabilityMode.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPoolHighAvailability; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolHighAvailabilityMode.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolHighAvailabilityMode.java new file mode 100644 index 0000000000000..e96ec3525fbe6 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolHighAvailabilityMode.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The high-availability mode requested for a HorizonDB pool. + */ +public final class PoolHighAvailabilityMode extends ExpandableStringEnum { + /** + * High availability is disabled. This mode is valid only when nodeCount is 1. + */ + public static final PoolHighAvailabilityMode DISABLED = fromString("Disabled"); + + /** + * The service may allocate nodes in the same availability zone or across availability zones. This mode is valid + * only when nodeCount is 2 through 16. + */ + public static final PoolHighAvailabilityMode ANY_ZONE = fromString("AnyZone"); + + /** + * The service must allocate nodes across availability zones. This mode is valid only when nodeCount is 2 through + * 16. + */ + public static final PoolHighAvailabilityMode ZONE_REDUNDANT = fromString("ZoneRedundant"); + + /** + * Creates a new instance of PoolHighAvailabilityMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PoolHighAvailabilityMode() { + } + + /** + * Creates or finds a PoolHighAvailabilityMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding PoolHighAvailabilityMode. + */ + public static PoolHighAvailabilityMode fromString(String name) { + return fromString(name, PoolHighAvailabilityMode.class); + } + + /** + * Gets known PoolHighAvailabilityMode values. + * + * @return known PoolHighAvailabilityMode values. + */ + public static Collection values() { + return values(PoolHighAvailabilityMode.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolHighAvailabilityPatch.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolHighAvailabilityPatch.java new file mode 100644 index 0000000000000..76abe0609975e --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolHighAvailabilityPatch.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.horizondb.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 high-availability configuration for a HorizonDB pool update. + */ +@Fluent +public final class PoolHighAvailabilityPatch implements JsonSerializable { + /* + * The high-availability mode. Omission preserves the current mode before the service validates it with the + * effective nodeCount. + */ + private PoolHighAvailabilityMode mode; + + /** + * Creates an instance of PoolHighAvailabilityPatch class. + */ + public PoolHighAvailabilityPatch() { + } + + /** + * Get the mode property: The high-availability mode. Omission preserves the current mode before the service + * validates it with the effective nodeCount. + * + * @return the mode value. + */ + public PoolHighAvailabilityMode mode() { + return this.mode; + } + + /** + * Set the mode property: The high-availability mode. Omission preserves the current mode before the service + * validates it with the effective nodeCount. + * + * @param mode the mode value to set. + * @return the PoolHighAvailabilityPatch object itself. + */ + public PoolHighAvailabilityPatch withMode(PoolHighAvailabilityMode mode) { + this.mode = mode; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PoolHighAvailabilityPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PoolHighAvailabilityPatch 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 PoolHighAvailabilityPatch. + */ + public static PoolHighAvailabilityPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PoolHighAvailabilityPatch deserializedPoolHighAvailabilityPatch = new PoolHighAvailabilityPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("mode".equals(fieldName)) { + deserializedPoolHighAvailabilityPatch.mode + = PoolHighAvailabilityMode.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPoolHighAvailabilityPatch; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolParameterGroupReference.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolParameterGroupReference.java new file mode 100644 index 0000000000000..425058711503c --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolParameterGroupReference.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A reference to the parameter group associated with a HorizonDB pool. The schema represents both default and + * customer-created parameter groups for create and update compatibility. In this API version, initial pool creation + * accepts only the corresponding default parameter group; PUT updates to an existing pool can associate either group + * type. + */ +@Fluent +public final class PoolParameterGroupReference implements JsonSerializable { + /* + * The Azure resource ID of the associated parameter group. Initial pool creation in this API version requires the + * corresponding Microsoft.HorizonDb/locations/parameterGroups resource. For an existing pool, PUT can specify + * either the corresponding default group or a customer-created Microsoft.HorizonDb/parameterGroups resource. + */ + private String parameterGroupResourceId; + + /* + * Determines when dynamic parameter changes from the associated parameter group become effective. Static parameter + * changes always require a customer-initiated pool Restart, regardless of this value. Stop followed by Start and + * scheduled maintenance do not apply pending parameter changes. + */ + private ParameterApplyMethod applyMethod; + + /* + * The synchronization status between the pool and its parameter group. PendingReboot changes remain pending across + * Stop, Start, and scheduled maintenance and become effective only after a customer-initiated Restart. + */ + private ParameterGroupSyncStatus syncStatus; + + /** + * Creates an instance of PoolParameterGroupReference class. + */ + public PoolParameterGroupReference() { + } + + /** + * Get the parameterGroupResourceId property: The Azure resource ID of the associated parameter group. Initial pool + * creation in this API version requires the corresponding Microsoft.HorizonDb/locations/parameterGroups resource. + * For an existing pool, PUT can specify either the corresponding default group or a customer-created + * Microsoft.HorizonDb/parameterGroups resource. + * + * @return the parameterGroupResourceId value. + */ + public String parameterGroupResourceId() { + return this.parameterGroupResourceId; + } + + /** + * Set the parameterGroupResourceId property: The Azure resource ID of the associated parameter group. Initial pool + * creation in this API version requires the corresponding Microsoft.HorizonDb/locations/parameterGroups resource. + * For an existing pool, PUT can specify either the corresponding default group or a customer-created + * Microsoft.HorizonDb/parameterGroups resource. + * + * @param parameterGroupResourceId the parameterGroupResourceId value to set. + * @return the PoolParameterGroupReference object itself. + */ + public PoolParameterGroupReference withParameterGroupResourceId(String parameterGroupResourceId) { + this.parameterGroupResourceId = parameterGroupResourceId; + return this; + } + + /** + * Get the applyMethod property: Determines when dynamic parameter changes from the associated parameter group + * become effective. Static parameter changes always require a customer-initiated pool Restart, regardless of this + * value. Stop followed by Start and scheduled maintenance do not apply pending parameter changes. + * + * @return the applyMethod value. + */ + public ParameterApplyMethod applyMethod() { + return this.applyMethod; + } + + /** + * Set the applyMethod property: Determines when dynamic parameter changes from the associated parameter group + * become effective. Static parameter changes always require a customer-initiated pool Restart, regardless of this + * value. Stop followed by Start and scheduled maintenance do not apply pending parameter changes. + * + * @param applyMethod the applyMethod value to set. + * @return the PoolParameterGroupReference object itself. + */ + public PoolParameterGroupReference withApplyMethod(ParameterApplyMethod applyMethod) { + this.applyMethod = applyMethod; + return this; + } + + /** + * Get the syncStatus property: The synchronization status between the pool and its parameter group. PendingReboot + * changes remain pending across Stop, Start, and scheduled maintenance and become effective only after a + * customer-initiated Restart. + * + * @return the syncStatus value. + */ + public ParameterGroupSyncStatus syncStatus() { + return this.syncStatus; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("parameterGroupResourceId", this.parameterGroupResourceId); + jsonWriter.writeStringField("applyMethod", this.applyMethod == null ? null : this.applyMethod.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PoolParameterGroupReference from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PoolParameterGroupReference 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 PoolParameterGroupReference. + */ + public static PoolParameterGroupReference fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PoolParameterGroupReference deserializedPoolParameterGroupReference = new PoolParameterGroupReference(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("parameterGroupResourceId".equals(fieldName)) { + deserializedPoolParameterGroupReference.parameterGroupResourceId = reader.getString(); + } else if ("applyMethod".equals(fieldName)) { + deserializedPoolParameterGroupReference.applyMethod + = ParameterApplyMethod.fromString(reader.getString()); + } else if ("syncStatus".equals(fieldName)) { + deserializedPoolParameterGroupReference.syncStatus + = ParameterGroupSyncStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPoolParameterGroupReference; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolParameterGroupReferenceForPatchUpdate.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolParameterGroupReferenceForPatchUpdate.java new file mode 100644 index 0000000000000..376b5c82df9f3 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolParameterGroupReferenceForPatchUpdate.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A parameter group reference for updating an existing HorizonDB pool. The pool can switch in either direction between + * its corresponding default parameter group and a customer-created parameter group. + */ +@Fluent +public final class PoolParameterGroupReferenceForPatchUpdate + implements JsonSerializable { + /* + * The Azure resource ID of the corresponding default or customer-created parameter group to associate with the + * existing pool. + */ + private String parameterGroupResourceId; + + /* + * Determines when dynamic parameter changes from the associated parameter group become effective. Static parameter + * changes always require a customer-initiated pool Restart, regardless of this value. Stop followed by Start and + * scheduled maintenance do not apply pending parameter changes. + */ + private ParameterApplyMethod applyMethod; + + /** + * Creates an instance of PoolParameterGroupReferenceForPatchUpdate class. + */ + public PoolParameterGroupReferenceForPatchUpdate() { + } + + /** + * Get the parameterGroupResourceId property: The Azure resource ID of the corresponding default or customer-created + * parameter group to associate with the existing pool. + * + * @return the parameterGroupResourceId value. + */ + public String parameterGroupResourceId() { + return this.parameterGroupResourceId; + } + + /** + * Set the parameterGroupResourceId property: The Azure resource ID of the corresponding default or customer-created + * parameter group to associate with the existing pool. + * + * @param parameterGroupResourceId the parameterGroupResourceId value to set. + * @return the PoolParameterGroupReferenceForPatchUpdate object itself. + */ + public PoolParameterGroupReferenceForPatchUpdate withParameterGroupResourceId(String parameterGroupResourceId) { + this.parameterGroupResourceId = parameterGroupResourceId; + return this; + } + + /** + * Get the applyMethod property: Determines when dynamic parameter changes from the associated parameter group + * become effective. Static parameter changes always require a customer-initiated pool Restart, regardless of this + * value. Stop followed by Start and scheduled maintenance do not apply pending parameter changes. + * + * @return the applyMethod value. + */ + public ParameterApplyMethod applyMethod() { + return this.applyMethod; + } + + /** + * Set the applyMethod property: Determines when dynamic parameter changes from the associated parameter group + * become effective. Static parameter changes always require a customer-initiated pool Restart, regardless of this + * value. Stop followed by Start and scheduled maintenance do not apply pending parameter changes. + * + * @param applyMethod the applyMethod value to set. + * @return the PoolParameterGroupReferenceForPatchUpdate object itself. + */ + public PoolParameterGroupReferenceForPatchUpdate withApplyMethod(ParameterApplyMethod applyMethod) { + this.applyMethod = applyMethod; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("parameterGroupResourceId", this.parameterGroupResourceId); + jsonWriter.writeStringField("applyMethod", this.applyMethod == null ? null : this.applyMethod.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PoolParameterGroupReferenceForPatchUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PoolParameterGroupReferenceForPatchUpdate 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 PoolParameterGroupReferenceForPatchUpdate. + */ + public static PoolParameterGroupReferenceForPatchUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PoolParameterGroupReferenceForPatchUpdate deserializedPoolParameterGroupReferenceForPatchUpdate + = new PoolParameterGroupReferenceForPatchUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("parameterGroupResourceId".equals(fieldName)) { + deserializedPoolParameterGroupReferenceForPatchUpdate.parameterGroupResourceId = reader.getString(); + } else if ("applyMethod".equals(fieldName)) { + deserializedPoolParameterGroupReferenceForPatchUpdate.applyMethod + = ParameterApplyMethod.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPoolParameterGroupReferenceForPatchUpdate; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolProperties.java new file mode 100644 index 0000000000000..4350e24d7ad8c --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolProperties.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.horizondb.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; + +/** + * Properties of a HorizonDB pool. + */ +@Fluent +public final class PoolProperties implements JsonSerializable { + /* + * Current state of the pool. + */ + private PoolState state; + + /* + * The required compute model for the HorizonDB pool. + */ + private PoolComputeModel computeModel; + + /* + * The required number of nodes to allocate and assign to the pool. Allowed values are 1 through 16. To deallocate + * runtime compute without changing the configured node count, stop the pool. + */ + private int nodeCount; + + /* + * The required high-availability configuration for the pool. mode must be Disabled when nodeCount is 1, and must be + * AnyZone or ZoneRedundant when nodeCount is 2 through 16. + */ + private PoolHighAvailability highAvailability; + + /* + * The required parameter group associated with the pool. When creating a new pool in this API version, the caller + * must supply the corresponding default parameter group; customer-created parameter groups are not accepted during + * creation. For an existing pool, PUT or PATCH can associate either the corresponding default parameter group or a + * customer-created parameter group. The create-visible shape intentionally supports both resource ID forms so a + * future API version can allow customer-created parameter groups during creation without a breaking schema change. + */ + private PoolParameterGroupReference parameterGroup; + + /* + * The scheduled maintenance configuration for the pool. The properties available depend on the selected maintenance + * management type. + */ + private ScheduledMaintenanceProperties scheduledMaintenance; + + /* + * The provisioning state of the pool. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of PoolProperties class. + */ + public PoolProperties() { + } + + /** + * Get the state property: Current state of the pool. + * + * @return the state value. + */ + public PoolState state() { + return this.state; + } + + /** + * Get the computeModel property: The required compute model for the HorizonDB pool. + * + * @return the computeModel value. + */ + public PoolComputeModel computeModel() { + return this.computeModel; + } + + /** + * Set the computeModel property: The required compute model for the HorizonDB pool. + * + * @param computeModel the computeModel value to set. + * @return the PoolProperties object itself. + */ + public PoolProperties withComputeModel(PoolComputeModel computeModel) { + this.computeModel = computeModel; + return this; + } + + /** + * Get the nodeCount property: The required number of nodes to allocate and assign to the pool. Allowed values are 1 + * through 16. To deallocate runtime compute without changing the configured node count, stop the pool. + * + * @return the nodeCount value. + */ + public int nodeCount() { + return this.nodeCount; + } + + /** + * Set the nodeCount property: The required number of nodes to allocate and assign to the pool. Allowed values are 1 + * through 16. To deallocate runtime compute without changing the configured node count, stop the pool. + * + * @param nodeCount the nodeCount value to set. + * @return the PoolProperties object itself. + */ + public PoolProperties withNodeCount(int nodeCount) { + this.nodeCount = nodeCount; + return this; + } + + /** + * Get the highAvailability property: The required high-availability configuration for the pool. mode must be + * Disabled when nodeCount is 1, and must be AnyZone or ZoneRedundant when nodeCount is 2 through 16. + * + * @return the highAvailability value. + */ + public PoolHighAvailability highAvailability() { + return this.highAvailability; + } + + /** + * Set the highAvailability property: The required high-availability configuration for the pool. mode must be + * Disabled when nodeCount is 1, and must be AnyZone or ZoneRedundant when nodeCount is 2 through 16. + * + * @param highAvailability the highAvailability value to set. + * @return the PoolProperties object itself. + */ + public PoolProperties withHighAvailability(PoolHighAvailability highAvailability) { + this.highAvailability = highAvailability; + return this; + } + + /** + * Get the parameterGroup property: The required parameter group associated with the pool. When creating a new pool + * in this API version, the caller must supply the corresponding default parameter group; customer-created parameter + * groups are not accepted during creation. For an existing pool, PUT or PATCH can associate either the + * corresponding default parameter group or a customer-created parameter group. The create-visible shape + * intentionally supports both resource ID forms so a future API version can allow customer-created parameter groups + * during creation without a breaking schema change. + * + * @return the parameterGroup value. + */ + public PoolParameterGroupReference parameterGroup() { + return this.parameterGroup; + } + + /** + * Set the parameterGroup property: The required parameter group associated with the pool. When creating a new pool + * in this API version, the caller must supply the corresponding default parameter group; customer-created parameter + * groups are not accepted during creation. For an existing pool, PUT or PATCH can associate either the + * corresponding default parameter group or a customer-created parameter group. The create-visible shape + * intentionally supports both resource ID forms so a future API version can allow customer-created parameter groups + * during creation without a breaking schema change. + * + * @param parameterGroup the parameterGroup value to set. + * @return the PoolProperties object itself. + */ + public PoolProperties withParameterGroup(PoolParameterGroupReference parameterGroup) { + this.parameterGroup = parameterGroup; + return this; + } + + /** + * Get the scheduledMaintenance property: The scheduled maintenance configuration for the pool. The properties + * available depend on the selected maintenance management type. + * + * @return the scheduledMaintenance value. + */ + public ScheduledMaintenanceProperties scheduledMaintenance() { + return this.scheduledMaintenance; + } + + /** + * Set the scheduledMaintenance property: The scheduled maintenance configuration for the pool. The properties + * available depend on the selected maintenance management type. + * + * @param scheduledMaintenance the scheduledMaintenance value to set. + * @return the PoolProperties object itself. + */ + public PoolProperties withScheduledMaintenance(ScheduledMaintenanceProperties scheduledMaintenance) { + this.scheduledMaintenance = scheduledMaintenance; + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the pool. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("computeModel", this.computeModel); + jsonWriter.writeIntField("nodeCount", this.nodeCount); + jsonWriter.writeJsonField("highAvailability", this.highAvailability); + jsonWriter.writeJsonField("parameterGroup", this.parameterGroup); + jsonWriter.writeJsonField("scheduledMaintenance", this.scheduledMaintenance); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PoolProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PoolProperties 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 PoolProperties. + */ + public static PoolProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PoolProperties deserializedPoolProperties = new PoolProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("computeModel".equals(fieldName)) { + deserializedPoolProperties.computeModel = PoolComputeModel.fromJson(reader); + } else if ("nodeCount".equals(fieldName)) { + deserializedPoolProperties.nodeCount = reader.getInt(); + } else if ("highAvailability".equals(fieldName)) { + deserializedPoolProperties.highAvailability = PoolHighAvailability.fromJson(reader); + } else if ("parameterGroup".equals(fieldName)) { + deserializedPoolProperties.parameterGroup = PoolParameterGroupReference.fromJson(reader); + } else if ("state".equals(fieldName)) { + deserializedPoolProperties.state = PoolState.fromString(reader.getString()); + } else if ("scheduledMaintenance".equals(fieldName)) { + deserializedPoolProperties.scheduledMaintenance = ScheduledMaintenanceProperties.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedPoolProperties.provisioningState = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPoolProperties; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolPropertiesForPatchUpdate.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolPropertiesForPatchUpdate.java new file mode 100644 index 0000000000000..c7bf4a0ac427a --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolPropertiesForPatchUpdate.java @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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; + +/** + * Properties of a HorizonDB pool for update operations. + */ +@Fluent +public final class PoolPropertiesForPatchUpdate implements JsonSerializable { + /* + * The compute model properties to update. Omitted properties preserve their current values. To change the compute + * model type, supply the complete target compute model, including type, computeProcessor, computeGeneration, and + * all properties required by the target type. + */ + private PoolComputeModelForPatchUpdate computeModel; + + /* + * The number of nodes to allocate and assign to the pool. Allowed values are 1 through 16. Omission preserves the + * current configured value. To deallocate runtime compute without changing the configured node count, stop the + * pool. + */ + private Integer nodeCount; + + /* + * The high-availability configuration to update. Omission preserves the current mode. The service recursively + * merges omitted PATCH properties with the existing resource before validating the effective nodeCount and mode + * together. + */ + private PoolHighAvailabilityPatch highAvailability; + + /* + * The corresponding default or a customer-created parameter group to associate with the existing pool. Customers + * can switch in either direction between these group types. Omission preserves the current association. + */ + private PoolParameterGroupReferenceForPatchUpdate parameterGroup; + + /* + * The scheduled maintenance configuration to update for the pool. When supplied, the complete configuration for the + * selected maintenance management type is required. Omission preserves the current configuration. + */ + private ScheduledMaintenancePropertiesForPatchUpdate scheduledMaintenance; + + /** + * Creates an instance of PoolPropertiesForPatchUpdate class. + */ + public PoolPropertiesForPatchUpdate() { + } + + /** + * Get the computeModel property: The compute model properties to update. Omitted properties preserve their current + * values. To change the compute model type, supply the complete target compute model, including type, + * computeProcessor, computeGeneration, and all properties required by the target type. + * + * @return the computeModel value. + */ + public PoolComputeModelForPatchUpdate computeModel() { + return this.computeModel; + } + + /** + * Set the computeModel property: The compute model properties to update. Omitted properties preserve their current + * values. To change the compute model type, supply the complete target compute model, including type, + * computeProcessor, computeGeneration, and all properties required by the target type. + * + * @param computeModel the computeModel value to set. + * @return the PoolPropertiesForPatchUpdate object itself. + */ + public PoolPropertiesForPatchUpdate withComputeModel(PoolComputeModelForPatchUpdate computeModel) { + this.computeModel = computeModel; + return this; + } + + /** + * Get the nodeCount property: The number of nodes to allocate and assign to the pool. Allowed values are 1 through + * 16. Omission preserves the current configured value. To deallocate runtime compute without changing the + * configured node count, stop the pool. + * + * @return the nodeCount value. + */ + public Integer nodeCount() { + return this.nodeCount; + } + + /** + * Set the nodeCount property: The number of nodes to allocate and assign to the pool. Allowed values are 1 through + * 16. Omission preserves the current configured value. To deallocate runtime compute without changing the + * configured node count, stop the pool. + * + * @param nodeCount the nodeCount value to set. + * @return the PoolPropertiesForPatchUpdate object itself. + */ + public PoolPropertiesForPatchUpdate withNodeCount(Integer nodeCount) { + this.nodeCount = nodeCount; + return this; + } + + /** + * Get the highAvailability property: The high-availability configuration to update. Omission preserves the current + * mode. The service recursively merges omitted PATCH properties with the existing resource before validating the + * effective nodeCount and mode together. + * + * @return the highAvailability value. + */ + public PoolHighAvailabilityPatch highAvailability() { + return this.highAvailability; + } + + /** + * Set the highAvailability property: The high-availability configuration to update. Omission preserves the current + * mode. The service recursively merges omitted PATCH properties with the existing resource before validating the + * effective nodeCount and mode together. + * + * @param highAvailability the highAvailability value to set. + * @return the PoolPropertiesForPatchUpdate object itself. + */ + public PoolPropertiesForPatchUpdate withHighAvailability(PoolHighAvailabilityPatch highAvailability) { + this.highAvailability = highAvailability; + return this; + } + + /** + * Get the parameterGroup property: The corresponding default or a customer-created parameter group to associate + * with the existing pool. Customers can switch in either direction between these group types. Omission preserves + * the current association. + * + * @return the parameterGroup value. + */ + public PoolParameterGroupReferenceForPatchUpdate parameterGroup() { + return this.parameterGroup; + } + + /** + * Set the parameterGroup property: The corresponding default or a customer-created parameter group to associate + * with the existing pool. Customers can switch in either direction between these group types. Omission preserves + * the current association. + * + * @param parameterGroup the parameterGroup value to set. + * @return the PoolPropertiesForPatchUpdate object itself. + */ + public PoolPropertiesForPatchUpdate withParameterGroup(PoolParameterGroupReferenceForPatchUpdate parameterGroup) { + this.parameterGroup = parameterGroup; + return this; + } + + /** + * Get the scheduledMaintenance property: The scheduled maintenance configuration to update for the pool. When + * supplied, the complete configuration for the selected maintenance management type is required. Omission preserves + * the current configuration. + * + * @return the scheduledMaintenance value. + */ + public ScheduledMaintenancePropertiesForPatchUpdate scheduledMaintenance() { + return this.scheduledMaintenance; + } + + /** + * Set the scheduledMaintenance property: The scheduled maintenance configuration to update for the pool. When + * supplied, the complete configuration for the selected maintenance management type is required. Omission preserves + * the current configuration. + * + * @param scheduledMaintenance the scheduledMaintenance value to set. + * @return the PoolPropertiesForPatchUpdate object itself. + */ + public PoolPropertiesForPatchUpdate + withScheduledMaintenance(ScheduledMaintenancePropertiesForPatchUpdate scheduledMaintenance) { + this.scheduledMaintenance = scheduledMaintenance; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("computeModel", this.computeModel); + jsonWriter.writeNumberField("nodeCount", this.nodeCount); + jsonWriter.writeJsonField("highAvailability", this.highAvailability); + jsonWriter.writeJsonField("parameterGroup", this.parameterGroup); + jsonWriter.writeJsonField("scheduledMaintenance", this.scheduledMaintenance); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PoolPropertiesForPatchUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PoolPropertiesForPatchUpdate 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 PoolPropertiesForPatchUpdate. + */ + public static PoolPropertiesForPatchUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PoolPropertiesForPatchUpdate deserializedPoolPropertiesForPatchUpdate = new PoolPropertiesForPatchUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("computeModel".equals(fieldName)) { + deserializedPoolPropertiesForPatchUpdate.computeModel + = PoolComputeModelForPatchUpdate.fromJson(reader); + } else if ("nodeCount".equals(fieldName)) { + deserializedPoolPropertiesForPatchUpdate.nodeCount = reader.getNullable(JsonReader::getInt); + } else if ("highAvailability".equals(fieldName)) { + deserializedPoolPropertiesForPatchUpdate.highAvailability + = PoolHighAvailabilityPatch.fromJson(reader); + } else if ("parameterGroup".equals(fieldName)) { + deserializedPoolPropertiesForPatchUpdate.parameterGroup + = PoolParameterGroupReferenceForPatchUpdate.fromJson(reader); + } else if ("scheduledMaintenance".equals(fieldName)) { + deserializedPoolPropertiesForPatchUpdate.scheduledMaintenance + = ScheduledMaintenancePropertiesForPatchUpdate.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPoolPropertiesForPatchUpdate; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolState.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolState.java new file mode 100644 index 0000000000000..1392496767707 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PoolState.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Current state of a HorizonDB pool. + */ +public final class PoolState extends ExpandableStringEnum { + /** + * Is ready and operational. + */ + public static final PoolState READY = fromString("Ready"); + + /** + * Is provisioning. + */ + public static final PoolState PROVISIONING = fromString("Provisioning"); + + /** + * Is being deleted. + */ + public static final PoolState DELETING = fromString("Deleting"); + + /** + * Is inaccessible. + */ + public static final PoolState INACCESSIBLE = fromString("Inaccessible"); + + /** + * Is being updated. + */ + public static final PoolState UPDATING = fromString("Updating"); + + /** + * Is starting up. + */ + public static final PoolState STARTING = fromString("Starting"); + + /** + * Is restarting. + */ + public static final PoolState RESTARTING = fromString("Restarting"); + + /** + * Is stopping. + */ + public static final PoolState STOPPING = fromString("Stopping"); + + /** + * Is stopped. + */ + public static final PoolState STOPPED = fromString("Stopped"); + + /** + * Creates a new instance of PoolState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PoolState() { + } + + /** + * Creates or finds a PoolState from its string representation. + * + * @param name a name to look for. + * @return the corresponding PoolState. + */ + public static PoolState fromString(String name) { + return fromString(name, PoolState.class); + } + + /** + * Gets known PoolState values. + * + * @return known PoolState values. + */ + public static Collection values() { + return values(PoolState.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Pools.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Pools.java new file mode 100644 index 0000000000000..97c3a70e2dbc0 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/Pools.java @@ -0,0 +1,292 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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 Pools. + */ +public interface Pools { + /** + * Gets information about a HorizonDB pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a HorizonDB pool along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String clusterName, String poolName, Context context); + + /** + * Gets information about a HorizonDB pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a HorizonDB pool. + */ + Pool get(String resourceGroupName, String clusterName, String poolName); + + /** + * Deletes a HorizonDB pool together with the Pool-scoped Endpoint whose associatedResourceId identifies that Pool + * and all FirewallRule children of that Endpoint. The Endpoint cannot outlive or be deleted independently from its + * Pool. When this is the Cluster's last surviving Pool, the service also disconnects every existing private + * endpoint connection associated with the Cluster by setting its privateLinkServiceConnectionState.status to + * Rejected and providing a description that the last Pool was deleted. The HorizonDB private endpoint connection + * resources remain available for inspection and cleanup, and customer-owned Microsoft.Network/privateEndpoints + * resources are not deleted. The delete long-running operation completes only after all required private endpoint + * disconnections have completed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 clusterName, String poolName); + + /** + * Deletes a HorizonDB pool together with the Pool-scoped Endpoint whose associatedResourceId identifies that Pool + * and all FirewallRule children of that Endpoint. The Endpoint cannot outlive or be deleted independently from its + * Pool. When this is the Cluster's last surviving Pool, the service also disconnects every existing private + * endpoint connection associated with the Cluster by setting its privateLinkServiceConnectionState.status to + * Rejected and providing a description that the last Pool was deleted. The HorizonDB private endpoint connection + * resources remain available for inspection and cleanup, and customer-owned Microsoft.Network/privateEndpoints + * resources are not deleted. The delete long-running operation completes only after all required private endpoint + * disconnections have completed. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 clusterName, String poolName, Context context); + + /** + * Lists all HorizonDB pools in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Pool list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String clusterName); + + /** + * Lists all HorizonDB pools in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB 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 Pool list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String clusterName, Context context); + + /** + * Starts a stopped HorizonDB pool. Power operations are supported only at pool scope in this API version; there is + * no cluster-level start action. Start does not apply pending dynamic or static parameter changes; + * parameterGroup.syncStatus remains PendingReboot until a customer-initiated Restart. When the pool is already + * Ready, the operation succeeds as a true idempotent no-op and likewise leaves pending parameter changes pending. + * The operation is allowed when the pool has no allocated nodes. After the Pool is running, its Pool-scoped + * ReadOnly Endpoint routes only when at least one allocated node is not currently playing the read-write role. The + * request fails with 409 Conflict when another operation is in progress or the pool is in any other incompatible + * state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool. + */ + Pool start(String resourceGroupName, String clusterName, String poolName); + + /** + * Starts a stopped HorizonDB pool. Power operations are supported only at pool scope in this API version; there is + * no cluster-level start action. Start does not apply pending dynamic or static parameter changes; + * parameterGroup.syncStatus remains PendingReboot until a customer-initiated Restart. When the pool is already + * Ready, the operation succeeds as a true idempotent no-op and likewise leaves pending parameter changes pending. + * The operation is allowed when the pool has no allocated nodes. After the Pool is running, its Pool-scoped + * ReadOnly Endpoint routes only when at least one allocated node is not currently playing the read-write role. The + * request fails with 409 Conflict when another operation is in progress or the pool is in any other incompatible + * state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool. + */ + Pool start(String resourceGroupName, String clusterName, String poolName, Context context); + + /** + * Stops a running HorizonDB pool and deallocates compute. Power operations are supported only at pool scope in this + * API version; there is no cluster-level stop action. Stop does not apply pending dynamic or static parameter + * changes; parameterGroup.syncStatus remains PendingReboot. A subsequent Start also preserves those pending + * changes. The operation succeeds as an idempotent no-op when the pool is already Stopped. It is allowed when the + * pool has no allocated nodes. The Pool-scoped ReadOnly Endpoint remains discoverable but has no routing + * destination while the Pool is Stopped. The request fails with 409 Conflict when another operation is in progress + * or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool. + */ + Pool stop(String resourceGroupName, String clusterName, String poolName); + + /** + * Stops a running HorizonDB pool and deallocates compute. Power operations are supported only at pool scope in this + * API version; there is no cluster-level stop action. Stop does not apply pending dynamic or static parameter + * changes; parameterGroup.syncStatus remains PendingReboot. A subsequent Start also preserves those pending + * changes. The operation succeeds as an idempotent no-op when the pool is already Stopped. It is allowed when the + * pool has no allocated nodes. The Pool-scoped ReadOnly Endpoint remains discoverable but has no routing + * destination while the Pool is Stopped. The request fails with 409 Conflict when another operation is in progress + * or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool. + */ + Pool stop(String resourceGroupName, String clusterName, String poolName, Context context); + + /** + * Restarts the PostgreSQL container on all allocated nodes in a ready HorizonDB pool and applies pending dynamic + * and static parameter changes. This customer-initiated Restart is the only operation that applies static parameter + * changes or dynamic parameter changes requested with PendingReboot; Stop followed by Start and scheduled + * maintenance do not apply them. Power operations are supported only at pool scope in this API version; there is no + * cluster-level restart action. When the pool has no allocated nodes, the operation succeeds without restarting any + * nodes, pending changes are considered applied, parameterGroup.syncStatus becomes InSync, and the resulting + * configuration applies to nodes allocated later. The request fails with 409 Conflict when another operation is in + * progress or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool. + */ + Pool restart(String resourceGroupName, String clusterName, String poolName); + + /** + * Restarts the PostgreSQL container on all allocated nodes in a ready HorizonDB pool and applies pending dynamic + * and static parameter changes. This customer-initiated Restart is the only operation that applies static parameter + * changes or dynamic parameter changes requested with PendingReboot; Stop followed by Start and scheduled + * maintenance do not apply them. Power operations are supported only at pool scope in this API version; there is no + * cluster-level restart action. When the pool has no allocated nodes, the operation succeeds without restarting any + * nodes, pending changes are considered applied, parameterGroup.syncStatus becomes InSync, and the resulting + * configuration applies to nodes allocated later. The request fails with 409 Conflict when another operation is in + * progress or the pool is in any other incompatible state. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @param poolName The name of the HorizonDB pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents the HorizonDB pool. + */ + Pool restart(String resourceGroupName, String clusterName, String poolName, Context context); + + /** + * Gets information about a HorizonDB pool. + * + * @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 information about a HorizonDB pool along with {@link Response}. + */ + Pool getById(String id); + + /** + * Gets information about a HorizonDB pool. + * + * @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 information about a HorizonDB pool along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a HorizonDB pool together with the Pool-scoped Endpoint whose associatedResourceId identifies that Pool + * and all FirewallRule children of that Endpoint. The Endpoint cannot outlive or be deleted independently from its + * Pool. When this is the Cluster's last surviving Pool, the service also disconnects every existing private + * endpoint connection associated with the Cluster by setting its privateLinkServiceConnectionState.status to + * Rejected and providing a description that the last Pool was deleted. The HorizonDB private endpoint connection + * resources remain available for inspection and cleanup, and customer-owned Microsoft.Network/privateEndpoints + * resources are not deleted. The delete long-running operation completes only after all required private endpoint + * disconnections have completed. + * + * @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); + + /** + * Deletes a HorizonDB pool together with the Pool-scoped Endpoint whose associatedResourceId identifies that Pool + * and all FirewallRule children of that Endpoint. The Endpoint cannot outlive or be deleted independently from its + * Pool. When this is the Cluster's last surviving Pool, the service also disconnects every existing private + * endpoint connection associated with the Cluster by setting its privateLinkServiceConnectionState.status to + * Rejected and providing a description that the last Pool was deleted. The HorizonDB private endpoint connection + * resources remain available for inspection and cleanup, and customer-owned Microsoft.Network/privateEndpoints + * resources are not deleted. The delete long-running operation completes only after all required private endpoint + * disconnections have completed. + * + * @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 Pool resource. + * + * @param name resource name. + * @return the first stage of the new Pool definition. + */ + Pool.DefinitionStages.Blank define(String name); +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PostgreSqlCapabilityVersion.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PostgreSqlCapabilityVersion.java new file mode 100644 index 0000000000000..8f2ab454042b3 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PostgreSqlCapabilityVersion.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * A PostgreSQL major version advertised by the HorizonDB capabilities API. + */ +public final class PostgreSqlCapabilityVersion extends ExpandableStringEnum { + /** + * PostgreSQL major version 17. + */ + public static final PostgreSqlCapabilityVersion V17 = fromString("17"); + + /** + * PostgreSQL major version 18. + */ + public static final PostgreSqlCapabilityVersion V18 = fromString("18"); + + /** + * Creates a new instance of PostgreSqlCapabilityVersion value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PostgreSqlCapabilityVersion() { + } + + /** + * Creates or finds a PostgreSqlCapabilityVersion from its string representation. + * + * @param name a name to look for. + * @return the corresponding PostgreSqlCapabilityVersion. + */ + public static PostgreSqlCapabilityVersion fromString(String name) { + return fromString(name, PostgreSqlCapabilityVersion.class); + } + + /** + * Gets known PostgreSqlCapabilityVersion values. + * + * @return known PostgreSqlCapabilityVersion values. + */ + public static Collection values() { + return values(PostgreSqlCapabilityVersion.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PostgreSqlVersion.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PostgreSqlVersion.java new file mode 100644 index 0000000000000..2f5ea0327c4e0 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PostgreSqlVersion.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * A PostgreSQL major version supported by HorizonDB. API version 2026-10-01-preview accepts 17 and 18. Future API + * versions may add named values, and clients must tolerate unknown values returned by the service. + */ +public final class PostgreSqlVersion extends ExpandableStringEnum { + /** + * PostgreSQL major version 17. + */ + public static final PostgreSqlVersion V17 = fromString("17"); + + /** + * PostgreSQL major version 18. + */ + public static final PostgreSqlVersion V18 = fromString("18"); + + /** + * Creates a new instance of PostgreSqlVersion value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PostgreSqlVersion() { + } + + /** + * Creates or finds a PostgreSqlVersion from its string representation. + * + * @param name a name to look for. + * @return the corresponding PostgreSqlVersion. + */ + public static PostgreSqlVersion fromString(String name) { + return fromString(name, PostgreSqlVersion.class); + } + + /** + * Gets known PostgreSqlVersion values. + * + * @return known PostgreSqlVersion values. + */ + public static Collection values() { + return values(PostgreSqlVersion.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PostgreSqlVersionCapability.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PostgreSqlVersionCapability.java new file mode 100644 index 0000000000000..4d76c6e4e24d2 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PostgreSqlVersionCapability.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.horizondb.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; + +/** + * The capabilities of a PostgreSQL major version supported by HorizonDB. + */ +@Immutable +public final class PostgreSqlVersionCapability implements JsonSerializable { + /* + * The PostgreSQL major version. + */ + private PostgreSqlCapabilityVersion name; + + /* + * The PostgreSQL major versions to which this version can be upgraded in place. API version 2026-10-01-preview does + * not support in-place PostgreSQL major-version upgrades, so this array is always empty. + */ + private List supportedVersionsToUpgrade; + + /** + * Creates an instance of PostgreSqlVersionCapability class. + */ + private PostgreSqlVersionCapability() { + } + + /** + * Get the name property: The PostgreSQL major version. + * + * @return the name value. + */ + public PostgreSqlCapabilityVersion name() { + return this.name; + } + + /** + * Get the supportedVersionsToUpgrade property: The PostgreSQL major versions to which this version can be upgraded + * in place. API version 2026-10-01-preview does not support in-place PostgreSQL major-version upgrades, so this + * array is always empty. + * + * @return the supportedVersionsToUpgrade value. + */ + public List supportedVersionsToUpgrade() { + return this.supportedVersionsToUpgrade; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PostgreSqlVersionCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PostgreSqlVersionCapability 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 PostgreSqlVersionCapability. + */ + public static PostgreSqlVersionCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PostgreSqlVersionCapability deserializedPostgreSqlVersionCapability = new PostgreSqlVersionCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedPostgreSqlVersionCapability.name + = PostgreSqlCapabilityVersion.fromString(reader.getString()); + } else if ("supportedVersionsToUpgrade".equals(fieldName)) { + List supportedVersionsToUpgrade + = reader.readArray(reader1 -> PostgreSqlCapabilityVersion.fromString(reader1.getString())); + deserializedPostgreSqlVersionCapability.supportedVersionsToUpgrade = supportedVersionsToUpgrade; + } else { + reader.skipChildren(); + } + } + + return deserializedPostgreSqlVersionCapability; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PrincipalTypes.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PrincipalTypes.java index b7583a8b87e93..81c99088e0ce2 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PrincipalTypes.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PrincipalTypes.java @@ -8,26 +8,26 @@ import java.util.Collection; /** - * The type of the Entra ID principal. + * The type of Microsoft Entra principal mapped to a PostgreSQL role. */ public final class PrincipalTypes extends ExpandableStringEnum { /** - * Unknown or unrecognized type (internal only, not accepted in requests). + * An unknown or unrecognized type. This value is for internal use and is not accepted in requests. */ public static final PrincipalTypes UNKNOWN = fromString("Unknown"); /** - * An Entra ID user account (UPN-based principal). + * A Microsoft Entra ID user account. */ public static final PrincipalTypes USER = fromString("User"); /** - * An Entra ID security group. All members of the group inherit admin privileges. + * A Microsoft Entra ID security group. All members of the group inherit administrator privileges. */ public static final PrincipalTypes GROUP = fromString("Group"); /** - * An Entra ID application / service principal (used for automated workloads). + * A Microsoft Entra ID application or service principal used for automated workloads. */ public static final PrincipalTypes SERVICE_PRINCIPAL = fromString("ServicePrincipal"); diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PrivateEndpointConnectionResource.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PrivateEndpointConnectionResource.java index 5a66a78fa15c7..c9de32d39d1b2 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PrivateEndpointConnectionResource.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PrivateEndpointConnectionResource.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.horizondb.models; import com.azure.core.management.SystemData; +import com.azure.core.util.Context; import com.azure.resourcemanager.horizondb.fluent.models.PrivateEndpointConnectionResourceInner; /** @@ -46,10 +47,143 @@ public interface PrivateEndpointConnectionResource { */ SystemData systemData(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.horizondb.fluent.models.PrivateEndpointConnectionResourceInner object. * * @return the inner object. */ PrivateEndpointConnectionResourceInner innerModel(); + + /** + * The entirety of the PrivateEndpointConnectionResource definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The PrivateEndpointConnectionResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the PrivateEndpointConnectionResource definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the PrivateEndpointConnectionResource definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, clusterName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the HorizonDB cluster. + * @return the next definition stage. + */ + WithCreate withExistingCluster(String resourceGroupName, String clusterName); + } + + /** + * The stage of the PrivateEndpointConnectionResource 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. + */ + PrivateEndpointConnectionResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + PrivateEndpointConnectionResource create(Context context); + } + + /** + * The stage of the PrivateEndpointConnectionResource definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The private endpoint connection properties. + * + * @param properties The private endpoint connection properties. + * @return the next definition stage. + */ + WithCreate withProperties(PrivateEndpointConnectionProperties properties); + } + } + + /** + * Begins update for the PrivateEndpointConnectionResource resource. + * + * @return the stage of resource update. + */ + PrivateEndpointConnectionResource.Update update(); + + /** + * The template for PrivateEndpointConnectionResource update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + PrivateEndpointConnectionResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + PrivateEndpointConnectionResource apply(Context context); + } + + /** + * The PrivateEndpointConnectionResource update stages. + */ + interface UpdateStages { + /** + * The stage of the PrivateEndpointConnectionResource update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The private endpoint connection properties. + * + * @param properties The private endpoint connection properties. + * @return the next definition stage. + */ + Update withProperties(PrivateEndpointConnectionProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + PrivateEndpointConnectionResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + PrivateEndpointConnectionResource refresh(Context context); } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbPrivateEndpointConnections.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PrivateEndpointConnections.java similarity index 76% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbPrivateEndpointConnections.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PrivateEndpointConnections.java index 27fb84c6700cc..cea890ae00d66 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbPrivateEndpointConnections.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PrivateEndpointConnections.java @@ -7,12 +7,11 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.horizondb.fluent.models.PrivateEndpointConnectionResourceInner; /** - * Resource collection API of HorizonDbPrivateEndpointConnections. + * Resource collection API of PrivateEndpointConnections. */ -public interface HorizonDbPrivateEndpointConnections { +public interface PrivateEndpointConnections { /** * Gets a private endpoint connection. * @@ -73,62 +72,81 @@ PagedIterable list(String resourceGroupName, Context context); /** - * Approves or rejects a private endpoint connection. + * Deletes a private endpoint connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure * resource. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection resource along with {@link Response}. */ - Response updateStatusWithResponse(String resourceGroupName, String clusterName, - String privateEndpointConnectionName, PrivateEndpointConnectionResourceInner resource, Context context); + void delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName); /** - * Approves or rejects a private endpoint connection. + * Deletes a private endpoint connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the HorizonDB cluster. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure * resource. - * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context); + + /** + * Gets a private endpoint connection. + * + * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection resource. + * @return a private endpoint connection along with {@link Response}. */ - PrivateEndpointConnectionResource updateStatus(String resourceGroupName, String clusterName, - String privateEndpointConnectionName, PrivateEndpointConnectionResourceInner resource); + PrivateEndpointConnectionResource getById(String id); + + /** + * Gets a private endpoint connection. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); /** * Deletes a private endpoint connection. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB cluster. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * @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 delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName); + void deleteById(String id); /** * Deletes a private endpoint connection. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterName The name of the HorizonDB cluster. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context); + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new PrivateEndpointConnectionResource resource. + * + * @param name resource name. + * @return the first stage of the new PrivateEndpointConnectionResource definition. + */ + PrivateEndpointConnectionResource.DefinitionStages.Blank define(String name); } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbPrivateLinkResource.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PrivateLinkResource.java similarity index 79% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbPrivateLinkResource.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PrivateLinkResource.java index e9cd45811e632..50256f30e51c1 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbPrivateLinkResource.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PrivateLinkResource.java @@ -5,12 +5,12 @@ package com.azure.resourcemanager.horizondb.models; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbPrivateLinkResourceInner; +import com.azure.resourcemanager.horizondb.fluent.models.PrivateLinkResourceInner; /** - * An immutable client-side representation of HorizonDbPrivateLinkResource. + * An immutable client-side representation of PrivateLinkResource. */ -public interface HorizonDbPrivateLinkResource { +public interface PrivateLinkResource { /** * Gets the id property: Fully qualified resource Id for the resource. * @@ -47,9 +47,9 @@ public interface HorizonDbPrivateLinkResource { SystemData systemData(); /** - * Gets the inner com.azure.resourcemanager.horizondb.fluent.models.HorizonDbPrivateLinkResourceInner object. + * Gets the inner com.azure.resourcemanager.horizondb.fluent.models.PrivateLinkResourceInner object. * * @return the inner object. */ - HorizonDbPrivateLinkResourceInner innerModel(); + PrivateLinkResourceInner innerModel(); } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbPrivateLinkResources.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PrivateLinkResources.java similarity index 76% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbPrivateLinkResources.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PrivateLinkResources.java index d03aafa691329..87533141df826 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbPrivateLinkResources.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/PrivateLinkResources.java @@ -9,9 +9,9 @@ import com.azure.core.util.Context; /** - * Resource collection API of HorizonDbPrivateLinkResources. + * Resource collection API of PrivateLinkResources. */ -public interface HorizonDbPrivateLinkResources { +public interface PrivateLinkResources { /** * Gets a private link resource. * @@ -24,8 +24,8 @@ public interface HorizonDbPrivateLinkResources { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private link resource along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String clusterName, - String groupName, Context context); + Response getWithResponse(String resourceGroupName, String clusterName, String groupName, + Context context); /** * Gets a private link resource. @@ -38,7 +38,7 @@ Response getWithResponse(String resourceGroupName, * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private link resource. */ - HorizonDbPrivateLinkResource get(String resourceGroupName, String clusterName, String groupName); + PrivateLinkResource get(String resourceGroupName, String clusterName, String groupName); /** * Lists private link resources in a HorizonDB cluster. @@ -48,10 +48,9 @@ Response getWithResponse(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbPrivateLinkResource list operation as paginated response with - * {@link PagedIterable}. + * @return the response of a PrivateLinkResource list operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String clusterName); + PagedIterable list(String resourceGroupName, String clusterName); /** * Lists private link resources in a HorizonDB cluster. @@ -62,8 +61,7 @@ Response getWithResponse(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a HorizonDbPrivateLinkResource list operation as paginated response with - * {@link PagedIterable}. + * @return the response of a PrivateLinkResource list operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String clusterName, Context context); + PagedIterable list(String resourceGroupName, String clusterName, Context context); } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ProvisionedComputeModelCapability.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ProvisionedComputeModelCapability.java new file mode 100644 index 0000000000000..66ea8e9e8c884 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ProvisionedComputeModelCapability.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.horizondb.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The capabilities of the Provisioned compute model. + */ +@Immutable +public final class ProvisionedComputeModelCapability extends ComputeModelCapability { + /* + * The compute model represented by these capabilities. + */ + private PoolComputeModelType type = PoolComputeModelType.PROVISIONED; + + /* + * The provisioned vCore count recommended for clients to select. This recommendation does not describe backend + * behavior when vCores is omitted from a request. + */ + private int recommendedVCoreCount; + + /* + * The supported provisioned compute sizes. + */ + private List supportedComputeSizes; + + /** + * Creates an instance of ProvisionedComputeModelCapability class. + */ + private ProvisionedComputeModelCapability() { + } + + /** + * Get the type property: The compute model represented by these capabilities. + * + * @return the type value. + */ + @Override + public PoolComputeModelType type() { + return this.type; + } + + /** + * Get the recommendedVCoreCount property: The provisioned vCore count recommended for clients to select. This + * recommendation does not describe backend behavior when vCores is omitted from a request. + * + * @return the recommendedVCoreCount value. + */ + public int recommendedVCoreCount() { + return this.recommendedVCoreCount; + } + + /** + * Get the supportedComputeSizes property: The supported provisioned compute sizes. + * + * @return the supportedComputeSizes value. + */ + public List supportedComputeSizes() { + return this.supportedComputeSizes; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProvisionedComputeModelCapability from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProvisionedComputeModelCapability 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 ProvisionedComputeModelCapability. + */ + public static ProvisionedComputeModelCapability fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProvisionedComputeModelCapability deserializedProvisionedComputeModelCapability + = new ProvisionedComputeModelCapability(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("recommendedVCoreCount".equals(fieldName)) { + deserializedProvisionedComputeModelCapability.recommendedVCoreCount = reader.getInt(); + } else if ("supportedComputeSizes".equals(fieldName)) { + List supportedComputeSizes + = reader.readArray(reader1 -> ComputeSizeCapability.fromJson(reader1)); + deserializedProvisionedComputeModelCapability.supportedComputeSizes = supportedComputeSizes; + } else if ("type".equals(fieldName)) { + deserializedProvisionedComputeModelCapability.type + = PoolComputeModelType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedProvisionedComputeModelCapability; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ProvisioningState.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ProvisioningState.java index 7e66431f729eb..dde224d713854 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ProvisioningState.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ProvisioningState.java @@ -12,27 +12,27 @@ */ public final class ProvisioningState extends ExpandableStringEnum { /** - * Provisioning completed successfully. + * Resource has been created. */ public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Provisioning failed. + * Resource creation failed. */ public static final ProvisioningState FAILED = fromString("Failed"); /** - * Provisioning was canceled. + * Resource creation was canceled. */ public static final ProvisioningState CANCELED = fromString("Canceled"); /** - * Provisioning is in progress. + * The HorizonDB resource operation is actively running. */ public static final ProvisioningState IN_PROGRESS = fromString("InProgress"); /** - * Provisioning is in progress. + * The HorizonDB resource is still provisioning. */ public static final ProvisioningState PROVISIONING = fromString("Provisioning"); diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ReadWritePoolProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ReadWritePoolProperties.java new file mode 100644 index 0000000000000..5d55dc21bcf6b --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ReadWritePoolProperties.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.horizondb.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The pool currently designated to host a HorizonDB cluster's read-write node. When a pool is created while the cluster + * currently has no pools, the service automatically designates the new pool as the read-write pool. This behavior also + * applies after all pools that existed earlier in the cluster's lifetime have been deleted. + */ +@Immutable +public final class ReadWritePoolProperties implements JsonSerializable { + /* + * The Azure resource ID of the pool designated to host the cluster's read-write node. The pool is a child resource + * of this cluster. When a pool is created while the cluster currently has no pools, the service automatically sets + * this property to the new pool's resource ID, including when all pools that existed earlier in the cluster's + * lifetime were deleted. This property is absent when no pool is designated, such as after clearReadWritePool + * succeeds. + */ + private String designatedPoolResourceId; + + /** + * Creates an instance of ReadWritePoolProperties class. + */ + private ReadWritePoolProperties() { + } + + /** + * Get the designatedPoolResourceId property: The Azure resource ID of the pool designated to host the cluster's + * read-write node. The pool is a child resource of this cluster. When a pool is created while the cluster currently + * has no pools, the service automatically sets this property to the new pool's resource ID, including when all + * pools that existed earlier in the cluster's lifetime were deleted. This property is absent when no pool is + * designated, such as after clearReadWritePool succeeds. + * + * @return the designatedPoolResourceId value. + */ + public String designatedPoolResourceId() { + return this.designatedPoolResourceId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ReadWritePoolProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ReadWritePoolProperties 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 ReadWritePoolProperties. + */ + public static ReadWritePoolProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ReadWritePoolProperties deserializedReadWritePoolProperties = new ReadWritePoolProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("designatedPoolResourceId".equals(fieldName)) { + deserializedReadWritePoolProperties.designatedPoolResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedReadWritePoolProperties; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ReplicaRole.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ReplicaRole.java deleted file mode 100644 index 985dbca7d75af..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ReplicaRole.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Role of the replica. - */ -public final class ReplicaRole extends ExpandableStringEnum { - /** - * Read-only replica. - */ - public static final ReplicaRole READ = fromString("Read"); - - /** - * ReadWrite replica. - */ - public static final ReplicaRole READ_WRITE = fromString("ReadWrite"); - - /** - * Creates a new instance of ReplicaRole value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ReplicaRole() { - } - - /** - * Creates or finds a ReplicaRole from its string representation. - * - * @param name a name to look for. - * @return the corresponding ReplicaRole. - */ - public static ReplicaRole fromString(String name) { - return fromString(name, ReplicaRole.class); - } - - /** - * Gets known ReplicaRole values. - * - * @return known ReplicaRole values. - */ - public static Collection values() { - return values(ReplicaRole.class); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ScheduledMaintenanceManagementType.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ScheduledMaintenanceManagementType.java new file mode 100644 index 0000000000000..a031fbb694ffc --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ScheduledMaintenanceManagementType.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.horizondb.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies who manages scheduled maintenance for a HorizonDB pool. + */ +public final class ScheduledMaintenanceManagementType extends ExpandableStringEnum { + /** + * Scheduled maintenance is managed by the system. + */ + public static final ScheduledMaintenanceManagementType SYSTEM = fromString("System"); + + /** + * Creates a new instance of ScheduledMaintenanceManagementType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ScheduledMaintenanceManagementType() { + } + + /** + * Creates or finds a ScheduledMaintenanceManagementType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ScheduledMaintenanceManagementType. + */ + public static ScheduledMaintenanceManagementType fromString(String name) { + return fromString(name, ScheduledMaintenanceManagementType.class); + } + + /** + * Gets known ScheduledMaintenanceManagementType values. + * + * @return known ScheduledMaintenanceManagementType values. + */ + public static Collection values() { + return values(ScheduledMaintenanceManagementType.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ScheduledMaintenanceProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ScheduledMaintenanceProperties.java new file mode 100644 index 0000000000000..3c5bbdb402157 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ScheduledMaintenanceProperties.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The scheduled maintenance configuration for a HorizonDB pool. + */ +@Immutable +public class ScheduledMaintenanceProperties implements JsonSerializable { + /* + * Specifies whether scheduled maintenance is managed by the system or by the user. + */ + private ScheduledMaintenanceManagementType maintenanceManagementType + = ScheduledMaintenanceManagementType.fromString("ScheduledMaintenanceProperties"); + + /** + * Creates an instance of ScheduledMaintenanceProperties class. + */ + public ScheduledMaintenanceProperties() { + } + + /** + * Get the maintenanceManagementType property: Specifies whether scheduled maintenance is managed by the system or + * by the user. + * + * @return the maintenanceManagementType value. + */ + public ScheduledMaintenanceManagementType maintenanceManagementType() { + return this.maintenanceManagementType; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("maintenanceManagementType", + this.maintenanceManagementType == null ? null : this.maintenanceManagementType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScheduledMaintenanceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScheduledMaintenanceProperties 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 ScheduledMaintenanceProperties. + */ + public static ScheduledMaintenanceProperties 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 ("maintenanceManagementType".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("System".equals(discriminatorValue)) { + return SystemScheduledMaintenanceProperties.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static ScheduledMaintenanceProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScheduledMaintenanceProperties deserializedScheduledMaintenanceProperties + = new ScheduledMaintenanceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("maintenanceManagementType".equals(fieldName)) { + deserializedScheduledMaintenanceProperties.maintenanceManagementType + = ScheduledMaintenanceManagementType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedScheduledMaintenanceProperties; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ScheduledMaintenancePropertiesForPatchUpdate.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ScheduledMaintenancePropertiesForPatchUpdate.java new file mode 100644 index 0000000000000..f6dac7b8d2034 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ScheduledMaintenancePropertiesForPatchUpdate.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.horizondb.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 scheduled maintenance configuration for a pool update operation. + */ +@Fluent +public final class ScheduledMaintenancePropertiesForPatchUpdate + implements JsonSerializable { + /* + * Specifies whether scheduled maintenance is managed by the system or by the user. When scheduledMaintenance is + * supplied, this property is required by the service. + */ + private ScheduledMaintenanceManagementType maintenanceManagementType; + + /** + * Creates an instance of ScheduledMaintenancePropertiesForPatchUpdate class. + */ + public ScheduledMaintenancePropertiesForPatchUpdate() { + } + + /** + * Get the maintenanceManagementType property: Specifies whether scheduled maintenance is managed by the system or + * by the user. When scheduledMaintenance is supplied, this property is required by the service. + * + * @return the maintenanceManagementType value. + */ + public ScheduledMaintenanceManagementType maintenanceManagementType() { + return this.maintenanceManagementType; + } + + /** + * Set the maintenanceManagementType property: Specifies whether scheduled maintenance is managed by the system or + * by the user. When scheduledMaintenance is supplied, this property is required by the service. + * + * @param maintenanceManagementType the maintenanceManagementType value to set. + * @return the ScheduledMaintenancePropertiesForPatchUpdate object itself. + */ + public ScheduledMaintenancePropertiesForPatchUpdate + withMaintenanceManagementType(ScheduledMaintenanceManagementType maintenanceManagementType) { + this.maintenanceManagementType = maintenanceManagementType; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("maintenanceManagementType", + this.maintenanceManagementType == null ? null : this.maintenanceManagementType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScheduledMaintenancePropertiesForPatchUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScheduledMaintenancePropertiesForPatchUpdate 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 ScheduledMaintenancePropertiesForPatchUpdate. + */ + public static ScheduledMaintenancePropertiesForPatchUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScheduledMaintenancePropertiesForPatchUpdate deserializedScheduledMaintenancePropertiesForPatchUpdate + = new ScheduledMaintenancePropertiesForPatchUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("maintenanceManagementType".equals(fieldName)) { + deserializedScheduledMaintenancePropertiesForPatchUpdate.maintenanceManagementType + = ScheduledMaintenanceManagementType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedScheduledMaintenancePropertiesForPatchUpdate; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/State.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/State.java deleted file mode 100644 index 26f9d3c7bd386..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/State.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Current states. - */ -public final class State extends ExpandableStringEnum { - /** - * Is ready and operational. - */ - public static final State READY = fromString("Ready"); - - /** - * Is being dropped/deleted. - */ - public static final State DROPPING = fromString("Dropping"); - - /** - * Is disabled. - */ - public static final State DISABLED = fromString("Disabled"); - - /** - * Is starting up. - */ - public static final State STARTING = fromString("Starting"); - - /** - * Is stopping. - */ - public static final State STOPPING = fromString("Stopping"); - - /** - * Is stopped. - */ - public static final State STOPPED = fromString("Stopped"); - - /** - * Is being updated. - */ - public static final State UPDATING = fromString("Updating"); - - /** - * Is healthy. - */ - public static final State HEALTHY = fromString("Healthy"); - - /** - * Is succeeded. - */ - public static final State SUCCEEDED = fromString("Succeeded"); - - /** - * Is upgrading. - */ - public static final State UPGRADING = fromString("Upgrading"); - - /** - * Creates a new instance of State value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public State() { - } - - /** - * Creates or finds a State from its string representation. - * - * @param name a name to look for. - * @return the corresponding State. - */ - public static State fromString(String name) { - return fromString(name, State.class); - } - - /** - * Gets known State values. - * - * @return known State values. - */ - public static Collection values() { - return values(State.class); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/SystemScheduledMaintenanceProperties.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/SystemScheduledMaintenanceProperties.java new file mode 100644 index 0000000000000..ad96a8a81fdd3 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/SystemScheduledMaintenanceProperties.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.horizondb.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; + +/** + * The system-managed scheduled maintenance configuration for a HorizonDB pool. User-managed schedule properties must be + * absent. + */ +@Immutable +public final class SystemScheduledMaintenanceProperties extends ScheduledMaintenanceProperties { + /* + * Specifies whether scheduled maintenance is managed by the system or by the user. + */ + private ScheduledMaintenanceManagementType maintenanceManagementType = ScheduledMaintenanceManagementType.SYSTEM; + + /** + * Creates an instance of SystemScheduledMaintenanceProperties class. + */ + public SystemScheduledMaintenanceProperties() { + } + + /** + * Get the maintenanceManagementType property: Specifies whether scheduled maintenance is managed by the system or + * by the user. + * + * @return the maintenanceManagementType value. + */ + @Override + public ScheduledMaintenanceManagementType maintenanceManagementType() { + return this.maintenanceManagementType; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("maintenanceManagementType", + this.maintenanceManagementType == null ? null : this.maintenanceManagementType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SystemScheduledMaintenanceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SystemScheduledMaintenanceProperties 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 SystemScheduledMaintenanceProperties. + */ + public static SystemScheduledMaintenanceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SystemScheduledMaintenanceProperties deserializedSystemScheduledMaintenanceProperties + = new SystemScheduledMaintenanceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("maintenanceManagementType".equals(fieldName)) { + deserializedSystemScheduledMaintenanceProperties.maintenanceManagementType + = ScheduledMaintenanceManagementType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSystemScheduledMaintenanceProperties; + }); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ZonePlacementPolicy.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ZonePlacementPolicy.java deleted file mode 100644 index 0077b318d46e6..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/ZonePlacementPolicy.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The zone redundancy option for the cluster. - */ -public final class ZonePlacementPolicy extends ExpandableStringEnum { - /** - * Enforce zonal redundancy. - */ - public static final ZonePlacementPolicy STRICT = fromString("Strict"); - - /** - * Best-effort placement (default). - */ - public static final ZonePlacementPolicy BEST_EFFORT = fromString("BestEffort"); - - /** - * Creates a new instance of ZonePlacementPolicy value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ZonePlacementPolicy() { - } - - /** - * Creates or finds a ZonePlacementPolicy from its string representation. - * - * @param name a name to look for. - * @return the corresponding ZonePlacementPolicy. - */ - public static ZonePlacementPolicy fromString(String name) { - return fromString(name, ZonePlacementPolicy.class); - } - - /** - * Gets known ZonePlacementPolicy values. - * - * @return known ZonePlacementPolicy values. - */ - public static Collection values() { - return values(ZonePlacementPolicy.class); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/package-info.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/package-info.java index 10439790181e4..573d5d382cbd0 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/package-info.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/models/package-info.java @@ -4,6 +4,6 @@ /** * Package containing the data models for HorizonDb. - * Azure Resource Provider API for managing HorizonDB clusters, pools, replicas, and firewall rules. + * Azure Resource Provider API for managing HorizonDB clusters, pools, endpoints, nodes, and firewall rules. */ package com.azure.resourcemanager.horizondb.models; diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/package-info.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/package-info.java index 4b894df01aafe..2e9cf574a74b0 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/package-info.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/java/com/azure/resourcemanager/horizondb/package-info.java @@ -4,6 +4,6 @@ /** * Package containing the classes for HorizonDb. - * Azure Resource Provider API for managing HorizonDB clusters, pools, replicas, and firewall rules. + * Azure Resource Provider API for managing HorizonDB clusters, pools, endpoints, nodes, and firewall rules. */ package com.azure.resourcemanager.horizondb; diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/resources/META-INF/azure-resourcemanager-horizondb_metadata.json b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/resources/META-INF/azure-resourcemanager-horizondb_metadata.json index a08bba0c1800a..4a98419571dee 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/resources/META-INF/azure-resourcemanager-horizondb_metadata.json +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/resources/META-INF/azure-resourcemanager-horizondb_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersions":{"Microsoft.HorizonDb":"2026-05-01-preview"},"crossLanguagePackageId":"Microsoft.HorizonDb","crossLanguageVersion":"e073010193f3","crossLanguageDefinitions":{"com.azure.resourcemanager.horizondb.fluent.HorizonDbAdministratorsClient":"Microsoft.HorizonDb.HorizonDbAdministrators","com.azure.resourcemanager.horizondb.fluent.HorizonDbAdministratorsClient.beginCreateOrUpdate":"Microsoft.HorizonDb.HorizonDbAdministrators.createOrUpdate","com.azure.resourcemanager.horizondb.fluent.HorizonDbAdministratorsClient.beginCreateOrUpdateAsync":"Microsoft.HorizonDb.HorizonDbAdministrators.createOrUpdate","com.azure.resourcemanager.horizondb.fluent.HorizonDbAdministratorsClient.beginDelete":"Microsoft.HorizonDb.HorizonDbAdministrators.delete","com.azure.resourcemanager.horizondb.fluent.HorizonDbAdministratorsClient.beginDeleteAsync":"Microsoft.HorizonDb.HorizonDbAdministrators.delete","com.azure.resourcemanager.horizondb.fluent.HorizonDbAdministratorsClient.createOrUpdate":"Microsoft.HorizonDb.HorizonDbAdministrators.createOrUpdate","com.azure.resourcemanager.horizondb.fluent.HorizonDbAdministratorsClient.createOrUpdateAsync":"Microsoft.HorizonDb.HorizonDbAdministrators.createOrUpdate","com.azure.resourcemanager.horizondb.fluent.HorizonDbAdministratorsClient.createOrUpdateWithResponseAsync":"Microsoft.HorizonDb.HorizonDbAdministrators.createOrUpdate","com.azure.resourcemanager.horizondb.fluent.HorizonDbAdministratorsClient.delete":"Microsoft.HorizonDb.HorizonDbAdministrators.delete","com.azure.resourcemanager.horizondb.fluent.HorizonDbAdministratorsClient.deleteAsync":"Microsoft.HorizonDb.HorizonDbAdministrators.delete","com.azure.resourcemanager.horizondb.fluent.HorizonDbAdministratorsClient.deleteWithResponseAsync":"Microsoft.HorizonDb.HorizonDbAdministrators.delete","com.azure.resourcemanager.horizondb.fluent.HorizonDbAdministratorsClient.get":"Microsoft.HorizonDb.HorizonDbAdministrators.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbAdministratorsClient.getAsync":"Microsoft.HorizonDb.HorizonDbAdministrators.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbAdministratorsClient.getWithResponse":"Microsoft.HorizonDb.HorizonDbAdministrators.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbAdministratorsClient.getWithResponseAsync":"Microsoft.HorizonDb.HorizonDbAdministrators.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbAdministratorsClient.list":"Microsoft.HorizonDb.HorizonDbAdministrators.list","com.azure.resourcemanager.horizondb.fluent.HorizonDbAdministratorsClient.listAsync":"Microsoft.HorizonDb.HorizonDbAdministrators.list","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient":"Microsoft.HorizonDb.HorizonDbClusters","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.beginCreateOrUpdate":"Microsoft.HorizonDb.HorizonDbClusters.createOrUpdate","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.beginCreateOrUpdateAsync":"Microsoft.HorizonDb.HorizonDbClusters.createOrUpdate","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.beginDelete":"Microsoft.HorizonDb.HorizonDbClusters.delete","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.beginDeleteAsync":"Microsoft.HorizonDb.HorizonDbClusters.delete","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.beginRestart":"Microsoft.HorizonDb.HorizonDbClusters.restart","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.beginRestartAsync":"Microsoft.HorizonDb.HorizonDbClusters.restart","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.beginStart":"Microsoft.HorizonDb.HorizonDbClusters.start","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.beginStartAsync":"Microsoft.HorizonDb.HorizonDbClusters.start","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.beginStop":"Microsoft.HorizonDb.HorizonDbClusters.stop","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.beginStopAsync":"Microsoft.HorizonDb.HorizonDbClusters.stop","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.beginUpdate":"Microsoft.HorizonDb.HorizonDbClusters.update","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.beginUpdateAsync":"Microsoft.HorizonDb.HorizonDbClusters.update","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.createOrUpdate":"Microsoft.HorizonDb.HorizonDbClusters.createOrUpdate","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.createOrUpdateAsync":"Microsoft.HorizonDb.HorizonDbClusters.createOrUpdate","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.createOrUpdateWithResponseAsync":"Microsoft.HorizonDb.HorizonDbClusters.createOrUpdate","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.delete":"Microsoft.HorizonDb.HorizonDbClusters.delete","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.deleteAsync":"Microsoft.HorizonDb.HorizonDbClusters.delete","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.deleteWithResponseAsync":"Microsoft.HorizonDb.HorizonDbClusters.delete","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.getByResourceGroup":"Microsoft.HorizonDb.HorizonDbClusters.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.getByResourceGroupAsync":"Microsoft.HorizonDb.HorizonDbClusters.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.getByResourceGroupWithResponse":"Microsoft.HorizonDb.HorizonDbClusters.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.getByResourceGroupWithResponseAsync":"Microsoft.HorizonDb.HorizonDbClusters.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.list":"Microsoft.HorizonDb.HorizonDbClusters.listBySubscription","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.listAsync":"Microsoft.HorizonDb.HorizonDbClusters.listBySubscription","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.listByResourceGroup":"Microsoft.HorizonDb.HorizonDbClusters.listByResourceGroup","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.listByResourceGroupAsync":"Microsoft.HorizonDb.HorizonDbClusters.listByResourceGroup","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.restart":"Microsoft.HorizonDb.HorizonDbClusters.restart","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.restartAsync":"Microsoft.HorizonDb.HorizonDbClusters.restart","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.restartWithResponseAsync":"Microsoft.HorizonDb.HorizonDbClusters.restart","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.start":"Microsoft.HorizonDb.HorizonDbClusters.start","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.startAsync":"Microsoft.HorizonDb.HorizonDbClusters.start","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.startWithResponseAsync":"Microsoft.HorizonDb.HorizonDbClusters.start","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.stop":"Microsoft.HorizonDb.HorizonDbClusters.stop","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.stopAsync":"Microsoft.HorizonDb.HorizonDbClusters.stop","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.stopWithResponseAsync":"Microsoft.HorizonDb.HorizonDbClusters.stop","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.update":"Microsoft.HorizonDb.HorizonDbClusters.update","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.updateAsync":"Microsoft.HorizonDb.HorizonDbClusters.update","com.azure.resourcemanager.horizondb.fluent.HorizonDbClustersClient.updateWithResponseAsync":"Microsoft.HorizonDb.HorizonDbClusters.update","com.azure.resourcemanager.horizondb.fluent.HorizonDbFirewallRulesClient":"Microsoft.HorizonDb.HorizonDbFirewallRules","com.azure.resourcemanager.horizondb.fluent.HorizonDbFirewallRulesClient.beginCreateOrUpdate":"Microsoft.HorizonDb.HorizonDbFirewallRules.createOrUpdate","com.azure.resourcemanager.horizondb.fluent.HorizonDbFirewallRulesClient.beginCreateOrUpdateAsync":"Microsoft.HorizonDb.HorizonDbFirewallRules.createOrUpdate","com.azure.resourcemanager.horizondb.fluent.HorizonDbFirewallRulesClient.beginDelete":"Microsoft.HorizonDb.HorizonDbFirewallRules.delete","com.azure.resourcemanager.horizondb.fluent.HorizonDbFirewallRulesClient.beginDeleteAsync":"Microsoft.HorizonDb.HorizonDbFirewallRules.delete","com.azure.resourcemanager.horizondb.fluent.HorizonDbFirewallRulesClient.createOrUpdate":"Microsoft.HorizonDb.HorizonDbFirewallRules.createOrUpdate","com.azure.resourcemanager.horizondb.fluent.HorizonDbFirewallRulesClient.createOrUpdateAsync":"Microsoft.HorizonDb.HorizonDbFirewallRules.createOrUpdate","com.azure.resourcemanager.horizondb.fluent.HorizonDbFirewallRulesClient.createOrUpdateWithResponseAsync":"Microsoft.HorizonDb.HorizonDbFirewallRules.createOrUpdate","com.azure.resourcemanager.horizondb.fluent.HorizonDbFirewallRulesClient.delete":"Microsoft.HorizonDb.HorizonDbFirewallRules.delete","com.azure.resourcemanager.horizondb.fluent.HorizonDbFirewallRulesClient.deleteAsync":"Microsoft.HorizonDb.HorizonDbFirewallRules.delete","com.azure.resourcemanager.horizondb.fluent.HorizonDbFirewallRulesClient.deleteWithResponseAsync":"Microsoft.HorizonDb.HorizonDbFirewallRules.delete","com.azure.resourcemanager.horizondb.fluent.HorizonDbFirewallRulesClient.get":"Microsoft.HorizonDb.HorizonDbFirewallRules.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbFirewallRulesClient.getAsync":"Microsoft.HorizonDb.HorizonDbFirewallRules.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbFirewallRulesClient.getWithResponse":"Microsoft.HorizonDb.HorizonDbFirewallRules.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbFirewallRulesClient.getWithResponseAsync":"Microsoft.HorizonDb.HorizonDbFirewallRules.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbFirewallRulesClient.list":"Microsoft.HorizonDb.HorizonDbFirewallRules.list","com.azure.resourcemanager.horizondb.fluent.HorizonDbFirewallRulesClient.listAsync":"Microsoft.HorizonDb.HorizonDbFirewallRules.list","com.azure.resourcemanager.horizondb.fluent.HorizonDbManagementClient":"Microsoft.HorizonDb","com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient":"Microsoft.HorizonDb.HorizonDbParameterGroups","com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient.beginCreateOrUpdate":"Microsoft.HorizonDb.HorizonDbParameterGroups.createOrUpdate","com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient.beginCreateOrUpdateAsync":"Microsoft.HorizonDb.HorizonDbParameterGroups.createOrUpdate","com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient.beginDelete":"Microsoft.HorizonDb.HorizonDbParameterGroups.delete","com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient.beginDeleteAsync":"Microsoft.HorizonDb.HorizonDbParameterGroups.delete","com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient.beginUpdate":"Microsoft.HorizonDb.HorizonDbParameterGroups.update","com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient.beginUpdateAsync":"Microsoft.HorizonDb.HorizonDbParameterGroups.update","com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient.createOrUpdate":"Microsoft.HorizonDb.HorizonDbParameterGroups.createOrUpdate","com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient.createOrUpdateAsync":"Microsoft.HorizonDb.HorizonDbParameterGroups.createOrUpdate","com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient.createOrUpdateWithResponseAsync":"Microsoft.HorizonDb.HorizonDbParameterGroups.createOrUpdate","com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient.delete":"Microsoft.HorizonDb.HorizonDbParameterGroups.delete","com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient.deleteAsync":"Microsoft.HorizonDb.HorizonDbParameterGroups.delete","com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient.deleteWithResponseAsync":"Microsoft.HorizonDb.HorizonDbParameterGroups.delete","com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient.getByResourceGroup":"Microsoft.HorizonDb.HorizonDbParameterGroups.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient.getByResourceGroupAsync":"Microsoft.HorizonDb.HorizonDbParameterGroups.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient.getByResourceGroupWithResponse":"Microsoft.HorizonDb.HorizonDbParameterGroups.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient.getByResourceGroupWithResponseAsync":"Microsoft.HorizonDb.HorizonDbParameterGroups.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient.list":"Microsoft.HorizonDb.HorizonDbParameterGroups.listBySubscription","com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient.listAsync":"Microsoft.HorizonDb.HorizonDbParameterGroups.listBySubscription","com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient.listByResourceGroup":"Microsoft.HorizonDb.HorizonDbParameterGroups.listByResourceGroup","com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient.listByResourceGroupAsync":"Microsoft.HorizonDb.HorizonDbParameterGroups.listByResourceGroup","com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient.listConnections":"Microsoft.HorizonDb.HorizonDbParameterGroups.listConnections","com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient.listConnectionsAsync":"Microsoft.HorizonDb.HorizonDbParameterGroups.listConnections","com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient.listVersions":"Microsoft.HorizonDb.HorizonDbParameterGroups.listVersions","com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient.listVersionsAsync":"Microsoft.HorizonDb.HorizonDbParameterGroups.listVersions","com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient.update":"Microsoft.HorizonDb.HorizonDbParameterGroups.update","com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient.updateAsync":"Microsoft.HorizonDb.HorizonDbParameterGroups.update","com.azure.resourcemanager.horizondb.fluent.HorizonDbParameterGroupsClient.updateWithResponseAsync":"Microsoft.HorizonDb.HorizonDbParameterGroups.update","com.azure.resourcemanager.horizondb.fluent.HorizonDbPoolsClient":"Microsoft.HorizonDb.HorizonDbPools","com.azure.resourcemanager.horizondb.fluent.HorizonDbPoolsClient.get":"Microsoft.HorizonDb.HorizonDbPools.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbPoolsClient.getAsync":"Microsoft.HorizonDb.HorizonDbPools.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbPoolsClient.getWithResponse":"Microsoft.HorizonDb.HorizonDbPools.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbPoolsClient.getWithResponseAsync":"Microsoft.HorizonDb.HorizonDbPools.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbPoolsClient.list":"Microsoft.HorizonDb.HorizonDbPools.list","com.azure.resourcemanager.horizondb.fluent.HorizonDbPoolsClient.listAsync":"Microsoft.HorizonDb.HorizonDbPools.list","com.azure.resourcemanager.horizondb.fluent.HorizonDbPrivateEndpointConnectionsClient":"Microsoft.HorizonDb.HorizonDbPrivateEndpointConnections","com.azure.resourcemanager.horizondb.fluent.HorizonDbPrivateEndpointConnectionsClient.beginDelete":"Microsoft.HorizonDb.HorizonDbPrivateEndpointConnections.delete","com.azure.resourcemanager.horizondb.fluent.HorizonDbPrivateEndpointConnectionsClient.beginDeleteAsync":"Microsoft.HorizonDb.HorizonDbPrivateEndpointConnections.delete","com.azure.resourcemanager.horizondb.fluent.HorizonDbPrivateEndpointConnectionsClient.delete":"Microsoft.HorizonDb.HorizonDbPrivateEndpointConnections.delete","com.azure.resourcemanager.horizondb.fluent.HorizonDbPrivateEndpointConnectionsClient.deleteAsync":"Microsoft.HorizonDb.HorizonDbPrivateEndpointConnections.delete","com.azure.resourcemanager.horizondb.fluent.HorizonDbPrivateEndpointConnectionsClient.deleteWithResponseAsync":"Microsoft.HorizonDb.HorizonDbPrivateEndpointConnections.delete","com.azure.resourcemanager.horizondb.fluent.HorizonDbPrivateEndpointConnectionsClient.get":"Microsoft.HorizonDb.HorizonDbPrivateEndpointConnections.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbPrivateEndpointConnectionsClient.getAsync":"Microsoft.HorizonDb.HorizonDbPrivateEndpointConnections.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbPrivateEndpointConnectionsClient.getWithResponse":"Microsoft.HorizonDb.HorizonDbPrivateEndpointConnections.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbPrivateEndpointConnectionsClient.getWithResponseAsync":"Microsoft.HorizonDb.HorizonDbPrivateEndpointConnections.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbPrivateEndpointConnectionsClient.list":"Microsoft.HorizonDb.HorizonDbPrivateEndpointConnections.list","com.azure.resourcemanager.horizondb.fluent.HorizonDbPrivateEndpointConnectionsClient.listAsync":"Microsoft.HorizonDb.HorizonDbPrivateEndpointConnections.list","com.azure.resourcemanager.horizondb.fluent.HorizonDbPrivateEndpointConnectionsClient.updateStatus":"Microsoft.HorizonDb.HorizonDbPrivateEndpointConnections.updateStatus","com.azure.resourcemanager.horizondb.fluent.HorizonDbPrivateEndpointConnectionsClient.updateStatusAsync":"Microsoft.HorizonDb.HorizonDbPrivateEndpointConnections.updateStatus","com.azure.resourcemanager.horizondb.fluent.HorizonDbPrivateEndpointConnectionsClient.updateStatusWithResponse":"Microsoft.HorizonDb.HorizonDbPrivateEndpointConnections.updateStatus","com.azure.resourcemanager.horizondb.fluent.HorizonDbPrivateEndpointConnectionsClient.updateStatusWithResponseAsync":"Microsoft.HorizonDb.HorizonDbPrivateEndpointConnections.updateStatus","com.azure.resourcemanager.horizondb.fluent.HorizonDbPrivateLinkResourcesClient":"Microsoft.HorizonDb.HorizonDbPrivateLinkResources","com.azure.resourcemanager.horizondb.fluent.HorizonDbPrivateLinkResourcesClient.get":"Microsoft.HorizonDb.HorizonDbPrivateLinkResources.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbPrivateLinkResourcesClient.getAsync":"Microsoft.HorizonDb.HorizonDbPrivateLinkResources.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbPrivateLinkResourcesClient.getWithResponse":"Microsoft.HorizonDb.HorizonDbPrivateLinkResources.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbPrivateLinkResourcesClient.getWithResponseAsync":"Microsoft.HorizonDb.HorizonDbPrivateLinkResources.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbPrivateLinkResourcesClient.list":"Microsoft.HorizonDb.HorizonDbPrivateLinkResources.list","com.azure.resourcemanager.horizondb.fluent.HorizonDbPrivateLinkResourcesClient.listAsync":"Microsoft.HorizonDb.HorizonDbPrivateLinkResources.list","com.azure.resourcemanager.horizondb.fluent.HorizonDbReplicasClient":"Microsoft.HorizonDb.HorizonDbReplicas","com.azure.resourcemanager.horizondb.fluent.HorizonDbReplicasClient.beginCreateOrUpdate":"Microsoft.HorizonDb.HorizonDbReplicas.createOrUpdate","com.azure.resourcemanager.horizondb.fluent.HorizonDbReplicasClient.beginCreateOrUpdateAsync":"Microsoft.HorizonDb.HorizonDbReplicas.createOrUpdate","com.azure.resourcemanager.horizondb.fluent.HorizonDbReplicasClient.beginDelete":"Microsoft.HorizonDb.HorizonDbReplicas.delete","com.azure.resourcemanager.horizondb.fluent.HorizonDbReplicasClient.beginDeleteAsync":"Microsoft.HorizonDb.HorizonDbReplicas.delete","com.azure.resourcemanager.horizondb.fluent.HorizonDbReplicasClient.beginUpdate":"Microsoft.HorizonDb.HorizonDbReplicas.update","com.azure.resourcemanager.horizondb.fluent.HorizonDbReplicasClient.beginUpdateAsync":"Microsoft.HorizonDb.HorizonDbReplicas.update","com.azure.resourcemanager.horizondb.fluent.HorizonDbReplicasClient.createOrUpdate":"Microsoft.HorizonDb.HorizonDbReplicas.createOrUpdate","com.azure.resourcemanager.horizondb.fluent.HorizonDbReplicasClient.createOrUpdateAsync":"Microsoft.HorizonDb.HorizonDbReplicas.createOrUpdate","com.azure.resourcemanager.horizondb.fluent.HorizonDbReplicasClient.createOrUpdateWithResponseAsync":"Microsoft.HorizonDb.HorizonDbReplicas.createOrUpdate","com.azure.resourcemanager.horizondb.fluent.HorizonDbReplicasClient.delete":"Microsoft.HorizonDb.HorizonDbReplicas.delete","com.azure.resourcemanager.horizondb.fluent.HorizonDbReplicasClient.deleteAsync":"Microsoft.HorizonDb.HorizonDbReplicas.delete","com.azure.resourcemanager.horizondb.fluent.HorizonDbReplicasClient.deleteWithResponseAsync":"Microsoft.HorizonDb.HorizonDbReplicas.delete","com.azure.resourcemanager.horizondb.fluent.HorizonDbReplicasClient.get":"Microsoft.HorizonDb.HorizonDbReplicas.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbReplicasClient.getAsync":"Microsoft.HorizonDb.HorizonDbReplicas.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbReplicasClient.getWithResponse":"Microsoft.HorizonDb.HorizonDbReplicas.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbReplicasClient.getWithResponseAsync":"Microsoft.HorizonDb.HorizonDbReplicas.get","com.azure.resourcemanager.horizondb.fluent.HorizonDbReplicasClient.list":"Microsoft.HorizonDb.HorizonDbReplicas.list","com.azure.resourcemanager.horizondb.fluent.HorizonDbReplicasClient.listAsync":"Microsoft.HorizonDb.HorizonDbReplicas.list","com.azure.resourcemanager.horizondb.fluent.HorizonDbReplicasClient.update":"Microsoft.HorizonDb.HorizonDbReplicas.update","com.azure.resourcemanager.horizondb.fluent.HorizonDbReplicasClient.updateAsync":"Microsoft.HorizonDb.HorizonDbReplicas.update","com.azure.resourcemanager.horizondb.fluent.HorizonDbReplicasClient.updateWithResponseAsync":"Microsoft.HorizonDb.HorizonDbReplicas.update","com.azure.resourcemanager.horizondb.fluent.OperationsClient":"Microsoft.HorizonDb.Operations","com.azure.resourcemanager.horizondb.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.horizondb.fluent.OperationsClient.listAsync":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.horizondb.fluent.models.HorizonDbAdministratorInner":"Microsoft.HorizonDb.HorizonDbAdministrator","com.azure.resourcemanager.horizondb.fluent.models.HorizonDbClusterInner":"Microsoft.HorizonDb.HorizonDbCluster","com.azure.resourcemanager.horizondb.fluent.models.HorizonDbFirewallRuleInner":"Microsoft.HorizonDb.HorizonDbFirewallRule","com.azure.resourcemanager.horizondb.fluent.models.HorizonDbParameterGroupConnectionPropertiesInner":"Microsoft.HorizonDb.HorizonDbParameterGroupConnectionProperties","com.azure.resourcemanager.horizondb.fluent.models.HorizonDbParameterGroupInner":"Microsoft.HorizonDb.HorizonDbParameterGroup","com.azure.resourcemanager.horizondb.fluent.models.HorizonDbPoolInner":"Microsoft.HorizonDb.HorizonDbPool","com.azure.resourcemanager.horizondb.fluent.models.HorizonDbPrivateLinkResourceInner":"Microsoft.HorizonDb.HorizonDbPrivateLinkResource","com.azure.resourcemanager.horizondb.fluent.models.HorizonDbReplicaInner":"Microsoft.HorizonDb.HorizonDbReplica","com.azure.resourcemanager.horizondb.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.horizondb.fluent.models.PrivateEndpointConnectionResourceInner":"Azure.ResourceManager.PrivateEndpointConnectionResource","com.azure.resourcemanager.horizondb.implementation.HorizonDbManagementClientBuilder":"Microsoft.HorizonDb","com.azure.resourcemanager.horizondb.implementation.models.HorizonDbAdministratorListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.horizondb.implementation.models.HorizonDbClusterListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.horizondb.implementation.models.HorizonDbFirewallRuleListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.horizondb.implementation.models.HorizonDbParameterGroupConnectionPropertiesListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.horizondb.implementation.models.HorizonDbParameterGroupListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.horizondb.implementation.models.HorizonDbPoolListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.horizondb.implementation.models.HorizonDbPrivateLinkResourceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.horizondb.implementation.models.HorizonDbReplicaListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.horizondb.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.horizondb.implementation.models.PrivateEndpointConnectionResourceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.horizondb.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.horizondb.models.AuthenticationState":"Microsoft.HorizonDb.AuthenticationState","com.azure.resourcemanager.horizondb.models.CreateModeCluster":"Microsoft.HorizonDb.CreateModeCluster","com.azure.resourcemanager.horizondb.models.CreateModePool":"Microsoft.HorizonDb.CreateModePool","com.azure.resourcemanager.horizondb.models.HorizonDbAdministratorAdd":"Microsoft.HorizonDb.HorizonDbAdministratorAdd","com.azure.resourcemanager.horizondb.models.HorizonDbAdministratorProperties":"Microsoft.HorizonDb.HorizonDbAdministratorProperties","com.azure.resourcemanager.horizondb.models.HorizonDbAdministratorPropertiesForAdd":"Microsoft.HorizonDb.HorizonDbAdministratorPropertiesForAdd","com.azure.resourcemanager.horizondb.models.HorizonDbClusterAuthConfig":"Microsoft.HorizonDb.HorizonDbClusterAuthConfig","com.azure.resourcemanager.horizondb.models.HorizonDbClusterForPatchUpdate":"Microsoft.HorizonDb.HorizonDbClusterForPatchUpdate","com.azure.resourcemanager.horizondb.models.HorizonDbClusterMirroring":"Microsoft.HorizonDb.HorizonDbClusterMirroring","com.azure.resourcemanager.horizondb.models.HorizonDbClusterParameterGroupConnectionProperties":"Microsoft.HorizonDb.HorizonDbClusterParameterGroupConnectionProperties","com.azure.resourcemanager.horizondb.models.HorizonDbClusterProperties":"Microsoft.HorizonDb.HorizonDbClusterProperties","com.azure.resourcemanager.horizondb.models.HorizonDbClusterPropertiesForPatchUpdate":"Microsoft.HorizonDb.HorizonDbClusterPropertiesForPatchUpdate","com.azure.resourcemanager.horizondb.models.HorizonDbComputeModel":"Microsoft.HorizonDb.HorizonDbComputeModel","com.azure.resourcemanager.horizondb.models.HorizonDbComputeModelType":"Microsoft.HorizonDb.HorizonDbComputeModelType","com.azure.resourcemanager.horizondb.models.HorizonDbFirewallRuleProperties":"Microsoft.HorizonDb.HorizonDbFirewallRuleProperties","com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroupForPatchUpdate":"Microsoft.HorizonDb.HorizonDbParameterGroupForPatchUpdate","com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroupProperties":"Microsoft.HorizonDb.HorizonDbParameterGroupProperties","com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroupPropertiesForPatchUpdate":"Microsoft.HorizonDb.HorizonDbParameterGroupPropertiesForPatchUpdate","com.azure.resourcemanager.horizondb.models.HorizonDbPoolProperties":"Microsoft.HorizonDb.HorizonDbPoolProperties","com.azure.resourcemanager.horizondb.models.HorizonDbReplicaForPatchUpdate":"Microsoft.HorizonDb.HorizonDbReplicaForPatchUpdate","com.azure.resourcemanager.horizondb.models.HorizonDbReplicaProperties":"Microsoft.HorizonDb.HorizonDbReplicaProperties","com.azure.resourcemanager.horizondb.models.HorizonDbReplicaPropertiesForPatchUpdate":"Microsoft.HorizonDb.HorizonDbReplicaPropertiesForPatchUpdate","com.azure.resourcemanager.horizondb.models.ManagedServiceIdentity":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentity","com.azure.resourcemanager.horizondb.models.ManagedServiceIdentityType":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType","com.azure.resourcemanager.horizondb.models.Network":"Microsoft.HorizonDb.Network","com.azure.resourcemanager.horizondb.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.horizondb.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.horizondb.models.ParameterProperties":"Microsoft.HorizonDb.ParameterProperties","com.azure.resourcemanager.horizondb.models.PrincipalTypes":"Microsoft.HorizonDb.PrincipalTypes","com.azure.resourcemanager.horizondb.models.PrivateEndpoint":"Azure.ResourceManager.CommonTypes.PrivateEndpoint","com.azure.resourcemanager.horizondb.models.PrivateEndpointConnectionProperties":"Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProperties","com.azure.resourcemanager.horizondb.models.PrivateEndpointConnectionProvisioningState":"Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProvisioningState","com.azure.resourcemanager.horizondb.models.PrivateEndpointServiceConnectionStatus":"Azure.ResourceManager.CommonTypes.PrivateEndpointServiceConnectionStatus","com.azure.resourcemanager.horizondb.models.PrivateLinkResourceProperties":"Azure.ResourceManager.CommonTypes.PrivateLinkResourceProperties","com.azure.resourcemanager.horizondb.models.PrivateLinkServiceConnectionState":"Azure.ResourceManager.CommonTypes.PrivateLinkServiceConnectionState","com.azure.resourcemanager.horizondb.models.ProvisioningState":"Microsoft.HorizonDb.ProvisioningState","com.azure.resourcemanager.horizondb.models.PublicNetworkAccessState":"Microsoft.HorizonDb.PublicNetworkAccessState","com.azure.resourcemanager.horizondb.models.ReplicaRole":"Microsoft.HorizonDb.ReplicaRole","com.azure.resourcemanager.horizondb.models.State":"Microsoft.HorizonDb.State","com.azure.resourcemanager.horizondb.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity","com.azure.resourcemanager.horizondb.models.ZonePlacementPolicy":"Microsoft.HorizonDb.ZonePlacementPolicy"},"generatedFiles":["src/main/java/com/azure/resourcemanager/horizondb/HorizonDbManager.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbAdministratorsClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbClustersClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbFirewallRulesClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbManagementClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbParameterGroupsClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbPoolsClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbPrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbPrivateLinkResourcesClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbReplicasClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbAdministratorInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbClusterInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbFirewallRuleInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbParameterGroupConnectionPropertiesInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbParameterGroupInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbPoolInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbPrivateLinkResourceInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/HorizonDbReplicaInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/PrivateEndpointConnectionResourceInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/package-info.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbAdministratorImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbAdministratorsClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbAdministratorsImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbClusterImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbClustersClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbClustersImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbFirewallRuleImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbFirewallRulesClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbFirewallRulesImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbManagementClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbParameterGroupConnectionPropertiesImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbParameterGroupImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbParameterGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbParameterGroupsImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPoolImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPoolsClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPoolsImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPrivateEndpointConnectionsImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPrivateLinkResourceImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPrivateLinkResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbPrivateLinkResourcesImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbReplicaImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbReplicasClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbReplicasImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/PrivateEndpointConnectionResourceImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbAdministratorListResult.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbClusterListResult.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbFirewallRuleListResult.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbParameterGroupConnectionPropertiesListResult.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbParameterGroupListResult.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbPoolListResult.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbPrivateLinkResourceListResult.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/HorizonDbReplicaListResult.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/PrivateEndpointConnectionResourceListResult.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/package-info.java","src/main/java/com/azure/resourcemanager/horizondb/models/ActionType.java","src/main/java/com/azure/resourcemanager/horizondb/models/AuthenticationState.java","src/main/java/com/azure/resourcemanager/horizondb/models/CreateModeCluster.java","src/main/java/com/azure/resourcemanager/horizondb/models/CreateModePool.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbAdministrator.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbAdministratorAdd.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbAdministratorProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbAdministratorPropertiesForAdd.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbAdministrators.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbCluster.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterAuthConfig.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterForPatchUpdate.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterMirroring.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterParameterGroupConnectionProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterPropertiesForPatchUpdate.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusters.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbComputeModel.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbComputeModelType.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbFirewallRule.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbFirewallRuleProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbFirewallRules.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbParameterGroup.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbParameterGroupConnectionProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbParameterGroupForPatchUpdate.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbParameterGroupProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbParameterGroupPropertiesForPatchUpdate.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbParameterGroups.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbPool.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbPoolProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbPools.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbPrivateEndpointConnections.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbPrivateLinkResource.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbPrivateLinkResources.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbReplica.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbReplicaForPatchUpdate.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbReplicaProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbReplicaPropertiesForPatchUpdate.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbReplicas.java","src/main/java/com/azure/resourcemanager/horizondb/models/ManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/horizondb/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/horizondb/models/Network.java","src/main/java/com/azure/resourcemanager/horizondb/models/Operation.java","src/main/java/com/azure/resourcemanager/horizondb/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/horizondb/models/Operations.java","src/main/java/com/azure/resourcemanager/horizondb/models/Origin.java","src/main/java/com/azure/resourcemanager/horizondb/models/ParameterProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/PrincipalTypes.java","src/main/java/com/azure/resourcemanager/horizondb/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/horizondb/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/PrivateEndpointConnectionProvisioningState.java","src/main/java/com/azure/resourcemanager/horizondb/models/PrivateEndpointConnectionResource.java","src/main/java/com/azure/resourcemanager/horizondb/models/PrivateEndpointServiceConnectionStatus.java","src/main/java/com/azure/resourcemanager/horizondb/models/PrivateLinkResourceProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/PrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/horizondb/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/horizondb/models/PublicNetworkAccessState.java","src/main/java/com/azure/resourcemanager/horizondb/models/ReplicaRole.java","src/main/java/com/azure/resourcemanager/horizondb/models/State.java","src/main/java/com/azure/resourcemanager/horizondb/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/horizondb/models/ZonePlacementPolicy.java","src/main/java/com/azure/resourcemanager/horizondb/models/package-info.java","src/main/java/com/azure/resourcemanager/horizondb/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersions":{"Microsoft.HorizonDb":"2026-10-01-preview"},"crossLanguagePackageId":"Microsoft.HorizonDb","crossLanguageVersion":"e3143f0fdae1","crossLanguageDefinitions":{"com.azure.resourcemanager.horizondb.fluent.AuthenticationsClient":"Microsoft.HorizonDb.Authentications","com.azure.resourcemanager.horizondb.fluent.AuthenticationsClient.list":"Microsoft.HorizonDb.Authentications.list","com.azure.resourcemanager.horizondb.fluent.AuthenticationsClient.listAsync":"Microsoft.HorizonDb.Authentications.list","com.azure.resourcemanager.horizondb.fluent.CapabilitiesClient":"Microsoft.HorizonDb.Capabilities","com.azure.resourcemanager.horizondb.fluent.CapabilitiesClient.get":"Microsoft.HorizonDb.Capabilities.get","com.azure.resourcemanager.horizondb.fluent.CapabilitiesClient.getAsync":"Microsoft.HorizonDb.Capabilities.get","com.azure.resourcemanager.horizondb.fluent.CapabilitiesClient.getWithResponse":"Microsoft.HorizonDb.Capabilities.get","com.azure.resourcemanager.horizondb.fluent.CapabilitiesClient.getWithResponseAsync":"Microsoft.HorizonDb.Capabilities.get","com.azure.resourcemanager.horizondb.fluent.CapabilitiesClient.list":"Microsoft.HorizonDb.Capabilities.list","com.azure.resourcemanager.horizondb.fluent.CapabilitiesClient.listAsync":"Microsoft.HorizonDb.Capabilities.list","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureCapabilitiesClient":"Microsoft.HorizonDb.ChangeDataCaptureCapabilities","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureCapabilitiesClient.beginCreateOrReplace":"Microsoft.HorizonDb.ChangeDataCaptureCapabilities.createOrReplace","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureCapabilitiesClient.beginCreateOrReplaceAsync":"Microsoft.HorizonDb.ChangeDataCaptureCapabilities.createOrReplace","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureCapabilitiesClient.beginDelete":"Microsoft.HorizonDb.ChangeDataCaptureCapabilities.delete","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureCapabilitiesClient.beginDeleteAsync":"Microsoft.HorizonDb.ChangeDataCaptureCapabilities.delete","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureCapabilitiesClient.beginUpdate":"Microsoft.HorizonDb.ChangeDataCaptureCapabilities.update","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureCapabilitiesClient.beginUpdateAsync":"Microsoft.HorizonDb.ChangeDataCaptureCapabilities.update","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureCapabilitiesClient.createOrReplace":"Microsoft.HorizonDb.ChangeDataCaptureCapabilities.createOrReplace","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureCapabilitiesClient.createOrReplaceAsync":"Microsoft.HorizonDb.ChangeDataCaptureCapabilities.createOrReplace","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureCapabilitiesClient.createOrReplaceWithResponseAsync":"Microsoft.HorizonDb.ChangeDataCaptureCapabilities.createOrReplace","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureCapabilitiesClient.delete":"Microsoft.HorizonDb.ChangeDataCaptureCapabilities.delete","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureCapabilitiesClient.deleteAsync":"Microsoft.HorizonDb.ChangeDataCaptureCapabilities.delete","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureCapabilitiesClient.deleteWithResponseAsync":"Microsoft.HorizonDb.ChangeDataCaptureCapabilities.delete","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureCapabilitiesClient.get":"Microsoft.HorizonDb.ChangeDataCaptureCapabilities.get","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureCapabilitiesClient.getAsync":"Microsoft.HorizonDb.ChangeDataCaptureCapabilities.get","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureCapabilitiesClient.getWithResponse":"Microsoft.HorizonDb.ChangeDataCaptureCapabilities.get","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureCapabilitiesClient.getWithResponseAsync":"Microsoft.HorizonDb.ChangeDataCaptureCapabilities.get","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureCapabilitiesClient.list":"Microsoft.HorizonDb.ChangeDataCaptureCapabilities.list","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureCapabilitiesClient.listAsync":"Microsoft.HorizonDb.ChangeDataCaptureCapabilities.list","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureCapabilitiesClient.update":"Microsoft.HorizonDb.ChangeDataCaptureCapabilities.update","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureCapabilitiesClient.updateAsync":"Microsoft.HorizonDb.ChangeDataCaptureCapabilities.update","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureCapabilitiesClient.updateWithResponseAsync":"Microsoft.HorizonDb.ChangeDataCaptureCapabilities.update","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureConfigurationsClient":"Microsoft.HorizonDb.ChangeDataCaptureConfigurations","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureConfigurationsClient.beginCreateOrReplace":"Microsoft.HorizonDb.ChangeDataCaptureConfigurations.createOrReplace","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureConfigurationsClient.beginCreateOrReplaceAsync":"Microsoft.HorizonDb.ChangeDataCaptureConfigurations.createOrReplace","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureConfigurationsClient.beginDelete":"Microsoft.HorizonDb.ChangeDataCaptureConfigurations.delete","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureConfigurationsClient.beginDeleteAsync":"Microsoft.HorizonDb.ChangeDataCaptureConfigurations.delete","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureConfigurationsClient.beginUpdate":"Microsoft.HorizonDb.ChangeDataCaptureConfigurations.update","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureConfigurationsClient.beginUpdateAsync":"Microsoft.HorizonDb.ChangeDataCaptureConfigurations.update","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureConfigurationsClient.createOrReplace":"Microsoft.HorizonDb.ChangeDataCaptureConfigurations.createOrReplace","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureConfigurationsClient.createOrReplaceAsync":"Microsoft.HorizonDb.ChangeDataCaptureConfigurations.createOrReplace","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureConfigurationsClient.createOrReplaceWithResponseAsync":"Microsoft.HorizonDb.ChangeDataCaptureConfigurations.createOrReplace","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureConfigurationsClient.delete":"Microsoft.HorizonDb.ChangeDataCaptureConfigurations.delete","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureConfigurationsClient.deleteAsync":"Microsoft.HorizonDb.ChangeDataCaptureConfigurations.delete","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureConfigurationsClient.deleteWithResponseAsync":"Microsoft.HorizonDb.ChangeDataCaptureConfigurations.delete","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureConfigurationsClient.get":"Microsoft.HorizonDb.ChangeDataCaptureConfigurations.get","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureConfigurationsClient.getAsync":"Microsoft.HorizonDb.ChangeDataCaptureConfigurations.get","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureConfigurationsClient.getWithResponse":"Microsoft.HorizonDb.ChangeDataCaptureConfigurations.get","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureConfigurationsClient.getWithResponseAsync":"Microsoft.HorizonDb.ChangeDataCaptureConfigurations.get","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureConfigurationsClient.list":"Microsoft.HorizonDb.ChangeDataCaptureConfigurations.list","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureConfigurationsClient.listAsync":"Microsoft.HorizonDb.ChangeDataCaptureConfigurations.list","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureConfigurationsClient.update":"Microsoft.HorizonDb.ChangeDataCaptureConfigurations.update","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureConfigurationsClient.updateAsync":"Microsoft.HorizonDb.ChangeDataCaptureConfigurations.update","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureConfigurationsClient.updateWithResponseAsync":"Microsoft.HorizonDb.ChangeDataCaptureConfigurations.update","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureDestinationsClient":"Microsoft.HorizonDb.ChangeDataCaptureDestinations","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureDestinationsClient.activateIdentity":"Microsoft.HorizonDb.ChangeDataCaptureDestinations.activateIdentity","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureDestinationsClient.activateIdentityAsync":"Microsoft.HorizonDb.ChangeDataCaptureDestinations.activateIdentity","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureDestinationsClient.activateIdentityWithResponseAsync":"Microsoft.HorizonDb.ChangeDataCaptureDestinations.activateIdentity","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureDestinationsClient.beginActivateIdentity":"Microsoft.HorizonDb.ChangeDataCaptureDestinations.activateIdentity","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureDestinationsClient.beginActivateIdentityAsync":"Microsoft.HorizonDb.ChangeDataCaptureDestinations.activateIdentity","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureDestinationsClient.beginCreateOrReplace":"Microsoft.HorizonDb.ChangeDataCaptureDestinations.createOrReplace","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureDestinationsClient.beginCreateOrReplaceAsync":"Microsoft.HorizonDb.ChangeDataCaptureDestinations.createOrReplace","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureDestinationsClient.beginDelete":"Microsoft.HorizonDb.ChangeDataCaptureDestinations.delete","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureDestinationsClient.beginDeleteAsync":"Microsoft.HorizonDb.ChangeDataCaptureDestinations.delete","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureDestinationsClient.beginUpdate":"Microsoft.HorizonDb.ChangeDataCaptureDestinations.update","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureDestinationsClient.beginUpdateAsync":"Microsoft.HorizonDb.ChangeDataCaptureDestinations.update","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureDestinationsClient.createOrReplace":"Microsoft.HorizonDb.ChangeDataCaptureDestinations.createOrReplace","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureDestinationsClient.createOrReplaceAsync":"Microsoft.HorizonDb.ChangeDataCaptureDestinations.createOrReplace","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureDestinationsClient.createOrReplaceWithResponseAsync":"Microsoft.HorizonDb.ChangeDataCaptureDestinations.createOrReplace","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureDestinationsClient.delete":"Microsoft.HorizonDb.ChangeDataCaptureDestinations.delete","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureDestinationsClient.deleteAsync":"Microsoft.HorizonDb.ChangeDataCaptureDestinations.delete","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureDestinationsClient.deleteWithResponseAsync":"Microsoft.HorizonDb.ChangeDataCaptureDestinations.delete","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureDestinationsClient.get":"Microsoft.HorizonDb.ChangeDataCaptureDestinations.get","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureDestinationsClient.getAsync":"Microsoft.HorizonDb.ChangeDataCaptureDestinations.get","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureDestinationsClient.getWithResponse":"Microsoft.HorizonDb.ChangeDataCaptureDestinations.get","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureDestinationsClient.getWithResponseAsync":"Microsoft.HorizonDb.ChangeDataCaptureDestinations.get","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureDestinationsClient.list":"Microsoft.HorizonDb.ChangeDataCaptureDestinations.list","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureDestinationsClient.listAsync":"Microsoft.HorizonDb.ChangeDataCaptureDestinations.list","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureDestinationsClient.update":"Microsoft.HorizonDb.ChangeDataCaptureDestinations.update","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureDestinationsClient.updateAsync":"Microsoft.HorizonDb.ChangeDataCaptureDestinations.update","com.azure.resourcemanager.horizondb.fluent.ChangeDataCaptureDestinationsClient.updateWithResponseAsync":"Microsoft.HorizonDb.ChangeDataCaptureDestinations.update","com.azure.resourcemanager.horizondb.fluent.ClustersClient":"Microsoft.HorizonDb.Clusters","com.azure.resourcemanager.horizondb.fluent.ClustersClient.beginCreateOrReplace":"Microsoft.HorizonDb.Clusters.createOrReplace","com.azure.resourcemanager.horizondb.fluent.ClustersClient.beginCreateOrReplaceAsync":"Microsoft.HorizonDb.Clusters.createOrReplace","com.azure.resourcemanager.horizondb.fluent.ClustersClient.beginDelete":"Microsoft.HorizonDb.Clusters.delete","com.azure.resourcemanager.horizondb.fluent.ClustersClient.beginDeleteAsync":"Microsoft.HorizonDb.Clusters.delete","com.azure.resourcemanager.horizondb.fluent.ClustersClient.beginFailover":"Microsoft.HorizonDb.Clusters.failover","com.azure.resourcemanager.horizondb.fluent.ClustersClient.beginFailoverAsync":"Microsoft.HorizonDb.Clusters.failover","com.azure.resourcemanager.horizondb.fluent.ClustersClient.beginUpdate":"Microsoft.HorizonDb.Clusters.update","com.azure.resourcemanager.horizondb.fluent.ClustersClient.beginUpdateAsync":"Microsoft.HorizonDb.Clusters.update","com.azure.resourcemanager.horizondb.fluent.ClustersClient.createOrReplace":"Microsoft.HorizonDb.Clusters.createOrReplace","com.azure.resourcemanager.horizondb.fluent.ClustersClient.createOrReplaceAsync":"Microsoft.HorizonDb.Clusters.createOrReplace","com.azure.resourcemanager.horizondb.fluent.ClustersClient.createOrReplaceWithResponseAsync":"Microsoft.HorizonDb.Clusters.createOrReplace","com.azure.resourcemanager.horizondb.fluent.ClustersClient.delete":"Microsoft.HorizonDb.Clusters.delete","com.azure.resourcemanager.horizondb.fluent.ClustersClient.deleteAsync":"Microsoft.HorizonDb.Clusters.delete","com.azure.resourcemanager.horizondb.fluent.ClustersClient.deleteWithResponseAsync":"Microsoft.HorizonDb.Clusters.delete","com.azure.resourcemanager.horizondb.fluent.ClustersClient.failover":"Microsoft.HorizonDb.Clusters.failover","com.azure.resourcemanager.horizondb.fluent.ClustersClient.failoverAsync":"Microsoft.HorizonDb.Clusters.failover","com.azure.resourcemanager.horizondb.fluent.ClustersClient.failoverWithResponseAsync":"Microsoft.HorizonDb.Clusters.failover","com.azure.resourcemanager.horizondb.fluent.ClustersClient.getByResourceGroup":"Microsoft.HorizonDb.Clusters.get","com.azure.resourcemanager.horizondb.fluent.ClustersClient.getByResourceGroupAsync":"Microsoft.HorizonDb.Clusters.get","com.azure.resourcemanager.horizondb.fluent.ClustersClient.getByResourceGroupWithResponse":"Microsoft.HorizonDb.Clusters.get","com.azure.resourcemanager.horizondb.fluent.ClustersClient.getByResourceGroupWithResponseAsync":"Microsoft.HorizonDb.Clusters.get","com.azure.resourcemanager.horizondb.fluent.ClustersClient.list":"Microsoft.HorizonDb.Clusters.listBySubscription","com.azure.resourcemanager.horizondb.fluent.ClustersClient.listAsync":"Microsoft.HorizonDb.Clusters.listBySubscription","com.azure.resourcemanager.horizondb.fluent.ClustersClient.listByResourceGroup":"Microsoft.HorizonDb.Clusters.listByResourceGroup","com.azure.resourcemanager.horizondb.fluent.ClustersClient.listByResourceGroupAsync":"Microsoft.HorizonDb.Clusters.listByResourceGroup","com.azure.resourcemanager.horizondb.fluent.ClustersClient.update":"Microsoft.HorizonDb.Clusters.update","com.azure.resourcemanager.horizondb.fluent.ClustersClient.updateAsync":"Microsoft.HorizonDb.Clusters.update","com.azure.resourcemanager.horizondb.fluent.ClustersClient.updateWithResponseAsync":"Microsoft.HorizonDb.Clusters.update","com.azure.resourcemanager.horizondb.fluent.DefaultParameterGroupsClient":"Microsoft.HorizonDb.DefaultParameterGroups","com.azure.resourcemanager.horizondb.fluent.DefaultParameterGroupsClient.get":"Microsoft.HorizonDb.DefaultParameterGroups.get","com.azure.resourcemanager.horizondb.fluent.DefaultParameterGroupsClient.getAsync":"Microsoft.HorizonDb.DefaultParameterGroups.get","com.azure.resourcemanager.horizondb.fluent.DefaultParameterGroupsClient.getWithResponse":"Microsoft.HorizonDb.DefaultParameterGroups.get","com.azure.resourcemanager.horizondb.fluent.DefaultParameterGroupsClient.getWithResponseAsync":"Microsoft.HorizonDb.DefaultParameterGroups.get","com.azure.resourcemanager.horizondb.fluent.DefaultParameterGroupsClient.listBySubscriptionAndRegion":"Microsoft.HorizonDb.DefaultParameterGroups.listBySubscriptionAndRegion","com.azure.resourcemanager.horizondb.fluent.DefaultParameterGroupsClient.listBySubscriptionAndRegionAsync":"Microsoft.HorizonDb.DefaultParameterGroups.listBySubscriptionAndRegion","com.azure.resourcemanager.horizondb.fluent.EndpointsClient":"Microsoft.HorizonDb.Endpoints","com.azure.resourcemanager.horizondb.fluent.EndpointsClient.get":"Microsoft.HorizonDb.Endpoints.get","com.azure.resourcemanager.horizondb.fluent.EndpointsClient.getAsync":"Microsoft.HorizonDb.Endpoints.get","com.azure.resourcemanager.horizondb.fluent.EndpointsClient.getWithResponse":"Microsoft.HorizonDb.Endpoints.get","com.azure.resourcemanager.horizondb.fluent.EndpointsClient.getWithResponseAsync":"Microsoft.HorizonDb.Endpoints.get","com.azure.resourcemanager.horizondb.fluent.EndpointsClient.list":"Microsoft.HorizonDb.Endpoints.list","com.azure.resourcemanager.horizondb.fluent.EndpointsClient.listAsync":"Microsoft.HorizonDb.Endpoints.list","com.azure.resourcemanager.horizondb.fluent.FirewallRulesClient":"Microsoft.HorizonDb.FirewallRules","com.azure.resourcemanager.horizondb.fluent.FirewallRulesClient.beginCreateOrReplace":"Microsoft.HorizonDb.FirewallRules.createOrReplace","com.azure.resourcemanager.horizondb.fluent.FirewallRulesClient.beginCreateOrReplaceAsync":"Microsoft.HorizonDb.FirewallRules.createOrReplace","com.azure.resourcemanager.horizondb.fluent.FirewallRulesClient.beginDelete":"Microsoft.HorizonDb.FirewallRules.delete","com.azure.resourcemanager.horizondb.fluent.FirewallRulesClient.beginDeleteAsync":"Microsoft.HorizonDb.FirewallRules.delete","com.azure.resourcemanager.horizondb.fluent.FirewallRulesClient.createOrReplace":"Microsoft.HorizonDb.FirewallRules.createOrReplace","com.azure.resourcemanager.horizondb.fluent.FirewallRulesClient.createOrReplaceAsync":"Microsoft.HorizonDb.FirewallRules.createOrReplace","com.azure.resourcemanager.horizondb.fluent.FirewallRulesClient.createOrReplaceWithResponseAsync":"Microsoft.HorizonDb.FirewallRules.createOrReplace","com.azure.resourcemanager.horizondb.fluent.FirewallRulesClient.delete":"Microsoft.HorizonDb.FirewallRules.delete","com.azure.resourcemanager.horizondb.fluent.FirewallRulesClient.deleteAsync":"Microsoft.HorizonDb.FirewallRules.delete","com.azure.resourcemanager.horizondb.fluent.FirewallRulesClient.deleteWithResponseAsync":"Microsoft.HorizonDb.FirewallRules.delete","com.azure.resourcemanager.horizondb.fluent.FirewallRulesClient.get":"Microsoft.HorizonDb.FirewallRules.get","com.azure.resourcemanager.horizondb.fluent.FirewallRulesClient.getAsync":"Microsoft.HorizonDb.FirewallRules.get","com.azure.resourcemanager.horizondb.fluent.FirewallRulesClient.getWithResponse":"Microsoft.HorizonDb.FirewallRules.get","com.azure.resourcemanager.horizondb.fluent.FirewallRulesClient.getWithResponseAsync":"Microsoft.HorizonDb.FirewallRules.get","com.azure.resourcemanager.horizondb.fluent.FirewallRulesClient.list":"Microsoft.HorizonDb.FirewallRules.list","com.azure.resourcemanager.horizondb.fluent.FirewallRulesClient.listAsync":"Microsoft.HorizonDb.FirewallRules.list","com.azure.resourcemanager.horizondb.fluent.HorizonDbManagementClient":"Microsoft.HorizonDb","com.azure.resourcemanager.horizondb.fluent.IdentityAssignmentsClient":"Microsoft.HorizonDb.IdentityAssignments","com.azure.resourcemanager.horizondb.fluent.IdentityAssignmentsClient.beginCreateOrReplace":"Microsoft.HorizonDb.IdentityAssignments.createOrReplace","com.azure.resourcemanager.horizondb.fluent.IdentityAssignmentsClient.beginCreateOrReplaceAsync":"Microsoft.HorizonDb.IdentityAssignments.createOrReplace","com.azure.resourcemanager.horizondb.fluent.IdentityAssignmentsClient.beginDelete":"Microsoft.HorizonDb.IdentityAssignments.delete","com.azure.resourcemanager.horizondb.fluent.IdentityAssignmentsClient.beginDeleteAsync":"Microsoft.HorizonDb.IdentityAssignments.delete","com.azure.resourcemanager.horizondb.fluent.IdentityAssignmentsClient.createOrReplace":"Microsoft.HorizonDb.IdentityAssignments.createOrReplace","com.azure.resourcemanager.horizondb.fluent.IdentityAssignmentsClient.createOrReplaceAsync":"Microsoft.HorizonDb.IdentityAssignments.createOrReplace","com.azure.resourcemanager.horizondb.fluent.IdentityAssignmentsClient.createOrReplaceWithResponseAsync":"Microsoft.HorizonDb.IdentityAssignments.createOrReplace","com.azure.resourcemanager.horizondb.fluent.IdentityAssignmentsClient.delete":"Microsoft.HorizonDb.IdentityAssignments.delete","com.azure.resourcemanager.horizondb.fluent.IdentityAssignmentsClient.deleteAsync":"Microsoft.HorizonDb.IdentityAssignments.delete","com.azure.resourcemanager.horizondb.fluent.IdentityAssignmentsClient.deleteWithResponseAsync":"Microsoft.HorizonDb.IdentityAssignments.delete","com.azure.resourcemanager.horizondb.fluent.IdentityAssignmentsClient.get":"Microsoft.HorizonDb.IdentityAssignments.get","com.azure.resourcemanager.horizondb.fluent.IdentityAssignmentsClient.getAsync":"Microsoft.HorizonDb.IdentityAssignments.get","com.azure.resourcemanager.horizondb.fluent.IdentityAssignmentsClient.getWithResponse":"Microsoft.HorizonDb.IdentityAssignments.get","com.azure.resourcemanager.horizondb.fluent.IdentityAssignmentsClient.getWithResponseAsync":"Microsoft.HorizonDb.IdentityAssignments.get","com.azure.resourcemanager.horizondb.fluent.IdentityAssignmentsClient.list":"Microsoft.HorizonDb.IdentityAssignments.list","com.azure.resourcemanager.horizondb.fluent.IdentityAssignmentsClient.listAsync":"Microsoft.HorizonDb.IdentityAssignments.list","com.azure.resourcemanager.horizondb.fluent.LogCaptureConfigurationsClient":"Microsoft.HorizonDb.LogCaptureConfigurations","com.azure.resourcemanager.horizondb.fluent.LogCaptureConfigurationsClient.beginUpdate":"Microsoft.HorizonDb.LogCaptureConfigurations.update","com.azure.resourcemanager.horizondb.fluent.LogCaptureConfigurationsClient.beginUpdateAsync":"Microsoft.HorizonDb.LogCaptureConfigurations.update","com.azure.resourcemanager.horizondb.fluent.LogCaptureConfigurationsClient.get":"Microsoft.HorizonDb.LogCaptureConfigurations.get","com.azure.resourcemanager.horizondb.fluent.LogCaptureConfigurationsClient.getAsync":"Microsoft.HorizonDb.LogCaptureConfigurations.get","com.azure.resourcemanager.horizondb.fluent.LogCaptureConfigurationsClient.getWithResponse":"Microsoft.HorizonDb.LogCaptureConfigurations.get","com.azure.resourcemanager.horizondb.fluent.LogCaptureConfigurationsClient.getWithResponseAsync":"Microsoft.HorizonDb.LogCaptureConfigurations.get","com.azure.resourcemanager.horizondb.fluent.LogCaptureConfigurationsClient.list":"Microsoft.HorizonDb.LogCaptureConfigurations.list","com.azure.resourcemanager.horizondb.fluent.LogCaptureConfigurationsClient.listAsync":"Microsoft.HorizonDb.LogCaptureConfigurations.list","com.azure.resourcemanager.horizondb.fluent.LogCaptureConfigurationsClient.update":"Microsoft.HorizonDb.LogCaptureConfigurations.update","com.azure.resourcemanager.horizondb.fluent.LogCaptureConfigurationsClient.updateAsync":"Microsoft.HorizonDb.LogCaptureConfigurations.update","com.azure.resourcemanager.horizondb.fluent.LogCaptureConfigurationsClient.updateWithResponseAsync":"Microsoft.HorizonDb.LogCaptureConfigurations.update","com.azure.resourcemanager.horizondb.fluent.LogFilesClient":"Microsoft.HorizonDb.LogFiles","com.azure.resourcemanager.horizondb.fluent.LogFilesClient.get":"Microsoft.HorizonDb.LogFiles.get","com.azure.resourcemanager.horizondb.fluent.LogFilesClient.getAsync":"Microsoft.HorizonDb.LogFiles.get","com.azure.resourcemanager.horizondb.fluent.LogFilesClient.getWithResponse":"Microsoft.HorizonDb.LogFiles.get","com.azure.resourcemanager.horizondb.fluent.LogFilesClient.getWithResponseAsync":"Microsoft.HorizonDb.LogFiles.get","com.azure.resourcemanager.horizondb.fluent.LogFilesClient.list":"Microsoft.HorizonDb.LogFiles.list","com.azure.resourcemanager.horizondb.fluent.LogFilesClient.listAsync":"Microsoft.HorizonDb.LogFiles.list","com.azure.resourcemanager.horizondb.fluent.LogFilesClient.listDownloadUrls":"Microsoft.HorizonDb.LogFiles.listDownloadUrls","com.azure.resourcemanager.horizondb.fluent.LogFilesClient.listDownloadUrlsAsync":"Microsoft.HorizonDb.LogFiles.listDownloadUrls","com.azure.resourcemanager.horizondb.fluent.LogFilesClient.listDownloadUrlsWithResponse":"Microsoft.HorizonDb.LogFiles.listDownloadUrls","com.azure.resourcemanager.horizondb.fluent.LogFilesClient.listDownloadUrlsWithResponseAsync":"Microsoft.HorizonDb.LogFiles.listDownloadUrls","com.azure.resourcemanager.horizondb.fluent.MaintenanceEventsClient":"Microsoft.HorizonDb.MaintenanceEvents","com.azure.resourcemanager.horizondb.fluent.MaintenanceEventsClient.applyNow":"Microsoft.HorizonDb.MaintenanceEvents.applyNow","com.azure.resourcemanager.horizondb.fluent.MaintenanceEventsClient.applyNowAsync":"Microsoft.HorizonDb.MaintenanceEvents.applyNow","com.azure.resourcemanager.horizondb.fluent.MaintenanceEventsClient.applyNowWithResponseAsync":"Microsoft.HorizonDb.MaintenanceEvents.applyNow","com.azure.resourcemanager.horizondb.fluent.MaintenanceEventsClient.beginApplyNow":"Microsoft.HorizonDb.MaintenanceEvents.applyNow","com.azure.resourcemanager.horizondb.fluent.MaintenanceEventsClient.beginApplyNowAsync":"Microsoft.HorizonDb.MaintenanceEvents.applyNow","com.azure.resourcemanager.horizondb.fluent.MaintenanceEventsClient.beginReschedule":"Microsoft.HorizonDb.MaintenanceEvents.reschedule","com.azure.resourcemanager.horizondb.fluent.MaintenanceEventsClient.beginRescheduleAsync":"Microsoft.HorizonDb.MaintenanceEvents.reschedule","com.azure.resourcemanager.horizondb.fluent.MaintenanceEventsClient.get":"Microsoft.HorizonDb.MaintenanceEvents.get","com.azure.resourcemanager.horizondb.fluent.MaintenanceEventsClient.getAsync":"Microsoft.HorizonDb.MaintenanceEvents.get","com.azure.resourcemanager.horizondb.fluent.MaintenanceEventsClient.getWithResponse":"Microsoft.HorizonDb.MaintenanceEvents.get","com.azure.resourcemanager.horizondb.fluent.MaintenanceEventsClient.getWithResponseAsync":"Microsoft.HorizonDb.MaintenanceEvents.get","com.azure.resourcemanager.horizondb.fluent.MaintenanceEventsClient.list":"Microsoft.HorizonDb.MaintenanceEvents.list","com.azure.resourcemanager.horizondb.fluent.MaintenanceEventsClient.listAsync":"Microsoft.HorizonDb.MaintenanceEvents.list","com.azure.resourcemanager.horizondb.fluent.MaintenanceEventsClient.reschedule":"Microsoft.HorizonDb.MaintenanceEvents.reschedule","com.azure.resourcemanager.horizondb.fluent.MaintenanceEventsClient.rescheduleAsync":"Microsoft.HorizonDb.MaintenanceEvents.reschedule","com.azure.resourcemanager.horizondb.fluent.MaintenanceEventsClient.rescheduleWithResponseAsync":"Microsoft.HorizonDb.MaintenanceEvents.reschedule","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAdministratorsClient":"Microsoft.HorizonDb.MicrosoftEntraAdministrators","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAdministratorsClient.beginCreateOrReplace":"Microsoft.HorizonDb.MicrosoftEntraAdministrators.createOrReplace","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAdministratorsClient.beginCreateOrReplaceAsync":"Microsoft.HorizonDb.MicrosoftEntraAdministrators.createOrReplace","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAdministratorsClient.beginDelete":"Microsoft.HorizonDb.MicrosoftEntraAdministrators.delete","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAdministratorsClient.beginDeleteAsync":"Microsoft.HorizonDb.MicrosoftEntraAdministrators.delete","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAdministratorsClient.createOrReplace":"Microsoft.HorizonDb.MicrosoftEntraAdministrators.createOrReplace","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAdministratorsClient.createOrReplaceAsync":"Microsoft.HorizonDb.MicrosoftEntraAdministrators.createOrReplace","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAdministratorsClient.createOrReplaceWithResponseAsync":"Microsoft.HorizonDb.MicrosoftEntraAdministrators.createOrReplace","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAdministratorsClient.delete":"Microsoft.HorizonDb.MicrosoftEntraAdministrators.delete","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAdministratorsClient.deleteAsync":"Microsoft.HorizonDb.MicrosoftEntraAdministrators.delete","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAdministratorsClient.deleteWithResponseAsync":"Microsoft.HorizonDb.MicrosoftEntraAdministrators.delete","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAdministratorsClient.get":"Microsoft.HorizonDb.MicrosoftEntraAdministrators.get","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAdministratorsClient.getAsync":"Microsoft.HorizonDb.MicrosoftEntraAdministrators.get","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAdministratorsClient.getWithResponse":"Microsoft.HorizonDb.MicrosoftEntraAdministrators.get","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAdministratorsClient.getWithResponseAsync":"Microsoft.HorizonDb.MicrosoftEntraAdministrators.get","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAdministratorsClient.list":"Microsoft.HorizonDb.MicrosoftEntraAdministrators.list","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAdministratorsClient.listAsync":"Microsoft.HorizonDb.MicrosoftEntraAdministrators.list","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAuthenticationsClient":"Microsoft.HorizonDb.MicrosoftEntraAuthentications","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAuthenticationsClient.beginCreateOrReplace":"Microsoft.HorizonDb.MicrosoftEntraAuthentications.createOrReplace","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAuthenticationsClient.beginCreateOrReplaceAsync":"Microsoft.HorizonDb.MicrosoftEntraAuthentications.createOrReplace","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAuthenticationsClient.beginUpdate":"Microsoft.HorizonDb.MicrosoftEntraAuthentications.update","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAuthenticationsClient.beginUpdateAsync":"Microsoft.HorizonDb.MicrosoftEntraAuthentications.update","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAuthenticationsClient.createOrReplace":"Microsoft.HorizonDb.MicrosoftEntraAuthentications.createOrReplace","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAuthenticationsClient.createOrReplaceAsync":"Microsoft.HorizonDb.MicrosoftEntraAuthentications.createOrReplace","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAuthenticationsClient.createOrReplaceWithResponseAsync":"Microsoft.HorizonDb.MicrosoftEntraAuthentications.createOrReplace","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAuthenticationsClient.get":"Microsoft.HorizonDb.MicrosoftEntraAuthentications.get","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAuthenticationsClient.getAsync":"Microsoft.HorizonDb.MicrosoftEntraAuthentications.get","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAuthenticationsClient.getWithResponse":"Microsoft.HorizonDb.MicrosoftEntraAuthentications.get","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAuthenticationsClient.getWithResponseAsync":"Microsoft.HorizonDb.MicrosoftEntraAuthentications.get","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAuthenticationsClient.update":"Microsoft.HorizonDb.MicrosoftEntraAuthentications.update","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAuthenticationsClient.updateAsync":"Microsoft.HorizonDb.MicrosoftEntraAuthentications.update","com.azure.resourcemanager.horizondb.fluent.MicrosoftEntraAuthenticationsClient.updateWithResponseAsync":"Microsoft.HorizonDb.MicrosoftEntraAuthentications.update","com.azure.resourcemanager.horizondb.fluent.NodesClient":"Microsoft.HorizonDb.Nodes","com.azure.resourcemanager.horizondb.fluent.NodesClient.get":"Microsoft.HorizonDb.Nodes.get","com.azure.resourcemanager.horizondb.fluent.NodesClient.getAsync":"Microsoft.HorizonDb.Nodes.get","com.azure.resourcemanager.horizondb.fluent.NodesClient.getWithResponse":"Microsoft.HorizonDb.Nodes.get","com.azure.resourcemanager.horizondb.fluent.NodesClient.getWithResponseAsync":"Microsoft.HorizonDb.Nodes.get","com.azure.resourcemanager.horizondb.fluent.NodesClient.list":"Microsoft.HorizonDb.Nodes.list","com.azure.resourcemanager.horizondb.fluent.NodesClient.listAsync":"Microsoft.HorizonDb.Nodes.list","com.azure.resourcemanager.horizondb.fluent.OperationsClient":"Microsoft.HorizonDb.Operations","com.azure.resourcemanager.horizondb.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.horizondb.fluent.OperationsClient.listAsync":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.horizondb.fluent.ParameterGroupsClient":"Microsoft.HorizonDb.ParameterGroups","com.azure.resourcemanager.horizondb.fluent.ParameterGroupsClient.beginCreateOrReplace":"Microsoft.HorizonDb.ParameterGroups.createOrReplace","com.azure.resourcemanager.horizondb.fluent.ParameterGroupsClient.beginCreateOrReplaceAsync":"Microsoft.HorizonDb.ParameterGroups.createOrReplace","com.azure.resourcemanager.horizondb.fluent.ParameterGroupsClient.beginDelete":"Microsoft.HorizonDb.ParameterGroups.delete","com.azure.resourcemanager.horizondb.fluent.ParameterGroupsClient.beginDeleteAsync":"Microsoft.HorizonDb.ParameterGroups.delete","com.azure.resourcemanager.horizondb.fluent.ParameterGroupsClient.beginUpdate":"Microsoft.HorizonDb.ParameterGroups.update","com.azure.resourcemanager.horizondb.fluent.ParameterGroupsClient.beginUpdateAsync":"Microsoft.HorizonDb.ParameterGroups.update","com.azure.resourcemanager.horizondb.fluent.ParameterGroupsClient.createOrReplace":"Microsoft.HorizonDb.ParameterGroups.createOrReplace","com.azure.resourcemanager.horizondb.fluent.ParameterGroupsClient.createOrReplaceAsync":"Microsoft.HorizonDb.ParameterGroups.createOrReplace","com.azure.resourcemanager.horizondb.fluent.ParameterGroupsClient.createOrReplaceWithResponseAsync":"Microsoft.HorizonDb.ParameterGroups.createOrReplace","com.azure.resourcemanager.horizondb.fluent.ParameterGroupsClient.delete":"Microsoft.HorizonDb.ParameterGroups.delete","com.azure.resourcemanager.horizondb.fluent.ParameterGroupsClient.deleteAsync":"Microsoft.HorizonDb.ParameterGroups.delete","com.azure.resourcemanager.horizondb.fluent.ParameterGroupsClient.deleteWithResponseAsync":"Microsoft.HorizonDb.ParameterGroups.delete","com.azure.resourcemanager.horizondb.fluent.ParameterGroupsClient.getByResourceGroup":"Microsoft.HorizonDb.ParameterGroups.get","com.azure.resourcemanager.horizondb.fluent.ParameterGroupsClient.getByResourceGroupAsync":"Microsoft.HorizonDb.ParameterGroups.get","com.azure.resourcemanager.horizondb.fluent.ParameterGroupsClient.getByResourceGroupWithResponse":"Microsoft.HorizonDb.ParameterGroups.get","com.azure.resourcemanager.horizondb.fluent.ParameterGroupsClient.getByResourceGroupWithResponseAsync":"Microsoft.HorizonDb.ParameterGroups.get","com.azure.resourcemanager.horizondb.fluent.ParameterGroupsClient.list":"Microsoft.HorizonDb.ParameterGroups.listBySubscription","com.azure.resourcemanager.horizondb.fluent.ParameterGroupsClient.listAsync":"Microsoft.HorizonDb.ParameterGroups.listBySubscription","com.azure.resourcemanager.horizondb.fluent.ParameterGroupsClient.listByResourceGroup":"Microsoft.HorizonDb.ParameterGroups.listByResourceGroup","com.azure.resourcemanager.horizondb.fluent.ParameterGroupsClient.listByResourceGroupAsync":"Microsoft.HorizonDb.ParameterGroups.listByResourceGroup","com.azure.resourcemanager.horizondb.fluent.ParameterGroupsClient.listConnections":"Microsoft.HorizonDb.ParameterGroups.listConnections","com.azure.resourcemanager.horizondb.fluent.ParameterGroupsClient.listConnectionsAsync":"Microsoft.HorizonDb.ParameterGroups.listConnections","com.azure.resourcemanager.horizondb.fluent.ParameterGroupsClient.update":"Microsoft.HorizonDb.ParameterGroups.update","com.azure.resourcemanager.horizondb.fluent.ParameterGroupsClient.updateAsync":"Microsoft.HorizonDb.ParameterGroups.update","com.azure.resourcemanager.horizondb.fluent.ParameterGroupsClient.updateWithResponseAsync":"Microsoft.HorizonDb.ParameterGroups.update","com.azure.resourcemanager.horizondb.fluent.PasswordAuthenticationsClient":"Microsoft.HorizonDb.PasswordAuthentications","com.azure.resourcemanager.horizondb.fluent.PasswordAuthenticationsClient.beginCreateOrReplace":"Microsoft.HorizonDb.PasswordAuthentications.createOrReplace","com.azure.resourcemanager.horizondb.fluent.PasswordAuthenticationsClient.beginCreateOrReplaceAsync":"Microsoft.HorizonDb.PasswordAuthentications.createOrReplace","com.azure.resourcemanager.horizondb.fluent.PasswordAuthenticationsClient.beginUpdate":"Microsoft.HorizonDb.PasswordAuthentications.update","com.azure.resourcemanager.horizondb.fluent.PasswordAuthenticationsClient.beginUpdateAsync":"Microsoft.HorizonDb.PasswordAuthentications.update","com.azure.resourcemanager.horizondb.fluent.PasswordAuthenticationsClient.createOrReplace":"Microsoft.HorizonDb.PasswordAuthentications.createOrReplace","com.azure.resourcemanager.horizondb.fluent.PasswordAuthenticationsClient.createOrReplaceAsync":"Microsoft.HorizonDb.PasswordAuthentications.createOrReplace","com.azure.resourcemanager.horizondb.fluent.PasswordAuthenticationsClient.createOrReplaceWithResponseAsync":"Microsoft.HorizonDb.PasswordAuthentications.createOrReplace","com.azure.resourcemanager.horizondb.fluent.PasswordAuthenticationsClient.get":"Microsoft.HorizonDb.PasswordAuthentications.get","com.azure.resourcemanager.horizondb.fluent.PasswordAuthenticationsClient.getAsync":"Microsoft.HorizonDb.PasswordAuthentications.get","com.azure.resourcemanager.horizondb.fluent.PasswordAuthenticationsClient.getWithResponse":"Microsoft.HorizonDb.PasswordAuthentications.get","com.azure.resourcemanager.horizondb.fluent.PasswordAuthenticationsClient.getWithResponseAsync":"Microsoft.HorizonDb.PasswordAuthentications.get","com.azure.resourcemanager.horizondb.fluent.PasswordAuthenticationsClient.update":"Microsoft.HorizonDb.PasswordAuthentications.update","com.azure.resourcemanager.horizondb.fluent.PasswordAuthenticationsClient.updateAsync":"Microsoft.HorizonDb.PasswordAuthentications.update","com.azure.resourcemanager.horizondb.fluent.PasswordAuthenticationsClient.updateWithResponseAsync":"Microsoft.HorizonDb.PasswordAuthentications.update","com.azure.resourcemanager.horizondb.fluent.PoolsClient":"Microsoft.HorizonDb.Pools","com.azure.resourcemanager.horizondb.fluent.PoolsClient.beginCreateOrReplace":"Microsoft.HorizonDb.Pools.createOrReplace","com.azure.resourcemanager.horizondb.fluent.PoolsClient.beginCreateOrReplaceAsync":"Microsoft.HorizonDb.Pools.createOrReplace","com.azure.resourcemanager.horizondb.fluent.PoolsClient.beginDelete":"Microsoft.HorizonDb.Pools.delete","com.azure.resourcemanager.horizondb.fluent.PoolsClient.beginDeleteAsync":"Microsoft.HorizonDb.Pools.delete","com.azure.resourcemanager.horizondb.fluent.PoolsClient.beginRestart":"Microsoft.HorizonDb.Pools.restart","com.azure.resourcemanager.horizondb.fluent.PoolsClient.beginRestartAsync":"Microsoft.HorizonDb.Pools.restart","com.azure.resourcemanager.horizondb.fluent.PoolsClient.beginStart":"Microsoft.HorizonDb.Pools.start","com.azure.resourcemanager.horizondb.fluent.PoolsClient.beginStartAsync":"Microsoft.HorizonDb.Pools.start","com.azure.resourcemanager.horizondb.fluent.PoolsClient.beginStop":"Microsoft.HorizonDb.Pools.stop","com.azure.resourcemanager.horizondb.fluent.PoolsClient.beginStopAsync":"Microsoft.HorizonDb.Pools.stop","com.azure.resourcemanager.horizondb.fluent.PoolsClient.beginUpdate":"Microsoft.HorizonDb.Pools.update","com.azure.resourcemanager.horizondb.fluent.PoolsClient.beginUpdateAsync":"Microsoft.HorizonDb.Pools.update","com.azure.resourcemanager.horizondb.fluent.PoolsClient.createOrReplace":"Microsoft.HorizonDb.Pools.createOrReplace","com.azure.resourcemanager.horizondb.fluent.PoolsClient.createOrReplaceAsync":"Microsoft.HorizonDb.Pools.createOrReplace","com.azure.resourcemanager.horizondb.fluent.PoolsClient.createOrReplaceWithResponseAsync":"Microsoft.HorizonDb.Pools.createOrReplace","com.azure.resourcemanager.horizondb.fluent.PoolsClient.delete":"Microsoft.HorizonDb.Pools.delete","com.azure.resourcemanager.horizondb.fluent.PoolsClient.deleteAsync":"Microsoft.HorizonDb.Pools.delete","com.azure.resourcemanager.horizondb.fluent.PoolsClient.deleteWithResponseAsync":"Microsoft.HorizonDb.Pools.delete","com.azure.resourcemanager.horizondb.fluent.PoolsClient.get":"Microsoft.HorizonDb.Pools.get","com.azure.resourcemanager.horizondb.fluent.PoolsClient.getAsync":"Microsoft.HorizonDb.Pools.get","com.azure.resourcemanager.horizondb.fluent.PoolsClient.getWithResponse":"Microsoft.HorizonDb.Pools.get","com.azure.resourcemanager.horizondb.fluent.PoolsClient.getWithResponseAsync":"Microsoft.HorizonDb.Pools.get","com.azure.resourcemanager.horizondb.fluent.PoolsClient.list":"Microsoft.HorizonDb.Pools.list","com.azure.resourcemanager.horizondb.fluent.PoolsClient.listAsync":"Microsoft.HorizonDb.Pools.list","com.azure.resourcemanager.horizondb.fluent.PoolsClient.restart":"Microsoft.HorizonDb.Pools.restart","com.azure.resourcemanager.horizondb.fluent.PoolsClient.restartAsync":"Microsoft.HorizonDb.Pools.restart","com.azure.resourcemanager.horizondb.fluent.PoolsClient.restartWithResponseAsync":"Microsoft.HorizonDb.Pools.restart","com.azure.resourcemanager.horizondb.fluent.PoolsClient.start":"Microsoft.HorizonDb.Pools.start","com.azure.resourcemanager.horizondb.fluent.PoolsClient.startAsync":"Microsoft.HorizonDb.Pools.start","com.azure.resourcemanager.horizondb.fluent.PoolsClient.startWithResponseAsync":"Microsoft.HorizonDb.Pools.start","com.azure.resourcemanager.horizondb.fluent.PoolsClient.stop":"Microsoft.HorizonDb.Pools.stop","com.azure.resourcemanager.horizondb.fluent.PoolsClient.stopAsync":"Microsoft.HorizonDb.Pools.stop","com.azure.resourcemanager.horizondb.fluent.PoolsClient.stopWithResponseAsync":"Microsoft.HorizonDb.Pools.stop","com.azure.resourcemanager.horizondb.fluent.PoolsClient.update":"Microsoft.HorizonDb.Pools.update","com.azure.resourcemanager.horizondb.fluent.PoolsClient.updateAsync":"Microsoft.HorizonDb.Pools.update","com.azure.resourcemanager.horizondb.fluent.PoolsClient.updateWithResponseAsync":"Microsoft.HorizonDb.Pools.update","com.azure.resourcemanager.horizondb.fluent.PrivateEndpointConnectionsClient":"Microsoft.HorizonDb.PrivateEndpointConnections","com.azure.resourcemanager.horizondb.fluent.PrivateEndpointConnectionsClient.approveOrReject":"Microsoft.HorizonDb.PrivateEndpointConnections.approveOrReject","com.azure.resourcemanager.horizondb.fluent.PrivateEndpointConnectionsClient.approveOrRejectAsync":"Microsoft.HorizonDb.PrivateEndpointConnections.approveOrReject","com.azure.resourcemanager.horizondb.fluent.PrivateEndpointConnectionsClient.approveOrRejectWithResponseAsync":"Microsoft.HorizonDb.PrivateEndpointConnections.approveOrReject","com.azure.resourcemanager.horizondb.fluent.PrivateEndpointConnectionsClient.beginApproveOrReject":"Microsoft.HorizonDb.PrivateEndpointConnections.approveOrReject","com.azure.resourcemanager.horizondb.fluent.PrivateEndpointConnectionsClient.beginApproveOrRejectAsync":"Microsoft.HorizonDb.PrivateEndpointConnections.approveOrReject","com.azure.resourcemanager.horizondb.fluent.PrivateEndpointConnectionsClient.beginDelete":"Microsoft.HorizonDb.PrivateEndpointConnections.delete","com.azure.resourcemanager.horizondb.fluent.PrivateEndpointConnectionsClient.beginDeleteAsync":"Microsoft.HorizonDb.PrivateEndpointConnections.delete","com.azure.resourcemanager.horizondb.fluent.PrivateEndpointConnectionsClient.delete":"Microsoft.HorizonDb.PrivateEndpointConnections.delete","com.azure.resourcemanager.horizondb.fluent.PrivateEndpointConnectionsClient.deleteAsync":"Microsoft.HorizonDb.PrivateEndpointConnections.delete","com.azure.resourcemanager.horizondb.fluent.PrivateEndpointConnectionsClient.deleteWithResponseAsync":"Microsoft.HorizonDb.PrivateEndpointConnections.delete","com.azure.resourcemanager.horizondb.fluent.PrivateEndpointConnectionsClient.get":"Microsoft.HorizonDb.PrivateEndpointConnections.get","com.azure.resourcemanager.horizondb.fluent.PrivateEndpointConnectionsClient.getAsync":"Microsoft.HorizonDb.PrivateEndpointConnections.get","com.azure.resourcemanager.horizondb.fluent.PrivateEndpointConnectionsClient.getWithResponse":"Microsoft.HorizonDb.PrivateEndpointConnections.get","com.azure.resourcemanager.horizondb.fluent.PrivateEndpointConnectionsClient.getWithResponseAsync":"Microsoft.HorizonDb.PrivateEndpointConnections.get","com.azure.resourcemanager.horizondb.fluent.PrivateEndpointConnectionsClient.list":"Microsoft.HorizonDb.PrivateEndpointConnections.list","com.azure.resourcemanager.horizondb.fluent.PrivateEndpointConnectionsClient.listAsync":"Microsoft.HorizonDb.PrivateEndpointConnections.list","com.azure.resourcemanager.horizondb.fluent.PrivateLinkResourcesClient":"Microsoft.HorizonDb.PrivateLinkResources","com.azure.resourcemanager.horizondb.fluent.PrivateLinkResourcesClient.get":"Microsoft.HorizonDb.PrivateLinkResources.get","com.azure.resourcemanager.horizondb.fluent.PrivateLinkResourcesClient.getAsync":"Microsoft.HorizonDb.PrivateLinkResources.get","com.azure.resourcemanager.horizondb.fluent.PrivateLinkResourcesClient.getWithResponse":"Microsoft.HorizonDb.PrivateLinkResources.get","com.azure.resourcemanager.horizondb.fluent.PrivateLinkResourcesClient.getWithResponseAsync":"Microsoft.HorizonDb.PrivateLinkResources.get","com.azure.resourcemanager.horizondb.fluent.PrivateLinkResourcesClient.list":"Microsoft.HorizonDb.PrivateLinkResources.list","com.azure.resourcemanager.horizondb.fluent.PrivateLinkResourcesClient.listAsync":"Microsoft.HorizonDb.PrivateLinkResources.list","com.azure.resourcemanager.horizondb.fluent.models.ActivateChangeDataCaptureIdentityResultInner":"Microsoft.HorizonDb.ActivateChangeDataCaptureIdentityResult","com.azure.resourcemanager.horizondb.fluent.models.AuthenticationInner":"Microsoft.HorizonDb.Authentication","com.azure.resourcemanager.horizondb.fluent.models.CapabilityInner":"Microsoft.HorizonDb.Capability","com.azure.resourcemanager.horizondb.fluent.models.ChangeDataCaptureCapabilityInner":"Microsoft.HorizonDb.ChangeDataCaptureCapability","com.azure.resourcemanager.horizondb.fluent.models.ChangeDataCaptureConfigurationInner":"Microsoft.HorizonDb.ChangeDataCaptureConfiguration","com.azure.resourcemanager.horizondb.fluent.models.ChangeDataCaptureDestinationInner":"Microsoft.HorizonDb.ChangeDataCaptureDestination","com.azure.resourcemanager.horizondb.fluent.models.ClusterInner":"Microsoft.HorizonDb.Cluster","com.azure.resourcemanager.horizondb.fluent.models.DefaultParameterGroupInner":"Microsoft.HorizonDb.DefaultParameterGroup","com.azure.resourcemanager.horizondb.fluent.models.EndpointInner":"Microsoft.HorizonDb.Endpoint","com.azure.resourcemanager.horizondb.fluent.models.FirewallRuleInner":"Microsoft.HorizonDb.FirewallRule","com.azure.resourcemanager.horizondb.fluent.models.IdentityAssignmentInner":"Microsoft.HorizonDb.IdentityAssignment","com.azure.resourcemanager.horizondb.fluent.models.LogCaptureConfigurationInner":"Microsoft.HorizonDb.LogCaptureConfiguration","com.azure.resourcemanager.horizondb.fluent.models.LogFileDownloadUrlInner":"Microsoft.HorizonDb.LogFileDownloadUrl","com.azure.resourcemanager.horizondb.fluent.models.LogFileInner":"Microsoft.HorizonDb.LogFile","com.azure.resourcemanager.horizondb.fluent.models.MaintenanceEventActionResponseInner":"Microsoft.HorizonDb.MaintenanceEventActionResponse","com.azure.resourcemanager.horizondb.fluent.models.MaintenanceEventInner":"Microsoft.HorizonDb.MaintenanceEvent","com.azure.resourcemanager.horizondb.fluent.models.MicrosoftEntraAdministratorInner":"Microsoft.HorizonDb.MicrosoftEntraAdministrator","com.azure.resourcemanager.horizondb.fluent.models.MicrosoftEntraAuthenticationInner":"Microsoft.HorizonDb.MicrosoftEntraAuthentication","com.azure.resourcemanager.horizondb.fluent.models.NodeInner":"Microsoft.HorizonDb.Node","com.azure.resourcemanager.horizondb.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.horizondb.fluent.models.ParameterGroupConnectionPropertiesInner":"Microsoft.HorizonDb.ParameterGroupConnectionProperties","com.azure.resourcemanager.horizondb.fluent.models.ParameterGroupInner":"Microsoft.HorizonDb.ParameterGroup","com.azure.resourcemanager.horizondb.fluent.models.PasswordAuthenticationInner":"Microsoft.HorizonDb.PasswordAuthentication","com.azure.resourcemanager.horizondb.fluent.models.PoolInner":"Microsoft.HorizonDb.Pool","com.azure.resourcemanager.horizondb.fluent.models.PrivateEndpointConnectionResourceInner":"Azure.ResourceManager.PrivateEndpointConnectionResource","com.azure.resourcemanager.horizondb.fluent.models.PrivateLinkResourceInner":"Microsoft.HorizonDb.PrivateLinkResource","com.azure.resourcemanager.horizondb.implementation.HorizonDbManagementClientBuilder":"Microsoft.HorizonDb","com.azure.resourcemanager.horizondb.implementation.models.AuthenticationListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.horizondb.implementation.models.CapabilityListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.horizondb.implementation.models.ChangeDataCaptureCapabilityListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.horizondb.implementation.models.ChangeDataCaptureConfigurationListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.horizondb.implementation.models.ChangeDataCaptureDestinationListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.horizondb.implementation.models.ClusterListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.horizondb.implementation.models.DefaultParameterGroupListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.horizondb.implementation.models.EndpointListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.horizondb.implementation.models.FirewallRuleListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.horizondb.implementation.models.IdentityAssignmentListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.horizondb.implementation.models.LogCaptureConfigurationListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.horizondb.implementation.models.LogFileListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.horizondb.implementation.models.MaintenanceEventListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.horizondb.implementation.models.MicrosoftEntraAdministratorListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.horizondb.implementation.models.NodeListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.horizondb.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.horizondb.implementation.models.PagedParameterGroupConnectionProperties":"Microsoft.HorizonDb.PagedParameterGroupConnectionProperties","com.azure.resourcemanager.horizondb.implementation.models.ParameterGroupListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.horizondb.implementation.models.PoolListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.horizondb.implementation.models.PrivateEndpointConnectionResourceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.horizondb.implementation.models.PrivateLinkResourceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.horizondb.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.horizondb.models.ActivateChangeDataCaptureIdentityRequest":"Microsoft.HorizonDb.ActivateChangeDataCaptureIdentityRequest","com.azure.resourcemanager.horizondb.models.AiModelManagementStatus":"Microsoft.HorizonDb.AiModelManagementStatus","com.azure.resourcemanager.horizondb.models.AuthenticationProperties":"Microsoft.HorizonDb.AuthenticationProperties","com.azure.resourcemanager.horizondb.models.AuthenticationState":"Microsoft.HorizonDb.AuthenticationState","com.azure.resourcemanager.horizondb.models.BackupProperties":"Microsoft.HorizonDb.BackupProperties","com.azure.resourcemanager.horizondb.models.BackupPropertiesForPatchUpdate":"Microsoft.HorizonDb.BackupPropertiesForPatchUpdate","com.azure.resourcemanager.horizondb.models.CapabilityProperties":"Microsoft.HorizonDb.CapabilityProperties","com.azure.resourcemanager.horizondb.models.ChangeDataCaptureCapabilityForPatchUpdate":"Microsoft.HorizonDb.ChangeDataCaptureCapabilityForPatchUpdate","com.azure.resourcemanager.horizondb.models.ChangeDataCaptureCapabilityProperties":"Microsoft.HorizonDb.ChangeDataCaptureCapabilityProperties","com.azure.resourcemanager.horizondb.models.ChangeDataCaptureCapabilityPropertiesForPatchUpdate":"Microsoft.HorizonDb.ChangeDataCaptureCapabilityPropertiesForPatchUpdate","com.azure.resourcemanager.horizondb.models.ChangeDataCaptureConfigurationForPatchUpdate":"Microsoft.HorizonDb.ChangeDataCaptureConfigurationForPatchUpdate","com.azure.resourcemanager.horizondb.models.ChangeDataCaptureConfigurationProperties":"Microsoft.HorizonDb.ChangeDataCaptureConfigurationProperties","com.azure.resourcemanager.horizondb.models.ChangeDataCaptureConfigurationPropertiesForPatchUpdate":"Microsoft.HorizonDb.ChangeDataCaptureConfigurationPropertiesForPatchUpdate","com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDesiredState":"Microsoft.HorizonDb.ChangeDataCaptureDesiredState","com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDestinationDetails":"Microsoft.HorizonDb.ChangeDataCaptureDestinationDetails","com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDestinationEffectiveState":"Microsoft.HorizonDb.ChangeDataCaptureDestinationEffectiveState","com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDestinationForPatchUpdate":"Microsoft.HorizonDb.ChangeDataCaptureDestinationForPatchUpdate","com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDestinationProperties":"Microsoft.HorizonDb.ChangeDataCaptureDestinationProperties","com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDestinationPropertiesForPatchUpdate":"Microsoft.HorizonDb.ChangeDataCaptureDestinationPropertiesForPatchUpdate","com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDestinationType":"Microsoft.HorizonDb.ChangeDataCaptureDestinationType","com.azure.resourcemanager.horizondb.models.ChangeDataCaptureEffectiveState":"Microsoft.HorizonDb.ChangeDataCaptureEffectiveState","com.azure.resourcemanager.horizondb.models.ChangeDataCaptureEngineConfigurationState":"Microsoft.HorizonDb.ChangeDataCaptureEngineConfigurationState","com.azure.resourcemanager.horizondb.models.ChangeDataCaptureExtensionState":"Microsoft.HorizonDb.ChangeDataCaptureExtensionState","com.azure.resourcemanager.horizondb.models.ChangeDataCaptureExtensionStatus":"Microsoft.HorizonDb.ChangeDataCaptureExtensionStatus","com.azure.resourcemanager.horizondb.models.ChangeDataCaptureIdentityActivationState":"Microsoft.HorizonDb.ChangeDataCaptureIdentityActivationState","com.azure.resourcemanager.horizondb.models.ChangeDataCaptureIdentityAssignmentProperties":"Microsoft.HorizonDb.ChangeDataCaptureIdentityAssignmentProperties","com.azure.resourcemanager.horizondb.models.ChangeDataCaptureIdentityAssignmentState":"Microsoft.HorizonDb.ChangeDataCaptureIdentityAssignmentState","com.azure.resourcemanager.horizondb.models.ChangeDataCaptureIdentityValidationState":"Microsoft.HorizonDb.ChangeDataCaptureIdentityValidationState","com.azure.resourcemanager.horizondb.models.ChangeDataCapturePrerequisiteStatus":"Microsoft.HorizonDb.ChangeDataCapturePrerequisiteStatus","com.azure.resourcemanager.horizondb.models.ChangeDataCaptureProtocol":"Microsoft.HorizonDb.ChangeDataCaptureProtocol","com.azure.resourcemanager.horizondb.models.ChangeDataCaptureReadWriteEndpointState":"Microsoft.HorizonDb.ChangeDataCaptureReadWriteEndpointState","com.azure.resourcemanager.horizondb.models.ChangeDataCaptureReplicationArchitecture":"Microsoft.HorizonDb.ChangeDataCaptureReplicationArchitecture","com.azure.resourcemanager.horizondb.models.ChangeDataCaptureReplicationState":"Microsoft.HorizonDb.ChangeDataCaptureReplicationState","com.azure.resourcemanager.horizondb.models.ChangeDataCaptureReplicationStatus":"Microsoft.HorizonDb.ChangeDataCaptureReplicationStatus","com.azure.resourcemanager.horizondb.models.ChangeDataCaptureStatus":"Microsoft.HorizonDb.ChangeDataCaptureStatus","com.azure.resourcemanager.horizondb.models.ChangeDataCaptureTopologyBindingState":"Microsoft.HorizonDb.ChangeDataCaptureTopologyBindingState","com.azure.resourcemanager.horizondb.models.ChangeDataCaptureTopologyBindingStatus":"Microsoft.HorizonDb.ChangeDataCaptureTopologyBindingStatus","com.azure.resourcemanager.horizondb.models.ChangeDataCaptureUsageProfile":"Microsoft.HorizonDb.ChangeDataCaptureUsageProfile","com.azure.resourcemanager.horizondb.models.ClusterCapability":"Microsoft.HorizonDb.ClusterCapability","com.azure.resourcemanager.horizondb.models.ClusterCreateMode":"Microsoft.HorizonDb.ClusterCreateMode","com.azure.resourcemanager.horizondb.models.ClusterFeatureCapability":"Microsoft.HorizonDb.ClusterFeatureCapability","com.azure.resourcemanager.horizondb.models.ClusterForPatchUpdate":"Microsoft.HorizonDb.ClusterForPatchUpdate","com.azure.resourcemanager.horizondb.models.ClusterProperties":"Microsoft.HorizonDb.ClusterProperties","com.azure.resourcemanager.horizondb.models.ClusterPropertiesForPatchUpdate":"Microsoft.HorizonDb.ClusterPropertiesForPatchUpdate","com.azure.resourcemanager.horizondb.models.ClusterState":"Microsoft.HorizonDb.ClusterState","com.azure.resourcemanager.horizondb.models.ComputeGenerationCapability":"Microsoft.HorizonDb.ComputeGenerationCapability","com.azure.resourcemanager.horizondb.models.ComputeModelCapability":"Microsoft.HorizonDb.ComputeModelCapability","com.azure.resourcemanager.horizondb.models.ComputeProcessorCapability":"Microsoft.HorizonDb.ComputeProcessorCapability","com.azure.resourcemanager.horizondb.models.ComputeProcessorType":"Microsoft.HorizonDb.ComputeProcessorType","com.azure.resourcemanager.horizondb.models.ComputeSizeCapability":"Microsoft.HorizonDb.ComputeSizeCapability","com.azure.resourcemanager.horizondb.models.DefaultParameterGroupProperties":"Microsoft.HorizonDb.DefaultParameterGroupProperties","com.azure.resourcemanager.horizondb.models.EndpointProperties":"Microsoft.HorizonDb.EndpointProperties","com.azure.resourcemanager.horizondb.models.EndpointRole":"Microsoft.HorizonDb.EndpointRole","com.azure.resourcemanager.horizondb.models.EndpointScope":"Microsoft.HorizonDb.EndpointScope","com.azure.resourcemanager.horizondb.models.FabricDestinationDetails":"Microsoft.HorizonDb.FabricDestinationDetails","com.azure.resourcemanager.horizondb.models.FirewallRuleProperties":"Microsoft.HorizonDb.FirewallRuleProperties","com.azure.resourcemanager.horizondb.models.GeoRedundancyState":"Microsoft.HorizonDb.GeoRedundancyState","com.azure.resourcemanager.horizondb.models.HorizonDbClusterDataEncryption":"Microsoft.HorizonDb.HorizonDbClusterDataEncryption","com.azure.resourcemanager.horizondb.models.HorizonDbClusterDataEncryptionForPatchUpdate":"Microsoft.HorizonDb.HorizonDbClusterDataEncryptionForPatchUpdate","com.azure.resourcemanager.horizondb.models.HorizonDbClusterDataEncryptionType":"Microsoft.HorizonDb.HorizonDbClusterDataEncryptionType","com.azure.resourcemanager.horizondb.models.HorizonDbClusterEncryptionKeyStatus":"Microsoft.HorizonDb.HorizonDbClusterEncryptionKeyStatus","com.azure.resourcemanager.horizondb.models.HorizonDbClusterIdentityType":"Microsoft.HorizonDb.HorizonDbClusterIdentityType","com.azure.resourcemanager.horizondb.models.HorizonDbClusterManagedServiceIdentity":"Microsoft.HorizonDb.HorizonDbClusterManagedServiceIdentity","com.azure.resourcemanager.horizondb.models.IdentityValidationStatus":"Microsoft.HorizonDb.IdentityValidationStatus","com.azure.resourcemanager.horizondb.models.LogCaptureConfigurationForPatchUpdate":"Microsoft.HorizonDb.LogCaptureConfigurationForPatchUpdate","com.azure.resourcemanager.horizondb.models.LogCaptureConfigurationProperties":"Microsoft.HorizonDb.LogCaptureConfigurationProperties","com.azure.resourcemanager.horizondb.models.LogCaptureConfigurationPropertiesForPatchUpdate":"Microsoft.HorizonDb.LogCaptureConfigurationPropertiesForPatchUpdate","com.azure.resourcemanager.horizondb.models.LogCaptureState":"Microsoft.HorizonDb.LogCaptureState","com.azure.resourcemanager.horizondb.models.LogFileProperties":"Microsoft.HorizonDb.LogFileProperties","com.azure.resourcemanager.horizondb.models.LogFileType":"Microsoft.HorizonDb.LogFileType","com.azure.resourcemanager.horizondb.models.MaintenanceEventProperties":"Microsoft.HorizonDb.MaintenanceEventProperties","com.azure.resourcemanager.horizondb.models.MaintenanceEventRescheduleRequest":"Microsoft.HorizonDb.MaintenanceEventRescheduleRequest","com.azure.resourcemanager.horizondb.models.MaintenanceEventStatus":"Microsoft.HorizonDb.MaintenanceEventStatus","com.azure.resourcemanager.horizondb.models.MaintenanceType":"Microsoft.HorizonDb.MaintenanceType","com.azure.resourcemanager.horizondb.models.MicrosoftEntraAdministratorAdd":"Microsoft.HorizonDb.MicrosoftEntraAdministratorAdd","com.azure.resourcemanager.horizondb.models.MicrosoftEntraAdministratorProperties":"Microsoft.HorizonDb.MicrosoftEntraAdministratorProperties","com.azure.resourcemanager.horizondb.models.MicrosoftEntraAdministratorPropertiesForAdd":"Microsoft.HorizonDb.MicrosoftEntraAdministratorPropertiesForAdd","com.azure.resourcemanager.horizondb.models.MicrosoftEntraAuthenticationForPatchUpdate":"Microsoft.HorizonDb.MicrosoftEntraAuthenticationForPatchUpdate","com.azure.resourcemanager.horizondb.models.MicrosoftEntraAuthenticationProperties":"Microsoft.HorizonDb.MicrosoftEntraAuthenticationProperties","com.azure.resourcemanager.horizondb.models.MicrosoftEntraAuthenticationPropertiesForPatchUpdate":"Microsoft.HorizonDb.MicrosoftEntraAuthenticationPropertiesForPatchUpdate","com.azure.resourcemanager.horizondb.models.Network":"Microsoft.HorizonDb.Network","com.azure.resourcemanager.horizondb.models.NetworkForPatchUpdate":"Microsoft.HorizonDb.NetworkForPatchUpdate","com.azure.resourcemanager.horizondb.models.NodeProperties":"Microsoft.HorizonDb.NodeProperties","com.azure.resourcemanager.horizondb.models.NodeRole":"Microsoft.HorizonDb.NodeRole","com.azure.resourcemanager.horizondb.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.horizondb.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.horizondb.models.ParameterApplyMethod":"Microsoft.HorizonDb.ParameterApplyMethod","com.azure.resourcemanager.horizondb.models.ParameterGroupForPatchUpdate":"Microsoft.HorizonDb.ParameterGroupForPatchUpdate","com.azure.resourcemanager.horizondb.models.ParameterGroupProperties":"Microsoft.HorizonDb.ParameterGroupProperties","com.azure.resourcemanager.horizondb.models.ParameterGroupPropertiesForPatchUpdate":"Microsoft.HorizonDb.ParameterGroupPropertiesForPatchUpdate","com.azure.resourcemanager.horizondb.models.ParameterGroupSyncStatus":"Microsoft.HorizonDb.ParameterGroupSyncStatus","com.azure.resourcemanager.horizondb.models.ParameterProperties":"Microsoft.HorizonDb.ParameterProperties","com.azure.resourcemanager.horizondb.models.ParameterValueSource":"Microsoft.HorizonDb.ParameterValueSource","com.azure.resourcemanager.horizondb.models.PasswordAuthenticationForPatchUpdate":"Microsoft.HorizonDb.PasswordAuthenticationForPatchUpdate","com.azure.resourcemanager.horizondb.models.PasswordAuthenticationProperties":"Microsoft.HorizonDb.PasswordAuthenticationProperties","com.azure.resourcemanager.horizondb.models.PasswordAuthenticationPropertiesForPatchUpdate":"Microsoft.HorizonDb.PasswordAuthenticationPropertiesForPatchUpdate","com.azure.resourcemanager.horizondb.models.PoolCapability":"Microsoft.HorizonDb.PoolCapability","com.azure.resourcemanager.horizondb.models.PoolComputeModel":"Microsoft.HorizonDb.PoolComputeModel","com.azure.resourcemanager.horizondb.models.PoolComputeModelForPatchUpdate":"Microsoft.HorizonDb.PoolComputeModelForPatchUpdate","com.azure.resourcemanager.horizondb.models.PoolComputeModelType":"Microsoft.HorizonDb.PoolComputeModelType","com.azure.resourcemanager.horizondb.models.PoolFeatureCapability":"Microsoft.HorizonDb.PoolFeatureCapability","com.azure.resourcemanager.horizondb.models.PoolForPatchUpdate":"Microsoft.HorizonDb.PoolForPatchUpdate","com.azure.resourcemanager.horizondb.models.PoolHighAvailability":"Microsoft.HorizonDb.PoolHighAvailability","com.azure.resourcemanager.horizondb.models.PoolHighAvailabilityMode":"Microsoft.HorizonDb.PoolHighAvailabilityMode","com.azure.resourcemanager.horizondb.models.PoolHighAvailabilityPatch":"Microsoft.HorizonDb.PoolHighAvailabilityPatch","com.azure.resourcemanager.horizondb.models.PoolParameterGroupReference":"Microsoft.HorizonDb.PoolParameterGroupReference","com.azure.resourcemanager.horizondb.models.PoolParameterGroupReferenceForPatchUpdate":"Microsoft.HorizonDb.PoolParameterGroupReferenceForPatchUpdate","com.azure.resourcemanager.horizondb.models.PoolProperties":"Microsoft.HorizonDb.PoolProperties","com.azure.resourcemanager.horizondb.models.PoolPropertiesForPatchUpdate":"Microsoft.HorizonDb.PoolPropertiesForPatchUpdate","com.azure.resourcemanager.horizondb.models.PoolState":"Microsoft.HorizonDb.PoolState","com.azure.resourcemanager.horizondb.models.PostgreSqlCapabilityVersion":"Microsoft.HorizonDb.PostgreSqlCapabilityVersion","com.azure.resourcemanager.horizondb.models.PostgreSqlVersion":"Microsoft.HorizonDb.PostgreSqlVersion","com.azure.resourcemanager.horizondb.models.PostgreSqlVersionCapability":"Microsoft.HorizonDb.PostgreSqlVersionCapability","com.azure.resourcemanager.horizondb.models.PrincipalTypes":"Microsoft.HorizonDb.PrincipalTypes","com.azure.resourcemanager.horizondb.models.PrivateEndpoint":"Azure.ResourceManager.CommonTypes.PrivateEndpoint","com.azure.resourcemanager.horizondb.models.PrivateEndpointConnectionProperties":"Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProperties","com.azure.resourcemanager.horizondb.models.PrivateEndpointConnectionProvisioningState":"Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProvisioningState","com.azure.resourcemanager.horizondb.models.PrivateEndpointServiceConnectionStatus":"Azure.ResourceManager.CommonTypes.PrivateEndpointServiceConnectionStatus","com.azure.resourcemanager.horizondb.models.PrivateLinkResourceProperties":"Azure.ResourceManager.CommonTypes.PrivateLinkResourceProperties","com.azure.resourcemanager.horizondb.models.PrivateLinkServiceConnectionState":"Azure.ResourceManager.CommonTypes.PrivateLinkServiceConnectionState","com.azure.resourcemanager.horizondb.models.ProvisionedComputeModelCapability":"Microsoft.HorizonDb.ProvisionedComputeModelCapability","com.azure.resourcemanager.horizondb.models.ProvisioningState":"Microsoft.HorizonDb.ProvisioningState","com.azure.resourcemanager.horizondb.models.PublicNetworkAccessState":"Microsoft.HorizonDb.PublicNetworkAccessState","com.azure.resourcemanager.horizondb.models.ReadWritePoolProperties":"Microsoft.HorizonDb.ReadWritePoolProperties","com.azure.resourcemanager.horizondb.models.ScheduledMaintenanceManagementType":"Microsoft.HorizonDb.ScheduledMaintenanceManagementType","com.azure.resourcemanager.horizondb.models.ScheduledMaintenanceProperties":"Microsoft.HorizonDb.ScheduledMaintenanceProperties","com.azure.resourcemanager.horizondb.models.ScheduledMaintenancePropertiesForPatchUpdate":"Microsoft.HorizonDb.ScheduledMaintenancePropertiesForPatchUpdate","com.azure.resourcemanager.horizondb.models.SystemScheduledMaintenanceProperties":"Microsoft.HorizonDb.SystemScheduledMaintenanceProperties","com.azure.resourcemanager.horizondb.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity"},"generatedFiles":["src/main/java/com/azure/resourcemanager/horizondb/HorizonDbManager.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/AuthenticationsClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/CapabilitiesClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/ChangeDataCaptureCapabilitiesClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/ChangeDataCaptureConfigurationsClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/ChangeDataCaptureDestinationsClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/ClustersClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/DefaultParameterGroupsClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/EndpointsClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/FirewallRulesClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/HorizonDbManagementClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/IdentityAssignmentsClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/LogCaptureConfigurationsClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/LogFilesClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/MaintenanceEventsClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/MicrosoftEntraAdministratorsClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/MicrosoftEntraAuthenticationsClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/NodesClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/ParameterGroupsClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/PasswordAuthenticationsClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/PoolsClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/PrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/PrivateLinkResourcesClient.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/ActivateChangeDataCaptureIdentityResultInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/AuthenticationInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/CapabilityInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/ChangeDataCaptureCapabilityInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/ChangeDataCaptureConfigurationInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/ChangeDataCaptureDestinationInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/ClusterInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/DefaultParameterGroupInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/EndpointInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/FirewallRuleInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/IdentityAssignmentInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/LogCaptureConfigurationInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/LogFileDownloadUrlInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/LogFileInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/MaintenanceEventActionResponseInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/MaintenanceEventInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/MicrosoftEntraAdministratorInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/MicrosoftEntraAuthenticationInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/NodeInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/ParameterGroupConnectionPropertiesInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/ParameterGroupInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/PasswordAuthenticationInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/PoolInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/PrivateEndpointConnectionResourceInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/PrivateLinkResourceInner.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/horizondb/fluent/package-info.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/ActivateChangeDataCaptureIdentityResultImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/AuthenticationImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/AuthenticationsClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/AuthenticationsImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/CapabilitiesClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/CapabilitiesImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/CapabilityImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureCapabilitiesClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureCapabilitiesImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureCapabilityImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureConfigurationImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureConfigurationsImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureDestinationImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureDestinationsClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/ChangeDataCaptureDestinationsImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/ClusterImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/ClustersClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/ClustersImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/DefaultParameterGroupImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/DefaultParameterGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/DefaultParameterGroupsImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/EndpointImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/EndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/EndpointsImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/FirewallRuleImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/FirewallRulesClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/FirewallRulesImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/HorizonDbManagementClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/IdentityAssignmentImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/IdentityAssignmentsClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/IdentityAssignmentsImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/LogCaptureConfigurationImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/LogCaptureConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/LogCaptureConfigurationsImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/LogFileDownloadUrlImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/LogFileImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/LogFilesClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/LogFilesImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/MaintenanceEventActionResponseImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/MaintenanceEventImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/MaintenanceEventsClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/MaintenanceEventsImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/MicrosoftEntraAdministratorImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/MicrosoftEntraAdministratorsClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/MicrosoftEntraAdministratorsImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/MicrosoftEntraAuthenticationImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/MicrosoftEntraAuthenticationsClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/MicrosoftEntraAuthenticationsImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/NodeImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/NodesClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/NodesImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/ParameterGroupConnectionPropertiesImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/ParameterGroupImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/ParameterGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/ParameterGroupsImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/PasswordAuthenticationImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/PasswordAuthenticationsClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/PasswordAuthenticationsImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/PoolImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/PoolsClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/PoolsImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/PrivateEndpointConnectionResourceImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/PrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/PrivateEndpointConnectionsImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/PrivateLinkResourceImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/PrivateLinkResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/PrivateLinkResourcesImpl.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/AuthenticationListResult.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/CapabilityListResult.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/ChangeDataCaptureCapabilityListResult.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/ChangeDataCaptureConfigurationListResult.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/ChangeDataCaptureDestinationListResult.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/ClusterListResult.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/DefaultParameterGroupListResult.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/EndpointListResult.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/FirewallRuleListResult.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/IdentityAssignmentListResult.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/LogCaptureConfigurationListResult.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/LogFileListResult.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/MaintenanceEventListResult.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/MicrosoftEntraAdministratorListResult.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/NodeListResult.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/PagedParameterGroupConnectionProperties.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/ParameterGroupListResult.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/PoolListResult.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/PrivateEndpointConnectionResourceListResult.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/models/PrivateLinkResourceListResult.java","src/main/java/com/azure/resourcemanager/horizondb/implementation/package-info.java","src/main/java/com/azure/resourcemanager/horizondb/models/ActionType.java","src/main/java/com/azure/resourcemanager/horizondb/models/ActivateChangeDataCaptureIdentityRequest.java","src/main/java/com/azure/resourcemanager/horizondb/models/ActivateChangeDataCaptureIdentityResult.java","src/main/java/com/azure/resourcemanager/horizondb/models/AiModelManagementStatus.java","src/main/java/com/azure/resourcemanager/horizondb/models/Authentication.java","src/main/java/com/azure/resourcemanager/horizondb/models/AuthenticationProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/AuthenticationState.java","src/main/java/com/azure/resourcemanager/horizondb/models/Authentications.java","src/main/java/com/azure/resourcemanager/horizondb/models/BackupProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/BackupPropertiesForPatchUpdate.java","src/main/java/com/azure/resourcemanager/horizondb/models/Capabilities.java","src/main/java/com/azure/resourcemanager/horizondb/models/Capability.java","src/main/java/com/azure/resourcemanager/horizondb/models/CapabilityProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureCapabilities.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureCapability.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureCapabilityForPatchUpdate.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureCapabilityProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureCapabilityPropertiesForPatchUpdate.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureConfiguration.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureConfigurationForPatchUpdate.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureConfigurationProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureConfigurationPropertiesForPatchUpdate.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureConfigurations.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDesiredState.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestination.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestinationDetails.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestinationEffectiveState.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestinationForPatchUpdate.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestinationProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestinationPropertiesForPatchUpdate.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestinationType.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureDestinations.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureEffectiveState.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureEngineConfigurationState.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureExtensionState.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureExtensionStatus.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureIdentityActivationState.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureIdentityAssignmentProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureIdentityAssignmentState.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureIdentityValidationState.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCapturePrerequisiteStatus.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureProtocol.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureReadWriteEndpointState.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureReplicationArchitecture.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureReplicationState.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureReplicationStatus.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureStatus.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureTopologyBindingState.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureTopologyBindingStatus.java","src/main/java/com/azure/resourcemanager/horizondb/models/ChangeDataCaptureUsageProfile.java","src/main/java/com/azure/resourcemanager/horizondb/models/Cluster.java","src/main/java/com/azure/resourcemanager/horizondb/models/ClusterCapability.java","src/main/java/com/azure/resourcemanager/horizondb/models/ClusterCreateMode.java","src/main/java/com/azure/resourcemanager/horizondb/models/ClusterFeatureCapability.java","src/main/java/com/azure/resourcemanager/horizondb/models/ClusterForPatchUpdate.java","src/main/java/com/azure/resourcemanager/horizondb/models/ClusterProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/ClusterPropertiesForPatchUpdate.java","src/main/java/com/azure/resourcemanager/horizondb/models/ClusterState.java","src/main/java/com/azure/resourcemanager/horizondb/models/Clusters.java","src/main/java/com/azure/resourcemanager/horizondb/models/ComputeGenerationCapability.java","src/main/java/com/azure/resourcemanager/horizondb/models/ComputeModelCapability.java","src/main/java/com/azure/resourcemanager/horizondb/models/ComputeProcessorCapability.java","src/main/java/com/azure/resourcemanager/horizondb/models/ComputeProcessorType.java","src/main/java/com/azure/resourcemanager/horizondb/models/ComputeSizeCapability.java","src/main/java/com/azure/resourcemanager/horizondb/models/DefaultParameterGroup.java","src/main/java/com/azure/resourcemanager/horizondb/models/DefaultParameterGroupProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/DefaultParameterGroups.java","src/main/java/com/azure/resourcemanager/horizondb/models/Endpoint.java","src/main/java/com/azure/resourcemanager/horizondb/models/EndpointProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/EndpointRole.java","src/main/java/com/azure/resourcemanager/horizondb/models/EndpointScope.java","src/main/java/com/azure/resourcemanager/horizondb/models/Endpoints.java","src/main/java/com/azure/resourcemanager/horizondb/models/FabricDestinationDetails.java","src/main/java/com/azure/resourcemanager/horizondb/models/FirewallRule.java","src/main/java/com/azure/resourcemanager/horizondb/models/FirewallRuleProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/FirewallRules.java","src/main/java/com/azure/resourcemanager/horizondb/models/GeoRedundancyState.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterDataEncryption.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterDataEncryptionForPatchUpdate.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterDataEncryptionType.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterEncryptionKeyStatus.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterIdentityType.java","src/main/java/com/azure/resourcemanager/horizondb/models/HorizonDbClusterManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/horizondb/models/IdentityAssignment.java","src/main/java/com/azure/resourcemanager/horizondb/models/IdentityAssignments.java","src/main/java/com/azure/resourcemanager/horizondb/models/IdentityValidationStatus.java","src/main/java/com/azure/resourcemanager/horizondb/models/LogCaptureConfiguration.java","src/main/java/com/azure/resourcemanager/horizondb/models/LogCaptureConfigurationForPatchUpdate.java","src/main/java/com/azure/resourcemanager/horizondb/models/LogCaptureConfigurationProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/LogCaptureConfigurationPropertiesForPatchUpdate.java","src/main/java/com/azure/resourcemanager/horizondb/models/LogCaptureConfigurations.java","src/main/java/com/azure/resourcemanager/horizondb/models/LogCaptureState.java","src/main/java/com/azure/resourcemanager/horizondb/models/LogFile.java","src/main/java/com/azure/resourcemanager/horizondb/models/LogFileDownloadUrl.java","src/main/java/com/azure/resourcemanager/horizondb/models/LogFileProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/LogFileType.java","src/main/java/com/azure/resourcemanager/horizondb/models/LogFiles.java","src/main/java/com/azure/resourcemanager/horizondb/models/MaintenanceEvent.java","src/main/java/com/azure/resourcemanager/horizondb/models/MaintenanceEventActionResponse.java","src/main/java/com/azure/resourcemanager/horizondb/models/MaintenanceEventProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/MaintenanceEventRescheduleRequest.java","src/main/java/com/azure/resourcemanager/horizondb/models/MaintenanceEventStatus.java","src/main/java/com/azure/resourcemanager/horizondb/models/MaintenanceEvents.java","src/main/java/com/azure/resourcemanager/horizondb/models/MaintenanceType.java","src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAdministrator.java","src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAdministratorAdd.java","src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAdministratorProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAdministratorPropertiesForAdd.java","src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAdministrators.java","src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAuthentication.java","src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAuthenticationForPatchUpdate.java","src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAuthenticationProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAuthenticationPropertiesForPatchUpdate.java","src/main/java/com/azure/resourcemanager/horizondb/models/MicrosoftEntraAuthentications.java","src/main/java/com/azure/resourcemanager/horizondb/models/Network.java","src/main/java/com/azure/resourcemanager/horizondb/models/NetworkForPatchUpdate.java","src/main/java/com/azure/resourcemanager/horizondb/models/Node.java","src/main/java/com/azure/resourcemanager/horizondb/models/NodeProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/NodeRole.java","src/main/java/com/azure/resourcemanager/horizondb/models/Nodes.java","src/main/java/com/azure/resourcemanager/horizondb/models/Operation.java","src/main/java/com/azure/resourcemanager/horizondb/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/horizondb/models/Operations.java","src/main/java/com/azure/resourcemanager/horizondb/models/Origin.java","src/main/java/com/azure/resourcemanager/horizondb/models/ParameterApplyMethod.java","src/main/java/com/azure/resourcemanager/horizondb/models/ParameterGroup.java","src/main/java/com/azure/resourcemanager/horizondb/models/ParameterGroupConnectionProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/ParameterGroupForPatchUpdate.java","src/main/java/com/azure/resourcemanager/horizondb/models/ParameterGroupProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/ParameterGroupPropertiesForPatchUpdate.java","src/main/java/com/azure/resourcemanager/horizondb/models/ParameterGroupSyncStatus.java","src/main/java/com/azure/resourcemanager/horizondb/models/ParameterGroups.java","src/main/java/com/azure/resourcemanager/horizondb/models/ParameterProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/ParameterValueSource.java","src/main/java/com/azure/resourcemanager/horizondb/models/PasswordAuthentication.java","src/main/java/com/azure/resourcemanager/horizondb/models/PasswordAuthenticationForPatchUpdate.java","src/main/java/com/azure/resourcemanager/horizondb/models/PasswordAuthenticationProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/PasswordAuthenticationPropertiesForPatchUpdate.java","src/main/java/com/azure/resourcemanager/horizondb/models/PasswordAuthentications.java","src/main/java/com/azure/resourcemanager/horizondb/models/Pool.java","src/main/java/com/azure/resourcemanager/horizondb/models/PoolCapability.java","src/main/java/com/azure/resourcemanager/horizondb/models/PoolComputeModel.java","src/main/java/com/azure/resourcemanager/horizondb/models/PoolComputeModelForPatchUpdate.java","src/main/java/com/azure/resourcemanager/horizondb/models/PoolComputeModelType.java","src/main/java/com/azure/resourcemanager/horizondb/models/PoolFeatureCapability.java","src/main/java/com/azure/resourcemanager/horizondb/models/PoolForPatchUpdate.java","src/main/java/com/azure/resourcemanager/horizondb/models/PoolHighAvailability.java","src/main/java/com/azure/resourcemanager/horizondb/models/PoolHighAvailabilityMode.java","src/main/java/com/azure/resourcemanager/horizondb/models/PoolHighAvailabilityPatch.java","src/main/java/com/azure/resourcemanager/horizondb/models/PoolParameterGroupReference.java","src/main/java/com/azure/resourcemanager/horizondb/models/PoolParameterGroupReferenceForPatchUpdate.java","src/main/java/com/azure/resourcemanager/horizondb/models/PoolProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/PoolPropertiesForPatchUpdate.java","src/main/java/com/azure/resourcemanager/horizondb/models/PoolState.java","src/main/java/com/azure/resourcemanager/horizondb/models/Pools.java","src/main/java/com/azure/resourcemanager/horizondb/models/PostgreSqlCapabilityVersion.java","src/main/java/com/azure/resourcemanager/horizondb/models/PostgreSqlVersion.java","src/main/java/com/azure/resourcemanager/horizondb/models/PostgreSqlVersionCapability.java","src/main/java/com/azure/resourcemanager/horizondb/models/PrincipalTypes.java","src/main/java/com/azure/resourcemanager/horizondb/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/horizondb/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/PrivateEndpointConnectionProvisioningState.java","src/main/java/com/azure/resourcemanager/horizondb/models/PrivateEndpointConnectionResource.java","src/main/java/com/azure/resourcemanager/horizondb/models/PrivateEndpointConnections.java","src/main/java/com/azure/resourcemanager/horizondb/models/PrivateEndpointServiceConnectionStatus.java","src/main/java/com/azure/resourcemanager/horizondb/models/PrivateLinkResource.java","src/main/java/com/azure/resourcemanager/horizondb/models/PrivateLinkResourceProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/PrivateLinkResources.java","src/main/java/com/azure/resourcemanager/horizondb/models/PrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/horizondb/models/ProvisionedComputeModelCapability.java","src/main/java/com/azure/resourcemanager/horizondb/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/horizondb/models/PublicNetworkAccessState.java","src/main/java/com/azure/resourcemanager/horizondb/models/ReadWritePoolProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/ScheduledMaintenanceManagementType.java","src/main/java/com/azure/resourcemanager/horizondb/models/ScheduledMaintenanceProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/ScheduledMaintenancePropertiesForPatchUpdate.java","src/main/java/com/azure/resourcemanager/horizondb/models/SystemScheduledMaintenanceProperties.java","src/main/java/com/azure/resourcemanager/horizondb/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/horizondb/models/package-info.java","src/main/java/com/azure/resourcemanager/horizondb/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-horizondb/proxy-config.json b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-horizondb/proxy-config.json index 6b2f0ad0eeef8..6015050adf88a 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-horizondb/proxy-config.json +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-horizondb/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.horizondb.implementation.HorizonDbAdministratorsClientImpl$HorizonDbAdministratorsService"],["com.azure.resourcemanager.horizondb.implementation.HorizonDbClustersClientImpl$HorizonDbClustersService"],["com.azure.resourcemanager.horizondb.implementation.HorizonDbFirewallRulesClientImpl$HorizonDbFirewallRulesService"],["com.azure.resourcemanager.horizondb.implementation.HorizonDbParameterGroupsClientImpl$HorizonDbParameterGroupsService"],["com.azure.resourcemanager.horizondb.implementation.HorizonDbPoolsClientImpl$HorizonDbPoolsService"],["com.azure.resourcemanager.horizondb.implementation.HorizonDbPrivateEndpointConnectionsClientImpl$HorizonDbPrivateEndpointConnectionsService"],["com.azure.resourcemanager.horizondb.implementation.HorizonDbPrivateLinkResourcesClientImpl$HorizonDbPrivateLinkResourcesService"],["com.azure.resourcemanager.horizondb.implementation.HorizonDbReplicasClientImpl$HorizonDbReplicasService"],["com.azure.resourcemanager.horizondb.implementation.OperationsClientImpl$OperationsService"]] \ No newline at end of file +[["com.azure.resourcemanager.horizondb.implementation.AuthenticationsClientImpl$AuthenticationsService"],["com.azure.resourcemanager.horizondb.implementation.CapabilitiesClientImpl$CapabilitiesService"],["com.azure.resourcemanager.horizondb.implementation.ChangeDataCaptureCapabilitiesClientImpl$ChangeDataCaptureCapabilitiesService"],["com.azure.resourcemanager.horizondb.implementation.ChangeDataCaptureConfigurationsClientImpl$ChangeDataCaptureConfigurationsService"],["com.azure.resourcemanager.horizondb.implementation.ChangeDataCaptureDestinationsClientImpl$ChangeDataCaptureDestinationsService"],["com.azure.resourcemanager.horizondb.implementation.ClustersClientImpl$ClustersService"],["com.azure.resourcemanager.horizondb.implementation.DefaultParameterGroupsClientImpl$DefaultParameterGroupsService"],["com.azure.resourcemanager.horizondb.implementation.EndpointsClientImpl$EndpointsService"],["com.azure.resourcemanager.horizondb.implementation.FirewallRulesClientImpl$FirewallRulesService"],["com.azure.resourcemanager.horizondb.implementation.IdentityAssignmentsClientImpl$IdentityAssignmentsService"],["com.azure.resourcemanager.horizondb.implementation.LogCaptureConfigurationsClientImpl$LogCaptureConfigurationsService"],["com.azure.resourcemanager.horizondb.implementation.LogFilesClientImpl$LogFilesService"],["com.azure.resourcemanager.horizondb.implementation.MaintenanceEventsClientImpl$MaintenanceEventsService"],["com.azure.resourcemanager.horizondb.implementation.MicrosoftEntraAdministratorsClientImpl$MicrosoftEntraAdministratorsService"],["com.azure.resourcemanager.horizondb.implementation.MicrosoftEntraAuthenticationsClientImpl$MicrosoftEntraAuthenticationsService"],["com.azure.resourcemanager.horizondb.implementation.NodesClientImpl$NodesService"],["com.azure.resourcemanager.horizondb.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.horizondb.implementation.ParameterGroupsClientImpl$ParameterGroupsService"],["com.azure.resourcemanager.horizondb.implementation.PasswordAuthenticationsClientImpl$PasswordAuthenticationsService"],["com.azure.resourcemanager.horizondb.implementation.PoolsClientImpl$PoolsService"],["com.azure.resourcemanager.horizondb.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.horizondb.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"]] \ No newline at end of file diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/AuthenticationsListSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/AuthenticationsListSamples.java new file mode 100644 index 0000000000000..a2e428de35a04 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/AuthenticationsListSamples.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.horizondb.generated; + +/** + * Samples for Authentications List. + */ +public final class AuthenticationsListSamples { + /* + * x-ms-original-file: 2026-10-01-preview/Authentications_List.json + */ + /** + * Sample code: List the service-created authentication methods. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + listTheServiceCreatedAuthenticationMethods(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.authentications().list("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/CapabilitiesGetSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/CapabilitiesGetSamples.java new file mode 100644 index 0000000000000..f4e2794782714 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/CapabilitiesGetSamples.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.horizondb.generated; + +/** + * Samples for Capabilities Get. + */ +public final class CapabilitiesGetSamples { + /* + * x-ms-original-file: 2026-10-01-preview/Capabilities_Get.json + */ + /** + * Sample code: Get HorizonDB capabilities by subscription and region. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + getHorizonDBCapabilitiesBySubscriptionAndRegion(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.capabilities().getWithResponse("eastus2", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/CapabilitiesListSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/CapabilitiesListSamples.java new file mode 100644 index 0000000000000..25c9e6feceacf --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/CapabilitiesListSamples.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.horizondb.generated; + +/** + * Samples for Capabilities List. + */ +public final class CapabilitiesListSamples { + /* + * x-ms-original-file: 2026-10-01-preview/Capabilities_List.json + */ + /** + * Sample code: List HorizonDB capabilities by subscription and region. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + listHorizonDBCapabilitiesBySubscriptionAndRegion(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.capabilities().list("eastus2", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureCapabilitiesCreateOrReplaceSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureCapabilitiesCreateOrReplaceSamples.java new file mode 100644 index 0000000000000..18fc133034cf3 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureCapabilitiesCreateOrReplaceSamples.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.horizondb.generated; + +import com.azure.resourcemanager.horizondb.fluent.models.ChangeDataCaptureCapabilityInner; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureCapabilityProperties; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDesiredState; + +/** + * Samples for ChangeDataCaptureCapabilities CreateOrReplace. + */ +public final class ChangeDataCaptureCapabilitiesCreateOrReplaceSamples { + /* + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureCapabilities_CreateOrReplace.json + */ + /** + * Sample code: Enable the cluster change data capture capability. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + enableTheClusterChangeDataCaptureCapability(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.changeDataCaptureCapabilities() + .createOrReplace("example-resource-group", "example-cluster", + new ChangeDataCaptureCapabilityInner().withProperties( + new ChangeDataCaptureCapabilityProperties().withDesiredState(ChangeDataCaptureDesiredState.ENABLED) + .withAutoUpgradeExtension(true)), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureCapabilitiesDeleteSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureCapabilitiesDeleteSamples.java new file mode 100644 index 0000000000000..6fab1c246b6f5 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureCapabilitiesDeleteSamples.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.horizondb.generated; + +/** + * Samples for ChangeDataCaptureCapabilities Delete. + */ +public final class ChangeDataCaptureCapabilitiesDeleteSamples { + /* + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureCapabilities_Delete.json + */ + /** + * Sample code: Delete the cluster change data capture capability. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + deleteTheClusterChangeDataCaptureCapability(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.changeDataCaptureCapabilities() + .delete("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureCapabilitiesGetSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureCapabilitiesGetSamples.java new file mode 100644 index 0000000000000..1613fc61661a5 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureCapabilitiesGetSamples.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.horizondb.generated; + +/** + * Samples for ChangeDataCaptureCapabilities Get. + */ +public final class ChangeDataCaptureCapabilitiesGetSamples { + /* + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureCapabilities_Get.json + */ + /** + * Sample code: Get the cluster change data capture capability. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + getTheClusterChangeDataCaptureCapability(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.changeDataCaptureCapabilities() + .getWithResponse("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureCapabilitiesListSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureCapabilitiesListSamples.java new file mode 100644 index 0000000000000..9de0cde6147af --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureCapabilitiesListSamples.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.horizondb.generated; + +/** + * Samples for ChangeDataCaptureCapabilities List. + */ +public final class ChangeDataCaptureCapabilitiesListSamples { + /* + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureCapabilities_List.json + */ + /** + * Sample code: List the optional cluster change data capture capability. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void listTheOptionalClusterChangeDataCaptureCapability( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.changeDataCaptureCapabilities() + .list("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureCapabilitiesUpdateSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureCapabilitiesUpdateSamples.java new file mode 100644 index 0000000000000..87d3efc422c5e --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureCapabilitiesUpdateSamples.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.horizondb.generated; + +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureCapabilityForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureCapabilityPropertiesForPatchUpdate; + +/** + * Samples for ChangeDataCaptureCapabilities Update. + */ +public final class ChangeDataCaptureCapabilitiesUpdateSamples { + /* + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureCapabilities_Update.json + */ + /** + * Sample code: Update the cluster change data capture capability. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + updateTheClusterChangeDataCaptureCapability(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.changeDataCaptureCapabilities() + .update("example-resource-group", "example-cluster", + new ChangeDataCaptureCapabilityForPatchUpdate().withProperties( + new ChangeDataCaptureCapabilityPropertiesForPatchUpdate().withAutoUpgradeExtension(false)), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureConfigurationsCreateOrReplaceSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureConfigurationsCreateOrReplaceSamples.java new file mode 100644 index 0000000000000..2058179a1069f --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureConfigurationsCreateOrReplaceSamples.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.generated; + +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureConfigurationProperties; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDesiredState; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureUsageProfile; + +/** + * Samples for ChangeDataCaptureConfigurations CreateOrReplace. + */ +public final class ChangeDataCaptureConfigurationsCreateOrReplaceSamples { + /* + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureConfigurations_CreateOrReplace.json + */ + /** + * Sample code: Enroll a database for Microsoft Fabric Mirroring. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + enrollADatabaseForMicrosoftFabricMirroring(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.changeDataCaptureConfigurations() + .define("sales-database") + .withExistingCluster("example-resource-group", "example-cluster") + .withProperties(new ChangeDataCaptureConfigurationProperties().withDatabaseName("sales") + .withUsageProfile(ChangeDataCaptureUsageProfile.MIRRORING) + .withDestinationResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/example-cluster/changeDataCaptureDestinations/fabric-mirroring") + .withDesiredState(ChangeDataCaptureDesiredState.ENABLED)) + .create(); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureConfigurationsDeleteSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureConfigurationsDeleteSamples.java new file mode 100644 index 0000000000000..eb755d55b1ef6 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureConfigurationsDeleteSamples.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.horizondb.generated; + +/** + * Samples for ChangeDataCaptureConfigurations Delete. + */ +public final class ChangeDataCaptureConfigurationsDeleteSamples { + /* + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureConfigurations_Delete.json + */ + /** + * Sample code: Delete a Microsoft Fabric Mirroring configuration. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + deleteAMicrosoftFabricMirroringConfiguration(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.changeDataCaptureConfigurations() + .delete("example-resource-group", "example-cluster", "sales-database", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureConfigurationsGetSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureConfigurationsGetSamples.java new file mode 100644 index 0000000000000..7883be251528e --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureConfigurationsGetSamples.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.horizondb.generated; + +/** + * Samples for ChangeDataCaptureConfigurations Get. + */ +public final class ChangeDataCaptureConfigurationsGetSamples { + /* + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureConfigurations_Get.json + */ + /** + * Sample code: Get a Microsoft Fabric Mirroring configuration. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + getAMicrosoftFabricMirroringConfiguration(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.changeDataCaptureConfigurations() + .getWithResponse("example-resource-group", "example-cluster", "sales-database", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureConfigurationsListSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureConfigurationsListSamples.java new file mode 100644 index 0000000000000..2b5fe73d926af --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureConfigurationsListSamples.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.horizondb.generated; + +/** + * Samples for ChangeDataCaptureConfigurations List. + */ +public final class ChangeDataCaptureConfigurationsListSamples { + /* + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureConfigurations_List.json + */ + /** + * Sample code: List Microsoft Fabric Mirroring configurations. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + listMicrosoftFabricMirroringConfigurations(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.changeDataCaptureConfigurations() + .list("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureConfigurationsUpdateSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureConfigurationsUpdateSamples.java new file mode 100644 index 0000000000000..c69a62aba758a --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureConfigurationsUpdateSamples.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.horizondb.generated; + +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureConfiguration; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureConfigurationPropertiesForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDesiredState; + +/** + * Samples for ChangeDataCaptureConfigurations Update. + */ +public final class ChangeDataCaptureConfigurationsUpdateSamples { + /* + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureConfigurations_Update.json + */ + /** + * Sample code: Disable a Microsoft Fabric Mirroring configuration. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + disableAMicrosoftFabricMirroringConfiguration(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + ChangeDataCaptureConfiguration resource = manager.changeDataCaptureConfigurations() + .getWithResponse("example-resource-group", "example-cluster", "sales-database", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new ChangeDataCaptureConfigurationPropertiesForPatchUpdate() + .withDesiredState(ChangeDataCaptureDesiredState.DISABLED)) + .apply(); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureDestinationsActivateIdentitySamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureDestinationsActivateIdentitySamples.java new file mode 100644 index 0000000000000..5ea535f470231 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureDestinationsActivateIdentitySamples.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.horizondb.generated; + +import com.azure.resourcemanager.horizondb.models.ActivateChangeDataCaptureIdentityRequest; + +/** + * Samples for ChangeDataCaptureDestinations ActivateIdentity. + */ +public final class ChangeDataCaptureDestinationsActivateIdentitySamples { + /* + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureDestinations_ActivateIdentity.json + */ + /** + * Sample code: Activate a validated identity assignment for a change data capture destination. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void activateAValidatedIdentityAssignmentForAChangeDataCaptureDestination( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.changeDataCaptureDestinations() + .activateIdentity("example-resource-group", "*", "example-cluster", "fabric-mirroring", + new ActivateChangeDataCaptureIdentityRequest().withIdentityAssignmentResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/example-cluster/changeDataCaptureDestinations/fabric-mirroring/identityAssignments/fabric-writer") + .withDrainExistingSessions(true), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureDestinationsCreateOrReplaceSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureDestinationsCreateOrReplaceSamples.java new file mode 100644 index 0000000000000..414c8edad2f3d --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureDestinationsCreateOrReplaceSamples.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.horizondb.generated; + +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDesiredState; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDestinationProperties; +import com.azure.resourcemanager.horizondb.models.FabricDestinationDetails; + +/** + * Samples for ChangeDataCaptureDestinations CreateOrReplace. + */ +public final class ChangeDataCaptureDestinationsCreateOrReplaceSamples { + /* + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureDestinations_CreateOrReplace.json + */ + /** + * Sample code: Create a Microsoft Fabric change data capture destination. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void createAMicrosoftFabricChangeDataCaptureDestination( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.changeDataCaptureDestinations() + .define("fabric-mirroring") + .withExistingCluster("example-resource-group", "example-cluster") + .withProperties(new ChangeDataCaptureDestinationProperties() + .withDestination(new FabricDestinationDetails().withWorkspaceId("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")) + .withDesiredState(ChangeDataCaptureDesiredState.ENABLED)) + .create(); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureDestinationsDeleteSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureDestinationsDeleteSamples.java new file mode 100644 index 0000000000000..5b16041cab7bd --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureDestinationsDeleteSamples.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.horizondb.generated; + +/** + * Samples for ChangeDataCaptureDestinations Delete. + */ +public final class ChangeDataCaptureDestinationsDeleteSamples { + /* + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureDestinations_Delete.json + */ + /** + * Sample code: Delete a Microsoft Fabric change data capture destination. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void deleteAMicrosoftFabricChangeDataCaptureDestination( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.changeDataCaptureDestinations() + .delete("example-resource-group", "example-cluster", "fabric-mirroring", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureDestinationsGetSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureDestinationsGetSamples.java new file mode 100644 index 0000000000000..d44a573c0b2c9 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureDestinationsGetSamples.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.horizondb.generated; + +/** + * Samples for ChangeDataCaptureDestinations Get. + */ +public final class ChangeDataCaptureDestinationsGetSamples { + /* + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureDestinations_Get.json + */ + /** + * Sample code: Get a Microsoft Fabric change data capture destination. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + getAMicrosoftFabricChangeDataCaptureDestination(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.changeDataCaptureDestinations() + .getWithResponse("example-resource-group", "example-cluster", "fabric-mirroring", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureDestinationsListSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureDestinationsListSamples.java new file mode 100644 index 0000000000000..f0d630f252e13 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureDestinationsListSamples.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.horizondb.generated; + +/** + * Samples for ChangeDataCaptureDestinations List. + */ +public final class ChangeDataCaptureDestinationsListSamples { + /* + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureDestinations_List.json + */ + /** + * Sample code: List Microsoft Fabric change data capture destinations. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + listMicrosoftFabricChangeDataCaptureDestinations(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.changeDataCaptureDestinations() + .list("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureDestinationsUpdateSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureDestinationsUpdateSamples.java new file mode 100644 index 0000000000000..fa7a9cc6b1341 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureDestinationsUpdateSamples.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.horizondb.generated; + +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDesiredState; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDestination; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDestinationPropertiesForPatchUpdate; + +/** + * Samples for ChangeDataCaptureDestinations Update. + */ +public final class ChangeDataCaptureDestinationsUpdateSamples { + /* + * x-ms-original-file: 2026-10-01-preview/ChangeDataCaptureDestinations_Update.json + */ + /** + * Sample code: Disable a Microsoft Fabric change data capture destination. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void disableAMicrosoftFabricChangeDataCaptureDestination( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + ChangeDataCaptureDestination resource = manager.changeDataCaptureDestinations() + .getWithResponse("example-resource-group", "example-cluster", "fabric-mirroring", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new ChangeDataCaptureDestinationPropertiesForPatchUpdate() + .withDesiredState(ChangeDataCaptureDesiredState.DISABLED)) + .apply(); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ClustersCreateOrReplaceSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ClustersCreateOrReplaceSamples.java new file mode 100644 index 0000000000000..7df3d6070c947 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ClustersCreateOrReplaceSamples.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.horizondb.generated; + +import com.azure.resourcemanager.horizondb.models.BackupProperties; +import com.azure.resourcemanager.horizondb.models.ClusterCreateMode; +import com.azure.resourcemanager.horizondb.models.ClusterProperties; +import com.azure.resourcemanager.horizondb.models.GeoRedundancyState; +import com.azure.resourcemanager.horizondb.models.HorizonDbClusterDataEncryption; +import com.azure.resourcemanager.horizondb.models.HorizonDbClusterDataEncryptionType; +import com.azure.resourcemanager.horizondb.models.HorizonDbClusterIdentityType; +import com.azure.resourcemanager.horizondb.models.HorizonDbClusterManagedServiceIdentity; +import com.azure.resourcemanager.horizondb.models.Network; +import com.azure.resourcemanager.horizondb.models.PostgreSqlVersion; +import com.azure.resourcemanager.horizondb.models.PublicNetworkAccessState; +import com.azure.resourcemanager.horizondb.models.UserAssignedIdentity; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Clusters CreateOrReplace. + */ +public final class ClustersCreateOrReplaceSamples { + /* + * x-ms-original-file: 2026-10-01-preview/Clusters_CreateOrReplace.json + */ + /** + * Sample code: Create or replace a HorizonDB cluster. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void createOrReplaceAHorizonDBCluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.clusters() + .define("example-cluster") + .withRegion("eastus2") + .withExistingResourceGroup("example-resource-group") + .withTags(mapOf("environment", "production")) + .withProperties(new ClusterProperties().withPostgreSqlVersion(PostgreSqlVersion.V17) + .withNetwork(new Network().withPublicAccess(PublicNetworkAccessState.ENABLED)) + .withBackup(new BackupProperties().withGeoRedundancy(GeoRedundancyState.ENABLED).withRetentionDays(14))) + .withIdentity(new HorizonDbClusterManagedServiceIdentity() + .withType(HorizonDbClusterIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fabric-writer", + new UserAssignedIdentity()))) + .create(); + } + + /* + * x-ms-original-file: 2026-10-01-preview/Clusters_CreateOrReplaceMinimumDefaults.json + */ + /** + * Sample code: Create a PostgreSQL 18 HorizonDB cluster with minimum configuration and service defaults. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void createAPostgreSQL18HorizonDBClusterWithMinimumConfigurationAndServiceDefaults( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.clusters() + .define("minimum-defaults") + .withRegion("eastus2") + .withExistingResourceGroup("example-resource-group") + .withProperties(new ClusterProperties().withPostgreSqlVersion(PostgreSqlVersion.V18) + .withBackup(new BackupProperties().withGeoRedundancy(GeoRedundancyState.DISABLED))) + .create(); + } + + /* + * x-ms-original-file: 2026-10-01-preview/Clusters_CreateOrReplaceWithDataEncryption.json + */ + /** + * Sample code: Create a HorizonDB cluster with customer-managed key data encryption. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void createAHorizonDBClusterWithCustomerManagedKeyDataEncryption( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.clusters() + .define("example-cluster") + .withRegion("eastus2") + .withExistingResourceGroup("example-resource-group") + .withProperties(new ClusterProperties().withPostgreSqlVersion(PostgreSqlVersion.V17) + .withBackup(new BackupProperties().withGeoRedundancy(GeoRedundancyState.DISABLED).withRetentionDays(14)) + .withDataEncryption(new HorizonDbClusterDataEncryption() + .withType(HorizonDbClusterDataEncryptionType.AZURE_KEY_VAULT) + .withPrimaryKeyUri("fakeTokenPlaceholder") + .withPrimaryUserAssignedIdentityId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/primary-encryption-identity"))) + .withIdentity(new HorizonDbClusterManagedServiceIdentity() + .withType(HorizonDbClusterIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/primary-encryption-identity", + new UserAssignedIdentity()))) + .create(); + } + + /* + * x-ms-original-file: 2026-10-01-preview/Clusters_CreateOrReplacePointInTimeRestore.json + */ + /** + * Sample code: Restore a HorizonDB cluster to a point in time. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + restoreAHorizonDBClusterToAPointInTime(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.clusters() + .define("restored-cluster") + .withRegion("eastus2") + .withExistingResourceGroup("example-resource-group") + .withProperties(new ClusterProperties().withCreationMode(ClusterCreateMode.POINT_IN_TIME_RESTORE) + .withPointInTimeUtc(OffsetDateTime.parse("2026-07-27T12:00:00Z")) + .withCreationSourceClusterResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/source-cluster") + .withNetwork(new Network().withPublicAccess(PublicNetworkAccessState.DISABLED)) + .withBackup(new BackupProperties().withGeoRedundancy(GeoRedundancyState.ENABLED).withRetentionDays(14))) + .create(); + } + + /* + * x-ms-original-file: 2026-10-01-preview/Clusters_CreateOrReplaceCrossRegionPointInTimeRestore.json + */ + /** + * Sample code: Restore a HorizonDB cluster across Azure regions from the latest available backup. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void restoreAHorizonDBClusterAcrossAzureRegionsFromTheLatestAvailableBackup( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.clusters() + .define("cross-region-restored-cluster") + .withRegion("westus2") + .withExistingResourceGroup("example-resource-group") + .withProperties(new ClusterProperties().withCreationMode(ClusterCreateMode.POINT_IN_TIME_RESTORE) + .withPointInTimeUtc(OffsetDateTime.parse("2026-07-27T12:00:00Z")) + .withCreationSourceClusterResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/source-cluster") + .withCreationSourceClusterLocation("eastus2") + .withNetwork(new Network().withPublicAccess(PublicNetworkAccessState.DISABLED)) + .withBackup(new BackupProperties().withGeoRedundancy(GeoRedundancyState.ENABLED).withRetentionDays(14))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersDeleteSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ClustersDeleteSamples.java similarity index 63% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersDeleteSamples.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ClustersDeleteSamples.java index aa010266d84f4..fd3fe7a4ca6ba 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersDeleteSamples.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ClustersDeleteSamples.java @@ -5,11 +5,11 @@ package com.azure.resourcemanager.horizondb.generated; /** - * Samples for HorizonDbClusters Delete. + * Samples for Clusters Delete. */ -public final class HorizonDbClustersDeleteSamples { +public final class ClustersDeleteSamples { /* - * x-ms-original-file: 2026-05-01-preview/Clusters_Delete.json + * x-ms-original-file: 2026-10-01-preview/Clusters_Delete.json */ /** * Sample code: Delete a HorizonDB cluster. @@ -17,6 +17,6 @@ public final class HorizonDbClustersDeleteSamples { * @param manager Entry point to HorizonDbManager. */ public static void deleteAHorizonDBCluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbClusters().delete("exampleresourcegroup", "examplecluster", com.azure.core.util.Context.NONE); + manager.clusters().delete("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ClustersFailoverSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ClustersFailoverSamples.java new file mode 100644 index 0000000000000..2777dda72c384 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ClustersFailoverSamples.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.horizondb.generated; + +/** + * Samples for Clusters Failover. + */ +public final class ClustersFailoverSamples { + /* + * x-ms-original-file: 2026-10-01-preview/Clusters_Failover.json + */ + /** + * Sample code: Trigger failover within a HorizonDB cluster. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + triggerFailoverWithinAHorizonDBCluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.clusters().failover("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ClustersGetByResourceGroupSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ClustersGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..3086188263bfb --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ClustersGetByResourceGroupSamples.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.horizondb.generated; + +/** + * Samples for Clusters GetByResourceGroup. + */ +public final class ClustersGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-10-01-preview/Clusters_GetMinimumDefaults.json + */ + /** + * Sample code: Get a minimum HorizonDB cluster with materialized service defaults. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void getAMinimumHorizonDBClusterWithMaterializedServiceDefaults( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.clusters() + .getByResourceGroupWithResponse("example-resource-group", "minimum-defaults", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-10-01-preview/Clusters_Get.json + */ + /** + * Sample code: Get a HorizonDB cluster. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void getAHorizonDBCluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.clusters() + .getByResourceGroupWithResponse("example-resource-group", "example-cluster", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-10-01-preview/Clusters_GetAfterPoolCreationOnEmptyCluster.json + */ + /** + * Sample code: Get a cluster after pool creation while it had no existing pools. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void getAClusterAfterPoolCreationWhileItHadNoExistingPools( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.clusters() + .getByResourceGroupWithResponse("example-resource-group", "example-cluster", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersListByResourceGroupSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ClustersListByResourceGroupSamples.java similarity index 64% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersListByResourceGroupSamples.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ClustersListByResourceGroupSamples.java index ca1111d99564e..596af5978212b 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersListByResourceGroupSamples.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ClustersListByResourceGroupSamples.java @@ -5,11 +5,11 @@ package com.azure.resourcemanager.horizondb.generated; /** - * Samples for HorizonDbClusters ListByResourceGroup. + * Samples for Clusters ListByResourceGroup. */ -public final class HorizonDbClustersListByResourceGroupSamples { +public final class ClustersListByResourceGroupSamples { /* - * x-ms-original-file: 2026-05-01-preview/Clusters_ListByResourceGroup.json + * x-ms-original-file: 2026-10-01-preview/Clusters_ListByResourceGroup.json */ /** * Sample code: List HorizonDB clusters in a resource group. @@ -18,6 +18,6 @@ public final class HorizonDbClustersListByResourceGroupSamples { */ public static void listHorizonDBClustersInAResourceGroup(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbClusters().listByResourceGroup("exampleresourcegroup", com.azure.core.util.Context.NONE); + manager.clusters().listByResourceGroup("example-resource-group", com.azure.core.util.Context.NONE); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ClustersListSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ClustersListSamples.java new file mode 100644 index 0000000000000..5934f82fcb59e --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ClustersListSamples.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.horizondb.generated; + +/** + * Samples for Clusters List. + */ +public final class ClustersListSamples { + /* + * x-ms-original-file: 2026-10-01-preview/Clusters_ListBySubscription.json + */ + /** + * Sample code: List HorizonDB clusters in a subscription. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + listHorizonDBClustersInASubscription(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.clusters().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ClustersUpdateSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ClustersUpdateSamples.java new file mode 100644 index 0000000000000..c25e468892ecf --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ClustersUpdateSamples.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.horizondb.generated; + +import com.azure.resourcemanager.horizondb.models.BackupPropertiesForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.Cluster; +import com.azure.resourcemanager.horizondb.models.ClusterPropertiesForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.HorizonDbClusterDataEncryptionForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.NetworkForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.PublicNetworkAccessState; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Clusters Update. + */ +public final class ClustersUpdateSamples { + /* + * x-ms-original-file: 2026-10-01-preview/Clusters_Update.json + */ + /** + * Sample code: Update a HorizonDB cluster. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void updateAHorizonDBCluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + Cluster resource = manager.clusters() + .getByResourceGroupWithResponse("example-resource-group", "example-cluster", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("environment", "production", "team", "data-platform")) + .withProperties(new ClusterPropertiesForPatchUpdate() + .withNetwork(new NetworkForPatchUpdate().withPublicAccess(PublicNetworkAccessState.DISABLED)) + .withBackup(new BackupPropertiesForPatchUpdate().withRetentionDays(21))) + .apply(); + } + + /* + * x-ms-original-file: 2026-10-01-preview/Clusters_UpdateDataEncryption.json + */ + /** + * Sample code: Rotate the customer-managed key used by a HorizonDB cluster. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void rotateTheCustomerManagedKeyUsedByAHorizonDBCluster( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + Cluster resource = manager.clusters() + .getByResourceGroupWithResponse("example-resource-group", "example-cluster", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new ClusterPropertiesForPatchUpdate().withDataEncryption( + new HorizonDbClusterDataEncryptionForPatchUpdate().withPrimaryKeyUri("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/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/DefaultParameterGroupsGetSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/DefaultParameterGroupsGetSamples.java new file mode 100644 index 0000000000000..d47bf4fb887f5 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/DefaultParameterGroupsGetSamples.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.horizondb.generated; + +/** + * Samples for DefaultParameterGroups Get. + */ +public final class DefaultParameterGroupsGetSamples { + /* + * x-ms-original-file: 2026-10-01-preview/DefaultParameterGroups_Get.json + */ + /** + * Sample code: Get a default HorizonDB parameter group by subscription, location, and name. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void getADefaultHorizonDBParameterGroupBySubscriptionLocationAndName( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.defaultParameterGroups() + .getWithResponse("eastus2", "default-postgresql-17-provisioned", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/DefaultParameterGroupsListBySubscriptionAndRegionSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/DefaultParameterGroupsListBySubscriptionAndRegionSamples.java new file mode 100644 index 0000000000000..2aa1e63729822 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/DefaultParameterGroupsListBySubscriptionAndRegionSamples.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.horizondb.generated; + +/** + * Samples for DefaultParameterGroups ListBySubscriptionAndRegion. + */ +public final class DefaultParameterGroupsListBySubscriptionAndRegionSamples { + /* + * x-ms-original-file: 2026-10-01-preview/DefaultParameterGroups_List.json + */ + /** + * Sample code: List default HorizonDB parameter groups by subscription and region. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void listDefaultHorizonDBParameterGroupsBySubscriptionAndRegion( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.defaultParameterGroups().listBySubscriptionAndRegion("eastus2", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/EndpointsGetSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/EndpointsGetSamples.java new file mode 100644 index 0000000000000..cd82b4b9be5df --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/EndpointsGetSamples.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.horizondb.generated; + +/** + * Samples for Endpoints Get. + */ +public final class EndpointsGetSamples { + /* + * x-ms-original-file: 2026-10-01-preview/Endpoints_GetReadOnly.json + */ + /** + * Sample code: Get a read-only HorizonDB pool endpoint. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void getAReadOnlyHorizonDBPoolEndpoint(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.endpoints() + .getWithResponse("example-resource-group", "example-cluster", "example-pool-01", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-10-01-preview/Endpoints_Get.json + */ + /** + * Sample code: Get a HorizonDB endpoint. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void getAHorizonDBEndpoint(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.endpoints() + .getWithResponse("example-resource-group", "example-cluster", "example-cluster", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/EndpointsListSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/EndpointsListSamples.java new file mode 100644 index 0000000000000..60b205e2e5d56 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/EndpointsListSamples.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.horizondb.generated; + +/** + * Samples for Endpoints List. + */ +public final class EndpointsListSamples { + /* + * x-ms-original-file: 2026-10-01-preview/Endpoints_List.json + */ + /** + * Sample code: List HorizonDB endpoints in a cluster. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void listHorizonDBEndpointsInACluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.endpoints().list("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/FirewallRulesCreateOrReplaceSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/FirewallRulesCreateOrReplaceSamples.java new file mode 100644 index 0000000000000..085df09769d83 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/FirewallRulesCreateOrReplaceSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.generated; + +import com.azure.resourcemanager.horizondb.models.FirewallRuleProperties; + +/** + * Samples for FirewallRules CreateOrReplace. + */ +public final class FirewallRulesCreateOrReplaceSamples { + /* + * x-ms-original-file: 2026-10-01-preview/FirewallRules_CreateOrReplace.json + */ + /** + * Sample code: Create or replace a firewall rule on a HorizonDB pool. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + createOrReplaceAFirewallRuleOnAHorizonDBPool(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.firewallRules() + .define("example-firewall-rule-01") + .withExistingPool("example-resource-group", "example-cluster", "example-pool-01") + .withProperties(new FirewallRuleProperties().withStartIpAddress("10.0.0.1") + .withEndIpAddress("10.0.0.254") + .withDescription("Allow access from the corporate network")) + .create(); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/FirewallRulesDeleteSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/FirewallRulesDeleteSamples.java new file mode 100644 index 0000000000000..421996517b550 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/FirewallRulesDeleteSamples.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.horizondb.generated; + +/** + * Samples for FirewallRules Delete. + */ +public final class FirewallRulesDeleteSamples { + /* + * x-ms-original-file: 2026-10-01-preview/FirewallRules_Delete.json + */ + /** + * Sample code: Delete a firewall rule from a HorizonDB pool. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + deleteAFirewallRuleFromAHorizonDBPool(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.firewallRules() + .delete("example-resource-group", "example-cluster", "example-pool-01", "example-firewall-rule-01", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/FirewallRulesGetSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/FirewallRulesGetSamples.java new file mode 100644 index 0000000000000..9a328c12af614 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/FirewallRulesGetSamples.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.horizondb.generated; + +/** + * Samples for FirewallRules Get. + */ +public final class FirewallRulesGetSamples { + /* + * x-ms-original-file: 2026-10-01-preview/FirewallRules_Get.json + */ + /** + * Sample code: Get a firewall rule on a HorizonDB pool. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void getAFirewallRuleOnAHorizonDBPool(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.firewallRules() + .getWithResponse("example-resource-group", "example-cluster", "example-pool-01", "example-firewall-rule-01", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/FirewallRulesListSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/FirewallRulesListSamples.java new file mode 100644 index 0000000000000..6c5c0baafe7ef --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/FirewallRulesListSamples.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.horizondb.generated; + +/** + * Samples for FirewallRules List. + */ +public final class FirewallRulesListSamples { + /* + * x-ms-original-file: 2026-10-01-preview/FirewallRules_List.json + */ + /** + * Sample code: List firewall rules in a HorizonDB pool. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void listFirewallRulesInAHorizonDBPool(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.firewallRules() + .list("example-resource-group", "example-cluster", "example-pool-01", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorsCreateOrUpdateSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorsCreateOrUpdateSamples.java deleted file mode 100644 index 41011b91a3883..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorsCreateOrUpdateSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.resourcemanager.horizondb.models.HorizonDbAdministratorPropertiesForAdd; -import com.azure.resourcemanager.horizondb.models.PrincipalTypes; - -/** - * Samples for HorizonDbAdministrators CreateOrUpdate. - */ -public final class HorizonDbAdministratorsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Administrators_CreateOrUpdate.json - */ - /** - * Sample code: Create or update a HorizonDB administrator. - * - * @param manager Entry point to HorizonDbManager. - */ - public static void - createOrUpdateAHorizonDBAdministrator(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbAdministrators() - .define("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee") - .withExistingCluster("exampleresourcegroup", "examplecluster") - .withProperties(new HorizonDbAdministratorPropertiesForAdd().withPrincipalName("admin@contoso.com") - .withPrincipalType(PrincipalTypes.USER) - .withTenantId("11111111-2222-3333-4444-555555555555")) - .create(); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorsDeleteSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorsDeleteSamples.java deleted file mode 100644 index d65fd4070ac94..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -/** - * Samples for HorizonDbAdministrators Delete. - */ -public final class HorizonDbAdministratorsDeleteSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Administrators_Delete.json - */ - /** - * Sample code: Delete a HorizonDB administrator. - * - * @param manager Entry point to HorizonDbManager. - */ - public static void deleteAHorizonDBAdministrator(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbAdministrators() - .delete("exampleresourcegroup", "examplecluster", "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorsGetSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorsGetSamples.java deleted file mode 100644 index dd2ab5ffce004..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -/** - * Samples for HorizonDbAdministrators Get. - */ -public final class HorizonDbAdministratorsGetSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Administrators_Get.json - */ - /** - * Sample code: Get a HorizonDB administrator. - * - * @param manager Entry point to HorizonDbManager. - */ - public static void getAHorizonDBAdministrator(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbAdministrators() - .getWithResponse("exampleresourcegroup", "examplecluster", "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorsListSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorsListSamples.java deleted file mode 100644 index 2395195dced77..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorsListSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -/** - * Samples for HorizonDbAdministrators List. - */ -public final class HorizonDbAdministratorsListSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Administrators_List.json - */ - /** - * Sample code: List HorizonDB administrators in a cluster. - * - * @param manager Entry point to HorizonDbManager. - */ - public static void - listHorizonDBAdministratorsInACluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbAdministrators() - .list("exampleresourcegroup", "examplecluster", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersCreateOrUpdateSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersCreateOrUpdateSamples.java deleted file mode 100644 index 5a2f4a9de9993..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersCreateOrUpdateSamples.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.resourcemanager.horizondb.models.CreateModeCluster; -import com.azure.resourcemanager.horizondb.models.HorizonDbClusterProperties; -import com.azure.resourcemanager.horizondb.models.ZonePlacementPolicy; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for HorizonDbClusters CreateOrUpdate. - */ -public final class HorizonDbClustersCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Clusters_CreateOrUpdate.json - */ - /** - * Sample code: Create or update a HorizonDB cluster. - * - * @param manager Entry point to HorizonDbManager. - */ - public static void createOrUpdateAHorizonDBCluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbClusters() - .define("examplecluster") - .withRegion("westus2") - .withExistingResourceGroup("exampleresourcegroup") - .withTags(mapOf("env", "dev")) - .withProperties(new HorizonDbClusterProperties().withAdministratorLogin("exampleadministratorlogin") - .withAdministratorLoginPassword("fakeTokenPlaceholder") - .withVersion("17") - .withCreateMode(CreateModeCluster.CREATE) - .withReplicaCount(2) - .withVCores(4) - .withZonePlacementPolicy(ZonePlacementPolicy.BEST_EFFORT)) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersGetByResourceGroupSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersGetByResourceGroupSamples.java deleted file mode 100644 index 09ae3adae0368..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersGetByResourceGroupSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -/** - * Samples for HorizonDbClusters GetByResourceGroup. - */ -public final class HorizonDbClustersGetByResourceGroupSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Clusters_Get.json - */ - /** - * Sample code: Get a HorizonDB cluster. - * - * @param manager Entry point to HorizonDbManager. - */ - public static void getAHorizonDBCluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbClusters() - .getByResourceGroupWithResponse("exampleresourcegroup", "examplecluster", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersListSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersListSamples.java deleted file mode 100644 index 4fe3758a8efbc..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -/** - * Samples for HorizonDbClusters List. - */ -public final class HorizonDbClustersListSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Clusters_ListBySubscription.json - */ - /** - * Sample code: List HorizonDB clusters by subscription. - * - * @param manager Entry point to HorizonDbManager. - */ - public static void - listHorizonDBClustersBySubscription(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbClusters().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersRestartSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersRestartSamples.java deleted file mode 100644 index 992281ff2f725..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersRestartSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -/** - * Samples for HorizonDbClusters Restart. - */ -public final class HorizonDbClustersRestartSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Clusters_Restart.json - */ - /** - * Sample code: Restart a HorizonDB cluster. - * - * @param manager Entry point to HorizonDbManager. - */ - public static void restartAHorizonDBCluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbClusters().restart("exampleresourcegroup", "examplecluster", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersStartSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersStartSamples.java deleted file mode 100644 index 57f6389694e9b..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersStartSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -/** - * Samples for HorizonDbClusters Start. - */ -public final class HorizonDbClustersStartSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Clusters_Start.json - */ - /** - * Sample code: Start a HorizonDB cluster. - * - * @param manager Entry point to HorizonDbManager. - */ - public static void startAHorizonDBCluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbClusters().start("exampleresourcegroup", "examplecluster", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersStopSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersStopSamples.java deleted file mode 100644 index cfec45d899b31..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersStopSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -/** - * Samples for HorizonDbClusters Stop. - */ -public final class HorizonDbClustersStopSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Clusters_Stop.json - */ - /** - * Sample code: Stop a HorizonDB cluster. - * - * @param manager Entry point to HorizonDbManager. - */ - public static void stopAHorizonDBCluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbClusters().stop("exampleresourcegroup", "examplecluster", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersUpdateSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersUpdateSamples.java deleted file mode 100644 index f774a5af491bb..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersUpdateSamples.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.resourcemanager.horizondb.models.HorizonDbCluster; -import com.azure.resourcemanager.horizondb.models.HorizonDbClusterPropertiesForPatchUpdate; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for HorizonDbClusters Update. - */ -public final class HorizonDbClustersUpdateSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Clusters_Update.json - */ - /** - * Sample code: Update a HorizonDB cluster. - * - * @param manager Entry point to HorizonDbManager. - */ - public static void updateAHorizonDBCluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - HorizonDbCluster resource = manager.horizonDbClusters() - .getByResourceGroupWithResponse("exampleresourcegroup", "examplecluster", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf("team", "updated-data-platform")) - .withProperties( - new HorizonDbClusterPropertiesForPatchUpdate().withAdministratorLoginPassword("fakeTokenPlaceholder") - .withVCores(8)) - .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/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbFirewallRulesCreateOrUpdateSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbFirewallRulesCreateOrUpdateSamples.java deleted file mode 100644 index 067becde68390..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbFirewallRulesCreateOrUpdateSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.resourcemanager.horizondb.models.HorizonDbFirewallRuleProperties; - -/** - * Samples for HorizonDbFirewallRules CreateOrUpdate. - */ -public final class HorizonDbFirewallRulesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-05-01-preview/FirewallRules_CreateOrUpdate.json - */ - /** - * Sample code: Create or update a HorizonDB firewall rule. - * - * @param manager Entry point to HorizonDbManager. - */ - public static void - createOrUpdateAHorizonDBFirewallRule(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbFirewallRules() - .define("examplefirewallrule") - .withExistingPool("exampleresourcegroup", "examplecluster", "examplepool") - .withProperties(new HorizonDbFirewallRuleProperties().withStartIpAddress("10.0.0.1") - .withEndIpAddress("10.0.0.10") - .withDescription("Allow access from corporate network")) - .create(); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbFirewallRulesDeleteSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbFirewallRulesDeleteSamples.java deleted file mode 100644 index d99785a4ad47e..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbFirewallRulesDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -/** - * Samples for HorizonDbFirewallRules Delete. - */ -public final class HorizonDbFirewallRulesDeleteSamples { - /* - * x-ms-original-file: 2026-05-01-preview/FirewallRules_Delete.json - */ - /** - * Sample code: Delete a HorizonDB firewall rule. - * - * @param manager Entry point to HorizonDbManager. - */ - public static void deleteAHorizonDBFirewallRule(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbFirewallRules() - .delete("exampleresourcegroup", "examplecluster", "examplepool", "examplefirewallrule", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbFirewallRulesGetSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbFirewallRulesGetSamples.java deleted file mode 100644 index c7c8b713cb00d..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbFirewallRulesGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -/** - * Samples for HorizonDbFirewallRules Get. - */ -public final class HorizonDbFirewallRulesGetSamples { - /* - * x-ms-original-file: 2026-05-01-preview/FirewallRules_Get.json - */ - /** - * Sample code: Get a HorizonDB firewall rule. - * - * @param manager Entry point to HorizonDbManager. - */ - public static void getAHorizonDBFirewallRule(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbFirewallRules() - .getWithResponse("exampleresourcegroup", "examplecluster", "examplepool", "examplefirewallrule", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbFirewallRulesListSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbFirewallRulesListSamples.java deleted file mode 100644 index 070a1870b6055..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbFirewallRulesListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -/** - * Samples for HorizonDbFirewallRules List. - */ -public final class HorizonDbFirewallRulesListSamples { - /* - * x-ms-original-file: 2026-05-01-preview/FirewallRules_List.json - */ - /** - * Sample code: List HorizonDB firewall rules in a pool. - * - * @param manager Entry point to HorizonDbManager. - */ - public static void listHorizonDBFirewallRulesInAPool(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbFirewallRules() - .list("exampleresourcegroup", "examplecluster", "examplepool", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsCreateOrUpdateSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsCreateOrUpdateSamples.java deleted file mode 100644 index 2453b8e0c06c7..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsCreateOrUpdateSamples.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroupProperties; -import com.azure.resourcemanager.horizondb.models.ParameterProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for HorizonDbParameterGroups CreateOrUpdate. - */ -public final class HorizonDbParameterGroupsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-05-01-preview/ParameterGroups_CreateOrUpdate.json - */ - /** - * Sample code: Create or update a HorizonDB parameter group. - * - * @param manager Entry point to HorizonDbManager. - */ - public static void - createOrUpdateAHorizonDBParameterGroup(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbParameterGroups() - .define("exampleparametergroup") - .withRegion("westus2") - .withExistingResourceGroup("exampleresourcegroup") - .withTags(mapOf("env", "dev", "team", "data-platform")) - .withProperties(new HorizonDbParameterGroupProperties() - .withParameters(Arrays.asList(new ParameterProperties().withName("max_connections").withValue("200"), - new ParameterProperties().withName("log_min_error_statement").withValue("error"), - new ParameterProperties().withName("shared_buffers").withValue("2000"))) - .withDescription("Parameter group for high-throughput workloads") - .withPgVersion(17) - .withApplyImmediately(true)) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsListConnectionsSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsListConnectionsSamples.java deleted file mode 100644 index 5533a315a444a..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsListConnectionsSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -/** - * Samples for HorizonDbParameterGroups ListConnections. - */ -public final class HorizonDbParameterGroupsListConnectionsSamples { - /* - * x-ms-original-file: 2026-05-01-preview/ParameterGroups_ListConnections.json - */ - /** - * Sample code: List connections for a HorizonDB parameter group. - * - * @param manager Entry point to HorizonDbManager. - */ - public static void - listConnectionsForAHorizonDBParameterGroup(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbParameterGroups() - .listConnections("exampleresourcegroup", "exampleparametergroup", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsListVersionsSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsListVersionsSamples.java deleted file mode 100644 index eebf1e3bbd4cf..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsListVersionsSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -/** - * Samples for HorizonDbParameterGroups ListVersions. - */ -public final class HorizonDbParameterGroupsListVersionsSamples { - /* - * x-ms-original-file: 2026-05-01-preview/ParameterGroups_ListVersions.json - */ - /** - * Sample code: List parameter groups filtered by version. - * - * @param manager Entry point to HorizonDbManager. - */ - public static void - listParameterGroupsFilteredByVersion(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbParameterGroups() - .listVersions("exampleresourcegroup", "exampleparametergroup", 22, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsUpdateSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsUpdateSamples.java deleted file mode 100644 index 64509064aee19..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsUpdateSamples.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroup; -import com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroupPropertiesForPatchUpdate; -import com.azure.resourcemanager.horizondb.models.ParameterProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for HorizonDbParameterGroups Update. - */ -public final class HorizonDbParameterGroupsUpdateSamples { - /* - * x-ms-original-file: 2026-05-01-preview/ParameterGroups_Update.json - */ - /** - * Sample code: Update a HorizonDB parameter group. - * - * @param manager Entry point to HorizonDbManager. - */ - public static void updateAHorizonDBParameterGroup(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - HorizonDbParameterGroup resource = manager.horizonDbParameterGroups() - .getByResourceGroupWithResponse("exampleresourcegroup", "exampleparametergroup", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf("team", "updated-data-platform")) - .withProperties(new HorizonDbParameterGroupPropertiesForPatchUpdate() - .withParameters(Arrays.asList(new ParameterProperties().withName("max_connections").withValue("300"), - new ParameterProperties().withName("log_min_error_statement").withValue("warning"))) - .withDescription("Updated parameter group for high-throughput workloads") - .withApplyImmediately(true)) - .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/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateEndpointConnectionsGetSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateEndpointConnectionsGetSamples.java deleted file mode 100644 index fa7e2fd28fb60..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateEndpointConnectionsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -/** - * Samples for HorizonDbPrivateEndpointConnections Get. - */ -public final class HorizonDbPrivateEndpointConnectionsGetSamples { - /* - * x-ms-original-file: 2026-05-01-preview/PrivateEndpointConnections_Get.json - */ - /** - * Sample code: Get a private endpoint connection. - * - * @param manager Entry point to HorizonDbManager. - */ - public static void getAPrivateEndpointConnection(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbPrivateEndpointConnections() - .getWithResponse("exampleresourcegroup", "examplecluster", - "exampleprivateendpointconnection.1fa229cd-bf3f-47f0-8c49-afb36723997e", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateEndpointConnectionsListSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateEndpointConnectionsListSamples.java deleted file mode 100644 index 08055a1615c61..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateEndpointConnectionsListSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -/** - * Samples for HorizonDbPrivateEndpointConnections List. - */ -public final class HorizonDbPrivateEndpointConnectionsListSamples { - /* - * x-ms-original-file: 2026-05-01-preview/PrivateEndpointConnections_List.json - */ - /** - * Sample code: List all private endpoint connections on a cluster. - * - * @param manager Entry point to HorizonDbManager. - */ - public static void - listAllPrivateEndpointConnectionsOnACluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbPrivateEndpointConnections() - .list("exampleresourcegroup", "examplecluster", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateEndpointConnectionsUpdateStatusSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateEndpointConnectionsUpdateStatusSamples.java deleted file mode 100644 index cd9af4945752c..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateEndpointConnectionsUpdateStatusSamples.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.resourcemanager.horizondb.fluent.models.PrivateEndpointConnectionResourceInner; -import com.azure.resourcemanager.horizondb.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.horizondb.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.horizondb.models.PrivateLinkServiceConnectionState; - -/** - * Samples for HorizonDbPrivateEndpointConnections UpdateStatus. - */ -public final class HorizonDbPrivateEndpointConnectionsUpdateStatusSamples { - /* - * x-ms-original-file: 2026-05-01-preview/PrivateEndpointConnections_UpdateStatus.json - */ - /** - * Sample code: Approve or reject a private endpoint connection. - * - * @param manager Entry point to HorizonDbManager. - */ - public static void - approveOrRejectAPrivateEndpointConnection(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbPrivateEndpointConnections() - .updateStatusWithResponse("exampleresourcegroup", "examplecluster", - "exampleprivateendpointconnection.1fa229cd-bf3f-47f0-8c49-afb36723997e", - new PrivateEndpointConnectionResourceInner().withProperties(new PrivateEndpointConnectionProperties() - .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("Approved by johndoe@contoso.com"))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateLinkResourcesGetSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateLinkResourcesGetSamples.java deleted file mode 100644 index 94d9d0e15ef0f..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateLinkResourcesGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -/** - * Samples for HorizonDbPrivateLinkResources Get. - */ -public final class HorizonDbPrivateLinkResourcesGetSamples { - /* - * x-ms-original-file: 2026-05-01-preview/PrivateLinkResources_Get.json - */ - /** - * Sample code: Gets a private link resource for HorizonDB. - * - * @param manager Entry point to HorizonDbManager. - */ - public static void - getsAPrivateLinkResourceForHorizonDB(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbPrivateLinkResources() - .getWithResponse("exampleresourcegroup", "examplecluster", "default", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateLinkResourcesListSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateLinkResourcesListSamples.java deleted file mode 100644 index a3e266b08bccc..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateLinkResourcesListSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -/** - * Samples for HorizonDbPrivateLinkResources List. - */ -public final class HorizonDbPrivateLinkResourcesListSamples { - /* - * x-ms-original-file: 2026-05-01-preview/PrivateLinkResources_List.json - */ - /** - * Sample code: Gets private link resources for HorizonDB. - * - * @param manager Entry point to HorizonDbManager. - */ - public static void - getsPrivateLinkResourcesForHorizonDB(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbPrivateLinkResources() - .list("exampleresourcegroup", "examplecluster", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicasCreateOrUpdateSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicasCreateOrUpdateSamples.java deleted file mode 100644 index 2bcd14e412cdb..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicasCreateOrUpdateSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.resourcemanager.horizondb.models.HorizonDbReplicaProperties; -import com.azure.resourcemanager.horizondb.models.ReplicaRole; - -/** - * Samples for HorizonDbReplicas CreateOrUpdate. - */ -public final class HorizonDbReplicasCreateOrUpdateSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Replicas_CreateOrUpdate.json - */ - /** - * Sample code: Create or update a HorizonDB replica. - * - * @param manager Entry point to HorizonDbManager. - */ - public static void createOrUpdateAHorizonDBReplica(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbReplicas() - .define("examplereplica") - .withExistingPool("exampleresourcegroup", "examplecluster", "examplepool") - .withProperties(new HorizonDbReplicaProperties().withRole(ReplicaRole.READ).withAvailabilityZone("1")) - .create(); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicasDeleteSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicasDeleteSamples.java deleted file mode 100644 index b9cbf891332ab..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicasDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -/** - * Samples for HorizonDbReplicas Delete. - */ -public final class HorizonDbReplicasDeleteSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Replicas_Delete.json - */ - /** - * Sample code: Delete a HorizonDB replica. - * - * @param manager Entry point to HorizonDbManager. - */ - public static void deleteAHorizonDBReplica(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbReplicas() - .delete("exampleresourcegroup", "examplecluster", "examplepool", "examplereplica", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicasGetSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicasGetSamples.java deleted file mode 100644 index f451e2c2e33b6..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicasGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -/** - * Samples for HorizonDbReplicas Get. - */ -public final class HorizonDbReplicasGetSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Replicas_Get.json - */ - /** - * Sample code: Get a HorizonDB replica. - * - * @param manager Entry point to HorizonDbManager. - */ - public static void getAHorizonDBReplica(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbReplicas() - .getWithResponse("exampleresourcegroup", "examplecluster", "examplepool", "examplereplica", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicasListSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicasListSamples.java deleted file mode 100644 index 3ff06967b3983..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicasListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -/** - * Samples for HorizonDbReplicas List. - */ -public final class HorizonDbReplicasListSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Replicas_List.json - */ - /** - * Sample code: List HorizonDB replicas in a pool. - * - * @param manager Entry point to HorizonDbManager. - */ - public static void listHorizonDBReplicasInAPool(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbReplicas() - .list("exampleresourcegroup", "examplecluster", "examplepool", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicasUpdateSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicasUpdateSamples.java deleted file mode 100644 index 08384d4d9f45e..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicasUpdateSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.resourcemanager.horizondb.models.HorizonDbReplica; -import com.azure.resourcemanager.horizondb.models.HorizonDbReplicaPropertiesForPatchUpdate; -import com.azure.resourcemanager.horizondb.models.ReplicaRole; - -/** - * Samples for HorizonDbReplicas Update. - */ -public final class HorizonDbReplicasUpdateSamples { - /* - * x-ms-original-file: 2026-05-01-preview/Replicas_Update.json - */ - /** - * Sample code: Update a HorizonDB replica. - * - * @param manager Entry point to HorizonDbManager. - */ - public static void updateAHorizonDBReplica(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - HorizonDbReplica resource = manager.horizonDbReplicas() - .getWithResponse("exampleresourcegroup", "examplecluster", "examplepool", "examplereplica", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new HorizonDbReplicaPropertiesForPatchUpdate().withRole(ReplicaRole.READ_WRITE)) - .apply(); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/IdentityAssignmentsCreateOrReplaceSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/IdentityAssignmentsCreateOrReplaceSamples.java new file mode 100644 index 0000000000000..2c4e7f3b4d599 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/IdentityAssignmentsCreateOrReplaceSamples.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.horizondb.generated; + +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureIdentityAssignmentProperties; + +/** + * Samples for IdentityAssignments CreateOrReplace. + */ +public final class IdentityAssignmentsCreateOrReplaceSamples { + /* + * x-ms-original-file: 2026-10-01-preview/IdentityAssignments_CreateOrReplace.json + */ + /** + * Sample code: Create a change data capture identity assignment for a UAMI attached to the parent cluster. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void createAChangeDataCaptureIdentityAssignmentForAUAMIAttachedToTheParentCluster( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.identityAssignments() + .define("fabric-writer") + .withExistingChangeDataCaptureDestination("example-resource-group", "example-cluster", "fabric-mirroring") + .withProperties(new ChangeDataCaptureIdentityAssignmentProperties().withIdentityResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fabric-writer")) + .create(); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/IdentityAssignmentsDeleteSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/IdentityAssignmentsDeleteSamples.java new file mode 100644 index 0000000000000..4b4747ddfd539 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/IdentityAssignmentsDeleteSamples.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.horizondb.generated; + +/** + * Samples for IdentityAssignments Delete. + */ +public final class IdentityAssignmentsDeleteSamples { + /* + * x-ms-original-file: 2026-10-01-preview/IdentityAssignments_Delete.json + */ + /** + * Sample code: Delete an inactive change data capture identity assignment. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void deleteAnInactiveChangeDataCaptureIdentityAssignment( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.identityAssignments() + .delete("example-resource-group", "example-cluster", "fabric-mirroring", "fabric-writer", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/IdentityAssignmentsGetSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/IdentityAssignmentsGetSamples.java new file mode 100644 index 0000000000000..645f6724c3b6d --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/IdentityAssignmentsGetSamples.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.horizondb.generated; + +/** + * Samples for IdentityAssignments Get. + */ +public final class IdentityAssignmentsGetSamples { + /* + * x-ms-original-file: 2026-10-01-preview/IdentityAssignments_Get.json + */ + /** + * Sample code: Get a change data capture identity assignment. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + getAChangeDataCaptureIdentityAssignment(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.identityAssignments() + .getWithResponse("example-resource-group", "example-cluster", "fabric-mirroring", "fabric-writer", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/IdentityAssignmentsListSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/IdentityAssignmentsListSamples.java new file mode 100644 index 0000000000000..a112c00e9659a --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/IdentityAssignmentsListSamples.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.horizondb.generated; + +/** + * Samples for IdentityAssignments List. + */ +public final class IdentityAssignmentsListSamples { + /* + * x-ms-original-file: 2026-10-01-preview/IdentityAssignments_List.json + */ + /** + * Sample code: List change data capture identity assignments. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + listChangeDataCaptureIdentityAssignments(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.identityAssignments() + .list("example-resource-group", "example-cluster", "fabric-mirroring", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationsGetSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationsGetSamples.java new file mode 100644 index 0000000000000..2446caa3a7c93 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationsGetSamples.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.horizondb.generated; + +/** + * Samples for LogCaptureConfigurations Get. + */ +public final class LogCaptureConfigurationsGetSamples { + /* + * x-ms-original-file: 2026-10-01-preview/LogCaptureConfigurations_Get.json + */ + /** + * Sample code: Get the PostgreSQL server log capture configuration. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + getThePostgreSQLServerLogCaptureConfiguration(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.logCaptureConfigurations() + .getWithResponse("example-resource-group", "example-cluster", "PostgreSqlServer", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationsListSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationsListSamples.java new file mode 100644 index 0000000000000..61058b672271a --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationsListSamples.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.horizondb.generated; + +/** + * Samples for LogCaptureConfigurations List. + */ +public final class LogCaptureConfigurationsListSamples { + /* + * x-ms-original-file: 2026-10-01-preview/LogCaptureConfigurations_List.json + */ + /** + * Sample code: List log capture configurations. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void listLogCaptureConfigurations(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.logCaptureConfigurations() + .list("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationsUpdateSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationsUpdateSamples.java new file mode 100644 index 0000000000000..1c13b9a109b10 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationsUpdateSamples.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.horizondb.generated; + +import com.azure.resourcemanager.horizondb.models.LogCaptureConfigurationForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.LogCaptureConfigurationPropertiesForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.LogCaptureState; + +/** + * Samples for LogCaptureConfigurations Update. + */ +public final class LogCaptureConfigurationsUpdateSamples { + /* + * x-ms-original-file: 2026-10-01-preview/LogCaptureConfigurations_Update.json + */ + /** + * Sample code: Disable PostgreSQL server log capture. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void disablePostgreSQLServerLogCapture(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.logCaptureConfigurations() + .update("example-resource-group", "example-cluster", "PostgreSqlServer", + new LogCaptureConfigurationForPatchUpdate().withProperties( + new LogCaptureConfigurationPropertiesForPatchUpdate().withState(LogCaptureState.DISABLED)), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/LogFilesGetSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/LogFilesGetSamples.java new file mode 100644 index 0000000000000..b0c7d9d1b3be2 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/LogFilesGetSamples.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.horizondb.generated; + +/** + * Samples for LogFiles Get. + */ +public final class LogFilesGetSamples { + /* + * x-ms-original-file: 2026-10-01-preview/LogFiles_Get.json + */ + /** + * Sample code: Get captured log file metadata. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void getCapturedLogFileMetadata(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.logFiles() + .getWithResponse("example-resource-group", "example-cluster", "11111111-1111-1111-1111-111111111111", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/LogFilesListDownloadUrlsSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/LogFilesListDownloadUrlsSamples.java new file mode 100644 index 0000000000000..a2a6070c3bb3b --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/LogFilesListDownloadUrlsSamples.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.horizondb.generated; + +/** + * Samples for LogFiles ListDownloadUrls. + */ +public final class LogFilesListDownloadUrlsSamples { + /* + * x-ms-original-file: 2026-10-01-preview/LogFiles_ListDownloadUrls.json + */ + /** + * Sample code: List a signed URL for downloading a captured log file. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + listASignedURLForDownloadingACapturedLogFile(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.logFiles() + .listDownloadUrlsWithResponse("example-resource-group", "example-cluster", + "22222222-2222-2222-2222-222222222222", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/LogFilesListSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/LogFilesListSamples.java new file mode 100644 index 0000000000000..d0fd78a0b346b --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/LogFilesListSamples.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.horizondb.generated; + +/** + * Samples for LogFiles List. + */ +public final class LogFilesListSamples { + /* + * x-ms-original-file: 2026-10-01-preview/LogFiles_List.json + */ + /** + * Sample code: List captured log files. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void listCapturedLogFiles(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.logFiles().list("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventsApplyNowSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventsApplyNowSamples.java new file mode 100644 index 0000000000000..7ceb9d3f8272a --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventsApplyNowSamples.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.horizondb.generated; + +/** + * Samples for MaintenanceEvents ApplyNow. + */ +public final class MaintenanceEventsApplyNowSamples { + /* + * x-ms-original-file: 2026-10-01-preview/MaintenanceEvents_ApplyNow.json + */ + /** + * Sample code: Apply a maintenance event immediately for a HorizonDB pool. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void applyAMaintenanceEventImmediatelyForAHorizonDBPool( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.maintenanceEvents() + .applyNow("example-resource-group", "example-cluster", "example-pool-01", "ABCD-123", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventsGetSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventsGetSamples.java new file mode 100644 index 0000000000000..792a18d1e2247 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventsGetSamples.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.horizondb.generated; + +/** + * Samples for MaintenanceEvents Get. + */ +public final class MaintenanceEventsGetSamples { + /* + * x-ms-original-file: 2026-10-01-preview/MaintenanceEvents_Get.json + */ + /** + * Sample code: Get information about a maintenance event for a HorizonDB pool. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void getInformationAboutAMaintenanceEventForAHorizonDBPool( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.maintenanceEvents() + .getWithResponse("example-resource-group", "example-cluster", "example-pool-01", "ABCD-123", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventsListSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventsListSamples.java new file mode 100644 index 0000000000000..ac860cc44c3a5 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventsListSamples.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.horizondb.generated; + +/** + * Samples for MaintenanceEvents List. + */ +public final class MaintenanceEventsListSamples { + /* + * x-ms-original-file: 2026-10-01-preview/MaintenanceEvents_ListWithFilter.json + */ + /** + * Sample code: List upcoming maintenance events for a HorizonDB pool. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + listUpcomingMaintenanceEventsForAHorizonDBPool(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.maintenanceEvents() + .list("example-resource-group", "example-cluster", "example-pool-01", + "properties/status eq 'Planned' or properties/status eq 'InProgress'", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-10-01-preview/MaintenanceEvents_List.json + */ + /** + * Sample code: List maintenance events for a HorizonDB pool. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + listMaintenanceEventsForAHorizonDBPool(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.maintenanceEvents() + .list("example-resource-group", "example-cluster", "example-pool-01", null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventsRescheduleSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventsRescheduleSamples.java new file mode 100644 index 0000000000000..91316247179c3 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventsRescheduleSamples.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.horizondb.generated; + +import com.azure.resourcemanager.horizondb.models.MaintenanceEventRescheduleRequest; +import java.time.OffsetDateTime; + +/** + * Samples for MaintenanceEvents Reschedule. + */ +public final class MaintenanceEventsRescheduleSamples { + /* + * x-ms-original-file: 2026-10-01-preview/MaintenanceEvents_Reschedule.json + */ + /** + * Sample code: Reschedule a maintenance event for a HorizonDB pool. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + rescheduleAMaintenanceEventForAHorizonDBPool(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.maintenanceEvents() + .reschedule("example-resource-group", "example-cluster", "example-pool-01", "ABCD-123", + new MaintenanceEventRescheduleRequest().withPostponeToDateTimeUtc( + OffsetDateTime.parse("2026-08-20T10:00:00Z")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorsCreateOrReplaceSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorsCreateOrReplaceSamples.java new file mode 100644 index 0000000000000..0be3691e4789e --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorsCreateOrReplaceSamples.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.horizondb.generated; + +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAdministratorPropertiesForAdd; +import com.azure.resourcemanager.horizondb.models.PrincipalTypes; + +/** + * Samples for MicrosoftEntraAdministrators CreateOrReplace. + */ +public final class MicrosoftEntraAdministratorsCreateOrReplaceSamples { + /* + * x-ms-original-file: 2026-10-01-preview/MicrosoftEntraAdministrators_CreateOrReplace.json + */ + /** + * Sample code: Create or replace a Microsoft Entra administrator for a HorizonDB cluster. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void createOrReplaceAMicrosoftEntraAdministratorForAHorizonDBCluster( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.microsoftEntraAdministrators() + .define("11111111-1111-1111-1111-111111111111") + .withExistingCluster("example-resource-group", "example-cluster") + .withProperties(new MicrosoftEntraAdministratorPropertiesForAdd() + .withPrincipalName("database.administrators@contoso.com") + .withPrincipalType(PrincipalTypes.GROUP) + .withTenantId("22222222-2222-2222-2222-222222222222")) + .create(); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorsDeleteSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorsDeleteSamples.java new file mode 100644 index 0000000000000..b09fc14f987e7 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorsDeleteSamples.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.horizondb.generated; + +/** + * Samples for MicrosoftEntraAdministrators Delete. + */ +public final class MicrosoftEntraAdministratorsDeleteSamples { + /* + * x-ms-original-file: 2026-10-01-preview/MicrosoftEntraAdministrators_Delete.json + */ + /** + * Sample code: Delete a Microsoft Entra administrator from a HorizonDB cluster. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void deleteAMicrosoftEntraAdministratorFromAHorizonDBCluster( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.microsoftEntraAdministrators() + .delete("example-resource-group", "example-cluster", "11111111-1111-1111-1111-111111111111", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorsGetSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorsGetSamples.java new file mode 100644 index 0000000000000..0863b399328f9 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorsGetSamples.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.horizondb.generated; + +/** + * Samples for MicrosoftEntraAdministrators Get. + */ +public final class MicrosoftEntraAdministratorsGetSamples { + /* + * x-ms-original-file: 2026-10-01-preview/MicrosoftEntraAdministrators_Get.json + */ + /** + * Sample code: Get a Microsoft Entra administrator for a HorizonDB cluster. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void getAMicrosoftEntraAdministratorForAHorizonDBCluster( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.microsoftEntraAdministrators() + .getWithResponse("example-resource-group", "example-cluster", "11111111-1111-1111-1111-111111111111", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorsListSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorsListSamples.java new file mode 100644 index 0000000000000..f308fa641b9c9 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorsListSamples.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.horizondb.generated; + +/** + * Samples for MicrosoftEntraAdministrators List. + */ +public final class MicrosoftEntraAdministratorsListSamples { + /* + * x-ms-original-file: 2026-10-01-preview/MicrosoftEntraAdministrators_List.json + */ + /** + * Sample code: List Microsoft Entra administrators for a HorizonDB cluster. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void listMicrosoftEntraAdministratorsForAHorizonDBCluster( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.microsoftEntraAdministrators() + .list("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAuthenticationsCreateOrReplaceSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAuthenticationsCreateOrReplaceSamples.java new file mode 100644 index 0000000000000..118bae7e18467 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAuthenticationsCreateOrReplaceSamples.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.horizondb.generated; + +import com.azure.resourcemanager.horizondb.fluent.models.MicrosoftEntraAuthenticationInner; +import com.azure.resourcemanager.horizondb.models.AuthenticationState; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAuthenticationProperties; + +/** + * Samples for MicrosoftEntraAuthentications CreateOrReplace. + */ +public final class MicrosoftEntraAuthenticationsCreateOrReplaceSamples { + /* + * x-ms-original-file: 2026-10-01-preview/MicrosoftEntraAuthentications_CreateOrReplaceDisabled.json + */ + /** + * Sample code: Disable Microsoft Entra authentication declaratively. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + disableMicrosoftEntraAuthenticationDeclaratively(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.microsoftEntraAuthentications() + .createOrReplace("example-resource-group", "example-cluster", + new MicrosoftEntraAuthenticationInner().withProperties( + new MicrosoftEntraAuthenticationProperties().withState(AuthenticationState.DISABLED)), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-10-01-preview/MicrosoftEntraAuthentications_CreateOrReplaceEnabled.json + */ + /** + * Sample code: Enable Microsoft Entra authentication declaratively. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + enableMicrosoftEntraAuthenticationDeclaratively(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.microsoftEntraAuthentications() + .createOrReplace("example-resource-group", "example-cluster", + new MicrosoftEntraAuthenticationInner().withProperties( + new MicrosoftEntraAuthenticationProperties().withState(AuthenticationState.ENABLED)), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAuthenticationsGetSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAuthenticationsGetSamples.java new file mode 100644 index 0000000000000..f0bcd51c31a80 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAuthenticationsGetSamples.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.horizondb.generated; + +/** + * Samples for MicrosoftEntraAuthentications Get. + */ +public final class MicrosoftEntraAuthenticationsGetSamples { + /* + * x-ms-original-file: 2026-10-01-preview/MicrosoftEntraAuthentications_Get.json + */ + /** + * Sample code: Get the Microsoft Entra authentication method. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + getTheMicrosoftEntraAuthenticationMethod(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.microsoftEntraAuthentications() + .getWithResponse("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAuthenticationsUpdateSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAuthenticationsUpdateSamples.java new file mode 100644 index 0000000000000..4f5fea54cae2f --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAuthenticationsUpdateSamples.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.horizondb.generated; + +import com.azure.resourcemanager.horizondb.models.AuthenticationState; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAuthenticationForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAuthenticationPropertiesForPatchUpdate; + +/** + * Samples for MicrosoftEntraAuthentications Update. + */ +public final class MicrosoftEntraAuthenticationsUpdateSamples { + /* + * x-ms-original-file: 2026-10-01-preview/MicrosoftEntraAuthentications_Disable.json + */ + /** + * Sample code: Disable Microsoft Entra authentication without modifying existing database roles. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void disableMicrosoftEntraAuthenticationWithoutModifyingExistingDatabaseRoles( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.microsoftEntraAuthentications() + .update("example-resource-group", "example-cluster", + new MicrosoftEntraAuthenticationForPatchUpdate().withProperties( + new MicrosoftEntraAuthenticationPropertiesForPatchUpdate().withState(AuthenticationState.DISABLED)), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-10-01-preview/MicrosoftEntraAuthentications_Enable.json + */ + /** + * Sample code: Start enabling Microsoft Entra authentication. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + startEnablingMicrosoftEntraAuthentication(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.microsoftEntraAuthentications() + .update("example-resource-group", "example-cluster", + new MicrosoftEntraAuthenticationForPatchUpdate().withProperties( + new MicrosoftEntraAuthenticationPropertiesForPatchUpdate().withState(AuthenticationState.ENABLED)), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/NodesGetSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/NodesGetSamples.java new file mode 100644 index 0000000000000..7fa67e39a1da6 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/NodesGetSamples.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.horizondb.generated; + +/** + * Samples for Nodes Get. + */ +public final class NodesGetSamples { + /* + * x-ms-original-file: 2026-10-01-preview/Nodes_Get.json + */ + /** + * Sample code: Get a HorizonDB node. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void getAHorizonDBNode(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.nodes() + .getWithResponse("example-resource-group", "example-cluster", "example-pool-01", "node-01", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/NodesListSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/NodesListSamples.java new file mode 100644 index 0000000000000..99afc4fdc0fa5 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/NodesListSamples.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.horizondb.generated; + +/** + * Samples for Nodes List. + */ +public final class NodesListSamples { + /* + * x-ms-original-file: 2026-10-01-preview/Nodes_List.json + */ + /** + * Sample code: List the nodes allocated to a HorizonDB pool. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + listTheNodesAllocatedToAHorizonDBPool(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.nodes() + .list("example-resource-group", "example-cluster", "example-pool-01", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/OperationsListSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/OperationsListSamples.java index 7bcc932d5678b..87e22eb484198 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/OperationsListSamples.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/OperationsListSamples.java @@ -9,15 +9,15 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: 2026-05-01-preview/Operations_List.json + * x-ms-original-file: 2026-10-01-preview/Operations_List.json */ /** - * Sample code: List operations for Microsoft.HorizonDB. + * Sample code: List operations for Microsoft.HorizonDb. * * @param manager Entry point to HorizonDbManager. */ public static void - listOperationsForMicrosoftHorizonDB(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + listOperationsForMicrosoftHorizonDb(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { manager.operations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsCreateOrReplaceSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsCreateOrReplaceSamples.java new file mode 100644 index 0000000000000..6a5bd3983c929 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsCreateOrReplaceSamples.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.horizondb.generated; + +import com.azure.resourcemanager.horizondb.models.ParameterGroupProperties; +import com.azure.resourcemanager.horizondb.models.ParameterProperties; +import com.azure.resourcemanager.horizondb.models.PostgreSqlVersion; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ParameterGroups CreateOrReplace. + */ +public final class ParameterGroupsCreateOrReplaceSamples { + /* + * x-ms-original-file: 2026-10-01-preview/ParameterGroups_CreateOrReplace.json + */ + /** + * Sample code: Create or replace a HorizonDB parameter group for a PostgreSQL version. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void createOrReplaceAHorizonDBParameterGroupForAPostgreSQLVersion( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.parameterGroups() + .define("production-parameters") + .withRegion("eastus2") + .withExistingResourceGroup("example-resource-group") + .withTags(mapOf("environment", "production")) + .withProperties(new ParameterGroupProperties() + .withParameters(Arrays.asList( + new ParameterProperties().withName("application_name").withValue("horizondb-production"), + new ParameterProperties().withName("autovacuum").withValue("off"), + new ParameterProperties().withName("wal_receiver_timeout").withValue("45000"), + new ParameterProperties().withName("work_mem").withValue("8192"), + new ParameterProperties().withName("xmlbinary").withValue("base64"))) + .withDescription("Parameters for production transactional workloads") + .withPostgreSqlVersion(PostgreSqlVersion.V17)) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsDeleteSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsDeleteSamples.java similarity index 61% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsDeleteSamples.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsDeleteSamples.java index 3005a3a96db07..623da082cb8a1 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsDeleteSamples.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsDeleteSamples.java @@ -5,11 +5,11 @@ package com.azure.resourcemanager.horizondb.generated; /** - * Samples for HorizonDbParameterGroups Delete. + * Samples for ParameterGroups Delete. */ -public final class HorizonDbParameterGroupsDeleteSamples { +public final class ParameterGroupsDeleteSamples { /* - * x-ms-original-file: 2026-05-01-preview/ParameterGroups_Delete.json + * x-ms-original-file: 2026-10-01-preview/ParameterGroups_Delete.json */ /** * Sample code: Delete a HorizonDB parameter group. @@ -17,7 +17,7 @@ public final class HorizonDbParameterGroupsDeleteSamples { * @param manager Entry point to HorizonDbManager. */ public static void deleteAHorizonDBParameterGroup(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbParameterGroups() - .delete("exampleresourcegroup", "exampleparametergroup", com.azure.core.util.Context.NONE); + manager.parameterGroups() + .delete("example-resource-group", "production-parameters", com.azure.core.util.Context.NONE); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsGetByResourceGroupSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsGetByResourceGroupSamples.java similarity index 62% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsGetByResourceGroupSamples.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsGetByResourceGroupSamples.java index 9ed4eb3d20c91..d01742deaabeb 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsGetByResourceGroupSamples.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsGetByResourceGroupSamples.java @@ -5,11 +5,11 @@ package com.azure.resourcemanager.horizondb.generated; /** - * Samples for HorizonDbParameterGroups GetByResourceGroup. + * Samples for ParameterGroups GetByResourceGroup. */ -public final class HorizonDbParameterGroupsGetByResourceGroupSamples { +public final class ParameterGroupsGetByResourceGroupSamples { /* - * x-ms-original-file: 2026-05-01-preview/ParameterGroups_Get.json + * x-ms-original-file: 2026-10-01-preview/ParameterGroups_Get.json */ /** * Sample code: Get a HorizonDB parameter group. @@ -17,8 +17,8 @@ public final class HorizonDbParameterGroupsGetByResourceGroupSamples { * @param manager Entry point to HorizonDbManager. */ public static void getAHorizonDBParameterGroup(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbParameterGroups() - .getByResourceGroupWithResponse("exampleresourcegroup", "exampleparametergroup", + manager.parameterGroups() + .getByResourceGroupWithResponse("example-resource-group", "production-parameters", com.azure.core.util.Context.NONE); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsListByResourceGroupSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsListByResourceGroupSamples.java similarity index 62% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsListByResourceGroupSamples.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsListByResourceGroupSamples.java index 51664733d0e87..74983c656f972 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsListByResourceGroupSamples.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsListByResourceGroupSamples.java @@ -5,11 +5,11 @@ package com.azure.resourcemanager.horizondb.generated; /** - * Samples for HorizonDbParameterGroups ListByResourceGroup. + * Samples for ParameterGroups ListByResourceGroup. */ -public final class HorizonDbParameterGroupsListByResourceGroupSamples { +public final class ParameterGroupsListByResourceGroupSamples { /* - * x-ms-original-file: 2026-05-01-preview/ParameterGroups_ListByResourceGroup.json + * x-ms-original-file: 2026-10-01-preview/ParameterGroups_ListByResourceGroup.json */ /** * Sample code: List HorizonDB parameter groups in a resource group. @@ -18,7 +18,6 @@ public final class HorizonDbParameterGroupsListByResourceGroupSamples { */ public static void listHorizonDBParameterGroupsInAResourceGroup(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbParameterGroups() - .listByResourceGroup("exampleresourcegroup", com.azure.core.util.Context.NONE); + manager.parameterGroups().listByResourceGroup("example-resource-group", com.azure.core.util.Context.NONE); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsListConnectionsSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsListConnectionsSamples.java new file mode 100644 index 0000000000000..6c2586efd9051 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsListConnectionsSamples.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.horizondb.generated; + +/** + * Samples for ParameterGroups ListConnections. + */ +public final class ParameterGroupsListConnectionsSamples { + /* + * x-ms-original-file: 2026-10-01-preview/ParameterGroups_ListConnections.json + */ + /** + * Sample code: List HorizonDB pools connected to a parameter group. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + listHorizonDBPoolsConnectedToAParameterGroup(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.parameterGroups() + .listConnections("example-resource-group", "production-parameters", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsListSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsListSamples.java similarity index 68% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsListSamples.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsListSamples.java index c087d57a39643..ca757d84d123c 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsListSamples.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsListSamples.java @@ -5,11 +5,11 @@ package com.azure.resourcemanager.horizondb.generated; /** - * Samples for HorizonDbParameterGroups List. + * Samples for ParameterGroups List. */ -public final class HorizonDbParameterGroupsListSamples { +public final class ParameterGroupsListSamples { /* - * x-ms-original-file: 2026-05-01-preview/ParameterGroups_ListBySubscription.json + * x-ms-original-file: 2026-10-01-preview/ParameterGroups_ListBySubscription.json */ /** * Sample code: List HorizonDB parameter groups in a subscription. @@ -18,6 +18,6 @@ public final class HorizonDbParameterGroupsListSamples { */ public static void listHorizonDBParameterGroupsInASubscription(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbParameterGroups().list(com.azure.core.util.Context.NONE); + manager.parameterGroups().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsUpdateSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsUpdateSamples.java new file mode 100644 index 0000000000000..b320ea80cb758 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsUpdateSamples.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.horizondb.generated; + +import com.azure.resourcemanager.horizondb.models.ParameterGroup; +import com.azure.resourcemanager.horizondb.models.ParameterGroupPropertiesForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.ParameterProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ParameterGroups Update. + */ +public final class ParameterGroupsUpdateSamples { + /* + * x-ms-original-file: 2026-10-01-preview/ParameterGroups_Update.json + */ + /** + * Sample code: Update a HorizonDB parameter group. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void updateAHorizonDBParameterGroup(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + ParameterGroup resource = manager.parameterGroups() + .getByResourceGroupWithResponse("example-resource-group", "production-parameters", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("environment", "production", "team", "data-platform")) + .withProperties(new ParameterGroupPropertiesForPatchUpdate() + .withParameters(Arrays.asList( + new ParameterProperties().withName("application_name").withValue("horizondb-production"), + new ParameterProperties().withName("autovacuum").withValue("off"), + new ParameterProperties().withName("wal_receiver_timeout").withValue("45000"), + new ParameterProperties().withName("work_mem").withValue("8192"), + new ParameterProperties().withName("xmlbinary").withValue("base64"))) + .withDescription("Updated parameters for production transactional workloads")) + .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/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PasswordAuthenticationsCreateOrReplaceSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PasswordAuthenticationsCreateOrReplaceSamples.java new file mode 100644 index 0000000000000..f5bb9dfb0702d --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PasswordAuthenticationsCreateOrReplaceSamples.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.horizondb.generated; + +import com.azure.resourcemanager.horizondb.fluent.models.PasswordAuthenticationInner; +import com.azure.resourcemanager.horizondb.models.AuthenticationState; +import com.azure.resourcemanager.horizondb.models.PasswordAuthenticationProperties; + +/** + * Samples for PasswordAuthentications CreateOrReplace. + */ +public final class PasswordAuthenticationsCreateOrReplaceSamples { + /* + * x-ms-original-file: 2026-10-01-preview/PasswordAuthentications_CreateOrReplace.json + */ + /** + * Sample code: Enable password authentication and set the administrator login and password during initial setup. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void enablePasswordAuthenticationAndSetTheAdministratorLoginAndPasswordDuringInitialSetup( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.passwordAuthentications() + .createOrReplace("example-resource-group", "example-cluster", + new PasswordAuthenticationInner() + .withProperties(new PasswordAuthenticationProperties().withState(AuthenticationState.ENABLED) + .withAdministratorLogin("adminlogin1") + .withAdministratorLoginPassword("fakeTokenPlaceholder")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PasswordAuthenticationsGetSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PasswordAuthenticationsGetSamples.java new file mode 100644 index 0000000000000..f463cba6c3326 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PasswordAuthenticationsGetSamples.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.horizondb.generated; + +/** + * Samples for PasswordAuthentications Get. + */ +public final class PasswordAuthenticationsGetSamples { + /* + * x-ms-original-file: 2026-10-01-preview/PasswordAuthentications_Get.json + */ + /** + * Sample code: Get the password authentication method. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + getThePasswordAuthenticationMethod(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.passwordAuthentications() + .getWithResponse("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PasswordAuthenticationsUpdateSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PasswordAuthenticationsUpdateSamples.java new file mode 100644 index 0000000000000..5d120ea455a8b --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PasswordAuthenticationsUpdateSamples.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.horizondb.generated; + +import com.azure.resourcemanager.horizondb.models.AuthenticationState; +import com.azure.resourcemanager.horizondb.models.PasswordAuthenticationForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.PasswordAuthenticationPropertiesForPatchUpdate; + +/** + * Samples for PasswordAuthentications Update. + */ +public final class PasswordAuthenticationsUpdateSamples { + /* + * x-ms-original-file: 2026-10-01-preview/PasswordAuthentications_ResetPassword.json + */ + /** + * Sample code: Reset the sole PostgreSQL administrator role password. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + resetTheSolePostgreSQLAdministratorRolePassword(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.passwordAuthentications() + .update("example-resource-group", "example-cluster", + new PasswordAuthenticationForPatchUpdate() + .withProperties(new PasswordAuthenticationPropertiesForPatchUpdate() + .withAdministratorLoginPassword("fakeTokenPlaceholder")), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-10-01-preview/PasswordAuthentications_Enable.json + */ + /** + * Sample code: Enable password authentication and reset the existing administrator password. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void enablePasswordAuthenticationAndResetTheExistingAdministratorPassword( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.passwordAuthentications() + .update("example-resource-group", "example-cluster", + new PasswordAuthenticationForPatchUpdate().withProperties( + new PasswordAuthenticationPropertiesForPatchUpdate().withState(AuthenticationState.ENABLED) + .withAdministratorLoginPassword("fakeTokenPlaceholder")), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-10-01-preview/PasswordAuthentications_Disable.json + */ + /** + * Sample code: Disable password authentication. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void disablePasswordAuthentication(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.passwordAuthentications() + .update("example-resource-group", "example-cluster", + new PasswordAuthenticationForPatchUpdate().withProperties( + new PasswordAuthenticationPropertiesForPatchUpdate().withState(AuthenticationState.DISABLED)), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PoolsCreateOrReplaceSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PoolsCreateOrReplaceSamples.java new file mode 100644 index 0000000000000..df64e708921db --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PoolsCreateOrReplaceSamples.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.horizondb.generated; + +import com.azure.resourcemanager.horizondb.models.ComputeProcessorType; +import com.azure.resourcemanager.horizondb.models.ParameterApplyMethod; +import com.azure.resourcemanager.horizondb.models.PoolComputeModel; +import com.azure.resourcemanager.horizondb.models.PoolComputeModelType; +import com.azure.resourcemanager.horizondb.models.PoolHighAvailability; +import com.azure.resourcemanager.horizondb.models.PoolHighAvailabilityMode; +import com.azure.resourcemanager.horizondb.models.PoolParameterGroupReference; +import com.azure.resourcemanager.horizondb.models.PoolProperties; +import com.azure.resourcemanager.horizondb.models.SystemScheduledMaintenanceProperties; + +/** + * Samples for Pools CreateOrReplace. + */ +public final class PoolsCreateOrReplaceSamples { + /* + * x-ms-original-file: 2026-10-01-preview/Pools_CreateOrReplace.json + */ + /** + * Sample code: Create a minimum provisioned HorizonDB pool. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + createAMinimumProvisionedHorizonDBPool(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.pools() + .define("example-pool-01") + .withExistingCluster("example-resource-group", "example-cluster") + .withProperties(new PoolProperties() + .withComputeModel(new PoolComputeModel().withType(PoolComputeModelType.PROVISIONED) + .withComputeProcessor(ComputeProcessorType.AMD) + .withComputeGeneration(3) + .withVCores(2)) + .withNodeCount(1) + .withHighAvailability(new PoolHighAvailability().withMode(PoolHighAvailabilityMode.DISABLED)) + .withParameterGroup(new PoolParameterGroupReference().withParameterGroupResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.HorizonDb/locations/eastus2/parameterGroups/default-postgresql-17-provisioned") + .withApplyMethod(ParameterApplyMethod.IMMEDIATE)) + .withScheduledMaintenance(new SystemScheduledMaintenanceProperties())) + .create(); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PoolsDeleteSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PoolsDeleteSamples.java new file mode 100644 index 0000000000000..ca3bd6628140c --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PoolsDeleteSamples.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.horizondb.generated; + +/** + * Samples for Pools Delete. + */ +public final class PoolsDeleteSamples { + /* + * x-ms-original-file: 2026-10-01-preview/Pools_Delete.json + */ + /** + * Sample code: Delete the last HorizonDB pool and disconnect private endpoint connections. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void deleteTheLastHorizonDBPoolAndDisconnectPrivateEndpointConnections( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.pools() + .delete("example-resource-group", "example-cluster", "example-pool-01", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPoolsGetSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PoolsGetSamples.java similarity index 61% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPoolsGetSamples.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PoolsGetSamples.java index 288b1153e02e5..d1ef913424a08 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPoolsGetSamples.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PoolsGetSamples.java @@ -5,11 +5,11 @@ package com.azure.resourcemanager.horizondb.generated; /** - * Samples for HorizonDbPools Get. + * Samples for Pools Get. */ -public final class HorizonDbPoolsGetSamples { +public final class PoolsGetSamples { /* - * x-ms-original-file: 2026-05-01-preview/Pools_Get.json + * x-ms-original-file: 2026-10-01-preview/Pools_Get.json */ /** * Sample code: Get a HorizonDB pool. @@ -17,7 +17,8 @@ public final class HorizonDbPoolsGetSamples { * @param manager Entry point to HorizonDbManager. */ public static void getAHorizonDBPool(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbPools() - .getWithResponse("exampleresourcegroup", "examplecluster", "examplepool", com.azure.core.util.Context.NONE); + manager.pools() + .getWithResponse("example-resource-group", "example-cluster", "example-pool-01", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPoolsListSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PoolsListSamples.java similarity index 65% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPoolsListSamples.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PoolsListSamples.java index 0431a533319fb..579094326d865 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPoolsListSamples.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PoolsListSamples.java @@ -5,11 +5,11 @@ package com.azure.resourcemanager.horizondb.generated; /** - * Samples for HorizonDbPools List. + * Samples for Pools List. */ -public final class HorizonDbPoolsListSamples { +public final class PoolsListSamples { /* - * x-ms-original-file: 2026-05-01-preview/Pools_List.json + * x-ms-original-file: 2026-10-01-preview/Pools_List.json */ /** * Sample code: List HorizonDB pools in a cluster. @@ -17,6 +17,6 @@ public final class HorizonDbPoolsListSamples { * @param manager Entry point to HorizonDbManager. */ public static void listHorizonDBPoolsInACluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbPools().list("exampleresourcegroup", "examplecluster", com.azure.core.util.Context.NONE); + manager.pools().list("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PoolsRestartSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PoolsRestartSamples.java new file mode 100644 index 0000000000000..8b6d8b425c3c5 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PoolsRestartSamples.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.horizondb.generated; + +/** + * Samples for Pools Restart. + */ +public final class PoolsRestartSamples { + /* + * x-ms-original-file: 2026-10-01-preview/Pools_Restart.json + */ + /** + * Sample code: Restart a HorizonDB pool and apply pending parameter changes. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void restartAHorizonDBPoolAndApplyPendingParameterChanges( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.pools() + .restart("exampleresourcegroup", "examplecluster", "example-pool-01", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PoolsStartSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PoolsStartSamples.java new file mode 100644 index 0000000000000..81d4856e2b1ad --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PoolsStartSamples.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.horizondb.generated; + +/** + * Samples for Pools Start. + */ +public final class PoolsStartSamples { + /* + * x-ms-original-file: 2026-10-01-preview/Pools_Start.json + */ + /** + * Sample code: Start a HorizonDB pool without applying pending parameter changes. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void startAHorizonDBPoolWithoutApplyingPendingParameterChanges( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.pools() + .start("exampleresourcegroup", "examplecluster", "example-pool-01", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PoolsStopSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PoolsStopSamples.java new file mode 100644 index 0000000000000..02ec33dd49b7e --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PoolsStopSamples.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.horizondb.generated; + +/** + * Samples for Pools Stop. + */ +public final class PoolsStopSamples { + /* + * x-ms-original-file: 2026-10-01-preview/Pools_Stop.json + */ + /** + * Sample code: Stop and deallocate a HorizonDB pool without applying pending parameter changes. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void stopAndDeallocateAHorizonDBPoolWithoutApplyingPendingParameterChanges( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.pools() + .stop("exampleresourcegroup", "examplecluster", "example-pool-01", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PoolsUpdateSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PoolsUpdateSamples.java new file mode 100644 index 0000000000000..7939028622f4c --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PoolsUpdateSamples.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.horizondb.generated; + +import com.azure.resourcemanager.horizondb.models.ParameterApplyMethod; +import com.azure.resourcemanager.horizondb.models.Pool; +import com.azure.resourcemanager.horizondb.models.PoolComputeModelForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.PoolHighAvailabilityMode; +import com.azure.resourcemanager.horizondb.models.PoolHighAvailabilityPatch; +import com.azure.resourcemanager.horizondb.models.PoolParameterGroupReferenceForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.PoolPropertiesForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.ScheduledMaintenanceManagementType; +import com.azure.resourcemanager.horizondb.models.ScheduledMaintenancePropertiesForPatchUpdate; + +/** + * Samples for Pools Update. + */ +public final class PoolsUpdateSamples { + /* + * x-ms-original-file: 2026-10-01-preview/Pools_Update.json + */ + /** + * Sample code: Update a single HorizonDB pool compute property. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + updateASingleHorizonDBPoolComputeProperty(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + Pool resource = manager.pools() + .getWithResponse("example-resource-group", "example-cluster", "example-pool-01", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties( + new PoolPropertiesForPatchUpdate().withComputeModel(new PoolComputeModelForPatchUpdate().withVCores(16)) + .withScheduledMaintenance(new ScheduledMaintenancePropertiesForPatchUpdate() + .withMaintenanceManagementType(ScheduledMaintenanceManagementType.SYSTEM))) + .apply(); + } + + /* + * x-ms-original-file: 2026-10-01-preview/Pools_UpdateParameterGroupDefault.json + */ + /** + * Sample code: Switch a HorizonDB pool back to its corresponding default parameter group. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void switchAHorizonDBPoolBackToItsCorrespondingDefaultParameterGroup( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + Pool resource = manager.pools() + .getWithResponse("example-resource-group", "example-cluster", "example-pool-01", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new PoolPropertiesForPatchUpdate() + .withParameterGroup(new PoolParameterGroupReferenceForPatchUpdate().withParameterGroupResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.HorizonDb/locations/eastus2/parameterGroups/default-postgresql-17-provisioned") + .withApplyMethod(ParameterApplyMethod.IMMEDIATE))) + .apply(); + } + + /* + * x-ms-original-file: 2026-10-01-preview/Pools_UpdateParameterGroupImmediate.json + */ + /** + * Sample code: Associate a HorizonDB pool with a parameter group immediately. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void associateAHorizonDBPoolWithAParameterGroupImmediately( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + Pool resource = manager.pools() + .getWithResponse("example-resource-group", "example-cluster", "example-pool-01", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new PoolPropertiesForPatchUpdate() + .withParameterGroup(new PoolParameterGroupReferenceForPatchUpdate().withParameterGroupResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/parameterGroups/production-parameters") + .withApplyMethod(ParameterApplyMethod.IMMEDIATE))) + .apply(); + } + + /* + * x-ms-original-file: 2026-10-01-preview/Pools_UpdateParameterGroupPendingReboot.json + */ + /** + * Sample code: Associate a HorizonDB pool with a parameter group pending reboot. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void associateAHorizonDBPoolWithAParameterGroupPendingReboot( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + Pool resource = manager.pools() + .getWithResponse("example-resource-group", "example-cluster", "example-pool-01", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new PoolPropertiesForPatchUpdate() + .withParameterGroup(new PoolParameterGroupReferenceForPatchUpdate().withParameterGroupResourceId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/parameterGroups/maintenance-window-parameters") + .withApplyMethod(ParameterApplyMethod.PENDING_REBOOT))) + .apply(); + } + + /* + * x-ms-original-file: 2026-10-01-preview/Pools_UpdateHighAvailabilityMode.json + */ + /** + * Sample code: Require zone-redundant placement for a HorizonDB pool. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + requireZoneRedundantPlacementForAHorizonDBPool(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + Pool resource = manager.pools() + .getWithResponse("example-resource-group", "example-cluster", "example-pool-01", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new PoolPropertiesForPatchUpdate().withHighAvailability( + new PoolHighAvailabilityPatch().withMode(PoolHighAvailabilityMode.ZONE_REDUNDANT))) + .apply(); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionsApproveOrRejectSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionsApproveOrRejectSamples.java new file mode 100644 index 0000000000000..b87fbfe5c255d --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionsApproveOrRejectSamples.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.horizondb.generated; + +import com.azure.resourcemanager.horizondb.models.PrivateEndpointConnectionProperties; +import com.azure.resourcemanager.horizondb.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.horizondb.models.PrivateLinkServiceConnectionState; + +/** + * Samples for PrivateEndpointConnections ApproveOrReject. + */ +public final class PrivateEndpointConnectionsApproveOrRejectSamples { + /* + * x-ms-original-file: 2026-10-01-preview/PrivateEndpointConnections_ApproveOrReject.json + */ + /** + * Sample code: Approve or reject a private endpoint connection. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void + approveOrRejectAPrivateEndpointConnection(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.privateEndpointConnections() + .define("example-private-endpoint-connection") + .withExistingCluster("example-resource-group", "example-cluster") + .withProperties(new PrivateEndpointConnectionProperties().withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withDescription("Approved for the production database network"))) + .create(); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateEndpointConnectionsDeleteSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionsDeleteSamples.java similarity index 59% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateEndpointConnectionsDeleteSamples.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionsDeleteSamples.java index 65bdaace277b4..410176f0097ff 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -5,11 +5,11 @@ package com.azure.resourcemanager.horizondb.generated; /** - * Samples for HorizonDbPrivateEndpointConnections Delete. + * Samples for PrivateEndpointConnections Delete. */ -public final class HorizonDbPrivateEndpointConnectionsDeleteSamples { +public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: 2026-05-01-preview/PrivateEndpointConnections_Delete.json + * x-ms-original-file: 2026-10-01-preview/PrivateEndpointConnections_Delete.json */ /** * Sample code: Delete a private endpoint connection. @@ -17,9 +17,8 @@ public final class HorizonDbPrivateEndpointConnectionsDeleteSamples { * @param manager Entry point to HorizonDbManager. */ public static void deleteAPrivateEndpointConnection(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { - manager.horizonDbPrivateEndpointConnections() - .delete("exampleresourcegroup", "examplecluster", - "exampleprivateendpointconnection.1fa229cd-bf3f-47f0-8c49-afb36723997e", + manager.privateEndpointConnections() + .delete("example-resource-group", "example-cluster", "example-private-endpoint-connection", com.azure.core.util.Context.NONE); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionsGetSamples.java new file mode 100644 index 0000000000000..ded55309e2dfe --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionsGetSamples.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.horizondb.generated; + +/** + * Samples for PrivateEndpointConnections Get. + */ +public final class PrivateEndpointConnectionsGetSamples { + /* + * x-ms-original-file: 2026-10-01-preview/PrivateEndpointConnections_GetDisconnectedAfterLastPoolDeletion.json + */ + /** + * Sample code: Get a private endpoint connection disconnected after the last pool was deleted. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void getAPrivateEndpointConnectionDisconnectedAfterTheLastPoolWasDeleted( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.privateEndpointConnections() + .getWithResponse("example-resource-group", "example-cluster", "example-private-endpoint-connection", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-10-01-preview/PrivateEndpointConnections_Get.json + */ + /** + * Sample code: Get a private endpoint connection. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void getAPrivateEndpointConnection(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.privateEndpointConnections() + .getWithResponse("example-resource-group", "example-cluster", "example-private-endpoint-connection", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionsListSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionsListSamples.java new file mode 100644 index 0000000000000..332e20d097d60 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionsListSamples.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.horizondb.generated; + +/** + * Samples for PrivateEndpointConnections List. + */ +public final class PrivateEndpointConnectionsListSamples { + /* + * x-ms-original-file: 2026-10-01-preview/PrivateEndpointConnections_List.json + */ + /** + * Sample code: List private endpoint connections on a HorizonDB cluster. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void listPrivateEndpointConnectionsOnAHorizonDBCluster( + com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.privateEndpointConnections() + .list("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PrivateLinkResourcesGetSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PrivateLinkResourcesGetSamples.java new file mode 100644 index 0000000000000..1856918694b11 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PrivateLinkResourcesGetSamples.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.horizondb.generated; + +/** + * Samples for PrivateLinkResources Get. + */ +public final class PrivateLinkResourcesGetSamples { + /* + * x-ms-original-file: 2026-10-01-preview/PrivateLinkResources_Get.json + */ + /** + * Sample code: Get a HorizonDB private link resource. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void getAHorizonDBPrivateLinkResource(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.privateLinkResources() + .getWithResponse("example-resource-group", "example-cluster", "example-cluster", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PrivateLinkResourcesListSamples.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PrivateLinkResourcesListSamples.java new file mode 100644 index 0000000000000..e030d96effba7 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/samples/java/com/azure/resourcemanager/horizondb/generated/PrivateLinkResourcesListSamples.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.horizondb.generated; + +/** + * Samples for PrivateLinkResources List. + */ +public final class PrivateLinkResourcesListSamples { + /* + * x-ms-original-file: 2026-10-01-preview/PrivateLinkResources_List.json + */ + /** + * Sample code: List HorizonDB private link resources. + * + * @param manager Entry point to HorizonDbManager. + */ + public static void listHorizonDBPrivateLinkResources(com.azure.resourcemanager.horizondb.HorizonDbManager manager) { + manager.privateLinkResources() + .list("example-resource-group", "example-cluster", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ActivateChangeDataCaptureIdentityRequestTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ActivateChangeDataCaptureIdentityRequestTests.java new file mode 100644 index 0000000000000..6ac31474804ad --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ActivateChangeDataCaptureIdentityRequestTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ActivateChangeDataCaptureIdentityRequest; +import org.junit.jupiter.api.Assertions; + +public final class ActivateChangeDataCaptureIdentityRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ActivateChangeDataCaptureIdentityRequest model + = BinaryData.fromString("{\"identityAssignmentResourceId\":\"ayffim\",\"drainExistingSessions\":false}") + .toObject(ActivateChangeDataCaptureIdentityRequest.class); + Assertions.assertEquals("ayffim", model.identityAssignmentResourceId()); + Assertions.assertFalse(model.drainExistingSessions()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ActivateChangeDataCaptureIdentityRequest model + = new ActivateChangeDataCaptureIdentityRequest().withIdentityAssignmentResourceId("ayffim") + .withDrainExistingSessions(false); + model = BinaryData.fromObject(model).toObject(ActivateChangeDataCaptureIdentityRequest.class); + Assertions.assertEquals("ayffim", model.identityAssignmentResourceId()); + Assertions.assertFalse(model.drainExistingSessions()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ActivateChangeDataCaptureIdentityResultInnerTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ActivateChangeDataCaptureIdentityResultInnerTests.java new file mode 100644 index 0000000000000..47c9ef844962c --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ActivateChangeDataCaptureIdentityResultInnerTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.fluent.models.ActivateChangeDataCaptureIdentityResultInner; + +public final class ActivateChangeDataCaptureIdentityResultInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ActivateChangeDataCaptureIdentityResultInner model = BinaryData.fromString( + "{\"targetIdentityAssignmentResourceId\":\"tuzqogsexne\",\"previousIdentityAssignmentResourceId\":\"dnw\"}") + .toObject(ActivateChangeDataCaptureIdentityResultInner.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/AuthenticationInnerTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/AuthenticationInnerTests.java new file mode 100644 index 0000000000000..72c6dea2b8cbe --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/AuthenticationInnerTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.fluent.models.AuthenticationInner; + +public final class AuthenticationInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AuthenticationInner model = BinaryData.fromString( + "{\"properties\":{\"state\":\"Enabled\",\"provisioningState\":\"Provisioning\"},\"id\":\"ik\",\"name\":\"wggxkallat\",\"type\":\"elwuipi\"}") + .toObject(AuthenticationInner.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/AuthenticationListResultTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/AuthenticationListResultTests.java new file mode 100644 index 0000000000000..ab810a9373fca --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/AuthenticationListResultTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.implementation.models.AuthenticationListResult; +import org.junit.jupiter.api.Assertions; + +public final class AuthenticationListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AuthenticationListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"state\":\"Enabled\",\"provisioningState\":\"Succeeded\"},\"id\":\"ldtlwwr\",\"name\":\"kdmtncvokotll\",\"type\":\"d\"},{\"properties\":{\"state\":\"Enabled\",\"provisioningState\":\"Provisioning\"},\"id\":\"cogjltdtbn\",\"name\":\"hadoocrk\",\"type\":\"cikhnv\"}],\"nextLink\":\"mqg\"}") + .toObject(AuthenticationListResult.class); + Assertions.assertEquals("mqg", model.nextLink()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/AuthenticationPropertiesTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/AuthenticationPropertiesTests.java new file mode 100644 index 0000000000000..1b559556e98fc --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/AuthenticationPropertiesTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.AuthenticationProperties; + +public final class AuthenticationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AuthenticationProperties model + = BinaryData.fromString("{\"state\":\"Disabled\",\"provisioningState\":\"Canceled\"}") + .toObject(AuthenticationProperties.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersStartMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/AuthenticationsListMockTests.java similarity index 68% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersStartMockTests.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/AuthenticationsListMockTests.java index c5853e1cbebc7..765ee94de1a1e 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersStartMockTests.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/AuthenticationsListMockTests.java @@ -6,19 +6,22 @@ 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.horizondb.HorizonDbManager; +import com.azure.resourcemanager.horizondb.models.Authentication; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class HorizonDbClustersStartMockTests { +public final class AuthenticationsListMockTests { @Test - public void testStart() throws Exception { - String responseStr = "{}"; + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"state\":\"Disabled\",\"provisioningState\":\"Succeeded\"},\"id\":\"reljeamur\",\"name\":\"zmlovuanash\",\"type\":\"xlpm\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -27,7 +30,8 @@ public void testStart() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.horizonDbClusters().start("podxunkb", "bxmubyynt", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.authentications().list("cvjtszcofiz", "htd", com.azure.core.util.Context.NONE); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/BackupPropertiesForPatchUpdateTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/BackupPropertiesForPatchUpdateTests.java new file mode 100644 index 0000000000000..81bd7ad7a84e0 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/BackupPropertiesForPatchUpdateTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.BackupPropertiesForPatchUpdate; +import org.junit.jupiter.api.Assertions; + +public final class BackupPropertiesForPatchUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BackupPropertiesForPatchUpdate model + = BinaryData.fromString("{\"retentionDays\":361275746}").toObject(BackupPropertiesForPatchUpdate.class); + Assertions.assertEquals(361275746, model.retentionDays()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BackupPropertiesForPatchUpdate model = new BackupPropertiesForPatchUpdate().withRetentionDays(361275746); + model = BinaryData.fromObject(model).toObject(BackupPropertiesForPatchUpdate.class); + Assertions.assertEquals(361275746, model.retentionDays()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/BackupPropertiesTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/BackupPropertiesTests.java new file mode 100644 index 0000000000000..deda016553a16 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/BackupPropertiesTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.BackupProperties; +import com.azure.resourcemanager.horizondb.models.GeoRedundancyState; +import org.junit.jupiter.api.Assertions; + +public final class BackupPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BackupProperties model = BinaryData.fromString( + "{\"geoRedundancy\":\"Enabled\",\"retentionDays\":942645397,\"earliestRestorePointUtc\":\"2021-01-02T21:42:03Z\"}") + .toObject(BackupProperties.class); + Assertions.assertEquals(GeoRedundancyState.ENABLED, model.geoRedundancy()); + Assertions.assertEquals(942645397, model.retentionDays()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BackupProperties model + = new BackupProperties().withGeoRedundancy(GeoRedundancyState.ENABLED).withRetentionDays(942645397); + model = BinaryData.fromObject(model).toObject(BackupProperties.class); + Assertions.assertEquals(GeoRedundancyState.ENABLED, model.geoRedundancy()); + Assertions.assertEquals(942645397, model.retentionDays()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/CapabilitiesGetWithResponseMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/CapabilitiesGetWithResponseMockTests.java new file mode 100644 index 0000000000000..a88c827a931a3 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/CapabilitiesGetWithResponseMockTests.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.horizondb.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.horizondb.HorizonDbManager; +import com.azure.resourcemanager.horizondb.models.Capability; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class CapabilitiesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Canceled\",\"clusterCapabilities\":{\"recommendedPostgreSqlVersion\":\"17\",\"supportedPostgreSqlVersions\":[{\"name\":\"18\",\"supportedVersionsToUpgrade\":[\"17\",\"18\",\"18\",\"17\"]},{\"name\":\"18\",\"supportedVersionsToUpgrade\":[\"18\",\"17\",\"18\"]},{\"name\":\"17\",\"supportedVersionsToUpgrade\":[\"17\"]},{\"name\":\"17\",\"supportedVersionsToUpgrade\":[\"17\"]}],\"supportedFeatures\":[{\"name\":\"fbn\"}]},\"poolCapabilities\":{\"recommendedComputeProcessor\":\"Intel\",\"supportedProcessors\":[{\"name\":\"AMD\",\"supportedGenerations\":[{\"computeGeneration\":171252991,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[]},{\"computeGeneration\":488471027,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[]}]},{\"name\":\"Intel\",\"supportedGenerations\":[{\"computeGeneration\":1116199441,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[]},{\"computeGeneration\":845127211,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[]},{\"computeGeneration\":1795332478,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[]},{\"computeGeneration\":1248182459,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[]}]},{\"name\":\"Intel\",\"supportedGenerations\":[{\"computeGeneration\":479082652,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[]}]}],\"supportedFeatures\":[{\"name\":\"ijejvegrhbpn\"},{\"name\":\"ixexcc\"},{\"name\":\"dreaxh\"},{\"name\":\"exdrrvqahqkg\"}]}},\"id\":\"pwijnhy\",\"name\":\"svfycxzbfv\",\"type\":\"owvrvmtgjqppyos\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HorizonDbManager manager = HorizonDbManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + Capability response + = manager.capabilities().getWithResponse("vjayvblmhvkzu", com.azure.core.util.Context.NONE).getValue(); + + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/CapabilitiesListMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/CapabilitiesListMockTests.java new file mode 100644 index 0000000000000..37920cdf20f63 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/CapabilitiesListMockTests.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.horizondb.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.horizondb.HorizonDbManager; +import com.azure.resourcemanager.horizondb.models.Capability; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class CapabilitiesListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"clusterCapabilities\":{\"recommendedPostgreSqlVersion\":\"18\",\"supportedPostgreSqlVersions\":[{\"name\":\"18\",\"supportedVersionsToUpgrade\":[\"17\"]},{\"name\":\"17\",\"supportedVersionsToUpgrade\":[\"18\",\"18\",\"18\"]},{\"name\":\"18\",\"supportedVersionsToUpgrade\":[\"17\",\"17\"]}],\"supportedFeatures\":[{\"name\":\"sgumhjglikkxwsl\"},{\"name\":\"lbqpvuzlmvfelf\"}]},\"poolCapabilities\":{\"recommendedComputeProcessor\":\"Intel\",\"supportedProcessors\":[{\"name\":\"AMD\",\"supportedGenerations\":[{\"computeGeneration\":957829467,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[]},{\"computeGeneration\":1827941579,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[]}]},{\"name\":\"AMD\",\"supportedGenerations\":[{\"computeGeneration\":1534218395,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[]},{\"computeGeneration\":879908926,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[]}]},{\"name\":\"Intel\",\"supportedGenerations\":[{\"computeGeneration\":1802725249,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[]}]},{\"name\":\"AMD\",\"supportedGenerations\":[{\"computeGeneration\":78326163,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[]},{\"computeGeneration\":2126528324,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[]},{\"computeGeneration\":490713776,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[]}]}],\"supportedFeatures\":[{\"name\":\"saz\"},{\"name\":\"jjoqkagf\"},{\"name\":\"sxtta\"}]}},\"id\":\"zxnfaaz\",\"name\":\"xdtnkdmkqjjlw\",\"type\":\"envrkpyouaibrebq\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HorizonDbManager manager = HorizonDbManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.capabilities().list("ronzmyhgfip", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/CapabilityInnerTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/CapabilityInnerTests.java new file mode 100644 index 0000000000000..a5d56166e24d4 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/CapabilityInnerTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.fluent.models.CapabilityInner; + +public final class CapabilityInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CapabilityInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"InProgress\",\"clusterCapabilities\":{\"recommendedPostgreSqlVersion\":\"17\",\"supportedPostgreSqlVersions\":[{\"name\":\"17\",\"supportedVersionsToUpgrade\":[\"18\"]},{\"name\":\"17\",\"supportedVersionsToUpgrade\":[\"18\",\"18\",\"18\"]},{\"name\":\"17\",\"supportedVersionsToUpgrade\":[\"18\",\"18\"]},{\"name\":\"17\",\"supportedVersionsToUpgrade\":[\"18\",\"18\",\"17\",\"17\"]}],\"supportedFeatures\":[{\"name\":\"hdbihan\"},{\"name\":\"fhfcb\"},{\"name\":\"y\"}]},\"poolCapabilities\":{\"recommendedComputeProcessor\":\"Intel\",\"supportedProcessors\":[{\"name\":\"AMD\",\"supportedGenerations\":[{\"computeGeneration\":901713267,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[]}]}],\"supportedFeatures\":[{\"name\":\"hab\"},{\"name\":\"fpikxwczb\"},{\"name\":\"scnpqxuhivy\"},{\"name\":\"n\"}]}},\"id\":\"b\",\"name\":\"br\",\"type\":\"xvd\"}") + .toObject(CapabilityInner.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/CapabilityListResultTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/CapabilityListResultTests.java new file mode 100644 index 0000000000000..c4b48b178b68d --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/CapabilityListResultTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.implementation.models.CapabilityListResult; +import org.junit.jupiter.api.Assertions; + +public final class CapabilityListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CapabilityListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"clusterCapabilities\":{\"recommendedPostgreSqlVersion\":\"18\",\"supportedPostgreSqlVersions\":[{\"name\":\"17\",\"supportedVersionsToUpgrade\":[]},{\"name\":\"18\",\"supportedVersionsToUpgrade\":[]},{\"name\":\"18\",\"supportedVersionsToUpgrade\":[]}],\"supportedFeatures\":[{\"name\":\"rgqjbpfzfsinzg\"}]},\"poolCapabilities\":{\"recommendedComputeProcessor\":\"Intel\",\"supportedProcessors\":[{\"name\":\"Intel\",\"supportedGenerations\":[]},{\"name\":\"AMD\",\"supportedGenerations\":[]},{\"name\":\"Intel\",\"supportedGenerations\":[]},{\"name\":\"Intel\",\"supportedGenerations\":[]}],\"supportedFeatures\":[{\"name\":\"xxjtfe\"},{\"name\":\"luwfzitonpeqfpjk\"},{\"name\":\"lxofpdvhpfxxypin\"}]}},\"id\":\"mayhuybbkpodepoo\",\"name\":\"inuvamiheogn\",\"type\":\"rxzxtheo\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"clusterCapabilities\":{\"recommendedPostgreSqlVersion\":\"18\",\"supportedPostgreSqlVersions\":[{\"name\":\"18\",\"supportedVersionsToUpgrade\":[]}],\"supportedFeatures\":[{\"name\":\"cciqihnhungbwjz\"}]},\"poolCapabilities\":{\"recommendedComputeProcessor\":\"AMD\",\"supportedProcessors\":[{\"name\":\"AMD\",\"supportedGenerations\":[]},{\"name\":\"Intel\",\"supportedGenerations\":[]},{\"name\":\"AMD\",\"supportedGenerations\":[]},{\"name\":\"AMD\",\"supportedGenerations\":[]}],\"supportedFeatures\":[{\"name\":\"spemvtzfk\"}]}},\"id\":\"ubljofxqe\",\"name\":\"fjaeq\",\"type\":\"hqjbasvmsmj\"},{\"properties\":{\"provisioningState\":\"InProgress\",\"clusterCapabilities\":{\"recommendedPostgreSqlVersion\":\"18\",\"supportedPostgreSqlVersions\":[{\"name\":\"18\",\"supportedVersionsToUpgrade\":[]},{\"name\":\"17\",\"supportedVersionsToUpgrade\":[]},{\"name\":\"18\",\"supportedVersionsToUpgrade\":[]}],\"supportedFeatures\":[{\"name\":\"ybkzgcwr\"},{\"name\":\"clxxwrljdo\"},{\"name\":\"skcqvkocrcjd\"},{\"name\":\"wtnhxbnjbiksqr\"}]},\"poolCapabilities\":{\"recommendedComputeProcessor\":\"Intel\",\"supportedProcessors\":[{\"name\":\"AMD\",\"supportedGenerations\":[]},{\"name\":\"AMD\",\"supportedGenerations\":[]},{\"name\":\"AMD\",\"supportedGenerations\":[]},{\"name\":\"AMD\",\"supportedGenerations\":[]}],\"supportedFeatures\":[{\"name\":\"p\"},{\"name\":\"wnzlljfmppeeb\"},{\"name\":\"mgxsab\"}]}},\"id\":\"qduujitcjczdz\",\"name\":\"vndhkrwpdapp\",\"type\":\"sbdkvwr\"}],\"nextLink\":\"feusnhut\"}") + .toObject(CapabilityListResult.class); + Assertions.assertEquals("feusnhut", model.nextLink()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/CapabilityPropertiesTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/CapabilityPropertiesTests.java new file mode 100644 index 0000000000000..8847014d77c1d --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/CapabilityPropertiesTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.CapabilityProperties; + +public final class CapabilityPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CapabilityProperties model = BinaryData.fromString( + "{\"provisioningState\":\"Failed\",\"clusterCapabilities\":{\"recommendedPostgreSqlVersion\":\"17\",\"supportedPostgreSqlVersions\":[{\"name\":\"18\",\"supportedVersionsToUpgrade\":[\"17\",\"17\"]}],\"supportedFeatures\":[{\"name\":\"k\"},{\"name\":\"gaudcc\"}]},\"poolCapabilities\":{\"recommendedComputeProcessor\":\"AMD\",\"supportedProcessors\":[{\"name\":\"Intel\",\"supportedGenerations\":[{\"computeGeneration\":2045600331,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[{\"type\":\"ComputeModelCapability\"},{\"type\":\"ComputeModelCapability\"}]}]}],\"supportedFeatures\":[{\"name\":\"j\"},{\"name\":\"kryhtnapczwlokj\"}]}}") + .toObject(CapabilityProperties.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureCapabilityForPatchUpdateTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureCapabilityForPatchUpdateTests.java new file mode 100644 index 0000000000000..a1326e4e4413e --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureCapabilityForPatchUpdateTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureCapabilityForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureCapabilityPropertiesForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDesiredState; +import org.junit.jupiter.api.Assertions; + +public final class ChangeDataCaptureCapabilityForPatchUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ChangeDataCaptureCapabilityForPatchUpdate model + = BinaryData.fromString("{\"properties\":{\"desiredState\":\"Disabled\",\"autoUpgradeExtension\":false}}") + .toObject(ChangeDataCaptureCapabilityForPatchUpdate.class); + Assertions.assertEquals(ChangeDataCaptureDesiredState.DISABLED, model.properties().desiredState()); + Assertions.assertFalse(model.properties().autoUpgradeExtension()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ChangeDataCaptureCapabilityForPatchUpdate model = new ChangeDataCaptureCapabilityForPatchUpdate() + .withProperties(new ChangeDataCaptureCapabilityPropertiesForPatchUpdate() + .withDesiredState(ChangeDataCaptureDesiredState.DISABLED) + .withAutoUpgradeExtension(false)); + model = BinaryData.fromObject(model).toObject(ChangeDataCaptureCapabilityForPatchUpdate.class); + Assertions.assertEquals(ChangeDataCaptureDesiredState.DISABLED, model.properties().desiredState()); + Assertions.assertFalse(model.properties().autoUpgradeExtension()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureCapabilityPropertiesForPatchUpdateTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureCapabilityPropertiesForPatchUpdateTests.java new file mode 100644 index 0000000000000..6ab4bfb8a8bb9 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureCapabilityPropertiesForPatchUpdateTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureCapabilityPropertiesForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDesiredState; +import org.junit.jupiter.api.Assertions; + +public final class ChangeDataCaptureCapabilityPropertiesForPatchUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ChangeDataCaptureCapabilityPropertiesForPatchUpdate model + = BinaryData.fromString("{\"desiredState\":\"Disabled\",\"autoUpgradeExtension\":true}") + .toObject(ChangeDataCaptureCapabilityPropertiesForPatchUpdate.class); + Assertions.assertEquals(ChangeDataCaptureDesiredState.DISABLED, model.desiredState()); + Assertions.assertTrue(model.autoUpgradeExtension()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ChangeDataCaptureCapabilityPropertiesForPatchUpdate model + = new ChangeDataCaptureCapabilityPropertiesForPatchUpdate() + .withDesiredState(ChangeDataCaptureDesiredState.DISABLED) + .withAutoUpgradeExtension(true); + model = BinaryData.fromObject(model).toObject(ChangeDataCaptureCapabilityPropertiesForPatchUpdate.class); + Assertions.assertEquals(ChangeDataCaptureDesiredState.DISABLED, model.desiredState()); + Assertions.assertTrue(model.autoUpgradeExtension()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureConfigurationForPatchUpdateTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureConfigurationForPatchUpdateTests.java new file mode 100644 index 0000000000000..a73925dafa4b3 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureConfigurationForPatchUpdateTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureConfigurationForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureConfigurationPropertiesForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDesiredState; +import org.junit.jupiter.api.Assertions; + +public final class ChangeDataCaptureConfigurationForPatchUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ChangeDataCaptureConfigurationForPatchUpdate model + = BinaryData.fromString("{\"properties\":{\"desiredState\":\"Enabled\"}}") + .toObject(ChangeDataCaptureConfigurationForPatchUpdate.class); + Assertions.assertEquals(ChangeDataCaptureDesiredState.ENABLED, model.properties().desiredState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ChangeDataCaptureConfigurationForPatchUpdate model = new ChangeDataCaptureConfigurationForPatchUpdate() + .withProperties(new ChangeDataCaptureConfigurationPropertiesForPatchUpdate() + .withDesiredState(ChangeDataCaptureDesiredState.ENABLED)); + model = BinaryData.fromObject(model).toObject(ChangeDataCaptureConfigurationForPatchUpdate.class); + Assertions.assertEquals(ChangeDataCaptureDesiredState.ENABLED, model.properties().desiredState()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureConfigurationPropertiesForPatchUpdateTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureConfigurationPropertiesForPatchUpdateTests.java new file mode 100644 index 0000000000000..40735ada939d4 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureConfigurationPropertiesForPatchUpdateTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureConfigurationPropertiesForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDesiredState; +import org.junit.jupiter.api.Assertions; + +public final class ChangeDataCaptureConfigurationPropertiesForPatchUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ChangeDataCaptureConfigurationPropertiesForPatchUpdate model + = BinaryData.fromString("{\"desiredState\":\"Enabled\"}") + .toObject(ChangeDataCaptureConfigurationPropertiesForPatchUpdate.class); + Assertions.assertEquals(ChangeDataCaptureDesiredState.ENABLED, model.desiredState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ChangeDataCaptureConfigurationPropertiesForPatchUpdate model + = new ChangeDataCaptureConfigurationPropertiesForPatchUpdate() + .withDesiredState(ChangeDataCaptureDesiredState.ENABLED); + model = BinaryData.fromObject(model).toObject(ChangeDataCaptureConfigurationPropertiesForPatchUpdate.class); + Assertions.assertEquals(ChangeDataCaptureDesiredState.ENABLED, model.desiredState()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureDestinationDetailsTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureDestinationDetailsTests.java new file mode 100644 index 0000000000000..134f1c5e6cf4b --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureDestinationDetailsTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDestinationDetails; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureProtocol; +import org.junit.jupiter.api.Assertions; + +public final class ChangeDataCaptureDestinationDetailsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ChangeDataCaptureDestinationDetails model = BinaryData + .fromString("{\"destinationType\":\"ChangeDataCaptureDestinationDetails\",\"protocol\":\"Native\"}") + .toObject(ChangeDataCaptureDestinationDetails.class); + Assertions.assertEquals(ChangeDataCaptureProtocol.NATIVE, model.protocol()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ChangeDataCaptureDestinationDetails model + = new ChangeDataCaptureDestinationDetails().withProtocol(ChangeDataCaptureProtocol.NATIVE); + model = BinaryData.fromObject(model).toObject(ChangeDataCaptureDestinationDetails.class); + Assertions.assertEquals(ChangeDataCaptureProtocol.NATIVE, model.protocol()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureDestinationForPatchUpdateTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureDestinationForPatchUpdateTests.java new file mode 100644 index 0000000000000..267b13b2be8e1 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureDestinationForPatchUpdateTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDesiredState; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDestinationForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDestinationPropertiesForPatchUpdate; +import org.junit.jupiter.api.Assertions; + +public final class ChangeDataCaptureDestinationForPatchUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ChangeDataCaptureDestinationForPatchUpdate model + = BinaryData.fromString("{\"properties\":{\"desiredState\":\"Disabled\"}}") + .toObject(ChangeDataCaptureDestinationForPatchUpdate.class); + Assertions.assertEquals(ChangeDataCaptureDesiredState.DISABLED, model.properties().desiredState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ChangeDataCaptureDestinationForPatchUpdate model = new ChangeDataCaptureDestinationForPatchUpdate() + .withProperties(new ChangeDataCaptureDestinationPropertiesForPatchUpdate() + .withDesiredState(ChangeDataCaptureDesiredState.DISABLED)); + model = BinaryData.fromObject(model).toObject(ChangeDataCaptureDestinationForPatchUpdate.class); + Assertions.assertEquals(ChangeDataCaptureDesiredState.DISABLED, model.properties().desiredState()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureDestinationPropertiesForPatchUpdateTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureDestinationPropertiesForPatchUpdateTests.java new file mode 100644 index 0000000000000..533a4bced4cda --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureDestinationPropertiesForPatchUpdateTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDesiredState; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureDestinationPropertiesForPatchUpdate; +import org.junit.jupiter.api.Assertions; + +public final class ChangeDataCaptureDestinationPropertiesForPatchUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ChangeDataCaptureDestinationPropertiesForPatchUpdate model + = BinaryData.fromString("{\"desiredState\":\"Enabled\"}") + .toObject(ChangeDataCaptureDestinationPropertiesForPatchUpdate.class); + Assertions.assertEquals(ChangeDataCaptureDesiredState.ENABLED, model.desiredState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ChangeDataCaptureDestinationPropertiesForPatchUpdate model + = new ChangeDataCaptureDestinationPropertiesForPatchUpdate() + .withDesiredState(ChangeDataCaptureDesiredState.ENABLED); + model = BinaryData.fromObject(model).toObject(ChangeDataCaptureDestinationPropertiesForPatchUpdate.class); + Assertions.assertEquals(ChangeDataCaptureDesiredState.ENABLED, model.desiredState()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureDestinationsActivateIdentityMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureDestinationsActivateIdentityMockTests.java new file mode 100644 index 0000000000000..462ac049adfa9 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureDestinationsActivateIdentityMockTests.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.horizondb.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.horizondb.HorizonDbManager; +import com.azure.resourcemanager.horizondb.models.ActivateChangeDataCaptureIdentityRequest; +import com.azure.resourcemanager.horizondb.models.ActivateChangeDataCaptureIdentityResult; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ChangeDataCaptureDestinationsActivateIdentityMockTests { + @Test + public void testActivateIdentity() throws Exception { + String responseStr + = "{\"targetIdentityAssignmentResourceId\":\"vhdbevwqqxey\",\"previousIdentityAssignmentResourceId\":\"onqzinkfkbgbzbow\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HorizonDbManager manager = HorizonDbManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ActivateChangeDataCaptureIdentityResult response = manager.changeDataCaptureDestinations() + .activateIdentity("bdb", "qgqqihedsvqwthmk", "ibcysihsgqc", "dhohsdtmcdzsuf", + new ActivateChangeDataCaptureIdentityRequest().withIdentityAssignmentResourceId("ohdxbzlmcmu") + .withDrainExistingSessions(false), + com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureExtensionStatusTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureExtensionStatusTests.java new file mode 100644 index 0000000000000..be19c5a501dc7 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureExtensionStatusTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureExtensionStatus; + +public final class ChangeDataCaptureExtensionStatusTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ChangeDataCaptureExtensionStatus model + = BinaryData.fromString("{\"name\":\"itc\",\"version\":\"kfcktqum\",\"state\":\"Removing\"}") + .toObject(ChangeDataCaptureExtensionStatus.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCapturePrerequisiteStatusTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCapturePrerequisiteStatusTests.java new file mode 100644 index 0000000000000..b03cc3d1cce01 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCapturePrerequisiteStatusTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ChangeDataCapturePrerequisiteStatus; + +public final class ChangeDataCapturePrerequisiteStatusTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ChangeDataCapturePrerequisiteStatus model + = BinaryData.fromString("{\"engineConfigurationState\":\"Failed\",\"readWriteEndpointState\":\"Ready\"}") + .toObject(ChangeDataCapturePrerequisiteStatus.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureReplicationStatusTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureReplicationStatusTests.java new file mode 100644 index 0000000000000..bda2544cefb71 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureReplicationStatusTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureReplicationStatus; + +public final class ChangeDataCaptureReplicationStatusTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ChangeDataCaptureReplicationStatus model = BinaryData.fromString( + "{\"state\":\"Connecting\",\"externalArtifactId\":\"udutnco\",\"lastConnectedAtUtc\":\"2021-10-18T10:35:02Z\"}") + .toObject(ChangeDataCaptureReplicationStatus.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureTopologyBindingStatusTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureTopologyBindingStatusTests.java new file mode 100644 index 0000000000000..84657d17f0f67 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ChangeDataCaptureTopologyBindingStatusTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ChangeDataCaptureTopologyBindingStatus; + +public final class ChangeDataCaptureTopologyBindingStatusTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ChangeDataCaptureTopologyBindingStatus model = BinaryData.fromString( + "{\"state\":\"Active\",\"generation\":8357004354243931890,\"activeClusterResourceId\":\"tvcof\",\"replacementConfigurationResourceId\":\"f\"}") + .toObject(ChangeDataCaptureTopologyBindingStatus.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ClusterCapabilityTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ClusterCapabilityTests.java new file mode 100644 index 0000000000000..1fc10c55667ef --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ClusterCapabilityTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ClusterCapability; + +public final class ClusterCapabilityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ClusterCapability model = BinaryData.fromString( + "{\"recommendedPostgreSqlVersion\":\"18\",\"supportedPostgreSqlVersions\":[{\"name\":\"18\",\"supportedVersionsToUpgrade\":[\"17\",\"17\",\"18\"]},{\"name\":\"18\",\"supportedVersionsToUpgrade\":[\"18\",\"18\",\"17\",\"17\"]}],\"supportedFeatures\":[{\"name\":\"chgejspodm\"},{\"name\":\"ilzyd\"}]}") + .toObject(ClusterCapability.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ClusterFeatureCapabilityTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ClusterFeatureCapabilityTests.java new file mode 100644 index 0000000000000..0d5945d2e0b2d --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ClusterFeatureCapabilityTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ClusterFeatureCapability; + +public final class ClusterFeatureCapabilityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ClusterFeatureCapability model + = BinaryData.fromString("{\"name\":\"wyahuxinpmqnja\"}").toObject(ClusterFeatureCapability.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ComputeGenerationCapabilityTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ComputeGenerationCapabilityTests.java new file mode 100644 index 0000000000000..6793506762fcf --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ComputeGenerationCapabilityTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ComputeGenerationCapability; + +public final class ComputeGenerationCapabilityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ComputeGenerationCapability model = BinaryData.fromString( + "{\"computeGeneration\":491201544,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[{\"type\":\"ComputeModelCapability\"},{\"type\":\"ComputeModelCapability\"},{\"type\":\"ComputeModelCapability\"},{\"type\":\"ComputeModelCapability\"}]}") + .toObject(ComputeGenerationCapability.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ComputeModelCapabilityTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ComputeModelCapabilityTests.java new file mode 100644 index 0000000000000..d22e9d6d37699 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ComputeModelCapabilityTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ComputeModelCapability; + +public final class ComputeModelCapabilityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ComputeModelCapability model + = BinaryData.fromString("{\"type\":\"ComputeModelCapability\"}").toObject(ComputeModelCapability.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ComputeProcessorCapabilityTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ComputeProcessorCapabilityTests.java new file mode 100644 index 0000000000000..a3646709c3406 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ComputeProcessorCapabilityTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ComputeProcessorCapability; + +public final class ComputeProcessorCapabilityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ComputeProcessorCapability model = BinaryData.fromString( + "{\"name\":\"AMD\",\"supportedGenerations\":[{\"computeGeneration\":276706615,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[{\"type\":\"ComputeModelCapability\"},{\"type\":\"ComputeModelCapability\"}]},{\"computeGeneration\":1201536256,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[{\"type\":\"ComputeModelCapability\"},{\"type\":\"ComputeModelCapability\"},{\"type\":\"ComputeModelCapability\"}]},{\"computeGeneration\":1389039399,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[{\"type\":\"ComputeModelCapability\"},{\"type\":\"ComputeModelCapability\"}]}]}") + .toObject(ComputeProcessorCapability.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ComputeSizeCapabilityTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ComputeSizeCapabilityTests.java new file mode 100644 index 0000000000000..3fa2942b4a15e --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ComputeSizeCapabilityTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ComputeSizeCapability; + +public final class ComputeSizeCapabilityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ComputeSizeCapability model + = BinaryData.fromString("{\"vCores\":718519788,\"memoryPerVCoreInMb\":4715886813780668171}") + .toObject(ComputeSizeCapability.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/DefaultParameterGroupInnerTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/DefaultParameterGroupInnerTests.java new file mode 100644 index 0000000000000..d6f77be3d7a08 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/DefaultParameterGroupInnerTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.fluent.models.DefaultParameterGroupInner; +import com.azure.resourcemanager.horizondb.models.PostgreSqlVersion; +import org.junit.jupiter.api.Assertions; + +public final class DefaultParameterGroupInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DefaultParameterGroupInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Canceled\",\"parameters\":[{\"name\":\"vpbttd\",\"description\":\"orppxebmnzbtb\",\"value\":\"pglkf\",\"defaultValue\":\"hdneuelfph\",\"valueSource\":\"UserOverride\",\"dataType\":\"t\",\"allowedValues\":\"fikdowwqu\",\"isDynamic\":false,\"isReadOnly\":false,\"documentationLink\":\"lvithhqzonosgg\",\"unit\":\"c\"}],\"description\":\"fwdsj\",\"postgreSqlVersion\":\"17\"},\"id\":\"ljuti\",\"name\":\"swacffgdkzz\",\"type\":\"wkfvhqcrailvp\"}") + .toObject(DefaultParameterGroupInner.class); + Assertions.assertEquals("vpbttd", model.properties().parameters().get(0).name()); + Assertions.assertEquals("pglkf", model.properties().parameters().get(0).value()); + Assertions.assertEquals("fwdsj", model.properties().description()); + Assertions.assertEquals(PostgreSqlVersion.V17, model.properties().postgreSqlVersion()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/DefaultParameterGroupListResultTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/DefaultParameterGroupListResultTests.java new file mode 100644 index 0000000000000..07ca2ba25eb97 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/DefaultParameterGroupListResultTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.implementation.models.DefaultParameterGroupListResult; +import com.azure.resourcemanager.horizondb.models.PostgreSqlVersion; +import org.junit.jupiter.api.Assertions; + +public final class DefaultParameterGroupListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DefaultParameterGroupListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Provisioning\",\"parameters\":[{\"name\":\"bxwyjsflhhcaa\",\"description\":\"jixisxyawjoyaqcs\",\"value\":\"jpkiidzyexznelix\",\"defaultValue\":\"rzt\",\"valueSource\":\"SystemDefault\",\"dataType\":\"bnxknalaulppg\",\"allowedValues\":\"tpnapnyiropuhpig\",\"isDynamic\":true,\"isReadOnly\":false,\"documentationLink\":\"qgitxmed\",\"unit\":\"c\"}],\"description\":\"ynqwwncwzzhxgk\",\"postgreSqlVersion\":\"17\"},\"id\":\"gucnapkte\",\"name\":\"ellwptfdy\",\"type\":\"pfqbuaceopzf\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"parameters\":[{\"name\":\"opppcqeq\",\"description\":\"lzdahzxctobgbkdm\",\"value\":\"zpostmgrcfbu\",\"defaultValue\":\"mfqjhhkxbp\",\"valueSource\":\"UserOverride\",\"dataType\":\"jhxxjyn\",\"allowedValues\":\"divkrt\",\"isDynamic\":false,\"isReadOnly\":false,\"documentationLink\":\"vszjfauvjfdxxi\",\"unit\":\"tvtc\"},{\"name\":\"qtdo\",\"description\":\"cbxvwvxyslqbh\",\"value\":\"xoblytkbl\",\"defaultValue\":\"ewwwfbkrvrnsv\",\"valueSource\":\"SystemDefault\",\"dataType\":\"ohxcrsbfova\",\"allowedValues\":\"ruvw\",\"isDynamic\":true,\"isReadOnly\":true,\"documentationLink\":\"ubcgjbirxb\",\"unit\":\"bsrfbj\"},{\"name\":\"twss\",\"description\":\"ftpvjzbexil\",\"value\":\"nfqqnvwp\",\"defaultValue\":\"taruoujmkcj\",\"valueSource\":\"UserOverride\",\"dataType\":\"tjrybnwjewgdr\",\"allowedValues\":\"rvnaenqpeh\",\"isDynamic\":false,\"isReadOnly\":false,\"documentationLink\":\"mifthnzdnd\",\"unit\":\"gnayqigynduh\"}],\"description\":\"hqlkthumaqo\",\"postgreSqlVersion\":\"18\"},\"id\":\"ycduier\",\"name\":\"gccymvaolpssl\",\"type\":\"lfmmdnbbglzpswi\"},{\"properties\":{\"provisioningState\":\"InProgress\",\"parameters\":[{\"name\":\"hzdxssadbzm\",\"description\":\"dfznudaodv\",\"value\":\"bncblylpstdbhhx\",\"defaultValue\":\"zdzucerscdntnevf\",\"valueSource\":\"UserOverride\",\"dataType\":\"ygtdsslswt\",\"allowedValues\":\"eriofzpyqs\",\"isDynamic\":false,\"isReadOnly\":false,\"documentationLink\":\"ets\",\"unit\":\"szhedplvw\"},{\"name\":\"ubmwmbesld\",\"description\":\"wwtppj\",\"value\":\"cxogaokonzm\",\"defaultValue\":\"ikvmkqzeqqk\",\"valueSource\":\"SystemDefault\",\"dataType\":\"zxmhhvhgu\",\"allowedValues\":\"odkwobd\",\"isDynamic\":true,\"isReadOnly\":true,\"documentationLink\":\"qdxbxwa\",\"unit\":\"ogqxndlkzgxhuri\"}],\"description\":\"bpodxunkbebxm\",\"postgreSqlVersion\":\"18\"},\"id\":\"yntwlrbq\",\"name\":\"koievseo\",\"type\":\"gqrlltmuwla\"}],\"nextLink\":\"zizxbmpgcj\"}") + .toObject(DefaultParameterGroupListResult.class); + Assertions.assertEquals("bxwyjsflhhcaa", model.value().get(0).properties().parameters().get(0).name()); + Assertions.assertEquals("jpkiidzyexznelix", model.value().get(0).properties().parameters().get(0).value()); + Assertions.assertEquals("ynqwwncwzzhxgk", model.value().get(0).properties().description()); + Assertions.assertEquals(PostgreSqlVersion.V17, model.value().get(0).properties().postgreSqlVersion()); + Assertions.assertEquals("zizxbmpgcj", model.nextLink()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/DefaultParameterGroupPropertiesTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/DefaultParameterGroupPropertiesTests.java new file mode 100644 index 0000000000000..3a254b0984543 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/DefaultParameterGroupPropertiesTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.DefaultParameterGroupProperties; +import com.azure.resourcemanager.horizondb.models.PostgreSqlVersion; +import org.junit.jupiter.api.Assertions; + +public final class DefaultParameterGroupPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DefaultParameterGroupProperties model = BinaryData.fromString( + "{\"provisioningState\":\"Failed\",\"parameters\":[{\"name\":\"flrwd\",\"description\":\"dlxyjrxs\",\"value\":\"afcnih\",\"defaultValue\":\"qapnedgfbcv\",\"valueSource\":\"SystemDefault\",\"dataType\":\"vpk\",\"allowedValues\":\"dcvd\",\"isDynamic\":false,\"isReadOnly\":true,\"documentationLink\":\"sotbob\",\"unit\":\"opcjwvnhd\"},{\"name\":\"wmgxcxrsl\",\"description\":\"utwu\",\"value\":\"grpkhjwniyqs\",\"defaultValue\":\"i\",\"valueSource\":\"UserOverride\",\"dataType\":\"gk\",\"allowedValues\":\"lvmbmpaxmodfvuef\",\"isDynamic\":true,\"isReadOnly\":true,\"documentationLink\":\"vmwy\",\"unit\":\"fouyf\"},{\"name\":\"akcp\",\"description\":\"yzvqt\",\"value\":\"ubex\",\"defaultValue\":\"zksmondj\",\"valueSource\":\"UserOverride\",\"dataType\":\"vypomgkopkwho\",\"allowedValues\":\"pajqgxysm\",\"isDynamic\":false,\"isReadOnly\":false,\"documentationLink\":\"qvmkcxo\",\"unit\":\"pvhelxprg\"}],\"description\":\"atddc\",\"postgreSqlVersion\":\"18\"}") + .toObject(DefaultParameterGroupProperties.class); + Assertions.assertEquals("flrwd", model.parameters().get(0).name()); + Assertions.assertEquals("afcnih", model.parameters().get(0).value()); + Assertions.assertEquals("atddc", model.description()); + Assertions.assertEquals(PostgreSqlVersion.V18, model.postgreSqlVersion()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/DefaultParameterGroupsGetWithResponseMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/DefaultParameterGroupsGetWithResponseMockTests.java new file mode 100644 index 0000000000000..8b8aa54bdea47 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/DefaultParameterGroupsGetWithResponseMockTests.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.horizondb.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.horizondb.HorizonDbManager; +import com.azure.resourcemanager.horizondb.models.DefaultParameterGroup; +import com.azure.resourcemanager.horizondb.models.PostgreSqlVersion; +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 DefaultParameterGroupsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Failed\",\"parameters\":[{\"name\":\"xtxsuwprtujw\",\"description\":\"wddji\",\"value\":\"bxv\",\"defaultValue\":\"itvtzeexavo\",\"valueSource\":\"UserOverride\",\"dataType\":\"lecdmdqbw\",\"allowedValues\":\"pqtgsfjac\",\"isDynamic\":true,\"isReadOnly\":true,\"documentationLink\":\"udbxv\",\"unit\":\"htnsi\"},{\"name\":\"dhzmmesckdlp\",\"description\":\"zrcxfailcfxwmdbo\",\"value\":\"fgsftufqob\",\"defaultValue\":\"lnacgcc\",\"valueSource\":\"SystemDefault\",\"dataType\":\"xkizvy\",\"allowedValues\":\"rzvul\",\"isDynamic\":true,\"isReadOnly\":true,\"documentationLink\":\"anokqgu\",\"unit\":\"jqnv\"},{\"name\":\"oylaxxul\",\"description\":\"isdos\",\"value\":\"b\",\"defaultValue\":\"vgjrwhr\",\"valueSource\":\"SystemDefault\",\"dataType\":\"ytdc\",\"allowedValues\":\"gc\",\"isDynamic\":false,\"isReadOnly\":false,\"documentationLink\":\"mbtmvpdvjdhttzae\",\"unit\":\"dxihc\"},{\"name\":\"phkmcrjdqnsdfz\",\"description\":\"gtgkylkdghr\",\"value\":\"uutlwxezwzhok\",\"defaultValue\":\"wnhhtqlgehgppip\",\"valueSource\":\"UserOverride\",\"dataType\":\"f\",\"allowedValues\":\"ajvgcxtxjcsheafi\",\"isDynamic\":true,\"isReadOnly\":true,\"documentationLink\":\"resmkssjhoiftxfk\",\"unit\":\"egprhptil\"}],\"description\":\"cbiqtgdqoh\",\"postgreSqlVersion\":\"17\"},\"id\":\"sldrizetpwbral\",\"name\":\"libph\",\"type\":\"qzmiza\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HorizonDbManager manager = HorizonDbManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + DefaultParameterGroup response = manager.defaultParameterGroups() + .getWithResponse("ojbmxv", "vrefdeesv", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("xtxsuwprtujw", response.properties().parameters().get(0).name()); + Assertions.assertEquals("bxv", response.properties().parameters().get(0).value()); + Assertions.assertEquals("cbiqtgdqoh", response.properties().description()); + Assertions.assertEquals(PostgreSqlVersion.V17, response.properties().postgreSqlVersion()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/DefaultParameterGroupsListBySubscriptionAndRegionMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/DefaultParameterGroupsListBySubscriptionAndRegionMockTests.java new file mode 100644 index 0000000000000..c889f11c042c7 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/DefaultParameterGroupsListBySubscriptionAndRegionMockTests.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.horizondb.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.horizondb.HorizonDbManager; +import com.azure.resourcemanager.horizondb.models.DefaultParameterGroup; +import com.azure.resourcemanager.horizondb.models.PostgreSqlVersion; +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 DefaultParameterGroupsListBySubscriptionAndRegionMockTests { + @Test + public void testListBySubscriptionAndRegion() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Provisioning\",\"parameters\":[{\"name\":\"hhvjhh\",\"description\":\"kzyb\",\"value\":\"jid\",\"defaultValue\":\"syxkyxvxevblb\",\"valueSource\":\"SystemDefault\",\"dataType\":\"ljlageuaulxu\",\"allowedValues\":\"mjbnk\",\"isDynamic\":false,\"isReadOnly\":true,\"documentationLink\":\"nlsvxeiz\",\"unit\":\"wklnsrmffeyc\"}],\"description\":\"ktp\",\"postgreSqlVersion\":\"18\"},\"id\":\"erteeammxqiekk\",\"name\":\"zddrt\",\"type\":\"g\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HorizonDbManager manager = HorizonDbManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.defaultParameterGroups().listBySubscriptionAndRegion("pqg", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("hhvjhh", response.iterator().next().properties().parameters().get(0).name()); + Assertions.assertEquals("jid", response.iterator().next().properties().parameters().get(0).value()); + Assertions.assertEquals("ktp", response.iterator().next().properties().description()); + Assertions.assertEquals(PostgreSqlVersion.V18, response.iterator().next().properties().postgreSqlVersion()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/EndpointInnerTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/EndpointInnerTests.java new file mode 100644 index 0000000000000..d0b2955417b77 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/EndpointInnerTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.fluent.models.EndpointInner; + +public final class EndpointInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EndpointInner model = BinaryData.fromString( + "{\"properties\":{\"scope\":\"Cluster\",\"associatedResourceId\":\"ezkojvdcp\",\"fullyQualifiedDomainName\":\"foqouicybx\",\"role\":\"ReadWrite\"},\"id\":\"gszufoxciqopid\",\"name\":\"amcio\",\"type\":\"hkh\"}") + .toObject(EndpointInner.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/EndpointListResultTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/EndpointListResultTests.java new file mode 100644 index 0000000000000..d212d24c82651 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/EndpointListResultTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.implementation.models.EndpointListResult; +import org.junit.jupiter.api.Assertions; + +public final class EndpointListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EndpointListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"scope\":\"Cluster\",\"associatedResourceId\":\"vexztvbtqgs\",\"fullyQualifiedDomainName\":\"ra\",\"role\":\"ReadWrite\"},\"id\":\"koowtl\",\"name\":\"nguxawqaldsy\",\"type\":\"uximerqfobw\"},{\"properties\":{\"scope\":\"Pool\",\"associatedResourceId\":\"kby\",\"fullyQualifiedDomainName\":\"utwpfhp\",\"role\":\"ReadWrite\"},\"id\":\"hrskdsnfd\",\"name\":\"doakgtdlmkkzevdl\",\"type\":\"ewpusdsttwvogvb\"}],\"nextLink\":\"jdcngqqm\"}") + .toObject(EndpointListResult.class); + Assertions.assertEquals("jdcngqqm", model.nextLink()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/EndpointPropertiesTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/EndpointPropertiesTests.java new file mode 100644 index 0000000000000..3d4814ddc4b28 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/EndpointPropertiesTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.EndpointProperties; + +public final class EndpointPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EndpointProperties model = BinaryData.fromString( + "{\"scope\":\"Pool\",\"associatedResourceId\":\"xkhnzbonlwnto\",\"fullyQualifiedDomainName\":\"gokdwbwhks\",\"role\":\"ReadWrite\"}") + .toObject(EndpointProperties.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/EndpointsGetWithResponseMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/EndpointsGetWithResponseMockTests.java new file mode 100644 index 0000000000000..ae396ec9c21ca --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/EndpointsGetWithResponseMockTests.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.horizondb.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.horizondb.HorizonDbManager; +import com.azure.resourcemanager.horizondb.models.Endpoint; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class EndpointsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"scope\":\"Cluster\",\"associatedResourceId\":\"qigkx\",\"fullyQualifiedDomainName\":\"bsazgakg\",\"role\":\"ReadWrite\"},\"id\":\"rcmjdmspofapvuh\",\"name\":\"ylnio\",\"type\":\"rz\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HorizonDbManager manager = HorizonDbManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + Endpoint response = manager.endpoints() + .getWithResponse("vxkdivqihebwtswb", "uwfmduragegizvc", "felisdjub", com.azure.core.util.Context.NONE) + .getValue(); + + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/EndpointsListMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/EndpointsListMockTests.java new file mode 100644 index 0000000000000..c6fd6d1f3d16e --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/EndpointsListMockTests.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.horizondb.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.horizondb.HorizonDbManager; +import com.azure.resourcemanager.horizondb.models.Endpoint; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class EndpointsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"scope\":\"Cluster\",\"associatedResourceId\":\"twfans\",\"fullyQualifiedDomainName\":\"v\",\"role\":\"ReadWrite\"},\"id\":\"bmikost\",\"name\":\"z\",\"type\":\"kiwbuqnyoph\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HorizonDbManager manager = HorizonDbManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.endpoints().list("bzjedmstk", "nlvxbcuii", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/FabricDestinationDetailsTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/FabricDestinationDetailsTests.java new file mode 100644 index 0000000000000..fcdfb534905e2 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/FabricDestinationDetailsTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.FabricDestinationDetails; +import org.junit.jupiter.api.Assertions; + +public final class FabricDestinationDetailsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FabricDestinationDetails model = BinaryData + .fromString("{\"destinationType\":\"Fabric\",\"workspaceId\":\"jhkycub\",\"protocol\":\"Native\"}") + .toObject(FabricDestinationDetails.class); + Assertions.assertEquals("jhkycub", model.workspaceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + FabricDestinationDetails model = new FabricDestinationDetails().withWorkspaceId("jhkycub"); + model = BinaryData.fromObject(model).toObject(FabricDestinationDetails.class); + Assertions.assertEquals("jhkycub", model.workspaceId()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/FirewallRuleInnerTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/FirewallRuleInnerTests.java new file mode 100644 index 0000000000000..6de11727710ad --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/FirewallRuleInnerTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.fluent.models.FirewallRuleInner; +import com.azure.resourcemanager.horizondb.models.FirewallRuleProperties; +import org.junit.jupiter.api.Assertions; + +public final class FirewallRuleInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FirewallRuleInner model = BinaryData.fromString( + "{\"properties\":{\"startIpAddress\":\"hejjz\",\"endIpAddress\":\"v\",\"description\":\"dgwdslfhot\",\"provisioningState\":\"Succeeded\"},\"id\":\"npwlbjnpg\",\"name\":\"cftadeh\",\"type\":\"nltyfsoppusuesnz\"}") + .toObject(FirewallRuleInner.class); + Assertions.assertEquals("hejjz", model.properties().startIpAddress()); + Assertions.assertEquals("v", model.properties().endIpAddress()); + Assertions.assertEquals("dgwdslfhot", model.properties().description()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + FirewallRuleInner model + = new FirewallRuleInner().withProperties(new FirewallRuleProperties().withStartIpAddress("hejjz") + .withEndIpAddress("v") + .withDescription("dgwdslfhot")); + model = BinaryData.fromObject(model).toObject(FirewallRuleInner.class); + Assertions.assertEquals("hejjz", model.properties().startIpAddress()); + Assertions.assertEquals("v", model.properties().endIpAddress()); + Assertions.assertEquals("dgwdslfhot", model.properties().description()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/FirewallRuleListResultTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/FirewallRuleListResultTests.java new file mode 100644 index 0000000000000..50b2098b3f6f3 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/FirewallRuleListResultTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.implementation.models.FirewallRuleListResult; +import org.junit.jupiter.api.Assertions; + +public final class FirewallRuleListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FirewallRuleListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"startIpAddress\":\"kcglhslaz\",\"endIpAddress\":\"dyggdtjixhbku\",\"description\":\"qweykhmenev\",\"provisioningState\":\"Provisioning\"},\"id\":\"fwhybcibvy\",\"name\":\"dcsi\",\"type\":\"ynnaam\"},{\"properties\":{\"startIpAddress\":\"ctehfiqscjey\",\"endIpAddress\":\"vhezrkgqhcj\",\"description\":\"fovgmkqsleyyvxy\",\"provisioningState\":\"Failed\"},\"id\":\"cattpngjcrcczsq\",\"name\":\"jh\",\"type\":\"mdajv\"},{\"properties\":{\"startIpAddress\":\"sounqecanoaeu\",\"endIpAddress\":\"fhyhltrpmopjmcma\",\"description\":\"okth\",\"provisioningState\":\"InProgress\"},\"id\":\"aodsfcpkv\",\"name\":\"odpuozmyzydag\",\"type\":\"uaxbezyiuokkt\"}],\"nextLink\":\"rdxwzywqsm\"}") + .toObject(FirewallRuleListResult.class); + Assertions.assertEquals("kcglhslaz", model.value().get(0).properties().startIpAddress()); + Assertions.assertEquals("dyggdtjixhbku", model.value().get(0).properties().endIpAddress()); + Assertions.assertEquals("qweykhmenev", model.value().get(0).properties().description()); + Assertions.assertEquals("rdxwzywqsm", model.nextLink()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/FirewallRulePropertiesTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/FirewallRulePropertiesTests.java new file mode 100644 index 0000000000000..3aa698b591da1 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/FirewallRulePropertiesTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.FirewallRuleProperties; +import org.junit.jupiter.api.Assertions; + +public final class FirewallRulePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FirewallRuleProperties model = BinaryData.fromString( + "{\"startIpAddress\":\"dejbavo\",\"endIpAddress\":\"xzdmohctb\",\"description\":\"udwxdndnvowguj\",\"provisioningState\":\"Provisioning\"}") + .toObject(FirewallRuleProperties.class); + Assertions.assertEquals("dejbavo", model.startIpAddress()); + Assertions.assertEquals("xzdmohctb", model.endIpAddress()); + Assertions.assertEquals("udwxdndnvowguj", model.description()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + FirewallRuleProperties model = new FirewallRuleProperties().withStartIpAddress("dejbavo") + .withEndIpAddress("xzdmohctb") + .withDescription("udwxdndnvowguj"); + model = BinaryData.fromObject(model).toObject(FirewallRuleProperties.class); + Assertions.assertEquals("dejbavo", model.startIpAddress()); + Assertions.assertEquals("xzdmohctb", model.endIpAddress()); + Assertions.assertEquals("udwxdndnvowguj", model.description()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicasCreateOrUpdateMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/FirewallRulesCreateOrReplaceMockTests.java similarity index 52% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicasCreateOrUpdateMockTests.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/FirewallRulesCreateOrReplaceMockTests.java index 693ff80a5f2ee..6fee4a2c102cb 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicasCreateOrUpdateMockTests.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/FirewallRulesCreateOrReplaceMockTests.java @@ -10,20 +10,19 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.horizondb.HorizonDbManager; -import com.azure.resourcemanager.horizondb.models.HorizonDbReplica; -import com.azure.resourcemanager.horizondb.models.HorizonDbReplicaProperties; -import com.azure.resourcemanager.horizondb.models.ReplicaRole; +import com.azure.resourcemanager.horizondb.models.FirewallRule; +import com.azure.resourcemanager.horizondb.models.FirewallRuleProperties; 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 HorizonDbReplicasCreateOrUpdateMockTests { +public final class FirewallRulesCreateOrReplaceMockTests { @Test - public void testCreateOrUpdate() throws Exception { + public void testCreateOrReplace() throws Exception { String responseStr - = "{\"properties\":{\"role\":\"Read\",\"status\":\"Disabled\",\"fullyQualifiedDomainName\":\"zar\",\"availabilityZone\":\"lquuijfqkacewii\",\"provisioningState\":\"Succeeded\"},\"id\":\"bjibwwiftohq\",\"name\":\"vpuvks\",\"type\":\"plsaknynfsynljph\"}"; + = "{\"properties\":{\"startIpAddress\":\"iml\",\"endIpAddress\":\"oljxkcgx\",\"description\":\"xsffgcviz\",\"provisioningState\":\"Succeeded\"},\"id\":\"l\",\"name\":\"w\",\"type\":\"youpfgfbkj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +31,16 @@ public void testCreateOrUpdate() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - HorizonDbReplica response = manager.horizonDbReplicas() - .define("afnn") - .withExistingPool("qlpqwcciuq", "bdbutauvf", "tkuwhhmhykojo") - .withProperties( - new HorizonDbReplicaProperties().withRole(ReplicaRole.READ_WRITE).withAvailabilityZone("kcdyhbpk")) + FirewallRule response = manager.firewallRules() + .define("vcimpev") + .withExistingPool("qonmacj", "k", "izsh") + .withProperties(new FirewallRuleProperties().withStartIpAddress("mblrrilbywd") + .withEndIpAddress("smiccwrwfscj") + .withDescription("ynszquji")) .create(); - Assertions.assertEquals(ReplicaRole.READ, response.properties().role()); - Assertions.assertEquals("lquuijfqkacewii", response.properties().availabilityZone()); + Assertions.assertEquals("iml", response.properties().startIpAddress()); + Assertions.assertEquals("oljxkcgx", response.properties().endIpAddress()); + Assertions.assertEquals("xsffgcviz", response.properties().description()); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbFirewallRulesGetWithResponseMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/FirewallRulesGetWithResponseMockTests.java similarity index 62% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbFirewallRulesGetWithResponseMockTests.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/FirewallRulesGetWithResponseMockTests.java index 98f1ca2eda69b..5d1465874b56e 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbFirewallRulesGetWithResponseMockTests.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/FirewallRulesGetWithResponseMockTests.java @@ -10,18 +10,18 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.horizondb.HorizonDbManager; -import com.azure.resourcemanager.horizondb.models.HorizonDbFirewallRule; +import com.azure.resourcemanager.horizondb.models.FirewallRule; 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 HorizonDbFirewallRulesGetWithResponseMockTests { +public final class FirewallRulesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"startIpAddress\":\"zrpzb\",\"endIpAddress\":\"hckqqzqioxiy\",\"description\":\"iizynkedyatrwyh\",\"provisioningState\":\"InProgress\"},\"id\":\"zyh\",\"name\":\"itsmypyyn\",\"type\":\"cdpu\"}"; + = "{\"properties\":{\"startIpAddress\":\"gdxpg\",\"endIpAddress\":\"qchiszep\",\"description\":\"bjcrxgibbdaxco\",\"provisioningState\":\"Canceled\"},\"id\":\"auorsukokw\",\"name\":\"qplhlvnu\",\"type\":\"epzl\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,12 +30,12 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - HorizonDbFirewallRule response = manager.horizonDbFirewallRules() - .getWithResponse("op", "odlqiyntor", "ihleos", "swsrms", com.azure.core.util.Context.NONE) + FirewallRule response = manager.firewallRules() + .getWithResponse("sutujba", "pjuohminyfl", "orwmduvwpklv", "w", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("zrpzb", response.properties().startIpAddress()); - Assertions.assertEquals("hckqqzqioxiy", response.properties().endIpAddress()); - Assertions.assertEquals("iizynkedyatrwyh", response.properties().description()); + Assertions.assertEquals("gdxpg", response.properties().startIpAddress()); + Assertions.assertEquals("qchiszep", response.properties().endIpAddress()); + Assertions.assertEquals("bjcrxgibbdaxco", response.properties().description()); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbFirewallRulesListMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/FirewallRulesListMockTests.java similarity index 62% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbFirewallRulesListMockTests.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/FirewallRulesListMockTests.java index e4c5765a83be3..40f44c7012189 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbFirewallRulesListMockTests.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/FirewallRulesListMockTests.java @@ -11,18 +11,18 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.horizondb.HorizonDbManager; -import com.azure.resourcemanager.horizondb.models.HorizonDbFirewallRule; +import com.azure.resourcemanager.horizondb.models.FirewallRule; 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 HorizonDbFirewallRulesListMockTests { +public final class FirewallRulesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"startIpAddress\":\"ok\",\"endIpAddress\":\"tllxdyhgsyocogj\",\"description\":\"dtbnnha\",\"provisioningState\":\"InProgress\"},\"id\":\"rkvcikhnvpa\",\"name\":\"qgxqquezikyw\",\"type\":\"gxk\"}]}"; + = "{\"value\":[{\"properties\":{\"startIpAddress\":\"jhhgdnhxmsi\",\"endIpAddress\":\"fomiloxgg\",\"description\":\"fi\",\"provisioningState\":\"Canceled\"},\"id\":\"euzaof\",\"name\":\"chvcyyysfgdo\",\"type\":\"cubiipuipw\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,11 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.horizonDbFirewallRules() - .list("nzgmwznmabik", "sorgj", "xbldtlwwrlkdmtn", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.firewallRules().list("phwzsoldweyuqdu", "vmnnrw", "biorktal", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ok", response.iterator().next().properties().startIpAddress()); - Assertions.assertEquals("tllxdyhgsyocogj", response.iterator().next().properties().endIpAddress()); - Assertions.assertEquals("dtbnnha", response.iterator().next().properties().description()); + Assertions.assertEquals("jhhgdnhxmsi", response.iterator().next().properties().startIpAddress()); + Assertions.assertEquals("fomiloxgg", response.iterator().next().properties().endIpAddress()); + Assertions.assertEquals("fi", response.iterator().next().properties().description()); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorAddTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorAddTests.java deleted file mode 100644 index 053107b4cb950..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorAddTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.horizondb.models.HorizonDbAdministratorAdd; -import com.azure.resourcemanager.horizondb.models.HorizonDbAdministratorPropertiesForAdd; -import com.azure.resourcemanager.horizondb.models.PrincipalTypes; -import org.junit.jupiter.api.Assertions; - -public final class HorizonDbAdministratorAddTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HorizonDbAdministratorAdd model = BinaryData.fromString( - "{\"properties\":{\"principalName\":\"blmpewww\",\"principalType\":\"Group\",\"tenantId\":\"rvrnsvshqjohxc\"}}") - .toObject(HorizonDbAdministratorAdd.class); - Assertions.assertEquals("blmpewww", model.properties().principalName()); - Assertions.assertEquals(PrincipalTypes.GROUP, model.properties().principalType()); - Assertions.assertEquals("rvrnsvshqjohxc", model.properties().tenantId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HorizonDbAdministratorAdd model = new HorizonDbAdministratorAdd() - .withProperties(new HorizonDbAdministratorPropertiesForAdd().withPrincipalName("blmpewww") - .withPrincipalType(PrincipalTypes.GROUP) - .withTenantId("rvrnsvshqjohxc")); - model = BinaryData.fromObject(model).toObject(HorizonDbAdministratorAdd.class); - Assertions.assertEquals("blmpewww", model.properties().principalName()); - Assertions.assertEquals(PrincipalTypes.GROUP, model.properties().principalType()); - Assertions.assertEquals("rvrnsvshqjohxc", model.properties().tenantId()); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorInnerTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorInnerTests.java deleted file mode 100644 index 2881bed0612b4..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorInnerTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbAdministratorInner; -import com.azure.resourcemanager.horizondb.models.PrincipalTypes; -import org.junit.jupiter.api.Assertions; - -public final class HorizonDbAdministratorInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HorizonDbAdministratorInner model = BinaryData.fromString( - "{\"properties\":{\"principalName\":\"hzxct\",\"principalType\":\"ServicePrincipal\",\"objectId\":\"bkdmo\",\"tenantId\":\"postmgrcfbunrm\",\"provisioningState\":\"Canceled\"},\"id\":\"hkxbpv\",\"name\":\"ymjhxxjyngudivkr\",\"type\":\"swbxqz\"}") - .toObject(HorizonDbAdministratorInner.class); - Assertions.assertEquals("hzxct", model.properties().principalName()); - Assertions.assertEquals(PrincipalTypes.SERVICE_PRINCIPAL, model.properties().principalType()); - Assertions.assertEquals("postmgrcfbunrm", model.properties().tenantId()); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorListResultTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorListResultTests.java deleted file mode 100644 index a9683dbc190f7..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorListResultTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.horizondb.implementation.models.HorizonDbAdministratorListResult; -import com.azure.resourcemanager.horizondb.models.PrincipalTypes; -import org.junit.jupiter.api.Assertions; - -public final class HorizonDbAdministratorListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HorizonDbAdministratorListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"principalName\":\"qfsubcgjbirx\",\"principalType\":\"Group\",\"objectId\":\"bsrfbj\",\"tenantId\":\"twss\",\"provisioningState\":\"Succeeded\"},\"id\":\"pvjzbe\",\"name\":\"ilzznfqqnvwp\",\"type\":\"qtaruoujmkcjhwq\"},{\"properties\":{\"principalName\":\"jrybnwjewgdrjer\",\"principalType\":\"Group\",\"objectId\":\"enq\",\"tenantId\":\"hin\",\"provisioningState\":\"Succeeded\"},\"id\":\"mifthnzdnd\",\"name\":\"l\",\"type\":\"nayqi\"},{\"properties\":{\"principalName\":\"nduhavhqlkthum\",\"principalType\":\"User\",\"objectId\":\"lbg\",\"tenantId\":\"duiertgcc\",\"provisioningState\":\"Succeeded\"},\"id\":\"olpsslqlf\",\"name\":\"mdnbbglzpswiy\",\"type\":\"mcwyhzdxssadb\"},{\"properties\":{\"principalName\":\"nvdfznuda\",\"principalType\":\"ServicePrincipal\",\"objectId\":\"xzb\",\"tenantId\":\"blylpstdbh\",\"provisioningState\":\"Failed\"},\"id\":\"zdzucerscdntnevf\",\"name\":\"wjmy\",\"type\":\"tdss\"}],\"nextLink\":\"wtmwerio\"}") - .toObject(HorizonDbAdministratorListResult.class); - Assertions.assertEquals("qfsubcgjbirx", model.value().get(0).properties().principalName()); - Assertions.assertEquals(PrincipalTypes.GROUP, model.value().get(0).properties().principalType()); - Assertions.assertEquals("twss", model.value().get(0).properties().tenantId()); - Assertions.assertEquals("wtmwerio", model.nextLink()); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorPropertiesForAddTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorPropertiesForAddTests.java deleted file mode 100644 index 34fbcd4e10d2d..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorPropertiesForAddTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.horizondb.models.HorizonDbAdministratorPropertiesForAdd; -import com.azure.resourcemanager.horizondb.models.PrincipalTypes; -import org.junit.jupiter.api.Assertions; - -public final class HorizonDbAdministratorPropertiesForAddTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HorizonDbAdministratorPropertiesForAdd model = BinaryData - .fromString("{\"principalName\":\"sbfov\",\"principalType\":\"ServicePrincipal\",\"tenantId\":\"ruvw\"}") - .toObject(HorizonDbAdministratorPropertiesForAdd.class); - Assertions.assertEquals("sbfov", model.principalName()); - Assertions.assertEquals(PrincipalTypes.SERVICE_PRINCIPAL, model.principalType()); - Assertions.assertEquals("ruvw", model.tenantId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HorizonDbAdministratorPropertiesForAdd model - = new HorizonDbAdministratorPropertiesForAdd().withPrincipalName("sbfov") - .withPrincipalType(PrincipalTypes.SERVICE_PRINCIPAL) - .withTenantId("ruvw"); - model = BinaryData.fromObject(model).toObject(HorizonDbAdministratorPropertiesForAdd.class); - Assertions.assertEquals("sbfov", model.principalName()); - Assertions.assertEquals(PrincipalTypes.SERVICE_PRINCIPAL, model.principalType()); - Assertions.assertEquals("ruvw", model.tenantId()); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorPropertiesTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorPropertiesTests.java deleted file mode 100644 index 1fc4184139684..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorPropertiesTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.horizondb.models.HorizonDbAdministratorProperties; -import com.azure.resourcemanager.horizondb.models.PrincipalTypes; -import org.junit.jupiter.api.Assertions; - -public final class HorizonDbAdministratorPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HorizonDbAdministratorProperties model = BinaryData.fromString( - "{\"principalName\":\"szjfauvjfdxxivet\",\"principalType\":\"Unknown\",\"objectId\":\"qaqtdoqmcbxvwvxy\",\"tenantId\":\"qbhsfxobl\",\"provisioningState\":\"Canceled\"}") - .toObject(HorizonDbAdministratorProperties.class); - Assertions.assertEquals("szjfauvjfdxxivet", model.principalName()); - Assertions.assertEquals(PrincipalTypes.UNKNOWN, model.principalType()); - Assertions.assertEquals("qbhsfxobl", model.tenantId()); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClusterManagedServiceIdentityTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClusterManagedServiceIdentityTests.java new file mode 100644 index 0000000000000..8cead729307cc --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClusterManagedServiceIdentityTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.HorizonDbClusterIdentityType; +import com.azure.resourcemanager.horizondb.models.HorizonDbClusterManagedServiceIdentity; +import com.azure.resourcemanager.horizondb.models.UserAssignedIdentity; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class HorizonDbClusterManagedServiceIdentityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + HorizonDbClusterManagedServiceIdentity model = BinaryData.fromString( + "{\"type\":\"None\",\"userAssignedIdentities\":{\"ouf\":{\"principalId\":\"gakeqsr\",\"clientId\":\"bzqqedqytbciq\"},\"mutduqktaps\":{\"principalId\":\"mnkzsmod\",\"clientId\":\"lougpbkw\"},\"bbjfddgmbmbexp\":{\"principalId\":\"gcue\",\"clientId\":\"umkdosvqwhbmd\"},\"lgbquxig\":{\"principalId\":\"htqqrolfp\",\"clientId\":\"s\"}}}") + .toObject(HorizonDbClusterManagedServiceIdentity.class); + Assertions.assertEquals(HorizonDbClusterIdentityType.NONE, model.type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + HorizonDbClusterManagedServiceIdentity model + = new HorizonDbClusterManagedServiceIdentity().withType(HorizonDbClusterIdentityType.NONE) + .withUserAssignedIdentities( + mapOf("ouf", new UserAssignedIdentity(), "mutduqktaps", new UserAssignedIdentity(), + "bbjfddgmbmbexp", new UserAssignedIdentity(), "lgbquxig", new UserAssignedIdentity())); + model = BinaryData.fromObject(model).toObject(HorizonDbClusterManagedServiceIdentity.class); + Assertions.assertEquals(HorizonDbClusterIdentityType.NONE, model.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/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClusterMirroringTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClusterMirroringTests.java deleted file mode 100644 index 0eb4a873f4a3c..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClusterMirroringTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.horizondb.models.HorizonDbClusterMirroring; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class HorizonDbClusterMirroringTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HorizonDbClusterMirroring model = BinaryData.fromString( - "{\"databaseNames\":[\"nhsjcnyej\",\"kryhtnapczwlokj\",\"emkkvnipjox\",\"jnchgej\"],\"userAssignedIdentityId\":\"odmailzyd\"}") - .toObject(HorizonDbClusterMirroring.class); - Assertions.assertEquals("nhsjcnyej", model.databaseNames().get(0)); - Assertions.assertEquals("odmailzyd", model.userAssignedIdentityId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HorizonDbClusterMirroring model = new HorizonDbClusterMirroring() - .withDatabaseNames(Arrays.asList("nhsjcnyej", "kryhtnapczwlokj", "emkkvnipjox", "jnchgej")) - .withUserAssignedIdentityId("odmailzyd"); - model = BinaryData.fromObject(model).toObject(HorizonDbClusterMirroring.class); - Assertions.assertEquals("nhsjcnyej", model.databaseNames().get(0)); - Assertions.assertEquals("odmailzyd", model.userAssignedIdentityId()); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClusterParameterGroupConnectionPropertiesTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClusterParameterGroupConnectionPropertiesTests.java deleted file mode 100644 index a41271c68b5e3..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClusterParameterGroupConnectionPropertiesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.horizondb.models.HorizonDbClusterParameterGroupConnectionProperties; -import org.junit.jupiter.api.Assertions; - -public final class HorizonDbClusterParameterGroupConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HorizonDbClusterParameterGroupConnectionProperties model - = BinaryData.fromString("{\"id\":\"abifpikxwczbys\",\"syncStatus\":\"pqxu\",\"applyImmediately\":false}") - .toObject(HorizonDbClusterParameterGroupConnectionProperties.class); - Assertions.assertEquals("abifpikxwczbys", model.id()); - Assertions.assertFalse(model.applyImmediately()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HorizonDbClusterParameterGroupConnectionProperties model - = new HorizonDbClusterParameterGroupConnectionProperties().withId("abifpikxwczbys") - .withApplyImmediately(false); - model = BinaryData.fromObject(model).toObject(HorizonDbClusterParameterGroupConnectionProperties.class); - Assertions.assertEquals("abifpikxwczbys", model.id()); - Assertions.assertFalse(model.applyImmediately()); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbComputeModelTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbComputeModelTests.java deleted file mode 100644 index 85826bb32c660..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbComputeModelTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.horizondb.models.HorizonDbComputeModel; -import com.azure.resourcemanager.horizondb.models.HorizonDbComputeModelType; -import org.junit.jupiter.api.Assertions; - -public final class HorizonDbComputeModelTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HorizonDbComputeModel model = BinaryData.fromString( - "{\"type\":\"Provisioned\",\"vCores\":7252116,\"minvCores\":32.048692632114616,\"maxvCores\":14.591114914034398}") - .toObject(HorizonDbComputeModel.class); - Assertions.assertEquals(HorizonDbComputeModelType.PROVISIONED, model.type()); - Assertions.assertEquals(7252116, model.vCores()); - Assertions.assertEquals(32.048692632114616D, model.minvCores()); - Assertions.assertEquals(14.591114914034398D, model.maxvCores()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HorizonDbComputeModel model = new HorizonDbComputeModel().withType(HorizonDbComputeModelType.PROVISIONED) - .withVCores(7252116) - .withMinvCores(32.048692632114616D) - .withMaxvCores(14.591114914034398D); - model = BinaryData.fromObject(model).toObject(HorizonDbComputeModel.class); - Assertions.assertEquals(HorizonDbComputeModelType.PROVISIONED, model.type()); - Assertions.assertEquals(7252116, model.vCores()); - Assertions.assertEquals(32.048692632114616D, model.minvCores()); - Assertions.assertEquals(14.591114914034398D, model.maxvCores()); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbFirewallRuleInnerTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbFirewallRuleInnerTests.java deleted file mode 100644 index 2b26260a03116..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbFirewallRuleInnerTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbFirewallRuleInner; -import com.azure.resourcemanager.horizondb.models.HorizonDbFirewallRuleProperties; -import org.junit.jupiter.api.Assertions; - -public final class HorizonDbFirewallRuleInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HorizonDbFirewallRuleInner model = BinaryData.fromString( - "{\"properties\":{\"startIpAddress\":\"jkcpr\",\"endIpAddress\":\"nwbxgjvtbvpyssz\",\"description\":\"rujqg\",\"provisioningState\":\"Canceled\"},\"id\":\"ouqfprwz\",\"name\":\"bngui\",\"type\":\"nwui\"}") - .toObject(HorizonDbFirewallRuleInner.class); - Assertions.assertEquals("jkcpr", model.properties().startIpAddress()); - Assertions.assertEquals("nwbxgjvtbvpyssz", model.properties().endIpAddress()); - Assertions.assertEquals("rujqg", model.properties().description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HorizonDbFirewallRuleInner model = new HorizonDbFirewallRuleInner() - .withProperties(new HorizonDbFirewallRuleProperties().withStartIpAddress("jkcpr") - .withEndIpAddress("nwbxgjvtbvpyssz") - .withDescription("rujqg")); - model = BinaryData.fromObject(model).toObject(HorizonDbFirewallRuleInner.class); - Assertions.assertEquals("jkcpr", model.properties().startIpAddress()); - Assertions.assertEquals("nwbxgjvtbvpyssz", model.properties().endIpAddress()); - Assertions.assertEquals("rujqg", model.properties().description()); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbFirewallRuleListResultTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbFirewallRuleListResultTests.java deleted file mode 100644 index dd5da57353e45..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbFirewallRuleListResultTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.horizondb.implementation.models.HorizonDbFirewallRuleListResult; -import org.junit.jupiter.api.Assertions; - -public final class HorizonDbFirewallRuleListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HorizonDbFirewallRuleListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"startIpAddress\":\"ymwisdkft\",\"endIpAddress\":\"wxmnteiwao\",\"description\":\"km\",\"provisioningState\":\"Succeeded\"},\"id\":\"mxdcufufsrp\",\"name\":\"mzidnsezcxtb\",\"type\":\"sgfyccsnew\"},{\"properties\":{\"startIpAddress\":\"wzjeiach\",\"endIpAddress\":\"oosflnr\",\"description\":\"fqpte\",\"provisioningState\":\"Failed\"},\"id\":\"vypyqrimzinpv\",\"name\":\"wjdk\",\"type\":\"rsoodqxhcrmnoh\"}],\"nextLink\":\"ckwhds\"}") - .toObject(HorizonDbFirewallRuleListResult.class); - Assertions.assertEquals("ymwisdkft", model.value().get(0).properties().startIpAddress()); - Assertions.assertEquals("wxmnteiwao", model.value().get(0).properties().endIpAddress()); - Assertions.assertEquals("km", model.value().get(0).properties().description()); - Assertions.assertEquals("ckwhds", model.nextLink()); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbFirewallRulePropertiesTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbFirewallRulePropertiesTests.java deleted file mode 100644 index a3acb599cb287..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbFirewallRulePropertiesTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.horizondb.models.HorizonDbFirewallRuleProperties; -import org.junit.jupiter.api.Assertions; - -public final class HorizonDbFirewallRulePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HorizonDbFirewallRuleProperties model = BinaryData.fromString( - "{\"startIpAddress\":\"gazxuf\",\"endIpAddress\":\"zuckyfi\",\"description\":\"fidfvzw\",\"provisioningState\":\"Provisioning\"}") - .toObject(HorizonDbFirewallRuleProperties.class); - Assertions.assertEquals("gazxuf", model.startIpAddress()); - Assertions.assertEquals("zuckyfi", model.endIpAddress()); - Assertions.assertEquals("fidfvzw", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HorizonDbFirewallRuleProperties model = new HorizonDbFirewallRuleProperties().withStartIpAddress("gazxuf") - .withEndIpAddress("zuckyfi") - .withDescription("fidfvzw"); - model = BinaryData.fromObject(model).toObject(HorizonDbFirewallRuleProperties.class); - Assertions.assertEquals("gazxuf", model.startIpAddress()); - Assertions.assertEquals("zuckyfi", model.endIpAddress()); - Assertions.assertEquals("fidfvzw", model.description()); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbFirewallRulesCreateOrUpdateMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbFirewallRulesCreateOrUpdateMockTests.java deleted file mode 100644 index e1290a409e06a..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbFirewallRulesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.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.horizondb.HorizonDbManager; -import com.azure.resourcemanager.horizondb.models.HorizonDbFirewallRule; -import com.azure.resourcemanager.horizondb.models.HorizonDbFirewallRuleProperties; -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 HorizonDbFirewallRulesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"startIpAddress\":\"epxgyqagvr\",\"endIpAddress\":\"mnpkukghimdblxg\",\"description\":\"mfnjh\",\"provisioningState\":\"Succeeded\"},\"id\":\"mszkkfo\",\"name\":\"rey\",\"type\":\"kzikfjawneaivxwc\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HorizonDbManager manager = HorizonDbManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - HorizonDbFirewallRule response = manager.horizonDbFirewallRules() - .define("v") - .withExistingPool("lla", "melwuipiccjz", "z") - .withProperties(new HorizonDbFirewallRuleProperties().withStartIpAddress("vc") - .withEndIpAddress("ayrhyrnx") - .withDescription("ueedndrdvs")) - .create(); - - Assertions.assertEquals("epxgyqagvr", response.properties().startIpAddress()); - Assertions.assertEquals("mnpkukghimdblxg", response.properties().endIpAddress()); - Assertions.assertEquals("mfnjh", response.properties().description()); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupConnectionPropertiesInnerTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupConnectionPropertiesInnerTests.java deleted file mode 100644 index 39f6f887cccd8..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupConnectionPropertiesInnerTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbParameterGroupConnectionPropertiesInner; - -public final class HorizonDbParameterGroupConnectionPropertiesInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HorizonDbParameterGroupConnectionPropertiesInner model - = BinaryData.fromString("{\"name\":\"fdygpfqbuaceopz\",\"id\":\"rhhuaopppcqeqx\",\"type\":\"z\"}") - .toObject(HorizonDbParameterGroupConnectionPropertiesInner.class); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupConnectionPropertiesListResultTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupConnectionPropertiesListResultTests.java deleted file mode 100644 index d2f6f666ed498..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupConnectionPropertiesListResultTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.horizondb.implementation.models.HorizonDbParameterGroupConnectionPropertiesListResult; -import org.junit.jupiter.api.Assertions; - -public final class HorizonDbParameterGroupConnectionPropertiesListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HorizonDbParameterGroupConnectionPropertiesListResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"o\",\"id\":\"bnxknalaulppg\",\"type\":\"tpnapnyiropuhpig\"},{\"name\":\"gylgqgitxmedjvcs\",\"id\":\"n\",\"type\":\"wncwzzhxgktrmg\"}],\"nextLink\":\"napkteoellw\"}") - .toObject(HorizonDbParameterGroupConnectionPropertiesListResult.class); - Assertions.assertEquals("napkteoellw", model.nextLink()); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupForPatchUpdateTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupForPatchUpdateTests.java deleted file mode 100644 index 4a4b02aa37af9..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupForPatchUpdateTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroupForPatchUpdate; -import com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroupPropertiesForPatchUpdate; -import com.azure.resourcemanager.horizondb.models.ParameterProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class HorizonDbParameterGroupForPatchUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HorizonDbParameterGroupForPatchUpdate model = BinaryData.fromString( - "{\"tags\":{\"zrnkcqvyxlwh\":\"qftiy\",\"ryavwhheunmmqh\":\"lsicohoqqnwv\",\"noc\":\"yxzk\",\"uconuqszfkbey\":\"koklya\"},\"properties\":{\"parameters\":[{\"name\":\"jmwvvj\",\"description\":\"tcxsenhwlrs\",\"value\":\"rzpwvlqdqgbiq\",\"dataType\":\"ihkaetcktvfc\",\"allowedValues\":\"fsnkymuctq\",\"isDynamic\":true,\"isReadOnly\":false,\"documentationLink\":\"rjcxerfuwu\",\"unit\":\"txfvjrbirph\"},{\"name\":\"pcyvahfnljkyqx\",\"description\":\"uujqgidokgjljyo\",\"value\":\"vcltbgsncgh\",\"dataType\":\"esz\",\"allowedValues\":\"bijhtxfvgxbf\",\"isDynamic\":true,\"isReadOnly\":false,\"documentationLink\":\"mpvecxgodebfqk\",\"unit\":\"bmpukgriwflz\"},{\"name\":\"bxzpuzycisp\",\"description\":\"zahmgkbrpyydhibn\",\"value\":\"qkpikadrgvtqagnb\",\"dataType\":\"nhijggmebfsi\",\"allowedValues\":\"butr\",\"isDynamic\":false,\"isReadOnly\":true,\"documentationLink\":\"zmhjrunmp\",\"unit\":\"tdbhrbnla\"}],\"description\":\"xmyskp\",\"applyImmediately\":true}}") - .toObject(HorizonDbParameterGroupForPatchUpdate.class); - Assertions.assertEquals("qftiy", model.tags().get("zrnkcqvyxlwh")); - Assertions.assertEquals("jmwvvj", model.properties().parameters().get(0).name()); - Assertions.assertEquals("rzpwvlqdqgbiq", model.properties().parameters().get(0).value()); - Assertions.assertEquals("xmyskp", model.properties().description()); - Assertions.assertTrue(model.properties().applyImmediately()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HorizonDbParameterGroupForPatchUpdate model = new HorizonDbParameterGroupForPatchUpdate() - .withTags(mapOf("zrnkcqvyxlwh", "qftiy", "ryavwhheunmmqh", "lsicohoqqnwv", "noc", "yxzk", "uconuqszfkbey", - "koklya")) - .withProperties(new HorizonDbParameterGroupPropertiesForPatchUpdate() - .withParameters(Arrays.asList(new ParameterProperties().withName("jmwvvj").withValue("rzpwvlqdqgbiq"), - new ParameterProperties().withName("pcyvahfnljkyqx").withValue("vcltbgsncgh"), - new ParameterProperties().withName("bxzpuzycisp").withValue("qkpikadrgvtqagnb"))) - .withDescription("xmyskp") - .withApplyImmediately(true)); - model = BinaryData.fromObject(model).toObject(HorizonDbParameterGroupForPatchUpdate.class); - Assertions.assertEquals("qftiy", model.tags().get("zrnkcqvyxlwh")); - Assertions.assertEquals("jmwvvj", model.properties().parameters().get(0).name()); - Assertions.assertEquals("rzpwvlqdqgbiq", model.properties().parameters().get(0).value()); - Assertions.assertEquals("xmyskp", model.properties().description()); - Assertions.assertTrue(model.properties().applyImmediately()); - } - - // 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/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupInnerTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupInnerTests.java deleted file mode 100644 index 41e82a9520a21..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupInnerTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbParameterGroupInner; -import com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroupProperties; -import com.azure.resourcemanager.horizondb.models.ParameterProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class HorizonDbParameterGroupInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HorizonDbParameterGroupInner model = BinaryData.fromString( - "{\"properties\":{\"parameters\":[{\"name\":\"qjpkcattpngjcrc\",\"description\":\"sqpjhvmdajvn\",\"value\":\"ounqecano\",\"dataType\":\"upfh\",\"allowedValues\":\"ltrpmopj\",\"isDynamic\":false,\"isReadOnly\":false,\"documentationLink\":\"okth\",\"unit\":\"iuaod\"}],\"description\":\"cpkvxodp\",\"pgVersion\":182574553,\"version\":1621494681,\"applyImmediately\":true,\"provisioningState\":\"Succeeded\"},\"location\":\"fuaxbe\",\"tags\":{\"wqsmbsur\":\"uokktwhrdxwz\"},\"id\":\"xim\",\"name\":\"ryocfsfksymdd\",\"type\":\"stkiiuxhqyud\"}") - .toObject(HorizonDbParameterGroupInner.class); - Assertions.assertEquals("fuaxbe", model.location()); - Assertions.assertEquals("uokktwhrdxwz", model.tags().get("wqsmbsur")); - Assertions.assertEquals("qjpkcattpngjcrc", model.properties().parameters().get(0).name()); - Assertions.assertEquals("ounqecano", model.properties().parameters().get(0).value()); - Assertions.assertEquals("cpkvxodp", model.properties().description()); - Assertions.assertEquals(182574553, model.properties().pgVersion()); - Assertions.assertTrue(model.properties().applyImmediately()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HorizonDbParameterGroupInner model = new HorizonDbParameterGroupInner().withLocation("fuaxbe") - .withTags(mapOf("wqsmbsur", "uokktwhrdxwz")) - .withProperties(new HorizonDbParameterGroupProperties() - .withParameters( - Arrays.asList(new ParameterProperties().withName("qjpkcattpngjcrc").withValue("ounqecano"))) - .withDescription("cpkvxodp") - .withPgVersion(182574553) - .withApplyImmediately(true)); - model = BinaryData.fromObject(model).toObject(HorizonDbParameterGroupInner.class); - Assertions.assertEquals("fuaxbe", model.location()); - Assertions.assertEquals("uokktwhrdxwz", model.tags().get("wqsmbsur")); - Assertions.assertEquals("qjpkcattpngjcrc", model.properties().parameters().get(0).name()); - Assertions.assertEquals("ounqecano", model.properties().parameters().get(0).value()); - Assertions.assertEquals("cpkvxodp", model.properties().description()); - Assertions.assertEquals(182574553, model.properties().pgVersion()); - Assertions.assertTrue(model.properties().applyImmediately()); - } - - // 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/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupListResultTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupListResultTests.java deleted file mode 100644 index 2c160c91d2d4c..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupListResultTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.horizondb.implementation.models.HorizonDbParameterGroupListResult; -import org.junit.jupiter.api.Assertions; - -public final class HorizonDbParameterGroupListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HorizonDbParameterGroupListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"parameters\":[{\"name\":\"ilovnot\",\"description\":\"jfcn\",\"value\":\"k\",\"dataType\":\"x\",\"allowedValues\":\"bttk\",\"isDynamic\":false,\"isReadOnly\":true,\"documentationLink\":\"vjtoqnermclfp\",\"unit\":\"hoxus\"}],\"description\":\"pabgyeps\",\"pgVersion\":1974668378,\"version\":300871013,\"applyImmediately\":true,\"provisioningState\":\"InProgress\"},\"location\":\"wpmueefj\",\"tags\":{\"onobglaocqx\":\"qkqujidsu\",\"yudxytlmoy\":\"ccm\"},\"id\":\"xv\",\"name\":\"fudwpznt\",\"type\":\"hdzhlrqj\"},{\"properties\":{\"parameters\":[{\"name\":\"rlhrxs\",\"description\":\"yvpycanuzbpzk\",\"value\":\"kuwbcrnwb\",\"dataType\":\"hhseyv\",\"allowedValues\":\"srtslhspkdeem\",\"isDynamic\":false,\"isReadOnly\":true,\"documentationLink\":\"gkvtmelmqkrhah\",\"unit\":\"juahaquhcdhmdual\"},{\"name\":\"xqpvfadmw\",\"description\":\"crgvxpvgom\",\"value\":\"fmisg\",\"dataType\":\"nbbelda\",\"allowedValues\":\"zbaliourqha\",\"isDynamic\":true,\"isReadOnly\":true,\"documentationLink\":\"hsfwxosowzxcug\",\"unit\":\"jooxdjebw\"},{\"name\":\"cwwfvovbvme\",\"description\":\"civyhzceuo\",\"value\":\"jrwjueiotwm\",\"dataType\":\"ytdxwit\",\"allowedValues\":\"rjaw\",\"isDynamic\":false,\"isReadOnly\":true,\"documentationLink\":\"ni\",\"unit\":\"x\"}],\"description\":\"kpycgklwndnhjd\",\"pgVersion\":1458194336,\"version\":1064169122,\"applyImmediately\":false,\"provisioningState\":\"Provisioning\"},\"location\":\"tdhxujznbmpowuwp\",\"tags\":{\"alupjm\":\"lve\",\"iplrbpbewtghfgb\":\"hfxobbcswsrtj\",\"wxzvlvqhjkb\":\"c\",\"iebwwaloayqcgwrt\":\"gibtnm\"},\"id\":\"j\",\"name\":\"zg\",\"type\":\"yzm\"},{\"properties\":{\"parameters\":[{\"name\":\"gmtsavjcbpwxqpsr\",\"description\":\"ftguv\",\"value\":\"uhprwmdyvxqt\",\"dataType\":\"riwwroy\",\"allowedValues\":\"exrmcqibycnojvk\",\"isDynamic\":false,\"isReadOnly\":true,\"documentationLink\":\"gzva\",\"unit\":\"pjyzhpv\"},{\"name\":\"zcjrvxdjzlmwlx\",\"description\":\"ug\",\"value\":\"zovawjvz\",\"dataType\":\"luthn\",\"allowedValues\":\"rnxipei\",\"isDynamic\":true,\"isReadOnly\":true,\"documentationLink\":\"e\",\"unit\":\"dultskz\"}],\"description\":\"tdzumveekgpw\",\"pgVersion\":311434030,\"version\":1290652027,\"applyImmediately\":false,\"provisioningState\":\"Failed\"},\"location\":\"yofd\",\"tags\":{\"ttouwaboekqvkel\":\"us\",\"xwyjsflhhc\":\"smv\",\"ixisxyawjoy\":\"aln\"},\"id\":\"qcslyjpkiid\",\"name\":\"yexz\",\"type\":\"eli\"}],\"nextLink\":\"nr\"}") - .toObject(HorizonDbParameterGroupListResult.class); - Assertions.assertEquals("wpmueefj", model.value().get(0).location()); - Assertions.assertEquals("qkqujidsu", model.value().get(0).tags().get("onobglaocqx")); - Assertions.assertEquals("ilovnot", model.value().get(0).properties().parameters().get(0).name()); - Assertions.assertEquals("k", model.value().get(0).properties().parameters().get(0).value()); - Assertions.assertEquals("pabgyeps", model.value().get(0).properties().description()); - Assertions.assertEquals(1974668378, model.value().get(0).properties().pgVersion()); - Assertions.assertTrue(model.value().get(0).properties().applyImmediately()); - Assertions.assertEquals("nr", model.nextLink()); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupPropertiesForPatchUpdateTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupPropertiesForPatchUpdateTests.java deleted file mode 100644 index 12cfe04317662..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupPropertiesForPatchUpdateTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroupPropertiesForPatchUpdate; -import com.azure.resourcemanager.horizondb.models.ParameterProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class HorizonDbParameterGroupPropertiesForPatchUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HorizonDbParameterGroupPropertiesForPatchUpdate model = BinaryData.fromString( - "{\"parameters\":[{\"name\":\"kcxywnyt\",\"description\":\"synlqidybyxczfc\",\"value\":\"aaxdbabphlwrq\",\"dataType\":\"ktsthsucocmny\",\"allowedValues\":\"zt\",\"isDynamic\":false,\"isReadOnly\":false,\"documentationLink\":\"qpuedckzywbiex\",\"unit\":\"eyueaxibxujwb\"},{\"name\":\"walm\",\"description\":\"yoxa\",\"value\":\"dkzjancuxrh\",\"dataType\":\"bavxbniwdjswzt\",\"allowedValues\":\"bpg\",\"isDynamic\":false,\"isReadOnly\":false,\"documentationLink\":\"pzxbz\",\"unit\":\"zabglcuhxwt\"},{\"name\":\"yqiklbbovplwzb\",\"description\":\"gy\",\"value\":\"uosvmkfssxqukk\",\"dataType\":\"l\",\"allowedValues\":\"gsxnkjzkdeslpv\",\"isDynamic\":false,\"isReadOnly\":false,\"documentationLink\":\"ighxpk\",\"unit\":\"zb\"},{\"name\":\"uebbaumnyqup\",\"description\":\"eojnabc\",\"value\":\"smtxpsieb\",\"dataType\":\"hvpesapskrdqm\",\"allowedValues\":\"jdhtldwkyzxu\",\"isDynamic\":false,\"isReadOnly\":true,\"documentationLink\":\"scwsv\",\"unit\":\"otogtwrupqs\"}],\"description\":\"nmic\",\"applyImmediately\":false}") - .toObject(HorizonDbParameterGroupPropertiesForPatchUpdate.class); - Assertions.assertEquals("kcxywnyt", model.parameters().get(0).name()); - Assertions.assertEquals("aaxdbabphlwrq", model.parameters().get(0).value()); - Assertions.assertEquals("nmic", model.description()); - Assertions.assertFalse(model.applyImmediately()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HorizonDbParameterGroupPropertiesForPatchUpdate model = new HorizonDbParameterGroupPropertiesForPatchUpdate() - .withParameters(Arrays.asList(new ParameterProperties().withName("kcxywnyt").withValue("aaxdbabphlwrq"), - new ParameterProperties().withName("walm").withValue("dkzjancuxrh"), - new ParameterProperties().withName("yqiklbbovplwzb").withValue("uosvmkfssxqukk"), - new ParameterProperties().withName("uebbaumnyqup").withValue("smtxpsieb"))) - .withDescription("nmic") - .withApplyImmediately(false); - model = BinaryData.fromObject(model).toObject(HorizonDbParameterGroupPropertiesForPatchUpdate.class); - Assertions.assertEquals("kcxywnyt", model.parameters().get(0).name()); - Assertions.assertEquals("aaxdbabphlwrq", model.parameters().get(0).value()); - Assertions.assertEquals("nmic", model.description()); - Assertions.assertFalse(model.applyImmediately()); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupPropertiesTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupPropertiesTests.java deleted file mode 100644 index ad1aa959c6c88..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupPropertiesTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroupProperties; -import com.azure.resourcemanager.horizondb.models.ParameterProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class HorizonDbParameterGroupPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HorizonDbParameterGroupProperties model = BinaryData.fromString( - "{\"parameters\":[{\"name\":\"qn\",\"description\":\"oczvy\",\"value\":\"qrvkdv\",\"dataType\":\"llr\",\"allowedValues\":\"vdfwatkpn\",\"isDynamic\":true,\"isReadOnly\":false,\"documentationLink\":\"bczw\",\"unit\":\"uwiqzb\"},{\"name\":\"vsovmyokac\",\"description\":\"kwlhzdo\",\"value\":\"xjmflbvv\",\"dataType\":\"hrk\",\"allowedValues\":\"iwwzjuqk\",\"isDynamic\":false,\"isReadOnly\":true,\"documentationLink\":\"wkuofoskghsauu\",\"unit\":\"jmvxie\"},{\"name\":\"ugidyjrr\",\"description\":\"y\",\"value\":\"svexcsonpclhoco\",\"dataType\":\"lkevle\",\"allowedValues\":\"zfbuhf\",\"isDynamic\":true,\"isReadOnly\":false,\"documentationLink\":\"ffeii\",\"unit\":\"lvmezyvshxmzsbbz\"},{\"name\":\"gigr\",\"description\":\"burvjxxjnspy\",\"value\":\"tko\",\"dataType\":\"kouknvudwtiu\",\"allowedValues\":\"ldngkpoci\",\"isDynamic\":false,\"isReadOnly\":true,\"documentationLink\":\"egukgjnpiucg\",\"unit\":\"evqzntypmrbp\"}],\"description\":\"c\",\"pgVersion\":1616487247,\"version\":1971484471,\"applyImmediately\":false,\"provisioningState\":\"Failed\"}") - .toObject(HorizonDbParameterGroupProperties.class); - Assertions.assertEquals("qn", model.parameters().get(0).name()); - Assertions.assertEquals("qrvkdv", model.parameters().get(0).value()); - Assertions.assertEquals("c", model.description()); - Assertions.assertEquals(1616487247, model.pgVersion()); - Assertions.assertFalse(model.applyImmediately()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HorizonDbParameterGroupProperties model = new HorizonDbParameterGroupProperties() - .withParameters(Arrays.asList(new ParameterProperties().withName("qn").withValue("qrvkdv"), - new ParameterProperties().withName("vsovmyokac").withValue("xjmflbvv"), - new ParameterProperties().withName("ugidyjrr").withValue("svexcsonpclhoco"), - new ParameterProperties().withName("gigr").withValue("tko"))) - .withDescription("c") - .withPgVersion(1616487247) - .withApplyImmediately(false); - model = BinaryData.fromObject(model).toObject(HorizonDbParameterGroupProperties.class); - Assertions.assertEquals("qn", model.parameters().get(0).name()); - Assertions.assertEquals("qrvkdv", model.parameters().get(0).value()); - Assertions.assertEquals("c", model.description()); - Assertions.assertEquals(1616487247, model.pgVersion()); - Assertions.assertFalse(model.applyImmediately()); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsCreateOrUpdateMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsCreateOrUpdateMockTests.java deleted file mode 100644 index 9dac742682247..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.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.horizondb.HorizonDbManager; -import com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroup; -import com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroupProperties; -import com.azure.resourcemanager.horizondb.models.ParameterProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class HorizonDbParameterGroupsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"parameters\":[{\"name\":\"ktgplcr\",\"description\":\"jxeznoigbrnjwmw\",\"value\":\"nbsazejjoqkag\",\"dataType\":\"sxtta\",\"allowedValues\":\"zxnfaaz\",\"isDynamic\":false,\"isReadOnly\":false,\"documentationLink\":\"dm\",\"unit\":\"j\"},{\"name\":\"wuenvr\",\"description\":\"yo\",\"value\":\"ibreb\",\"dataType\":\"aysjkixqtnqttez\",\"allowedValues\":\"fffiak\",\"isDynamic\":false,\"isReadOnly\":false,\"documentationLink\":\"tedltmmj\",\"unit\":\"yeozphvwauyqncy\"},{\"name\":\"p\",\"description\":\"ipmdscwx\",\"value\":\"pevzhfst\",\"dataType\":\"xhojuj\",\"allowedValues\":\"pelmcuvhixbjxyf\",\"isDynamic\":false,\"isReadOnly\":false,\"documentationLink\":\"ool\",\"unit\":\"tpkiwkkbnujry\"},{\"name\":\"tylbfpncurdoiw\",\"description\":\"thtywub\",\"value\":\"bihwqknfdnt\",\"dataType\":\"chrdgoihxumwcto\",\"allowedValues\":\"zj\",\"isDynamic\":false,\"isReadOnly\":false,\"documentationLink\":\"lwg\",\"unit\":\"tsbwtovvtgse\"}],\"description\":\"qfi\",\"pgVersion\":257068718,\"version\":1223110676,\"applyImmediately\":true,\"provisioningState\":\"Succeeded\"},\"location\":\"nepttwqmsni\",\"tags\":{\"k\":\"dmqnrojlpij\"},\"id\":\"xfrdd\",\"name\":\"c\",\"type\":\"atiz\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HorizonDbManager manager = HorizonDbManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - HorizonDbParameterGroup response = manager.horizonDbParameterGroups() - .define("tmtdhtmdvypgik") - .withRegion("xzb") - .withExistingResourceGroup("fq") - .withTags(mapOf("ronzmyhgfip", "owvrvmtgjqppyos", "waekrrjreafxtsgu", "sxkm")) - .withProperties(new HorizonDbParameterGroupProperties() - .withParameters(Arrays.asList(new ParameterProperties().withName("w").withValue("oqrvqqaatjin"), - new ParameterProperties().withName("s").withValue("vwz"))) - .withDescription("vqahqkghtpwi") - .withPgVersion(205565987) - .withApplyImmediately(false)) - .create(); - - Assertions.assertEquals("nepttwqmsni", response.location()); - Assertions.assertEquals("dmqnrojlpij", response.tags().get("k")); - Assertions.assertEquals("ktgplcr", response.properties().parameters().get(0).name()); - Assertions.assertEquals("nbsazejjoqkag", response.properties().parameters().get(0).value()); - Assertions.assertEquals("qfi", response.properties().description()); - Assertions.assertEquals(257068718, response.properties().pgVersion()); - Assertions.assertTrue(response.properties().applyImmediately()); - } - - // 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/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsGetByResourceGroupWithResponseMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 4b3a9e97975d2..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.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.horizondb.HorizonDbManager; -import com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroup; -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 HorizonDbParameterGroupsGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"parameters\":[{\"name\":\"ifrvtpu\",\"description\":\"jmqlgkfb\",\"value\":\"doaon\",\"dataType\":\"jcntuj\",\"allowedValues\":\"c\",\"isDynamic\":false,\"isReadOnly\":true,\"documentationLink\":\"waezkojvd\",\"unit\":\"zfoqouicybxar\"},{\"name\":\"szufoxciqopidoa\",\"description\":\"iodhkhazxkhnz\",\"value\":\"nlwntoe\",\"dataType\":\"kdwbwhkszz\",\"allowedValues\":\"rvexztvb\",\"isDynamic\":true,\"isReadOnly\":false,\"documentationLink\":\"aoyzkoow\",\"unit\":\"mnguxawqaldsyu\"}],\"description\":\"imerqfobwyznk\",\"pgVersion\":1383706321,\"version\":189482477,\"applyImmediately\":true,\"provisioningState\":\"Canceled\"},\"location\":\"a\",\"tags\":{\"kdsnfdsdoakgtdl\":\"r\",\"dlhewp\":\"kkze\",\"bbejdcngqqm\":\"sdsttwvog\"},\"id\":\"akufgmjz\",\"name\":\"wr\",\"type\":\"grtwae\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HorizonDbManager manager = HorizonDbManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - HorizonDbParameterGroup response = manager.horizonDbParameterGroups() - .getByResourceGroupWithResponse("l", "wabm", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("a", response.location()); - Assertions.assertEquals("r", response.tags().get("kdsnfdsdoakgtdl")); - Assertions.assertEquals("ifrvtpu", response.properties().parameters().get(0).name()); - Assertions.assertEquals("doaon", response.properties().parameters().get(0).value()); - Assertions.assertEquals("imerqfobwyznk", response.properties().description()); - Assertions.assertEquals(1383706321, response.properties().pgVersion()); - Assertions.assertTrue(response.properties().applyImmediately()); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsListByResourceGroupMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsListByResourceGroupMockTests.java deleted file mode 100644 index f6e024780e24c..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsListByResourceGroupMockTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.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.horizondb.HorizonDbManager; -import com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroup; -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 HorizonDbParameterGroupsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"parameters\":[{\"name\":\"bminrfdwoyuhhzi\",\"description\":\"efozbhdms\",\"value\":\"mzqhoftrmaequi\",\"dataType\":\"xicslfao\",\"allowedValues\":\"piyylhalnswhccsp\",\"isDynamic\":true,\"isReadOnly\":true,\"documentationLink\":\"itqscywuggwoluhc\",\"unit\":\"wem\"},{\"name\":\"i\",\"description\":\"brgz\",\"value\":\"msweypqwdxggicc\",\"dataType\":\"xqhuexm\",\"allowedValues\":\"tlstvlzywem\",\"isDynamic\":true,\"isReadOnly\":true,\"documentationLink\":\"dtclusiypb\",\"unit\":\"gytguslfead\"},{\"name\":\"gq\",\"description\":\"yhejhzisxgfp\",\"value\":\"olppvksrpqvujz\",\"dataType\":\"ehtwdwrft\",\"allowedValues\":\"iby\",\"isDynamic\":false,\"isReadOnly\":true,\"documentationLink\":\"shfwpracstwity\",\"unit\":\"evxccedcp\"}],\"description\":\"dyodnwzxltj\",\"pgVersion\":424916927,\"version\":798686502,\"applyImmediately\":true,\"provisioningState\":\"Canceled\"},\"location\":\"xnavvwxq\",\"tags\":{\"vfgbvfvpdboda\":\"qunyowxwlmdjr\"},\"id\":\"izsjqlhkrr\",\"name\":\"bdeibqipqk\",\"type\":\"hvxndzwmkrefajpj\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HorizonDbManager manager = HorizonDbManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.horizonDbParameterGroups().listByResourceGroup("u", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("xnavvwxq", response.iterator().next().location()); - Assertions.assertEquals("qunyowxwlmdjr", response.iterator().next().tags().get("vfgbvfvpdboda")); - Assertions.assertEquals("bminrfdwoyuhhzi", response.iterator().next().properties().parameters().get(0).name()); - Assertions.assertEquals("mzqhoftrmaequi", response.iterator().next().properties().parameters().get(0).value()); - Assertions.assertEquals("dyodnwzxltj", response.iterator().next().properties().description()); - Assertions.assertEquals(424916927, response.iterator().next().properties().pgVersion()); - Assertions.assertTrue(response.iterator().next().properties().applyImmediately()); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsListMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsListMockTests.java deleted file mode 100644 index 74ec3fcc9681c..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsListMockTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.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.horizondb.HorizonDbManager; -import com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroup; -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 HorizonDbParameterGroupsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"parameters\":[{\"name\":\"nyhgbijtji\",\"description\":\"xzsjabib\",\"value\":\"stawfsdjpvkv\",\"dataType\":\"jxbkzbzkdvn\",\"allowedValues\":\"abudurgk\",\"isDynamic\":true,\"isReadOnly\":false,\"documentationLink\":\"hjjklff\",\"unit\":\"ouw\"},{\"name\":\"gzrf\",\"description\":\"eyebizikayuhql\",\"value\":\"bs\",\"dataType\":\"bqwrvtldgm\",\"allowedValues\":\"gvmpipaslthaqfx\",\"isDynamic\":true,\"isReadOnly\":false,\"documentationLink\":\"wbdsr\",\"unit\":\"pdrhne\"}],\"description\":\"owqkdwytisi\",\"pgVersion\":909535969,\"version\":1043585640,\"applyImmediately\":true,\"provisioningState\":\"Failed\"},\"location\":\"imejzanl\",\"tags\":{\"zonokixrjqci\":\"iavrm\"},\"id\":\"gzpfrla\",\"name\":\"szrnwo\",\"type\":\"indfpwpjyl\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HorizonDbManager manager = HorizonDbManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.horizonDbParameterGroups().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("imejzanl", response.iterator().next().location()); - Assertions.assertEquals("iavrm", response.iterator().next().tags().get("zonokixrjqci")); - Assertions.assertEquals("nyhgbijtji", response.iterator().next().properties().parameters().get(0).name()); - Assertions.assertEquals("stawfsdjpvkv", response.iterator().next().properties().parameters().get(0).value()); - Assertions.assertEquals("owqkdwytisi", response.iterator().next().properties().description()); - Assertions.assertEquals(909535969, response.iterator().next().properties().pgVersion()); - Assertions.assertTrue(response.iterator().next().properties().applyImmediately()); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsListVersionsMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsListVersionsMockTests.java deleted file mode 100644 index 570de0c4fbef6..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsListVersionsMockTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.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.horizondb.HorizonDbManager; -import com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroup; -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 HorizonDbParameterGroupsListVersionsMockTests { - @Test - public void testListVersions() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"parameters\":[{\"name\":\"xsowu\",\"description\":\"uqhhahhxvrh\",\"value\":\"kwpjgwwspughftqs\",\"dataType\":\"qxujxukndxd\",\"allowedValues\":\"rjguufzdmsyqtf\",\"isDynamic\":true,\"isReadOnly\":true,\"documentationLink\":\"tzingamvpph\",\"unit\":\"zqzudph\"},{\"name\":\"mvdk\",\"description\":\"ynwcvtbv\",\"value\":\"yhmtnvyqiat\",\"dataType\":\"wp\",\"allowedValues\":\"p\",\"isDynamic\":true,\"isReadOnly\":false,\"documentationLink\":\"sgvvsccyajguq\",\"unit\":\"wygzlvdnkfxusem\"}],\"description\":\"zrmuhapfcqdps\",\"pgVersion\":399879139,\"version\":124988622,\"applyImmediately\":false,\"provisioningState\":\"Failed\"},\"location\":\"mgccelvezrypq\",\"tags\":{\"edkowepbqpcrfk\":\"eokerqwkyhkobopg\"},\"id\":\"wccsnjvcdwxlpqek\",\"name\":\"tn\",\"type\":\"htjsying\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HorizonDbManager manager = HorizonDbManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response = manager.horizonDbParameterGroups() - .listVersions("hldvriii", "jnalghf", 1358973508, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("mgccelvezrypq", response.iterator().next().location()); - Assertions.assertEquals("eokerqwkyhkobopg", response.iterator().next().tags().get("edkowepbqpcrfk")); - Assertions.assertEquals("xsowu", response.iterator().next().properties().parameters().get(0).name()); - Assertions.assertEquals("kwpjgwwspughftqs", - response.iterator().next().properties().parameters().get(0).value()); - Assertions.assertEquals("zrmuhapfcqdps", response.iterator().next().properties().description()); - Assertions.assertEquals(399879139, response.iterator().next().properties().pgVersion()); - Assertions.assertFalse(response.iterator().next().properties().applyImmediately()); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPoolInnerTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPoolInnerTests.java deleted file mode 100644 index 439468cd015fd..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPoolInnerTests.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbPoolInner; -import org.junit.jupiter.api.Assertions; - -public final class HorizonDbPoolInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HorizonDbPoolInner model = BinaryData.fromString( - "{\"properties\":{\"location\":\"podepoo\",\"state\":\"Ready\",\"replicaCount\":1290742637,\"version\":\"mihe\",\"createMode\":\"Update\",\"provisioningState\":\"InProgress\"},\"tags\":{\"o\":\"xth\",\"cciqihnhungbwjz\":\"usivye\",\"kufubljo\":\"nfygxgispemvtz\",\"v\":\"xqeofjaeqjhqjba\"},\"id\":\"mjqulngsn\",\"name\":\"nbybkzgcwrwcl\",\"type\":\"xwrljdouskcqvkoc\"}") - .toObject(HorizonDbPoolInner.class); - Assertions.assertEquals("podepoo", model.properties().location()); - Assertions.assertEquals("xth", model.tags().get("o")); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPoolListResultTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPoolListResultTests.java deleted file mode 100644 index 65559c95b41a8..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPoolListResultTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.horizondb.implementation.models.HorizonDbPoolListResult; -import org.junit.jupiter.api.Assertions; - -public final class HorizonDbPoolListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HorizonDbPoolListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"location\":\"ljfmppee\",\"state\":\"Dropping\",\"replicaCount\":168593557,\"version\":\"abkyqduujitcjcz\",\"createMode\":\"Create\",\"provisioningState\":\"Succeeded\"},\"tags\":{\"dsbdkvwrwjf\":\"krwpdap\"},\"id\":\"snhu\",\"name\":\"je\",\"type\":\"tmrldhugjzzdatq\"}],\"nextLink\":\"oc\"}") - .toObject(HorizonDbPoolListResult.class); - Assertions.assertEquals("ljfmppee", model.value().get(0).properties().location()); - Assertions.assertEquals("krwpdap", model.value().get(0).tags().get("dsbdkvwrwjf")); - Assertions.assertEquals("oc", model.nextLink()); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPoolPropertiesTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPoolPropertiesTests.java deleted file mode 100644 index 708388ce36c16..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPoolPropertiesTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.horizondb.models.HorizonDbPoolProperties; -import org.junit.jupiter.api.Assertions; - -public final class HorizonDbPoolPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HorizonDbPoolProperties model = BinaryData.fromString( - "{\"location\":\"jdkwtnhxbnjb\",\"state\":\"Disabled\",\"replicaCount\":588901049,\"version\":\"lssai\",\"createMode\":\"Create\",\"provisioningState\":\"Failed\"}") - .toObject(HorizonDbPoolProperties.class); - Assertions.assertEquals("jdkwtnhxbnjb", model.location()); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateLinkResourceInnerTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateLinkResourceInnerTests.java deleted file mode 100644 index 3673d8b0693f6..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateLinkResourceInnerTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbPrivateLinkResourceInner; -import org.junit.jupiter.api.Assertions; - -public final class HorizonDbPrivateLinkResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HorizonDbPrivateLinkResourceInner model = BinaryData.fromString( - "{\"properties\":{\"groupId\":\"i\",\"requiredMembers\":[\"hzrvqd\"],\"requiredZoneNames\":[\"hjybigehoqfbo\"]},\"id\":\"kanyktzlcuiywg\",\"name\":\"ywgndrv\",\"type\":\"nhzgpphrcgyn\"}") - .toObject(HorizonDbPrivateLinkResourceInner.class); - Assertions.assertEquals("hjybigehoqfbo", model.properties().requiredZoneNames().get(0)); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateLinkResourceListResultTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateLinkResourceListResultTests.java deleted file mode 100644 index 46fb345f71268..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateLinkResourceListResultTests.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.horizondb.implementation.models.HorizonDbPrivateLinkResourceListResult; -import org.junit.jupiter.api.Assertions; - -public final class HorizonDbPrivateLinkResourceListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HorizonDbPrivateLinkResourceListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"wnfnbacf\",\"requiredMembers\":[\"l\",\"bxetqgtzxdpn\",\"bqqwxrj\",\"eallnwsubisnj\"],\"requiredZoneNames\":[\"mngnzscxaqw\"]},\"id\":\"chcbonqvpkvlrxnj\",\"name\":\"ase\",\"type\":\"pheoflokeyy\"},{\"properties\":{\"groupId\":\"jbdlwtgrhpdjpju\",\"requiredMembers\":[\"xazjpqyegual\",\"b\"],\"requiredZoneNames\":[\"e\",\"jzzvdud\"]},\"id\":\"dslfhotwmcy\",\"name\":\"pwlbjnpg\",\"type\":\"cftadeh\"},{\"properties\":{\"groupId\":\"tyfsoppusuesn\",\"requiredMembers\":[\"ej\",\"avo\"],\"requiredZoneNames\":[\"dmoh\",\"tbqvudw\",\"dndnvow\"]},\"id\":\"jjugwdkcglhslaz\",\"name\":\"dyggdtjixhbku\",\"type\":\"fqweykhmene\"},{\"properties\":{\"groupId\":\"exfwhy\",\"requiredMembers\":[\"bvyvdcsity\"],\"requiredZoneNames\":[\"amdecte\",\"f\"]},\"id\":\"scjeypv\",\"name\":\"ezrkgqhcjrefo\",\"type\":\"gm\"}],\"nextLink\":\"sle\"}") - .toObject(HorizonDbPrivateLinkResourceListResult.class); - Assertions.assertEquals("mngnzscxaqw", model.value().get(0).properties().requiredZoneNames().get(0)); - Assertions.assertEquals("sle", model.nextLink()); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicaForPatchUpdateTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicaForPatchUpdateTests.java deleted file mode 100644 index 09eaec68dfc27..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicaForPatchUpdateTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.horizondb.models.HorizonDbReplicaForPatchUpdate; -import com.azure.resourcemanager.horizondb.models.HorizonDbReplicaPropertiesForPatchUpdate; -import com.azure.resourcemanager.horizondb.models.ReplicaRole; -import org.junit.jupiter.api.Assertions; - -public final class HorizonDbReplicaForPatchUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HorizonDbReplicaForPatchUpdate model = BinaryData.fromString("{\"properties\":{\"role\":\"ReadWrite\"}}") - .toObject(HorizonDbReplicaForPatchUpdate.class); - Assertions.assertEquals(ReplicaRole.READ_WRITE, model.properties().role()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HorizonDbReplicaForPatchUpdate model = new HorizonDbReplicaForPatchUpdate() - .withProperties(new HorizonDbReplicaPropertiesForPatchUpdate().withRole(ReplicaRole.READ_WRITE)); - model = BinaryData.fromObject(model).toObject(HorizonDbReplicaForPatchUpdate.class); - Assertions.assertEquals(ReplicaRole.READ_WRITE, model.properties().role()); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicaInnerTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicaInnerTests.java deleted file mode 100644 index 7f03c81ce5ab0..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicaInnerTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.horizondb.fluent.models.HorizonDbReplicaInner; -import com.azure.resourcemanager.horizondb.models.HorizonDbReplicaProperties; -import com.azure.resourcemanager.horizondb.models.ReplicaRole; -import org.junit.jupiter.api.Assertions; - -public final class HorizonDbReplicaInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HorizonDbReplicaInner model = BinaryData.fromString( - "{\"properties\":{\"role\":\"ReadWrite\",\"status\":\"Dropping\",\"fullyQualifiedDomainName\":\"phut\",\"availabilityZone\":\"ndv\",\"provisioningState\":\"Canceled\"},\"id\":\"wyiftyhxhur\",\"name\":\"k\",\"type\":\"tyxolniwpwc\"}") - .toObject(HorizonDbReplicaInner.class); - Assertions.assertEquals(ReplicaRole.READ_WRITE, model.properties().role()); - Assertions.assertEquals("ndv", model.properties().availabilityZone()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HorizonDbReplicaInner model = new HorizonDbReplicaInner().withProperties( - new HorizonDbReplicaProperties().withRole(ReplicaRole.READ_WRITE).withAvailabilityZone("ndv")); - model = BinaryData.fromObject(model).toObject(HorizonDbReplicaInner.class); - Assertions.assertEquals(ReplicaRole.READ_WRITE, model.properties().role()); - Assertions.assertEquals("ndv", model.properties().availabilityZone()); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicaListResultTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicaListResultTests.java deleted file mode 100644 index 5c9b9def2f480..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicaListResultTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.horizondb.implementation.models.HorizonDbReplicaListResult; -import com.azure.resourcemanager.horizondb.models.ReplicaRole; -import org.junit.jupiter.api.Assertions; - -public final class HorizonDbReplicaListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HorizonDbReplicaListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"role\":\"ReadWrite\",\"status\":\"Ready\",\"fullyQualifiedDomainName\":\"ejk\",\"availabilityZone\":\"ynqgoulzndlikwyq\",\"provisioningState\":\"Failed\"},\"id\":\"ibmadgakeqsrxy\",\"name\":\"zqqedq\",\"type\":\"tbciqfouflmm\"},{\"properties\":{\"role\":\"ReadWrite\",\"status\":\"Ready\",\"fullyQualifiedDomainName\":\"mglougpbkw\",\"availabilityZone\":\"utduqktapspwgcu\",\"provisioningState\":\"InProgress\"},\"id\":\"mkdo\",\"name\":\"vqwhbmdgbbjfd\",\"type\":\"gmbmbexppbh\"},{\"properties\":{\"role\":\"Read\",\"status\":\"Updating\",\"fullyQualifiedDomainName\":\"p\",\"availabilityZone\":\"s\",\"provisioningState\":\"Succeeded\"},\"id\":\"qux\",\"name\":\"gjyjgzjaoyfhrtxi\",\"type\":\"n\"}],\"nextLink\":\"kujysvlejuvfq\"}") - .toObject(HorizonDbReplicaListResult.class); - Assertions.assertEquals(ReplicaRole.READ_WRITE, model.value().get(0).properties().role()); - Assertions.assertEquals("ynqgoulzndlikwyq", model.value().get(0).properties().availabilityZone()); - Assertions.assertEquals("kujysvlejuvfq", model.nextLink()); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicaPropertiesForPatchUpdateTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicaPropertiesForPatchUpdateTests.java deleted file mode 100644 index a178deb9396fe..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicaPropertiesForPatchUpdateTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.horizondb.models.HorizonDbReplicaPropertiesForPatchUpdate; -import com.azure.resourcemanager.horizondb.models.ReplicaRole; -import org.junit.jupiter.api.Assertions; - -public final class HorizonDbReplicaPropertiesForPatchUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HorizonDbReplicaPropertiesForPatchUpdate model = BinaryData.fromString("{\"role\":\"ReadWrite\"}") - .toObject(HorizonDbReplicaPropertiesForPatchUpdate.class); - Assertions.assertEquals(ReplicaRole.READ_WRITE, model.role()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HorizonDbReplicaPropertiesForPatchUpdate model - = new HorizonDbReplicaPropertiesForPatchUpdate().withRole(ReplicaRole.READ_WRITE); - model = BinaryData.fromObject(model).toObject(HorizonDbReplicaPropertiesForPatchUpdate.class); - Assertions.assertEquals(ReplicaRole.READ_WRITE, model.role()); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicaPropertiesTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicaPropertiesTests.java deleted file mode 100644 index 2ffab056c1d1e..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicaPropertiesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.horizondb.models.HorizonDbReplicaProperties; -import com.azure.resourcemanager.horizondb.models.ReplicaRole; -import org.junit.jupiter.api.Assertions; - -public final class HorizonDbReplicaPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HorizonDbReplicaProperties model = BinaryData.fromString( - "{\"role\":\"ReadWrite\",\"status\":\"Dropping\",\"fullyQualifiedDomainName\":\"iawxklry\",\"availabilityZone\":\"wckbasyypnd\",\"provisioningState\":\"InProgress\"}") - .toObject(HorizonDbReplicaProperties.class); - Assertions.assertEquals(ReplicaRole.READ_WRITE, model.role()); - Assertions.assertEquals("wckbasyypnd", model.availabilityZone()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HorizonDbReplicaProperties model - = new HorizonDbReplicaProperties().withRole(ReplicaRole.READ_WRITE).withAvailabilityZone("wckbasyypnd"); - model = BinaryData.fromObject(model).toObject(HorizonDbReplicaProperties.class); - Assertions.assertEquals(ReplicaRole.READ_WRITE, model.role()); - Assertions.assertEquals("wckbasyypnd", model.availabilityZone()); - } -} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationForPatchUpdateTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationForPatchUpdateTests.java new file mode 100644 index 0000000000000..79682f91148e3 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationForPatchUpdateTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.LogCaptureConfigurationForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.LogCaptureConfigurationPropertiesForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.LogCaptureState; +import org.junit.jupiter.api.Assertions; + +public final class LogCaptureConfigurationForPatchUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LogCaptureConfigurationForPatchUpdate model + = BinaryData.fromString("{\"properties\":{\"state\":\"Disabled\",\"retentionDays\":1274938421}}") + .toObject(LogCaptureConfigurationForPatchUpdate.class); + Assertions.assertEquals(LogCaptureState.DISABLED, model.properties().state()); + Assertions.assertEquals(1274938421, model.properties().retentionDays()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LogCaptureConfigurationForPatchUpdate model = new LogCaptureConfigurationForPatchUpdate() + .withProperties(new LogCaptureConfigurationPropertiesForPatchUpdate().withState(LogCaptureState.DISABLED) + .withRetentionDays(1274938421)); + model = BinaryData.fromObject(model).toObject(LogCaptureConfigurationForPatchUpdate.class); + Assertions.assertEquals(LogCaptureState.DISABLED, model.properties().state()); + Assertions.assertEquals(1274938421, model.properties().retentionDays()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationInnerTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationInnerTests.java new file mode 100644 index 0000000000000..ce953cd7c455f --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationInnerTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.fluent.models.LogCaptureConfigurationInner; +import com.azure.resourcemanager.horizondb.models.LogCaptureState; +import org.junit.jupiter.api.Assertions; + +public final class LogCaptureConfigurationInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LogCaptureConfigurationInner model = BinaryData.fromString( + "{\"properties\":{\"state\":\"Disabled\",\"retentionDays\":979577305,\"provisioningState\":\"Succeeded\"},\"id\":\"wyt\",\"name\":\"sibircgpi\",\"type\":\"pzimejzanlfzxi\"}") + .toObject(LogCaptureConfigurationInner.class); + Assertions.assertEquals(LogCaptureState.DISABLED, model.properties().state()); + Assertions.assertEquals(979577305, model.properties().retentionDays()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationListResultTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationListResultTests.java new file mode 100644 index 0000000000000..d5aa48c16fc1b --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationListResultTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.implementation.models.LogCaptureConfigurationListResult; +import com.azure.resourcemanager.horizondb.models.LogCaptureState; +import org.junit.jupiter.api.Assertions; + +public final class LogCaptureConfigurationListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LogCaptureConfigurationListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"state\":\"Enabled\",\"retentionDays\":749799353,\"provisioningState\":\"Failed\"},\"id\":\"frl\",\"name\":\"zszrnwoiindfpw\",\"type\":\"jylwbtlhflsj\"}],\"nextLink\":\"hszfjvfb\"}") + .toObject(LogCaptureConfigurationListResult.class); + Assertions.assertEquals(LogCaptureState.ENABLED, model.value().get(0).properties().state()); + Assertions.assertEquals(749799353, model.value().get(0).properties().retentionDays()); + Assertions.assertEquals("hszfjvfb", model.nextLink()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationPropertiesForPatchUpdateTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationPropertiesForPatchUpdateTests.java new file mode 100644 index 0000000000000..2ee99514f6896 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationPropertiesForPatchUpdateTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.LogCaptureConfigurationPropertiesForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.LogCaptureState; +import org.junit.jupiter.api.Assertions; + +public final class LogCaptureConfigurationPropertiesForPatchUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LogCaptureConfigurationPropertiesForPatchUpdate model + = BinaryData.fromString("{\"state\":\"Disabled\",\"retentionDays\":485732763}") + .toObject(LogCaptureConfigurationPropertiesForPatchUpdate.class); + Assertions.assertEquals(LogCaptureState.DISABLED, model.state()); + Assertions.assertEquals(485732763, model.retentionDays()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LogCaptureConfigurationPropertiesForPatchUpdate model + = new LogCaptureConfigurationPropertiesForPatchUpdate().withState(LogCaptureState.DISABLED) + .withRetentionDays(485732763); + model = BinaryData.fromObject(model).toObject(LogCaptureConfigurationPropertiesForPatchUpdate.class); + Assertions.assertEquals(LogCaptureState.DISABLED, model.state()); + Assertions.assertEquals(485732763, model.retentionDays()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationPropertiesTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationPropertiesTests.java new file mode 100644 index 0000000000000..9dcb953661887 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationPropertiesTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.LogCaptureConfigurationProperties; +import com.azure.resourcemanager.horizondb.models.LogCaptureState; +import org.junit.jupiter.api.Assertions; + +public final class LogCaptureConfigurationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LogCaptureConfigurationProperties model = BinaryData + .fromString("{\"state\":\"Enabled\",\"retentionDays\":1297052787,\"provisioningState\":\"InProgress\"}") + .toObject(LogCaptureConfigurationProperties.class); + Assertions.assertEquals(LogCaptureState.ENABLED, model.state()); + Assertions.assertEquals(1297052787, model.retentionDays()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPoolsGetWithResponseMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationsGetWithResponseMockTests.java similarity index 61% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPoolsGetWithResponseMockTests.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationsGetWithResponseMockTests.java index 63cb2f01482d1..fc3426d96f8fc 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPoolsGetWithResponseMockTests.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationsGetWithResponseMockTests.java @@ -10,18 +10,19 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.horizondb.HorizonDbManager; -import com.azure.resourcemanager.horizondb.models.HorizonDbPool; +import com.azure.resourcemanager.horizondb.models.LogCaptureConfiguration; +import com.azure.resourcemanager.horizondb.models.LogCaptureState; 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 HorizonDbPoolsGetWithResponseMockTests { +public final class LogCaptureConfigurationsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"location\":\"xclvit\",\"state\":\"Stopped\",\"replicaCount\":176578322,\"version\":\"osggbhc\",\"createMode\":\"Create\",\"provisioningState\":\"InProgress\"},\"tags\":{\"aljutiiswac\":\"n\",\"fvhqc\":\"fgdkzzew\",\"lvpnpp\":\"a\",\"hdlxyjrxsagafcn\":\"uflrwd\"},\"id\":\"gwq\",\"name\":\"pnedgf\",\"type\":\"cvkcvqvpkeqdcv\"}"; + = "{\"properties\":{\"state\":\"Disabled\",\"retentionDays\":341362078,\"provisioningState\":\"InProgress\"},\"id\":\"mjxlyyzglgouw\",\"name\":\"lmjjyuo\",\"type\":\"qtobaxkjeyt\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,11 +31,11 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - HorizonDbPool response = manager.horizonDbPools() - .getWithResponse("glkfg", "hdneuelfph", "dyhtozfikdowwquu", com.azure.core.util.Context.NONE) + LogCaptureConfiguration response = manager.logCaptureConfigurations() + .getWithResponse("znnbsoqeqalarvl", "gunbtgfebwlnbm", "yreeudz", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("xclvit", response.properties().location()); - Assertions.assertEquals("n", response.tags().get("aljutiiswac")); + Assertions.assertEquals(LogCaptureState.DISABLED, response.properties().state()); + Assertions.assertEquals(341362078, response.properties().retentionDays()); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPoolsListMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationsListMockTests.java similarity index 62% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPoolsListMockTests.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationsListMockTests.java index 2a64a1658553f..321f5d580eaa8 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPoolsListMockTests.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationsListMockTests.java @@ -11,18 +11,19 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.horizondb.HorizonDbManager; -import com.azure.resourcemanager.horizondb.models.HorizonDbPool; +import com.azure.resourcemanager.horizondb.models.LogCaptureConfiguration; +import com.azure.resourcemanager.horizondb.models.LogCaptureState; 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 HorizonDbPoolsListMockTests { +public final class LogCaptureConfigurationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"location\":\"cjwvn\",\"state\":\"Starting\",\"replicaCount\":3568430,\"version\":\"gx\",\"createMode\":\"Update\",\"provisioningState\":\"Succeeded\"},\"tags\":{\"egrpkhj\":\"utwu\",\"pdggkzzlvm\":\"niyqslui\"},\"id\":\"paxmodfvuefywsb\",\"name\":\"fvmwy\",\"type\":\"rfouyftaakcpw\"}]}"; + = "{\"value\":[{\"properties\":{\"state\":\"Enabled\",\"retentionDays\":351115849,\"provisioningState\":\"InProgress\"},\"id\":\"mpizru\",\"name\":\"n\",\"type\":\"qxpxiwfcngjsaa\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +32,10 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.horizonDbPools().list("rhvoods", "tbobz", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.logCaptureConfigurations().list("wey", "rdhlis", com.azure.core.util.Context.NONE); - Assertions.assertEquals("cjwvn", response.iterator().next().properties().location()); - Assertions.assertEquals("utwu", response.iterator().next().tags().get("egrpkhj")); + Assertions.assertEquals(LogCaptureState.ENABLED, response.iterator().next().properties().state()); + Assertions.assertEquals(351115849, response.iterator().next().properties().retentionDays()); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationsUpdateMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationsUpdateMockTests.java new file mode 100644 index 0000000000000..a6c20e036bb67 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogCaptureConfigurationsUpdateMockTests.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.horizondb.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.horizondb.HorizonDbManager; +import com.azure.resourcemanager.horizondb.models.LogCaptureConfiguration; +import com.azure.resourcemanager.horizondb.models.LogCaptureConfigurationForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.LogCaptureConfigurationPropertiesForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.LogCaptureState; +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 LogCaptureConfigurationsUpdateMockTests { + @Test + public void testUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"state\":\"Enabled\",\"retentionDays\":42255553,\"provisioningState\":\"Succeeded\"},\"id\":\"kdk\",\"name\":\"fmjnnawtqa\",\"type\":\"pxuckpggq\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HorizonDbManager manager = HorizonDbManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + LogCaptureConfiguration response = manager.logCaptureConfigurations() + .update("nlb", "jkwrusnkq", "hsyrqunj", + new LogCaptureConfigurationForPatchUpdate().withProperties( + new LogCaptureConfigurationPropertiesForPatchUpdate().withState(LogCaptureState.ENABLED) + .withRetentionDays(2136418443)), + com.azure.core.util.Context.NONE); + + Assertions.assertEquals(LogCaptureState.ENABLED, response.properties().state()); + Assertions.assertEquals(42255553, response.properties().retentionDays()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogFileDownloadUrlInnerTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogFileDownloadUrlInnerTests.java new file mode 100644 index 0000000000000..32d91827e9c23 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogFileDownloadUrlInnerTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.fluent.models.LogFileDownloadUrlInner; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class LogFileDownloadUrlInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LogFileDownloadUrlInner model + = BinaryData.fromString("{\"downloadUri\":\"mdvy\",\"expiresAtUtc\":\"2021-08-05T12:13:03Z\"}") + .toObject(LogFileDownloadUrlInner.class); + Assertions.assertEquals("mdvy", model.downloadUri()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-05T12:13:03Z"), model.expiresAtUtc()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogFileInnerTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogFileInnerTests.java new file mode 100644 index 0000000000000..d52828200ad4c --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogFileInnerTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.fluent.models.LogFileInner; + +public final class LogFileInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LogFileInner model = BinaryData.fromString( + "{\"properties\":{\"logType\":\"PostgreSqlServer\",\"createdAtUtc\":\"2021-05-01T16:56:13Z\",\"lastModifiedAtUtc\":\"2021-12-07T09:36:22Z\",\"retentionExpiresAtUtc\":\"2021-03-16T08:43:43Z\",\"isMutable\":false,\"sizeInKilobytes\":4038204930571080777,\"pool\":\"qmqhldvriii\",\"node\":\"jnalghf\",\"role\":\"ReadWrite\"},\"id\":\"vsexsowuelu\",\"name\":\"hhahhxvrhmzkwpjg\",\"type\":\"wspughftqsxhqx\"}") + .toObject(LogFileInner.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogFileListResultTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogFileListResultTests.java new file mode 100644 index 0000000000000..d9f0902983b82 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogFileListResultTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.implementation.models.LogFileListResult; +import org.junit.jupiter.api.Assertions; + +public final class LogFileListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LogFileListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"logType\":\"PostgreSqlServer\",\"createdAtUtc\":\"2021-12-08T15:37:46Z\",\"lastModifiedAtUtc\":\"2021-10-18T15:07:25Z\",\"retentionExpiresAtUtc\":\"2021-04-12T06:16:52Z\",\"isMutable\":true,\"sizeInKilobytes\":8365308553932036978,\"pool\":\"amvdkfwynwcvtbv\",\"node\":\"ayhmtnvyqiatkz\",\"role\":\"Unassigned\"},\"id\":\"npwzcjaes\",\"name\":\"vvsccyajguq\",\"type\":\"hwyg\"},{\"properties\":{\"logType\":\"PostgreSqlServer\",\"createdAtUtc\":\"2021-04-09T16:47:47Z\",\"lastModifiedAtUtc\":\"2021-12-09T19:36:39Z\",\"retentionExpiresAtUtc\":\"2021-05-24T16:37:21Z\",\"isMutable\":true,\"sizeInKilobytes\":1554120819785667906,\"pool\":\"semdwzrmu\",\"node\":\"apfcqdpsq\",\"role\":\"ReadOnly\"},\"id\":\"psvuoymgc\",\"name\":\"elvezrypq\",\"type\":\"mfe\"},{\"properties\":{\"logType\":\"PostgreSqlServer\",\"createdAtUtc\":\"2021-08-09T08:39:34Z\",\"lastModifiedAtUtc\":\"2021-10-17T10:06:59Z\",\"retentionExpiresAtUtc\":\"2021-04-01T02:04:26Z\",\"isMutable\":true,\"sizeInKilobytes\":3587377329379767061,\"pool\":\"kobopgxed\",\"node\":\"owepbqpcrfkb\",\"role\":\"ReadWrite\"},\"id\":\"snjvcdwxlpqekftn\",\"name\":\"htjsying\",\"type\":\"fq\"}],\"nextLink\":\"mtdh\"}") + .toObject(LogFileListResult.class); + Assertions.assertEquals("mtdh", model.nextLink()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogFilePropertiesTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogFilePropertiesTests.java new file mode 100644 index 0000000000000..70b7cb80a46e8 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogFilePropertiesTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.LogFileProperties; + +public final class LogFilePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LogFileProperties model = BinaryData.fromString( + "{\"logType\":\"PostgreSqlServer\",\"createdAtUtc\":\"2021-01-21T16:10:27Z\",\"lastModifiedAtUtc\":\"2021-10-26T21:17:13Z\",\"retentionExpiresAtUtc\":\"2021-06-04T22:03:42Z\",\"isMutable\":true,\"sizeInKilobytes\":6381082417075979554,\"pool\":\"digrjguufzdmsyqt\",\"node\":\"ihwhbotzingamvpp\",\"role\":\"ReadWrite\"}") + .toObject(LogFileProperties.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogFilesGetWithResponseMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogFilesGetWithResponseMockTests.java new file mode 100644 index 0000000000000..b9662e8bd0414 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogFilesGetWithResponseMockTests.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.horizondb.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.horizondb.HorizonDbManager; +import com.azure.resourcemanager.horizondb.models.LogFile; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class LogFilesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"logType\":\"PostgreSqlServer\",\"createdAtUtc\":\"2021-06-08T12:29:12Z\",\"lastModifiedAtUtc\":\"2021-03-25T11:26:29Z\",\"retentionExpiresAtUtc\":\"2021-03-02T16:22:17Z\",\"isMutable\":false,\"sizeInKilobytes\":425600276705130335,\"pool\":\"lbyvictctbrxkjzw\",\"node\":\"gxffmshkwf\",\"role\":\"Unassigned\"},\"id\":\"ozxwopd\",\"name\":\"yd\",\"type\":\"izqaclnapxbiyg\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HorizonDbManager manager = HorizonDbManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + LogFile response = manager.logFiles() + .getWithResponse("iixtmkzj", "kv", "irhgfgrwsdp", com.azure.core.util.Context.NONE) + .getValue(); + + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogFilesListDownloadUrlsWithResponseMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogFilesListDownloadUrlsWithResponseMockTests.java new file mode 100644 index 0000000000000..965484f3e4324 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogFilesListDownloadUrlsWithResponseMockTests.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.horizondb.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.horizondb.HorizonDbManager; +import com.azure.resourcemanager.horizondb.models.LogFileDownloadUrl; +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 LogFilesListDownloadUrlsWithResponseMockTests { + @Test + public void testListDownloadUrlsWithResponse() throws Exception { + String responseStr = "{\"downloadUri\":\"huxy\",\"expiresAtUtc\":\"2021-03-25T12:19:33Z\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HorizonDbManager manager = HorizonDbManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + LogFileDownloadUrl response = manager.logFiles() + .listDownloadUrlsWithResponse("rpddouifamo", "aziynknlqwzdv", "iwhxqszdtmaajq", + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("huxy", response.downloadUri()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-25T12:19:33Z"), response.expiresAtUtc()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogFilesListMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogFilesListMockTests.java new file mode 100644 index 0000000000000..7a1b883644281 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/LogFilesListMockTests.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.horizondb.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.horizondb.HorizonDbManager; +import com.azure.resourcemanager.horizondb.models.LogFile; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class LogFilesListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"logType\":\"PostgreSqlServer\",\"createdAtUtc\":\"2021-04-12T22:42:56Z\",\"lastModifiedAtUtc\":\"2021-07-13T11:30:30Z\",\"retentionExpiresAtUtc\":\"2021-10-26T11:31:47Z\",\"isMutable\":false,\"sizeInKilobytes\":8008907163889108924,\"pool\":\"iquvrehm\",\"node\":\"njhvsujztc\",\"role\":\"Unassigned\"},\"id\":\"qjtwhauu\",\"name\":\"fprnjl\",\"type\":\"tlxs\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HorizonDbManager manager = HorizonDbManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.logFiles().list("ugjknf", "mfcttux", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventActionResponseInnerTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventActionResponseInnerTests.java new file mode 100644 index 0000000000000..b1f9040719c3d --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventActionResponseInnerTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.fluent.models.MaintenanceEventActionResponseInner; +import com.azure.resourcemanager.horizondb.models.MaintenanceEventStatus; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class MaintenanceEventActionResponseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MaintenanceEventActionResponseInner model = BinaryData.fromString( + "{\"maintenanceEventId\":\"vvwxqi\",\"poolResourceId\":\"qunyowxwlmdjr\",\"status\":\"InProgress\",\"plannedStartTimeUtc\":\"2021-11-11T06:04:24Z\",\"plannedEndTimeUtc\":\"2021-11-13T18:34:35Z\",\"appliedNow\":false,\"lastUpdatedTimeUtc\":\"2021-07-21T07:28:03Z\"}") + .toObject(MaintenanceEventActionResponseInner.class); + Assertions.assertEquals("vvwxqi", model.maintenanceEventId()); + Assertions.assertEquals("qunyowxwlmdjr", model.poolResourceId()); + Assertions.assertEquals(MaintenanceEventStatus.IN_PROGRESS, model.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-11T06:04:24Z"), model.plannedStartTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-13T18:34:35Z"), model.plannedEndTimeUtc()); + Assertions.assertFalse(model.appliedNow()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-21T07:28:03Z"), model.lastUpdatedTimeUtc()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventInnerTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventInnerTests.java new file mode 100644 index 0000000000000..bc359a53297bb --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventInnerTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.fluent.models.MaintenanceEventInner; + +public final class MaintenanceEventInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MaintenanceEventInner model = BinaryData.fromString( + "{\"properties\":{\"maintenanceEventId\":\"ufgmjzrwrdg\",\"maintenanceType\":\"PlannedMaintenance\",\"description\":\"aenuuz\",\"status\":\"Canceled\",\"startTimeUtc\":\"2021-07-21T23:33:14Z\",\"endTimeUtc\":\"2021-12-02T02:53:31Z\",\"estimatedDowntime\":\"PT79H24M26S\",\"deferrable\":false,\"deferralDeadlineUtc\":\"2021-08-21T09:11:53Z\",\"rescheduledFromUtc\":\"2021-06-23T20:23:29Z\",\"lastUpdatedTimeUtc\":\"2021-12-10T08:12:44Z\",\"originalStartTimeUtc\":\"2021-07-25T01:07:20Z\"},\"id\":\"hziuiefozbhdms\",\"name\":\"l\",\"type\":\"zqhof\"}") + .toObject(MaintenanceEventInner.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventListResultTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventListResultTests.java new file mode 100644 index 0000000000000..a2bc8629ce406 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventListResultTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.implementation.models.MaintenanceEventListResult; +import org.junit.jupiter.api.Assertions; + +public final class MaintenanceEventListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MaintenanceEventListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"maintenanceEventId\":\"oluhczbwemh\",\"maintenanceType\":\"PlannedMaintenance\",\"description\":\"sbrgz\",\"status\":\"Complete\",\"startTimeUtc\":\"2021-06-14T04:59:44Z\",\"endTimeUtc\":\"2021-04-08T20:59:38Z\",\"estimatedDowntime\":\"PT143H14M24S\",\"deferrable\":true,\"deferralDeadlineUtc\":\"2021-05-03T02:40:47Z\",\"rescheduledFromUtc\":\"2021-08-15T00:09:16Z\",\"lastUpdatedTimeUtc\":\"2021-07-11T06:52:27Z\",\"originalStartTimeUtc\":\"2021-03-07T15:59:58Z\"},\"id\":\"cccnxqhuexmktt\",\"name\":\"stvlzywemhzrnc\",\"type\":\"dtclusiypb\"},{\"properties\":{\"maintenanceEventId\":\"ytguslf\",\"maintenanceType\":\"PlannedMaintenance\",\"description\":\"cy\",\"status\":\"Canceled\",\"startTimeUtc\":\"2021-03-01T03:16:18Z\",\"endTimeUtc\":\"2021-01-20T16:18:12Z\",\"estimatedDowntime\":\"PT54H3M34S\",\"deferrable\":false,\"deferralDeadlineUtc\":\"2021-05-08T07:59:13Z\",\"rescheduledFromUtc\":\"2021-10-20T10:25:57Z\",\"lastUpdatedTimeUtc\":\"2021-04-26T05:02:54Z\",\"originalStartTimeUtc\":\"2021-07-17T10:31:49Z\"},\"id\":\"pelol\",\"name\":\"pv\",\"type\":\"srp\"},{\"properties\":{\"maintenanceEventId\":\"jzraehtwdwrf\",\"maintenanceType\":\"PlannedMaintenance\",\"description\":\"iby\",\"status\":\"Planned\",\"startTimeUtc\":\"2021-07-06T15:36:40Z\",\"endTimeUtc\":\"2021-01-18T20:33:29Z\",\"estimatedDowntime\":\"PT66H16M31S\",\"deferrable\":true,\"deferralDeadlineUtc\":\"2021-05-15T13:33:35Z\",\"rescheduledFromUtc\":\"2021-04-24T14:19:46Z\",\"lastUpdatedTimeUtc\":\"2021-02-07T05:20:31Z\",\"originalStartTimeUtc\":\"2021-08-31T16:01:42Z\"},\"id\":\"twitykhev\",\"name\":\"c\",\"type\":\"edcpnmdyodnwzxl\"}],\"nextLink\":\"cvnhltiugc\"}") + .toObject(MaintenanceEventListResult.class); + Assertions.assertEquals("cvnhltiugc", model.nextLink()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventPropertiesTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventPropertiesTests.java new file mode 100644 index 0000000000000..fdc259de4ada1 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventPropertiesTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.MaintenanceEventProperties; + +public final class MaintenanceEventPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MaintenanceEventProperties model = BinaryData.fromString( + "{\"maintenanceEventId\":\"maequiahxicslfa\",\"maintenanceType\":\"PlannedMaintenance\",\"description\":\"piyylhalnswhccsp\",\"status\":\"Complete\",\"startTimeUtc\":\"2021-06-09T09:48:38Z\",\"endTimeUtc\":\"2021-07-06T09:04:22Z\",\"estimatedDowntime\":\"PT4H27M37S\",\"deferrable\":true,\"deferralDeadlineUtc\":\"2021-10-11T23:36:13Z\",\"rescheduledFromUtc\":\"2021-03-03T20:12:56Z\",\"lastUpdatedTimeUtc\":\"2021-09-24T20:22:06Z\",\"originalStartTimeUtc\":\"2021-05-30T08:18:18Z\"}") + .toObject(MaintenanceEventProperties.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventRescheduleRequestTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventRescheduleRequestTests.java new file mode 100644 index 0000000000000..47fac17f16931 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventRescheduleRequestTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.MaintenanceEventRescheduleRequest; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class MaintenanceEventRescheduleRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MaintenanceEventRescheduleRequest model + = BinaryData.fromString("{\"postponeToDateTimeUtc\":\"2021-05-15T14:48:31Z\"}") + .toObject(MaintenanceEventRescheduleRequest.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-15T14:48:31Z"), model.postponeToDateTimeUtc()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MaintenanceEventRescheduleRequest model = new MaintenanceEventRescheduleRequest() + .withPostponeToDateTimeUtc(OffsetDateTime.parse("2021-05-15T14:48:31Z")); + model = BinaryData.fromObject(model).toObject(MaintenanceEventRescheduleRequest.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-15T14:48:31Z"), model.postponeToDateTimeUtc()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventsApplyNowMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventsApplyNowMockTests.java new file mode 100644 index 0000000000000..25c33876d67cb --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventsApplyNowMockTests.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.horizondb.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.horizondb.HorizonDbManager; +import com.azure.resourcemanager.horizondb.models.MaintenanceEventActionResponse; +import com.azure.resourcemanager.horizondb.models.MaintenanceEventStatus; +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 MaintenanceEventsApplyNowMockTests { + @Test + public void testApplyNow() throws Exception { + String responseStr + = "{\"maintenanceEventId\":\"z\",\"poolResourceId\":\"mwmxqhndvnoamld\",\"status\":\"Canceled\",\"plannedStartTimeUtc\":\"2021-03-10T06:15:10Z\",\"plannedEndTimeUtc\":\"2021-05-08T13:12:33Z\",\"appliedNow\":false,\"lastUpdatedTimeUtc\":\"2021-09-08T22:46:23Z\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HorizonDbManager manager = HorizonDbManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + MaintenanceEventActionResponse response = manager.maintenanceEvents() + .applyNow("amikzebrqbsm", "wziqgfuhokzr", "swhvhczznvfbycj", "xjww", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("z", response.maintenanceEventId()); + Assertions.assertEquals("mwmxqhndvnoamld", response.poolResourceId()); + Assertions.assertEquals(MaintenanceEventStatus.CANCELED, response.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-10T06:15:10Z"), response.plannedStartTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-08T13:12:33Z"), response.plannedEndTimeUtc()); + Assertions.assertFalse(response.appliedNow()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-08T22:46:23Z"), response.lastUpdatedTimeUtc()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicasGetWithResponseMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventsGetWithResponseMockTests.java similarity index 58% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicasGetWithResponseMockTests.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventsGetWithResponseMockTests.java index f9be421812ae8..e1f3c07bcd973 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicasGetWithResponseMockTests.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventsGetWithResponseMockTests.java @@ -10,19 +10,17 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.horizondb.HorizonDbManager; -import com.azure.resourcemanager.horizondb.models.HorizonDbReplica; -import com.azure.resourcemanager.horizondb.models.ReplicaRole; +import com.azure.resourcemanager.horizondb.models.MaintenanceEvent; 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 HorizonDbReplicasGetWithResponseMockTests { +public final class MaintenanceEventsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"role\":\"Read\",\"status\":\"Stopped\",\"fullyQualifiedDomainName\":\"ajqgxy\",\"availabilityZone\":\"ocmbqfqvmkcxoza\",\"provisioningState\":\"Succeeded\"},\"id\":\"lxprglyatddckcbc\",\"name\":\"ejrjxgciqibrho\",\"type\":\"xsdqrhzoymibmrqy\"}"; + = "{\"properties\":{\"maintenanceEventId\":\"wetnpsihc\",\"maintenanceType\":\"PlannedMaintenance\",\"description\":\"zvaylptrsqqw\",\"status\":\"Planned\",\"startTimeUtc\":\"2021-10-08T01:02:03Z\",\"endTimeUtc\":\"2021-09-09T08:43:34Z\",\"estimatedDowntime\":\"PT8H54M32S\",\"deferrable\":false,\"deferralDeadlineUtc\":\"2021-10-02T19:03:46Z\",\"rescheduledFromUtc\":\"2021-11-26T04:41:12Z\",\"lastUpdatedTimeUtc\":\"2021-10-30T13:50:04Z\",\"originalStartTimeUtc\":\"2021-08-22T19:57:42Z\"},\"id\":\"ewzjkjexfd\",\"name\":\"qvhpsylkkshkbff\",\"type\":\"bmxzjrgywwpg\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +29,9 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - HorizonDbReplica response = manager.horizonDbReplicas() - .getWithResponse("yzvqt", "nubexk", "zksmondj", "quxvypomgkop", com.azure.core.util.Context.NONE) + MaintenanceEvent response = manager.maintenanceEvents() + .getWithResponse("fy", "sgcrpfbcunezzce", "elfwy", "wl", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(ReplicaRole.READ, response.properties().role()); - Assertions.assertEquals("ocmbqfqvmkcxoza", response.properties().availabilityZone()); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicasListMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventsListMockTests.java similarity index 58% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicasListMockTests.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventsListMockTests.java index 6fa0fa826a284..47f4c08abf8d5 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbReplicasListMockTests.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventsListMockTests.java @@ -11,19 +11,17 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.horizondb.HorizonDbManager; -import com.azure.resourcemanager.horizondb.models.HorizonDbReplica; -import com.azure.resourcemanager.horizondb.models.ReplicaRole; +import com.azure.resourcemanager.horizondb.models.MaintenanceEvent; 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 HorizonDbReplicasListMockTests { +public final class MaintenanceEventsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"role\":\"Read\",\"status\":\"Dropping\",\"fullyQualifiedDomainName\":\"tg\",\"availabilityZone\":\"bwoenwashrt\",\"provisioningState\":\"Failed\"},\"id\":\"nqxwbp\",\"name\":\"kulpiujwaasi\",\"type\":\"qiiobyuqer\"}]}"; + = "{\"value\":[{\"properties\":{\"maintenanceEventId\":\"ixokffqyin\",\"maintenanceType\":\"PlannedMaintenance\",\"description\":\"epqw\",\"status\":\"Complete\",\"startTimeUtc\":\"2021-10-07T20:21:36Z\",\"endTimeUtc\":\"2021-02-20T14:01:25Z\",\"estimatedDowntime\":\"PT72H22M24S\",\"deferrable\":false,\"deferralDeadlineUtc\":\"2021-01-17T19:00:27Z\",\"rescheduledFromUtc\":\"2021-09-25T05:57:05Z\",\"lastUpdatedTimeUtc\":\"2021-03-23T03:25:57Z\",\"originalStartTimeUtc\":\"2021-11-30T03:41Z\"},\"id\":\"lfcldu\",\"name\":\"cb\",\"type\":\"rds\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,10 +30,8 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.horizonDbReplicas().list("bahwfl", "szdtmhrkwof", "yvoqa", com.azure.core.util.Context.NONE); + PagedIterable response = manager.maintenanceEvents() + .list("xs", "ptfujgicgaaoept", "aqutdewemxswvruu", "zzjgehkfki", com.azure.core.util.Context.NONE); - Assertions.assertEquals(ReplicaRole.READ, response.iterator().next().properties().role()); - Assertions.assertEquals("bwoenwashrt", response.iterator().next().properties().availabilityZone()); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventsRescheduleMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventsRescheduleMockTests.java new file mode 100644 index 0000000000000..e5585206a044f --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MaintenanceEventsRescheduleMockTests.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.horizondb.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.horizondb.HorizonDbManager; +import com.azure.resourcemanager.horizondb.models.MaintenanceEventActionResponse; +import com.azure.resourcemanager.horizondb.models.MaintenanceEventRescheduleRequest; +import com.azure.resourcemanager.horizondb.models.MaintenanceEventStatus; +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 MaintenanceEventsRescheduleMockTests { + @Test + public void testReschedule() throws Exception { + String responseStr + = "{\"maintenanceEventId\":\"xqmul\",\"poolResourceId\":\"lxqzvn\",\"status\":\"Rescheduled\",\"plannedStartTimeUtc\":\"2021-10-17T21:55:15Z\",\"plannedEndTimeUtc\":\"2021-03-04T09:07:46Z\",\"appliedNow\":true,\"lastUpdatedTimeUtc\":\"2021-06-01T23:12:44Z\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HorizonDbManager manager = HorizonDbManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + MaintenanceEventActionResponse response = manager.maintenanceEvents() + .reschedule( + "uwc", "b", "egstmninwjizci", "nghgshej", new MaintenanceEventRescheduleRequest() + .withPostponeToDateTimeUtc(OffsetDateTime.parse("2021-08-21T12:03:17Z")), + com.azure.core.util.Context.NONE); + + Assertions.assertEquals("xqmul", response.maintenanceEventId()); + Assertions.assertEquals("lxqzvn", response.poolResourceId()); + Assertions.assertEquals(MaintenanceEventStatus.RESCHEDULED, response.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-17T21:55:15Z"), response.plannedStartTimeUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-04T09:07:46Z"), response.plannedEndTimeUtc()); + Assertions.assertTrue(response.appliedNow()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-01T23:12:44Z"), response.lastUpdatedTimeUtc()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ManagedServiceIdentityTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ManagedServiceIdentityTests.java deleted file mode 100644 index a544a58251ffb..0000000000000 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ManagedServiceIdentityTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.horizondb.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.horizondb.models.ManagedServiceIdentity; -import com.azure.resourcemanager.horizondb.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.horizondb.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ManagedServiceIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedServiceIdentity model = BinaryData.fromString( - "{\"principalId\":\"o\",\"tenantId\":\"yahux\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"mdvpjhulsu\":{\"principalId\":\"njaqwixjspro\",\"clientId\":\"cputegjvwmfdats\"},\"lwejdpv\":{\"principalId\":\"mkjozkrwf\",\"clientId\":\"iodjp\"}}}") - .toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedServiceIdentity model - = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf("mdvpjhulsu", new UserAssignedIdentity(), "lwejdpv", new UserAssignedIdentity())); - model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.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/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorAddTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorAddTests.java new file mode 100644 index 0000000000000..86f55ae8d941b --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorAddTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAdministratorAdd; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAdministratorPropertiesForAdd; +import com.azure.resourcemanager.horizondb.models.PrincipalTypes; +import org.junit.jupiter.api.Assertions; + +public final class MicrosoftEntraAdministratorAddTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MicrosoftEntraAdministratorAdd model = BinaryData + .fromString( + "{\"properties\":{\"principalName\":\"pi\",\"principalType\":\"Unknown\",\"tenantId\":\"aasipqi\"}}") + .toObject(MicrosoftEntraAdministratorAdd.class); + Assertions.assertEquals("pi", model.properties().principalName()); + Assertions.assertEquals(PrincipalTypes.UNKNOWN, model.properties().principalType()); + Assertions.assertEquals("aasipqi", model.properties().tenantId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MicrosoftEntraAdministratorAdd model = new MicrosoftEntraAdministratorAdd() + .withProperties(new MicrosoftEntraAdministratorPropertiesForAdd().withPrincipalName("pi") + .withPrincipalType(PrincipalTypes.UNKNOWN) + .withTenantId("aasipqi")); + model = BinaryData.fromObject(model).toObject(MicrosoftEntraAdministratorAdd.class); + Assertions.assertEquals("pi", model.properties().principalName()); + Assertions.assertEquals(PrincipalTypes.UNKNOWN, model.properties().principalType()); + Assertions.assertEquals("aasipqi", model.properties().tenantId()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorInnerTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorInnerTests.java new file mode 100644 index 0000000000000..8a0a59efc6e48 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorInnerTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.fluent.models.MicrosoftEntraAdministratorInner; +import com.azure.resourcemanager.horizondb.models.PrincipalTypes; +import org.junit.jupiter.api.Assertions; + +public final class MicrosoftEntraAdministratorInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MicrosoftEntraAdministratorInner model = BinaryData.fromString( + "{\"properties\":{\"principalName\":\"cuejrjxgci\",\"principalType\":\"Group\",\"objectId\":\"rhos\",\"tenantId\":\"dqrhzoymib\",\"provisioningState\":\"Failed\"},\"id\":\"ibahwflus\",\"name\":\"dtmhrkwofyyvoqa\",\"type\":\"piexpbtgiw\"}") + .toObject(MicrosoftEntraAdministratorInner.class); + Assertions.assertEquals("cuejrjxgci", model.properties().principalName()); + Assertions.assertEquals(PrincipalTypes.GROUP, model.properties().principalType()); + Assertions.assertEquals("dqrhzoymib", model.properties().tenantId()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorListResultTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorListResultTests.java new file mode 100644 index 0000000000000..d65a6678853a6 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorListResultTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.implementation.models.MicrosoftEntraAdministratorListResult; +import com.azure.resourcemanager.horizondb.models.PrincipalTypes; +import org.junit.jupiter.api.Assertions; + +public final class MicrosoftEntraAdministratorListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MicrosoftEntraAdministratorListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"principalName\":\"iuqgbdbutauv\",\"principalType\":\"User\",\"objectId\":\"kuwhh\",\"tenantId\":\"ykojoxafnndlpic\",\"provisioningState\":\"Failed\"},\"id\":\"mkcdyhbpkkpwdre\",\"name\":\"novvqfovljxy\",\"type\":\"suwsyrsnds\"},{\"properties\":{\"principalName\":\"g\",\"principalType\":\"Group\",\"objectId\":\"vraeaeneq\",\"tenantId\":\"arrwlquu\",\"provisioningState\":\"InProgress\"},\"id\":\"kacewiipfp\",\"name\":\"bjibwwiftohq\",\"type\":\"vpuvks\"},{\"properties\":{\"principalName\":\"lsa\",\"principalType\":\"ServicePrincipal\",\"objectId\":\"n\",\"tenantId\":\"ynl\",\"provisioningState\":\"Failed\"},\"id\":\"op\",\"name\":\"odlqiyntor\",\"type\":\"ihleos\"},{\"properties\":{\"principalName\":\"w\",\"principalType\":\"ServicePrincipal\",\"objectId\":\"slyzrpzbchckqq\",\"tenantId\":\"ioxiysuiizyn\",\"provisioningState\":\"InProgress\"},\"id\":\"atrwyhqmibzyh\",\"name\":\"itsmypyyn\",\"type\":\"cdpu\"}],\"nextLink\":\"zgmwznmabikns\"}") + .toObject(MicrosoftEntraAdministratorListResult.class); + Assertions.assertEquals("iuqgbdbutauv", model.value().get(0).properties().principalName()); + Assertions.assertEquals(PrincipalTypes.USER, model.value().get(0).properties().principalType()); + Assertions.assertEquals("ykojoxafnndlpic", model.value().get(0).properties().tenantId()); + Assertions.assertEquals("zgmwznmabikns", model.nextLink()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorPropertiesForAddTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorPropertiesForAddTests.java new file mode 100644 index 0000000000000..54a5f662fd088 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorPropertiesForAddTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAdministratorPropertiesForAdd; +import com.azure.resourcemanager.horizondb.models.PrincipalTypes; +import org.junit.jupiter.api.Assertions; + +public final class MicrosoftEntraAdministratorPropertiesForAddTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MicrosoftEntraAdministratorPropertiesForAdd model = BinaryData + .fromString("{\"principalName\":\"obyu\",\"principalType\":\"ServicePrincipal\",\"tenantId\":\"pqlpq\"}") + .toObject(MicrosoftEntraAdministratorPropertiesForAdd.class); + Assertions.assertEquals("obyu", model.principalName()); + Assertions.assertEquals(PrincipalTypes.SERVICE_PRINCIPAL, model.principalType()); + Assertions.assertEquals("pqlpq", model.tenantId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MicrosoftEntraAdministratorPropertiesForAdd model + = new MicrosoftEntraAdministratorPropertiesForAdd().withPrincipalName("obyu") + .withPrincipalType(PrincipalTypes.SERVICE_PRINCIPAL) + .withTenantId("pqlpq"); + model = BinaryData.fromObject(model).toObject(MicrosoftEntraAdministratorPropertiesForAdd.class); + Assertions.assertEquals("obyu", model.principalName()); + Assertions.assertEquals(PrincipalTypes.SERVICE_PRINCIPAL, model.principalType()); + Assertions.assertEquals("pqlpq", model.tenantId()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorPropertiesTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorPropertiesTests.java new file mode 100644 index 0000000000000..9b27db078d1db --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorPropertiesTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAdministratorProperties; +import com.azure.resourcemanager.horizondb.models.PrincipalTypes; +import org.junit.jupiter.api.Assertions; + +public final class MicrosoftEntraAdministratorPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MicrosoftEntraAdministratorProperties model = BinaryData.fromString( + "{\"principalName\":\"wo\",\"principalType\":\"User\",\"objectId\":\"ashrt\",\"tenantId\":\"kcnqxwbpo\",\"provisioningState\":\"Failed\"}") + .toObject(MicrosoftEntraAdministratorProperties.class); + Assertions.assertEquals("wo", model.principalName()); + Assertions.assertEquals(PrincipalTypes.USER, model.principalType()); + Assertions.assertEquals("kcnqxwbpo", model.tenantId()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorsCreateOrUpdateMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorsCreateOrReplaceMockTests.java similarity index 50% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorsCreateOrUpdateMockTests.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorsCreateOrReplaceMockTests.java index 0d69daf568785..8af7807fb77b9 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorsCreateOrUpdateMockTests.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorsCreateOrReplaceMockTests.java @@ -10,8 +10,8 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.horizondb.HorizonDbManager; -import com.azure.resourcemanager.horizondb.models.HorizonDbAdministrator; -import com.azure.resourcemanager.horizondb.models.HorizonDbAdministratorPropertiesForAdd; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAdministrator; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAdministratorPropertiesForAdd; import com.azure.resourcemanager.horizondb.models.PrincipalTypes; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -19,11 +19,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class HorizonDbAdministratorsCreateOrUpdateMockTests { +public final class MicrosoftEntraAdministratorsCreateOrReplaceMockTests { @Test - public void testCreateOrUpdate() throws Exception { + public void testCreateOrReplace() throws Exception { String responseStr - = "{\"properties\":{\"principalName\":\"mvzzbtdcqvp\",\"principalType\":\"ServicePrincipal\",\"objectId\":\"ujviylwdshfs\",\"tenantId\":\"rbgyefry\",\"provisioningState\":\"Succeeded\"},\"id\":\"ojfmwnco\",\"name\":\"mrfhirctymox\",\"type\":\"ftpipiwyczu\"}"; + = "{\"properties\":{\"principalName\":\"jqfrddgamquh\",\"principalType\":\"Unknown\",\"objectId\":\"rsjuivfcdisyir\",\"tenantId\":\"zhczexrxzbujrtrh\",\"provisioningState\":\"Succeeded\"},\"id\":\"evkh\",\"name\":\"nlnzonzlrpi\",\"type\":\"yw\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,16 +32,16 @@ public void testCreateOrUpdate() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - HorizonDbAdministrator response = manager.horizonDbAdministrators() - .define("mv") - .withExistingCluster("fo", "jzhpjbibgjmfx") - .withProperties(new HorizonDbAdministratorPropertiesForAdd().withPrincipalName("cluyovwxnbkf") - .withPrincipalType(PrincipalTypes.SERVICE_PRINCIPAL) - .withTenantId("xscyhwzdgirujbz")) + MicrosoftEntraAdministrator response = manager.microsoftEntraAdministrators() + .define("znrtffyaqit") + .withExistingCluster("bu", "qwyxebeybpm") + .withProperties(new MicrosoftEntraAdministratorPropertiesForAdd().withPrincipalName("hheioqaqhvseuf") + .withPrincipalType(PrincipalTypes.USER) + .withTenantId("rxpdlcgqlsi")) .create(); - Assertions.assertEquals("mvzzbtdcqvp", response.properties().principalName()); - Assertions.assertEquals(PrincipalTypes.SERVICE_PRINCIPAL, response.properties().principalType()); - Assertions.assertEquals("rbgyefry", response.properties().tenantId()); + Assertions.assertEquals("jqfrddgamquh", response.properties().principalName()); + Assertions.assertEquals(PrincipalTypes.UNKNOWN, response.properties().principalType()); + Assertions.assertEquals("zhczexrxzbujrtrh", response.properties().tenantId()); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorsGetWithResponseMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorsGetWithResponseMockTests.java similarity index 60% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorsGetWithResponseMockTests.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorsGetWithResponseMockTests.java index 601ccf7f8e7ea..f3339899ae442 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorsGetWithResponseMockTests.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorsGetWithResponseMockTests.java @@ -10,7 +10,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.horizondb.HorizonDbManager; -import com.azure.resourcemanager.horizondb.models.HorizonDbAdministrator; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAdministrator; import com.azure.resourcemanager.horizondb.models.PrincipalTypes; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -18,11 +18,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class HorizonDbAdministratorsGetWithResponseMockTests { +public final class MicrosoftEntraAdministratorsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"principalName\":\"wesgogczh\",\"principalType\":\"Unknown\",\"objectId\":\"xkr\",\"tenantId\":\"nyhmossxkkgthr\",\"provisioningState\":\"Failed\"},\"id\":\"jbdhqxvc\",\"name\":\"gf\",\"type\":\"pdso\"}"; + = "{\"properties\":{\"principalName\":\"muoyxprimr\",\"principalType\":\"User\",\"objectId\":\"teecjmeislst\",\"tenantId\":\"sylwxdzaumweooh\",\"provisioningState\":\"Provisioning\"},\"id\":\"uzboyjathw\",\"name\":\"zolbaemwmdxmebw\",\"type\":\"scjpahlxv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,12 +31,12 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - HorizonDbAdministrator response = manager.horizonDbAdministrators() - .getWithResponse("ronasxift", "zq", "zh", com.azure.core.util.Context.NONE) + MicrosoftEntraAdministrator response = manager.microsoftEntraAdministrators() + .getWithResponse("a", "ankjpdnjzh", "joylh", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("wesgogczh", response.properties().principalName()); - Assertions.assertEquals(PrincipalTypes.UNKNOWN, response.properties().principalType()); - Assertions.assertEquals("nyhmossxkkgthr", response.properties().tenantId()); + Assertions.assertEquals("muoyxprimr", response.properties().principalName()); + Assertions.assertEquals(PrincipalTypes.USER, response.properties().principalType()); + Assertions.assertEquals("sylwxdzaumweooh", response.properties().tenantId()); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorsListMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorsListMockTests.java similarity index 61% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorsListMockTests.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorsListMockTests.java index 8ef3b5adf0c6d..d36d979d15b96 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbAdministratorsListMockTests.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAdministratorsListMockTests.java @@ -11,7 +11,7 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.horizondb.HorizonDbManager; -import com.azure.resourcemanager.horizondb.models.HorizonDbAdministrator; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAdministrator; import com.azure.resourcemanager.horizondb.models.PrincipalTypes; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -19,11 +19,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class HorizonDbAdministratorsListMockTests { +public final class MicrosoftEntraAdministratorsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"principalName\":\"bycnunvjsrtkf\",\"principalType\":\"ServicePrincipal\",\"objectId\":\"opqgikyzirtxdyux\",\"tenantId\":\"jntpsewgioilqu\",\"provisioningState\":\"Succeeded\"},\"id\":\"xtqmieoxor\",\"name\":\"gufhyaomtbg\",\"type\":\"havgrvk\"}]}"; + = "{\"value\":[{\"properties\":{\"principalName\":\"nmwmqtibx\",\"principalType\":\"User\",\"objectId\":\"ddtvqctt\",\"tenantId\":\"ijaeukm\",\"provisioningState\":\"Canceled\"},\"id\":\"ekpndzaapmudq\",\"name\":\"eqw\",\"type\":\"gp\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,12 +32,11 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.horizonDbAdministrators().list("bshrnsvbuswd", "z", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.microsoftEntraAdministrators().list("a", "f", com.azure.core.util.Context.NONE); - Assertions.assertEquals("bycnunvjsrtkf", response.iterator().next().properties().principalName()); - Assertions.assertEquals(PrincipalTypes.SERVICE_PRINCIPAL, - response.iterator().next().properties().principalType()); - Assertions.assertEquals("jntpsewgioilqu", response.iterator().next().properties().tenantId()); + Assertions.assertEquals("nmwmqtibx", response.iterator().next().properties().principalName()); + Assertions.assertEquals(PrincipalTypes.USER, response.iterator().next().properties().principalType()); + Assertions.assertEquals("ijaeukm", response.iterator().next().properties().tenantId()); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAuthenticationForPatchUpdateTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAuthenticationForPatchUpdateTests.java new file mode 100644 index 0000000000000..ad5e9bc630a05 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAuthenticationForPatchUpdateTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.AuthenticationState; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAuthenticationForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAuthenticationPropertiesForPatchUpdate; +import org.junit.jupiter.api.Assertions; + +public final class MicrosoftEntraAuthenticationForPatchUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MicrosoftEntraAuthenticationForPatchUpdate model + = BinaryData.fromString("{\"properties\":{\"state\":\"Enabled\"}}") + .toObject(MicrosoftEntraAuthenticationForPatchUpdate.class); + Assertions.assertEquals(AuthenticationState.ENABLED, model.properties().state()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MicrosoftEntraAuthenticationForPatchUpdate model + = new MicrosoftEntraAuthenticationForPatchUpdate().withProperties( + new MicrosoftEntraAuthenticationPropertiesForPatchUpdate().withState(AuthenticationState.ENABLED)); + model = BinaryData.fromObject(model).toObject(MicrosoftEntraAuthenticationForPatchUpdate.class); + Assertions.assertEquals(AuthenticationState.ENABLED, model.properties().state()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAuthenticationInnerTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAuthenticationInnerTests.java new file mode 100644 index 0000000000000..c08008c4bf830 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAuthenticationInnerTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.fluent.models.MicrosoftEntraAuthenticationInner; +import com.azure.resourcemanager.horizondb.models.AuthenticationState; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAuthenticationProperties; +import org.junit.jupiter.api.Assertions; + +public final class MicrosoftEntraAuthenticationInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MicrosoftEntraAuthenticationInner model = BinaryData.fromString( + "{\"properties\":{\"state\":\"Disabled\",\"provisioningState\":\"Succeeded\"},\"id\":\"dxepxgyq\",\"name\":\"gvr\",\"type\":\"mnpkukghimdblxg\"}") + .toObject(MicrosoftEntraAuthenticationInner.class); + Assertions.assertEquals(AuthenticationState.DISABLED, model.properties().state()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MicrosoftEntraAuthenticationInner model = new MicrosoftEntraAuthenticationInner() + .withProperties(new MicrosoftEntraAuthenticationProperties().withState(AuthenticationState.DISABLED)); + model = BinaryData.fromObject(model).toObject(MicrosoftEntraAuthenticationInner.class); + Assertions.assertEquals(AuthenticationState.DISABLED, model.properties().state()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAuthenticationPropertiesForPatchUpdateTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAuthenticationPropertiesForPatchUpdateTests.java new file mode 100644 index 0000000000000..9f0b8bffc892f --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAuthenticationPropertiesForPatchUpdateTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.AuthenticationState; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAuthenticationPropertiesForPatchUpdate; +import org.junit.jupiter.api.Assertions; + +public final class MicrosoftEntraAuthenticationPropertiesForPatchUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MicrosoftEntraAuthenticationPropertiesForPatchUpdate model = BinaryData.fromString("{\"state\":\"Enabled\"}") + .toObject(MicrosoftEntraAuthenticationPropertiesForPatchUpdate.class); + Assertions.assertEquals(AuthenticationState.ENABLED, model.state()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MicrosoftEntraAuthenticationPropertiesForPatchUpdate model + = new MicrosoftEntraAuthenticationPropertiesForPatchUpdate().withState(AuthenticationState.ENABLED); + model = BinaryData.fromObject(model).toObject(MicrosoftEntraAuthenticationPropertiesForPatchUpdate.class); + Assertions.assertEquals(AuthenticationState.ENABLED, model.state()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAuthenticationPropertiesTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAuthenticationPropertiesTests.java new file mode 100644 index 0000000000000..c032ca30c32e7 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAuthenticationPropertiesTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.AuthenticationState; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAuthenticationProperties; +import org.junit.jupiter.api.Assertions; + +public final class MicrosoftEntraAuthenticationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MicrosoftEntraAuthenticationProperties model + = BinaryData.fromString("{\"state\":\"Disabled\",\"provisioningState\":\"Succeeded\"}") + .toObject(MicrosoftEntraAuthenticationProperties.class); + Assertions.assertEquals(AuthenticationState.DISABLED, model.state()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MicrosoftEntraAuthenticationProperties model + = new MicrosoftEntraAuthenticationProperties().withState(AuthenticationState.DISABLED); + model = BinaryData.fromObject(model).toObject(MicrosoftEntraAuthenticationProperties.class); + Assertions.assertEquals(AuthenticationState.DISABLED, model.state()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAuthenticationsCreateOrReplaceMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAuthenticationsCreateOrReplaceMockTests.java new file mode 100644 index 0000000000000..68eb89f124852 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAuthenticationsCreateOrReplaceMockTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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.horizondb.HorizonDbManager; +import com.azure.resourcemanager.horizondb.fluent.models.MicrosoftEntraAuthenticationInner; +import com.azure.resourcemanager.horizondb.models.AuthenticationState; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAuthentication; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAuthenticationProperties; +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 MicrosoftEntraAuthenticationsCreateOrReplaceMockTests { + @Test + public void testCreateOrReplace() throws Exception { + String responseStr + = "{\"properties\":{\"state\":\"Disabled\",\"provisioningState\":\"Succeeded\"},\"id\":\"texoqqpwc\",\"name\":\"yufmhruncuwmq\",\"type\":\"pkcdqzhlct\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HorizonDbManager manager = HorizonDbManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + MicrosoftEntraAuthentication response = manager.microsoftEntraAuthentications() + .createOrReplace("q", "yb", + new MicrosoftEntraAuthenticationInner().withProperties( + new MicrosoftEntraAuthenticationProperties().withState(AuthenticationState.ENABLED)), + com.azure.core.util.Context.NONE); + + Assertions.assertEquals(AuthenticationState.DISABLED, response.properties().state()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateLinkResourcesGetWithResponseMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAuthenticationsGetWithResponseMockTests.java similarity index 65% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateLinkResourcesGetWithResponseMockTests.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAuthenticationsGetWithResponseMockTests.java index 1b3275cd14155..cb97464409f1f 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateLinkResourcesGetWithResponseMockTests.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAuthenticationsGetWithResponseMockTests.java @@ -10,18 +10,19 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.horizondb.HorizonDbManager; -import com.azure.resourcemanager.horizondb.models.HorizonDbPrivateLinkResource; +import com.azure.resourcemanager.horizondb.models.AuthenticationState; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAuthentication; 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 HorizonDbPrivateLinkResourcesGetWithResponseMockTests { +public final class MicrosoftEntraAuthenticationsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"groupId\":\"kwyfzqwhxxbuyqax\",\"requiredMembers\":[\"qztpp\"],\"requiredZoneNames\":[\"lxorjaltolmncws\"]},\"id\":\"qwcsdbnwdcfhuc\",\"name\":\"dpfuvg\",\"type\":\"sbjjc\"}"; + = "{\"properties\":{\"state\":\"Disabled\",\"provisioningState\":\"Provisioning\"},\"id\":\"nomdrkywuhpsv\",\"name\":\"uurutlwexxwlalni\",\"type\":\"xzsrzpge\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,10 +31,10 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - HorizonDbPrivateLinkResource response = manager.horizonDbPrivateLinkResources() - .getWithResponse("nqicvinvkjjxdxrb", "ukzclewyhmlwpaz", "zpof", com.azure.core.util.Context.NONE) + MicrosoftEntraAuthentication response = manager.microsoftEntraAuthentications() + .getWithResponse("elawumu", "slzkwrrwoycqu", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("lxorjaltolmncws", response.properties().requiredZoneNames().get(0)); + Assertions.assertEquals(AuthenticationState.DISABLED, response.properties().state()); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAuthenticationsUpdateMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAuthenticationsUpdateMockTests.java new file mode 100644 index 0000000000000..866a5e128d658 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/MicrosoftEntraAuthenticationsUpdateMockTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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.horizondb.HorizonDbManager; +import com.azure.resourcemanager.horizondb.models.AuthenticationState; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAuthentication; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAuthenticationForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.MicrosoftEntraAuthenticationPropertiesForPatchUpdate; +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 MicrosoftEntraAuthenticationsUpdateMockTests { + @Test + public void testUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"state\":\"Enabled\",\"provisioningState\":\"Succeeded\"},\"id\":\"egy\",\"name\":\"cw\",\"type\":\"oxjumvqqo\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HorizonDbManager manager = HorizonDbManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + MicrosoftEntraAuthentication response + = manager.microsoftEntraAuthentications() + .update("dunqnd", "fpch", new MicrosoftEntraAuthenticationForPatchUpdate().withProperties( + new MicrosoftEntraAuthenticationPropertiesForPatchUpdate().withState(AuthenticationState.DISABLED)), + com.azure.core.util.Context.NONE); + + Assertions.assertEquals(AuthenticationState.ENABLED, response.properties().state()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/NetworkForPatchUpdateTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/NetworkForPatchUpdateTests.java new file mode 100644 index 0000000000000..5d5c32524bc45 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/NetworkForPatchUpdateTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.NetworkForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.PublicNetworkAccessState; +import org.junit.jupiter.api.Assertions; + +public final class NetworkForPatchUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkForPatchUpdate model + = BinaryData.fromString("{\"publicAccess\":\"Enabled\"}").toObject(NetworkForPatchUpdate.class); + Assertions.assertEquals(PublicNetworkAccessState.ENABLED, model.publicAccess()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkForPatchUpdate model = new NetworkForPatchUpdate().withPublicAccess(PublicNetworkAccessState.ENABLED); + model = BinaryData.fromObject(model).toObject(NetworkForPatchUpdate.class); + Assertions.assertEquals(PublicNetworkAccessState.ENABLED, model.publicAccess()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/NetworkTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/NetworkTests.java index 6dcfbe3747284..f20cd0c99247f 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/NetworkTests.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/NetworkTests.java @@ -6,16 +6,20 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.horizondb.models.Network; +import com.azure.resourcemanager.horizondb.models.PublicNetworkAccessState; +import org.junit.jupiter.api.Assertions; public final class NetworkTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Network model = BinaryData.fromString("{\"publicNetworkAccess\":\"Disabled\"}").toObject(Network.class); + Network model = BinaryData.fromString("{\"publicAccess\":\"Enabled\"}").toObject(Network.class); + Assertions.assertEquals(PublicNetworkAccessState.ENABLED, model.publicAccess()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Network model = new Network(); + Network model = new Network().withPublicAccess(PublicNetworkAccessState.ENABLED); model = BinaryData.fromObject(model).toObject(Network.class); + Assertions.assertEquals(PublicNetworkAccessState.ENABLED, model.publicAccess()); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/NodeInnerTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/NodeInnerTests.java new file mode 100644 index 0000000000000..0e0caa1a99f0f --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/NodeInnerTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.fluent.models.NodeInner; + +public final class NodeInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NodeInner model = BinaryData.fromString( + "{\"properties\":{\"role\":\"ReadOnly\",\"availabilityZone\":\"acizsjqlhkrr\"},\"id\":\"deibqip\",\"name\":\"kghv\",\"type\":\"ndzwmkrefa\"}") + .toObject(NodeInner.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/NodeListResultTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/NodeListResultTests.java new file mode 100644 index 0000000000000..c59cd358219ad --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/NodeListResultTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.implementation.models.NodeListResult; +import org.junit.jupiter.api.Assertions; + +public final class NodeListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NodeListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"role\":\"ReadWrite\",\"availabilityZone\":\"fxzsjabibsyst\"},\"id\":\"fsdjpvkvp\",\"name\":\"jxbkzbzkdvn\",\"type\":\"jabudurgkakmo\"},{\"properties\":{\"role\":\"ReadWrite\",\"availabilityZone\":\"jjklff\"},\"id\":\"ouw\",\"name\":\"lgzrfzeeyeb\",\"type\":\"zi\"},{\"properties\":{\"role\":\"Unassigned\",\"availabilityZone\":\"uhqlbjbsybbqwrvt\"},\"id\":\"gmfpgvmp\",\"name\":\"paslthaqfxssmwu\",\"type\":\"wbdsr\"}],\"nextLink\":\"pdrhne\"}") + .toObject(NodeListResult.class); + Assertions.assertEquals("pdrhne", model.nextLink()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/NodePropertiesTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/NodePropertiesTests.java new file mode 100644 index 0000000000000..656b2caf486e5 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/NodePropertiesTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.NodeProperties; + +public final class NodePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NodeProperties model = BinaryData.fromString("{\"role\":\"Unassigned\",\"availabilityZone\":\"jorwkqnyhgbij\"}") + .toObject(NodeProperties.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersRestartMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/NodesGetWithResponseMockTests.java similarity index 67% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersRestartMockTests.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/NodesGetWithResponseMockTests.java index 678470106d39c..6c8f69cbbc464 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersRestartMockTests.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/NodesGetWithResponseMockTests.java @@ -10,15 +10,17 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.horizondb.HorizonDbManager; +import com.azure.resourcemanager.horizondb.models.Node; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class HorizonDbClustersRestartMockTests { +public final class NodesGetWithResponseMockTests { @Test - public void testRestart() throws Exception { - String responseStr = "{}"; + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"role\":\"Unassigned\",\"availabilityZone\":\"pbswvefloccsrm\"},\"id\":\"ihmipgawtxxpk\",\"name\":\"jcxcjxgrytfmpcyc\",\"type\":\"lrmcaykg\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -27,7 +29,9 @@ public void testRestart() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.horizonDbClusters().restart("l", "tmuwlauwzi", com.azure.core.util.Context.NONE); + Node response = manager.nodes() + .getWithResponse("lzok", "coxpelnjeta", "ltsxoatf", "g", com.azure.core.util.Context.NONE) + .getValue(); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersStopMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/NodesListMockTests.java similarity index 67% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersStopMockTests.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/NodesListMockTests.java index 4790f76f876a9..d981a9251453a 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbClustersStopMockTests.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/NodesListMockTests.java @@ -6,19 +6,22 @@ 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.horizondb.HorizonDbManager; +import com.azure.resourcemanager.horizondb.models.Node; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class HorizonDbClustersStopMockTests { +public final class NodesListMockTests { @Test - public void testStop() throws Exception { - String responseStr = "{}"; + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"role\":\"ReadOnly\",\"availabilityZone\":\"zvoamktc\"},\"id\":\"os\",\"name\":\"gbzahgxqdlyr\",\"type\":\"ltlaprltzkatbhj\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -27,7 +30,8 @@ public void testStop() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.horizonDbClusters().stop("lrb", "tkoievseotgq", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.nodes().list("noxuztrksx", "pndfcpfnznt", "jtwkjaos", com.azure.core.util.Context.NONE); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/OperationsListMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/OperationsListMockTests.java index 1147bab381964..c13ae8609c884 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/OperationsListMockTests.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/OperationsListMockTests.java @@ -21,7 +21,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"pyqs\",\"isDataAction\":false,\"display\":{\"provider\":\"n\",\"resource\":\"shhszhedplvwiw\",\"operation\":\"mwmbes\",\"description\":\"nkww\"},\"origin\":\"user\",\"actionType\":\"Internal\"}]}"; + = "{\"value\":[{\"name\":\"kdgszywkbirr\",\"isDataAction\":false,\"display\":{\"provider\":\"hkjoqr\",\"resource\":\"qaatjinrv\",\"operation\":\"upmfiibfg\",\"description\":\"ioolvrwxkvtkkgll\"},\"origin\":\"system\",\"actionType\":\"Internal\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PagedParameterGroupConnectionPropertiesTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PagedParameterGroupConnectionPropertiesTests.java new file mode 100644 index 0000000000000..c4f43059e2efd --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PagedParameterGroupConnectionPropertiesTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.implementation.models.PagedParameterGroupConnectionProperties; +import org.junit.jupiter.api.Assertions; + +public final class PagedParameterGroupConnectionPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PagedParameterGroupConnectionProperties model = BinaryData.fromString( + "{\"value\":[{\"poolResourceId\":\"tdzumveekgpw\"},{\"poolResourceId\":\"zuhkfpbsjyof\"},{\"poolResourceId\":\"xl\"}],\"nextLink\":\"sd\"}") + .toObject(PagedParameterGroupConnectionProperties.class); + Assertions.assertEquals("sd", model.nextLink()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupConnectionPropertiesInnerTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupConnectionPropertiesInnerTests.java new file mode 100644 index 0000000000000..ae96bfde1a66e --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupConnectionPropertiesInnerTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.fluent.models.ParameterGroupConnectionPropertiesInner; + +public final class ParameterGroupConnectionPropertiesInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ParameterGroupConnectionPropertiesInner model = BinaryData.fromString("{\"poolResourceId\":\"touwaboekqv\"}") + .toObject(ParameterGroupConnectionPropertiesInner.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupForPatchUpdateTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupForPatchUpdateTests.java new file mode 100644 index 0000000000000..480f925ad053c --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupForPatchUpdateTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ParameterGroupForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.ParameterGroupPropertiesForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.ParameterProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ParameterGroupForPatchUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ParameterGroupForPatchUpdate model = BinaryData.fromString( + "{\"tags\":{\"k\":\"fcnj\"},\"properties\":{\"parameters\":[{\"name\":\"bttk\",\"description\":\"ywpnvjt\",\"value\":\"nermcl\",\"defaultValue\":\"lphox\",\"valueSource\":\"SystemDefault\",\"dataType\":\"pabgyeps\",\"allowedValues\":\"tazqugxywpmueefj\",\"isDynamic\":false,\"isReadOnly\":true,\"documentationLink\":\"ujidsuyono\",\"unit\":\"laocqxtccmg\"}],\"description\":\"dxyt\"}}") + .toObject(ParameterGroupForPatchUpdate.class); + Assertions.assertEquals("fcnj", model.tags().get("k")); + Assertions.assertEquals("bttk", model.properties().parameters().get(0).name()); + Assertions.assertEquals("nermcl", model.properties().parameters().get(0).value()); + Assertions.assertEquals("dxyt", model.properties().description()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ParameterGroupForPatchUpdate model = new ParameterGroupForPatchUpdate().withTags(mapOf("k", "fcnj")) + .withProperties(new ParameterGroupPropertiesForPatchUpdate() + .withParameters(Arrays.asList(new ParameterProperties().withName("bttk").withValue("nermcl"))) + .withDescription("dxyt")); + model = BinaryData.fromObject(model).toObject(ParameterGroupForPatchUpdate.class); + Assertions.assertEquals("fcnj", model.tags().get("k")); + Assertions.assertEquals("bttk", model.properties().parameters().get(0).name()); + Assertions.assertEquals("nermcl", model.properties().parameters().get(0).value()); + Assertions.assertEquals("dxyt", model.properties().description()); + } + + // 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/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupInnerTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupInnerTests.java new file mode 100644 index 0000000000000..64838e27c16d5 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupInnerTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.fluent.models.ParameterGroupInner; +import com.azure.resourcemanager.horizondb.models.ParameterGroupProperties; +import com.azure.resourcemanager.horizondb.models.ParameterProperties; +import com.azure.resourcemanager.horizondb.models.PostgreSqlVersion; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ParameterGroupInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ParameterGroupInner model = BinaryData.fromString( + "{\"properties\":{\"parameters\":[{\"name\":\"krbm\",\"description\":\"kgriwflzlfbx\",\"value\":\"uzycispnqza\",\"defaultValue\":\"gkbrpyyd\",\"valueSource\":\"UserOverride\",\"dataType\":\"uqqkpik\",\"allowedValues\":\"rgvtqag\",\"isDynamic\":false,\"isReadOnly\":true,\"documentationLink\":\"ijggmebfsiar\",\"unit\":\"trcvpnazzmh\"},{\"name\":\"unmpxttd\",\"description\":\"rbnlankxmyskp\",\"value\":\"enbtkcxywny\",\"defaultValue\":\"rsyn\",\"valueSource\":\"UserOverride\",\"dataType\":\"ybyxc\",\"allowedValues\":\"clha\",\"isDynamic\":false,\"isReadOnly\":false,\"documentationLink\":\"p\",\"unit\":\"wrqlfktsthsuco\"}],\"description\":\"nyyazttbtwwrqpue\",\"postgreSqlVersion\":\"18\",\"provisioningState\":\"Succeeded\"},\"location\":\"wbiexzfey\",\"tags\":{\"zyoxaepdkzjan\":\"xibxujwbhqwalm\",\"hdwbavxbniwdjs\":\"ux\"},\"id\":\"zt\",\"name\":\"dbpgnxytxhp\",\"type\":\"xbzpfzab\"}") + .toObject(ParameterGroupInner.class); + Assertions.assertEquals("wbiexzfey", model.location()); + Assertions.assertEquals("xibxujwbhqwalm", model.tags().get("zyoxaepdkzjan")); + Assertions.assertEquals("krbm", model.properties().parameters().get(0).name()); + Assertions.assertEquals("uzycispnqza", model.properties().parameters().get(0).value()); + Assertions.assertEquals("nyyazttbtwwrqpue", model.properties().description()); + Assertions.assertEquals(PostgreSqlVersion.V18, model.properties().postgreSqlVersion()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ParameterGroupInner model = new ParameterGroupInner().withLocation("wbiexzfey") + .withTags(mapOf("zyoxaepdkzjan", "xibxujwbhqwalm", "hdwbavxbniwdjs", "ux")) + .withProperties(new ParameterGroupProperties() + .withParameters(Arrays.asList(new ParameterProperties().withName("krbm").withValue("uzycispnqza"), + new ParameterProperties().withName("unmpxttd").withValue("enbtkcxywny"))) + .withDescription("nyyazttbtwwrqpue") + .withPostgreSqlVersion(PostgreSqlVersion.V18)); + model = BinaryData.fromObject(model).toObject(ParameterGroupInner.class); + Assertions.assertEquals("wbiexzfey", model.location()); + Assertions.assertEquals("xibxujwbhqwalm", model.tags().get("zyoxaepdkzjan")); + Assertions.assertEquals("krbm", model.properties().parameters().get(0).name()); + Assertions.assertEquals("uzycispnqza", model.properties().parameters().get(0).value()); + Assertions.assertEquals("nyyazttbtwwrqpue", model.properties().description()); + Assertions.assertEquals(PostgreSqlVersion.V18, model.properties().postgreSqlVersion()); + } + + // 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/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupListResultTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupListResultTests.java new file mode 100644 index 0000000000000..527a275466a81 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupListResultTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.implementation.models.ParameterGroupListResult; +import com.azure.resourcemanager.horizondb.models.PostgreSqlVersion; +import org.junit.jupiter.api.Assertions; + +public final class ParameterGroupListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ParameterGroupListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"parameters\":[{\"name\":\"xzvlvqhjkbegib\",\"description\":\"mxiebw\",\"value\":\"loayqcgw\",\"defaultValue\":\"zjuzgwyz\",\"valueSource\":\"SystemDefault\",\"dataType\":\"ongmtsa\",\"allowedValues\":\"cbpwxqpsrknft\",\"isDynamic\":true,\"isReadOnly\":true,\"documentationLink\":\"hprwmdyv\",\"unit\":\"tayriwwroyqbex\"}],\"description\":\"cqibycnojv\",\"postgreSqlVersion\":\"18\",\"provisioningState\":\"Provisioning\"},\"location\":\"qsgzvahapj\",\"tags\":{\"lxkvu\":\"pvgqzcjrvxdjzlm\",\"n\":\"fhzovawjvzunluth\"},\"id\":\"rnxipei\",\"name\":\"pjzu\",\"type\":\"e\"}],\"nextLink\":\"dultskz\"}") + .toObject(ParameterGroupListResult.class); + Assertions.assertEquals("qsgzvahapj", model.value().get(0).location()); + Assertions.assertEquals("pvgqzcjrvxdjzlm", model.value().get(0).tags().get("lxkvu")); + Assertions.assertEquals("xzvlvqhjkbegib", model.value().get(0).properties().parameters().get(0).name()); + Assertions.assertEquals("loayqcgw", model.value().get(0).properties().parameters().get(0).value()); + Assertions.assertEquals("cqibycnojv", model.value().get(0).properties().description()); + Assertions.assertEquals(PostgreSqlVersion.V18, model.value().get(0).properties().postgreSqlVersion()); + Assertions.assertEquals("dultskz", model.nextLink()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupPropertiesForPatchUpdateTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupPropertiesForPatchUpdateTests.java new file mode 100644 index 0000000000000..cb7cce6a8b987 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupPropertiesForPatchUpdateTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ParameterGroupPropertiesForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.ParameterProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ParameterGroupPropertiesForPatchUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ParameterGroupPropertiesForPatchUpdate model = BinaryData.fromString( + "{\"parameters\":[{\"name\":\"rxv\",\"description\":\"u\",\"value\":\"pz\",\"defaultValue\":\"xhdzhlrqjbhckf\",\"valueSource\":\"SystemDefault\",\"dataType\":\"xsbkyvpyca\",\"allowedValues\":\"z\",\"isDynamic\":false,\"isReadOnly\":false,\"documentationLink\":\"kuwbcrnwb\",\"unit\":\"hhseyv\"},{\"name\":\"srtslhspkdeem\",\"description\":\"fm\",\"value\":\"gkvtmelmqkrhah\",\"defaultValue\":\"juahaquhcdhmdual\",\"valueSource\":\"UserOverride\",\"dataType\":\"pvfadmwsrcr\",\"allowedValues\":\"xpvgo\",\"isDynamic\":false,\"isReadOnly\":false,\"documentationLink\":\"sgwbnbbeld\",\"unit\":\"k\"},{\"name\":\"ali\",\"description\":\"rqhakauha\",\"value\":\"sfwxosowzxc\",\"defaultValue\":\"i\",\"valueSource\":\"UserOverride\",\"dataType\":\"xdje\",\"allowedValues\":\"pucwwfvovbvme\",\"isDynamic\":true,\"isReadOnly\":true,\"documentationLink\":\"hzceuojgjrwjue\",\"unit\":\"twm\"},{\"name\":\"ytdxwit\",\"description\":\"rjaw\",\"value\":\"wgxhn\",\"defaultValue\":\"kxfbkpycgklwndn\",\"valueSource\":\"UserOverride\",\"dataType\":\"uwhvylwzbtdhxujz\",\"allowedValues\":\"mpowuwpr\",\"isDynamic\":false,\"isReadOnly\":true,\"documentationLink\":\"alupjm\",\"unit\":\"fxobbcsws\"}],\"description\":\"jriplrbpbewtghf\"}") + .toObject(ParameterGroupPropertiesForPatchUpdate.class); + Assertions.assertEquals("rxv", model.parameters().get(0).name()); + Assertions.assertEquals("pz", model.parameters().get(0).value()); + Assertions.assertEquals("jriplrbpbewtghf", model.description()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ParameterGroupPropertiesForPatchUpdate model + = new ParameterGroupPropertiesForPatchUpdate() + .withParameters(Arrays.asList(new ParameterProperties().withName("rxv").withValue("pz"), + new ParameterProperties().withName("srtslhspkdeem").withValue("gkvtmelmqkrhah"), + new ParameterProperties().withName("ali").withValue("sfwxosowzxc"), + new ParameterProperties().withName("ytdxwit").withValue("wgxhn"))) + .withDescription("jriplrbpbewtghf"); + model = BinaryData.fromObject(model).toObject(ParameterGroupPropertiesForPatchUpdate.class); + Assertions.assertEquals("rxv", model.parameters().get(0).name()); + Assertions.assertEquals("pz", model.parameters().get(0).value()); + Assertions.assertEquals("jriplrbpbewtghf", model.description()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupPropertiesTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupPropertiesTests.java new file mode 100644 index 0000000000000..00ea1ead2ca5d --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupPropertiesTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ParameterGroupProperties; +import com.azure.resourcemanager.horizondb.models.ParameterProperties; +import com.azure.resourcemanager.horizondb.models.PostgreSqlVersion; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ParameterGroupPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ParameterGroupProperties model = BinaryData.fromString( + "{\"parameters\":[{\"name\":\"hxw\",\"description\":\"tyq\",\"value\":\"lbbovplw\",\"defaultValue\":\"hvgyuguosvmk\",\"valueSource\":\"SystemDefault\",\"dataType\":\"qukkfp\",\"allowedValues\":\"mg\",\"isDynamic\":true,\"isReadOnly\":true,\"documentationLink\":\"kde\",\"unit\":\"pvlopwiyighxpkd\"}],\"description\":\"baiuebbaumny\",\"postgreSqlVersion\":\"18\",\"provisioningState\":\"Provisioning\"}") + .toObject(ParameterGroupProperties.class); + Assertions.assertEquals("hxw", model.parameters().get(0).name()); + Assertions.assertEquals("lbbovplw", model.parameters().get(0).value()); + Assertions.assertEquals("baiuebbaumny", model.description()); + Assertions.assertEquals(PostgreSqlVersion.V18, model.postgreSqlVersion()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ParameterGroupProperties model = new ParameterGroupProperties() + .withParameters(Arrays.asList(new ParameterProperties().withName("hxw").withValue("lbbovplw"))) + .withDescription("baiuebbaumny") + .withPostgreSqlVersion(PostgreSqlVersion.V18); + model = BinaryData.fromObject(model).toObject(ParameterGroupProperties.class); + Assertions.assertEquals("hxw", model.parameters().get(0).name()); + Assertions.assertEquals("lbbovplw", model.parameters().get(0).value()); + Assertions.assertEquals("baiuebbaumny", model.description()); + Assertions.assertEquals(PostgreSqlVersion.V18, model.postgreSqlVersion()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsCreateOrReplaceMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsCreateOrReplaceMockTests.java new file mode 100644 index 0000000000000..677511a53ece5 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsCreateOrReplaceMockTests.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.horizondb.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.horizondb.HorizonDbManager; +import com.azure.resourcemanager.horizondb.models.ParameterGroup; +import com.azure.resourcemanager.horizondb.models.ParameterGroupProperties; +import com.azure.resourcemanager.horizondb.models.ParameterProperties; +import com.azure.resourcemanager.horizondb.models.PostgreSqlVersion; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ParameterGroupsCreateOrReplaceMockTests { + @Test + public void testCreateOrReplace() throws Exception { + String responseStr + = "{\"properties\":{\"parameters\":[{\"name\":\"xykxhdj\",\"description\":\"immbcx\",\"value\":\"bcporxvxcjzhqizx\",\"defaultValue\":\"xtgqscjavftjuh\",\"valueSource\":\"UserOverride\",\"dataType\":\"k\",\"allowedValues\":\"gg\",\"isDynamic\":true,\"isReadOnly\":false,\"documentationLink\":\"ajc\",\"unit\":\"m\"},{\"name\":\"hfcf\",\"description\":\"rxgkne\",\"value\":\"yinzqodfvpgs\",\"defaultValue\":\"xgsg\",\"valueSource\":\"UserOverride\",\"dataType\":\"zdjtxvzflbqv\",\"allowedValues\":\"qvlgafcqusrdvetn\",\"isDynamic\":true,\"isReadOnly\":false,\"documentationLink\":\"nwlduycvuzhyrmew\",\"unit\":\"mvekdxukuqgsjj\"},{\"name\":\"n\",\"description\":\"gketwzhhzjhf\",\"value\":\"hvvmuvgpmun\",\"defaultValue\":\"sx\",\"valueSource\":\"UserOverride\",\"dataType\":\"buzjyih\",\"allowedValues\":\"sbhud\",\"isDynamic\":true,\"isReadOnly\":false,\"documentationLink\":\"emslynsqyrp\",\"unit\":\"obrltt\"},{\"name\":\"sjnygqdnfwqzdzgt\",\"description\":\"axhnfh\",\"value\":\"yvi\",\"defaultValue\":\"uwivkxoy\",\"valueSource\":\"SystemDefault\",\"dataType\":\"ixxrtikvcpw\",\"allowedValues\":\"clrcivtsox\",\"isDynamic\":false,\"isReadOnly\":true,\"documentationLink\":\"pmyyefrpmpdnqq\",\"unit\":\"awaoqvmmbnpqfrt\"}],\"description\":\"kzmegnitgvkxlz\",\"postgreSqlVersion\":\"18\",\"provisioningState\":\"Succeeded\"},\"location\":\"eg\",\"tags\":{\"oyqhlwig\":\"lzxwhcansy\",\"wasqvdaeyyg\":\"ivbkbxgomfaj\",\"zkgimsid\":\"xakjsqzhzb\"},\"id\":\"asi\",\"name\":\"ddyvvjskgfmo\",\"type\":\"wa\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HorizonDbManager manager = HorizonDbManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ParameterGroup response = manager.parameterGroups() + .define("brxjjsto") + .withRegion("thwwn") + .withExistingResourceGroup("hvv") + .withTags(mapOf("zswpchwa", "l")) + .withProperties(new ParameterGroupProperties() + .withParameters( + Arrays.asList(new ParameterProperties().withName("pkxztmoobkl").withValue("mpimaqxzhemjyh"))) + .withDescription("z") + .withPostgreSqlVersion(PostgreSqlVersion.V18)) + .create(); + + Assertions.assertEquals("eg", response.location()); + Assertions.assertEquals("lzxwhcansy", response.tags().get("oyqhlwig")); + Assertions.assertEquals("xykxhdj", response.properties().parameters().get(0).name()); + Assertions.assertEquals("bcporxvxcjzhqizx", response.properties().parameters().get(0).value()); + Assertions.assertEquals("kzmegnitgvkxlz", response.properties().description()); + Assertions.assertEquals(PostgreSqlVersion.V18, response.properties().postgreSqlVersion()); + } + + // 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/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsGetByResourceGroupWithResponseMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsGetByResourceGroupWithResponseMockTests.java new file mode 100644 index 0000000000000..1bcadc768b178 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsGetByResourceGroupWithResponseMockTests.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.horizondb.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.horizondb.HorizonDbManager; +import com.azure.resourcemanager.horizondb.models.ParameterGroup; +import com.azure.resourcemanager.horizondb.models.PostgreSqlVersion; +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 ParameterGroupsGetByResourceGroupWithResponseMockTests { + @Test + public void testGetByResourceGroupWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"parameters\":[{\"name\":\"vzm\",\"description\":\"t\",\"value\":\"dgxobfircl\",\"defaultValue\":\"kciayzri\",\"valueSource\":\"SystemDefault\",\"dataType\":\"awfvjlboxqvkjl\",\"allowedValues\":\"ho\",\"isDynamic\":true,\"isReadOnly\":false,\"documentationLink\":\"wdigumbnraauz\",\"unit\":\"tj\"},{\"name\":\"ysdzhez\",\"description\":\"vaiqyuvvf\",\"value\":\"kphhq\",\"defaultValue\":\"kvylauyavl\",\"valueSource\":\"UserOverride\",\"dataType\":\"csttijfybvpoekr\",\"allowedValues\":\"sgbdhuz\",\"isDynamic\":true,\"isReadOnly\":true,\"documentationLink\":\"kynscliqhzv\",\"unit\":\"nk\"}],\"description\":\"tkubotppn\",\"postgreSqlVersion\":\"17\",\"provisioningState\":\"InProgress\"},\"location\":\"hihfrbbcevqagtlt\",\"tags\":{\"vgtrdcnifmzzs\":\"fkqojpy\",\"g\":\"ymbrnysuxmpraf\"},\"id\":\"khocxvdfffwaf\",\"name\":\"roud\",\"type\":\"spave\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HorizonDbManager manager = HorizonDbManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ParameterGroup response = manager.parameterGroups() + .getByResourceGroupWithResponse("f", "gzuriglaecxndt", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("hihfrbbcevqagtlt", response.location()); + Assertions.assertEquals("fkqojpy", response.tags().get("vgtrdcnifmzzs")); + Assertions.assertEquals("vzm", response.properties().parameters().get(0).name()); + Assertions.assertEquals("dgxobfircl", response.properties().parameters().get(0).value()); + Assertions.assertEquals("tkubotppn", response.properties().description()); + Assertions.assertEquals(PostgreSqlVersion.V17, response.properties().postgreSqlVersion()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsListByResourceGroupMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsListByResourceGroupMockTests.java new file mode 100644 index 0000000000000..0bd1125a18024 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsListByResourceGroupMockTests.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.horizondb.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.horizondb.HorizonDbManager; +import com.azure.resourcemanager.horizondb.models.ParameterGroup; +import com.azure.resourcemanager.horizondb.models.PostgreSqlVersion; +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 ParameterGroupsListByResourceGroupMockTests { + @Test + public void testListByResourceGroup() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"parameters\":[{\"name\":\"oz\",\"description\":\"hcxgkmoyx\",\"value\":\"yuibhm\",\"defaultValue\":\"nbzydvfvfcj\",\"valueSource\":\"UserOverride\",\"dataType\":\"isrvhm\",\"allowedValues\":\"r\",\"isDynamic\":true,\"isReadOnly\":false,\"documentationLink\":\"cvwmzhwplefa\",\"unit\":\"xilcbtgnhnzey\"}],\"description\":\"tjj\",\"postgreSqlVersion\":\"17\",\"provisioningState\":\"Provisioning\"},\"location\":\"hycav\",\"tags\":{\"nlrariaawiuagy\":\"gxdbeesmie\",\"ojocqwogf\":\"wqfbylyrfgiagt\"},\"id\":\"zjvusfzldmo\",\"name\":\"uxylfsbtkadpy\",\"type\":\"own\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HorizonDbManager manager = HorizonDbManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.parameterGroups().listByResourceGroup("hrv", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("hycav", response.iterator().next().location()); + Assertions.assertEquals("gxdbeesmie", response.iterator().next().tags().get("nlrariaawiuagy")); + Assertions.assertEquals("oz", response.iterator().next().properties().parameters().get(0).name()); + Assertions.assertEquals("yuibhm", response.iterator().next().properties().parameters().get(0).value()); + Assertions.assertEquals("tjj", response.iterator().next().properties().description()); + Assertions.assertEquals(PostgreSqlVersion.V17, response.iterator().next().properties().postgreSqlVersion()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsListConnectionsMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsListConnectionsMockTests.java similarity index 72% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsListConnectionsMockTests.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsListConnectionsMockTests.java index e356578b97134..43368c353e553 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbParameterGroupsListConnectionsMockTests.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsListConnectionsMockTests.java @@ -11,16 +11,16 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.horizondb.HorizonDbManager; -import com.azure.resourcemanager.horizondb.models.HorizonDbParameterGroupConnectionProperties; +import com.azure.resourcemanager.horizondb.models.ParameterGroupConnectionProperties; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class HorizonDbParameterGroupsListConnectionsMockTests { +public final class ParameterGroupsListConnectionsMockTests { @Test public void testListConnections() throws Exception { - String responseStr = "{\"value\":[{\"name\":\"sj\",\"id\":\"hszfjvfb\",\"type\":\"feljagrqm\"}]}"; + String responseStr = "{\"value\":[{\"poolResourceId\":\"kkzjcjbtrga\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -29,8 +29,8 @@ public void testListConnections() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.horizonDbParameterGroups().listConnections("bt", "h", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.parameterGroups().listConnections("lhvnhlab", "q", com.azure.core.util.Context.NONE); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsListMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsListMockTests.java new file mode 100644 index 0000000000000..a549afaa7f28f --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterGroupsListMockTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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.horizondb.HorizonDbManager; +import com.azure.resourcemanager.horizondb.models.ParameterGroup; +import com.azure.resourcemanager.horizondb.models.PostgreSqlVersion; +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 ParameterGroupsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"parameters\":[{\"name\":\"u\",\"description\":\"jqctojcmisofie\",\"value\":\"efojyqdhcupl\",\"defaultValue\":\"lcwkhihihlhz\",\"valueSource\":\"SystemDefault\",\"dataType\":\"zbsrgnowcj\",\"allowedValues\":\"gmvecactxmw\",\"isDynamic\":false,\"isReadOnly\":false,\"documentationLink\":\"cluqovekqvgqo\",\"unit\":\"ifzmpjwyivqi\"}],\"description\":\"xcvhrfs\",\"postgreSqlVersion\":\"18\",\"provisioningState\":\"InProgress\"},\"location\":\"rttikteusqc\",\"tags\":{\"qcuubgqibrta\":\"yklxubyjaffmmfbl\",\"lqxihhrmooiz\":\"metttwgd\"},\"id\":\"seypxiutcxapz\",\"name\":\"y\",\"type\":\"petogebjox\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HorizonDbManager manager = HorizonDbManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.parameterGroups().list(com.azure.core.util.Context.NONE); + + Assertions.assertEquals("rttikteusqc", response.iterator().next().location()); + Assertions.assertEquals("yklxubyjaffmmfbl", response.iterator().next().tags().get("qcuubgqibrta")); + Assertions.assertEquals("u", response.iterator().next().properties().parameters().get(0).name()); + Assertions.assertEquals("efojyqdhcupl", response.iterator().next().properties().parameters().get(0).value()); + Assertions.assertEquals("xcvhrfs", response.iterator().next().properties().description()); + Assertions.assertEquals(PostgreSqlVersion.V18, response.iterator().next().properties().postgreSqlVersion()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterPropertiesTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterPropertiesTests.java index 4e72ec0253edb..b279356df99e2 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterPropertiesTests.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ParameterPropertiesTests.java @@ -12,17 +12,17 @@ public final class ParameterPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ParameterProperties model = BinaryData.fromString( - "{\"name\":\"fyhxde\",\"description\":\"jzicwifsjt\",\"value\":\"zfbishcbkhaj\",\"dataType\":\"yeamdphagalpb\",\"allowedValues\":\"wgipwhono\",\"isDynamic\":true,\"isReadOnly\":true,\"documentationLink\":\"ankixzbinjeput\",\"unit\":\"rywn\"}") + "{\"name\":\"eojnabc\",\"description\":\"smtxpsieb\",\"value\":\"hvpesapskrdqm\",\"defaultValue\":\"jdhtldwkyzxu\",\"valueSource\":\"SystemDefault\",\"dataType\":\"cwscwsvlx\",\"allowedValues\":\"ogtwrupqsxvnmi\",\"isDynamic\":true,\"isReadOnly\":true,\"documentationLink\":\"o\",\"unit\":\"ilovnot\"}") .toObject(ParameterProperties.class); - Assertions.assertEquals("fyhxde", model.name()); - Assertions.assertEquals("zfbishcbkhaj", model.value()); + Assertions.assertEquals("eojnabc", model.name()); + Assertions.assertEquals("hvpesapskrdqm", model.value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ParameterProperties model = new ParameterProperties().withName("fyhxde").withValue("zfbishcbkhaj"); + ParameterProperties model = new ParameterProperties().withName("eojnabc").withValue("hvpesapskrdqm"); model = BinaryData.fromObject(model).toObject(ParameterProperties.class); - Assertions.assertEquals("fyhxde", model.name()); - Assertions.assertEquals("zfbishcbkhaj", model.value()); + Assertions.assertEquals("eojnabc", model.name()); + Assertions.assertEquals("hvpesapskrdqm", model.value()); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolCapabilityTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolCapabilityTests.java new file mode 100644 index 0000000000000..e76334c1905ce --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolCapabilityTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.PoolCapability; + +public final class PoolCapabilityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PoolCapability model = BinaryData.fromString( + "{\"recommendedComputeProcessor\":\"AMD\",\"supportedProcessors\":[{\"name\":\"Intel\",\"supportedGenerations\":[{\"computeGeneration\":355528987,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[{\"type\":\"ComputeModelCapability\"}]},{\"computeGeneration\":1750576238,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[{\"type\":\"ComputeModelCapability\"},{\"type\":\"ComputeModelCapability\"}]},{\"computeGeneration\":1708707643,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[{\"type\":\"ComputeModelCapability\"},{\"type\":\"ComputeModelCapability\"},{\"type\":\"ComputeModelCapability\"},{\"type\":\"ComputeModelCapability\"}]}]},{\"name\":\"Intel\",\"supportedGenerations\":[{\"computeGeneration\":827593581,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[{\"type\":\"ComputeModelCapability\"}]}]},{\"name\":\"AMD\",\"supportedGenerations\":[{\"computeGeneration\":1508437812,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[{\"type\":\"ComputeModelCapability\"},{\"type\":\"ComputeModelCapability\"}]},{\"computeGeneration\":105374828,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[{\"type\":\"ComputeModelCapability\"}]},{\"computeGeneration\":344559573,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[{\"type\":\"ComputeModelCapability\"},{\"type\":\"ComputeModelCapability\"},{\"type\":\"ComputeModelCapability\"}]}]},{\"name\":\"AMD\",\"supportedGenerations\":[{\"computeGeneration\":2111308623,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[{\"type\":\"ComputeModelCapability\"},{\"type\":\"ComputeModelCapability\"},{\"type\":\"ComputeModelCapability\"},{\"type\":\"ComputeModelCapability\"}]},{\"computeGeneration\":994442510,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[{\"type\":\"ComputeModelCapability\"}]},{\"computeGeneration\":1961045961,\"recommendedComputeModelType\":\"Provisioned\",\"supportedComputeModels\":[{\"type\":\"ComputeModelCapability\"},{\"type\":\"ComputeModelCapability\"},{\"type\":\"ComputeModelCapability\"}]}]}],\"supportedFeatures\":[{\"name\":\"ozkrwfndiodjpslw\"},{\"name\":\"jdpvwryo\"},{\"name\":\"psoacctazakljl\"}]}") + .toObject(PoolCapability.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolComputeModelForPatchUpdateTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolComputeModelForPatchUpdateTests.java new file mode 100644 index 0000000000000..dd45d3c2427ff --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolComputeModelForPatchUpdateTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ComputeProcessorType; +import com.azure.resourcemanager.horizondb.models.PoolComputeModelForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.PoolComputeModelType; +import org.junit.jupiter.api.Assertions; + +public final class PoolComputeModelForPatchUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PoolComputeModelForPatchUpdate model = BinaryData.fromString( + "{\"type\":\"Provisioned\",\"computeProcessor\":\"AMD\",\"computeGeneration\":1604770276,\"vCores\":537336258}") + .toObject(PoolComputeModelForPatchUpdate.class); + Assertions.assertEquals(PoolComputeModelType.PROVISIONED, model.type()); + Assertions.assertEquals(ComputeProcessorType.AMD, model.computeProcessor()); + Assertions.assertEquals(1604770276, model.computeGeneration()); + Assertions.assertEquals(537336258, model.vCores()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PoolComputeModelForPatchUpdate model + = new PoolComputeModelForPatchUpdate().withType(PoolComputeModelType.PROVISIONED) + .withComputeProcessor(ComputeProcessorType.AMD) + .withComputeGeneration(1604770276) + .withVCores(537336258); + model = BinaryData.fromObject(model).toObject(PoolComputeModelForPatchUpdate.class); + Assertions.assertEquals(PoolComputeModelType.PROVISIONED, model.type()); + Assertions.assertEquals(ComputeProcessorType.AMD, model.computeProcessor()); + Assertions.assertEquals(1604770276, model.computeGeneration()); + Assertions.assertEquals(537336258, model.vCores()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolComputeModelTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolComputeModelTests.java new file mode 100644 index 0000000000000..75320e3bf927c --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolComputeModelTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ComputeProcessorType; +import com.azure.resourcemanager.horizondb.models.PoolComputeModel; +import com.azure.resourcemanager.horizondb.models.PoolComputeModelType; +import org.junit.jupiter.api.Assertions; + +public final class PoolComputeModelTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PoolComputeModel model = BinaryData.fromString( + "{\"type\":\"Provisioned\",\"computeProcessor\":\"Intel\",\"computeGeneration\":1853852705,\"vCores\":812550328}") + .toObject(PoolComputeModel.class); + Assertions.assertEquals(PoolComputeModelType.PROVISIONED, model.type()); + Assertions.assertEquals(ComputeProcessorType.INTEL, model.computeProcessor()); + Assertions.assertEquals(1853852705, model.computeGeneration()); + Assertions.assertEquals(812550328, model.vCores()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PoolComputeModel model = new PoolComputeModel().withType(PoolComputeModelType.PROVISIONED) + .withComputeProcessor(ComputeProcessorType.INTEL) + .withComputeGeneration(1853852705) + .withVCores(812550328); + model = BinaryData.fromObject(model).toObject(PoolComputeModel.class); + Assertions.assertEquals(PoolComputeModelType.PROVISIONED, model.type()); + Assertions.assertEquals(ComputeProcessorType.INTEL, model.computeProcessor()); + Assertions.assertEquals(1853852705, model.computeGeneration()); + Assertions.assertEquals(812550328, model.vCores()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolFeatureCapabilityTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolFeatureCapabilityTests.java new file mode 100644 index 0000000000000..027aa5f43b04a --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolFeatureCapabilityTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.PoolFeatureCapability; + +public final class PoolFeatureCapabilityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PoolFeatureCapability model + = BinaryData.fromString("{\"name\":\"hcrzevd\"}").toObject(PoolFeatureCapability.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolForPatchUpdateTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolForPatchUpdateTests.java new file mode 100644 index 0000000000000..c6c67aff02fd4 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolForPatchUpdateTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ComputeProcessorType; +import com.azure.resourcemanager.horizondb.models.ParameterApplyMethod; +import com.azure.resourcemanager.horizondb.models.PoolComputeModelForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.PoolComputeModelType; +import com.azure.resourcemanager.horizondb.models.PoolForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.PoolHighAvailabilityMode; +import com.azure.resourcemanager.horizondb.models.PoolHighAvailabilityPatch; +import com.azure.resourcemanager.horizondb.models.PoolParameterGroupReferenceForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.PoolPropertiesForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.ScheduledMaintenanceManagementType; +import com.azure.resourcemanager.horizondb.models.ScheduledMaintenancePropertiesForPatchUpdate; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class PoolForPatchUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PoolForPatchUpdate model = BinaryData.fromString( + "{\"tags\":{\"kajionpim\":\"dxkqpx\",\"txgcpodgmaajr\":\"xg\",\"lwhijcoejctbzaq\":\"vdjwzrlovm\"},\"properties\":{\"computeModel\":{\"type\":\"Provisioned\",\"computeProcessor\":\"Intel\",\"computeGeneration\":1508721218,\"vCores\":544085929},\"nodeCount\":1619207085,\"highAvailability\":{\"mode\":\"AnyZone\"},\"parameterGroup\":{\"parameterGroupResourceId\":\"ppofmxaxcfjpgdd\",\"applyMethod\":\"Immediate\"},\"scheduledMaintenance\":{\"maintenanceManagementType\":\"System\"}}}") + .toObject(PoolForPatchUpdate.class); + Assertions.assertEquals("dxkqpx", model.tags().get("kajionpim")); + Assertions.assertEquals(PoolComputeModelType.PROVISIONED, model.properties().computeModel().type()); + Assertions.assertEquals(ComputeProcessorType.INTEL, model.properties().computeModel().computeProcessor()); + Assertions.assertEquals(1508721218, model.properties().computeModel().computeGeneration()); + Assertions.assertEquals(544085929, model.properties().computeModel().vCores()); + Assertions.assertEquals(1619207085, model.properties().nodeCount()); + Assertions.assertEquals(PoolHighAvailabilityMode.ANY_ZONE, model.properties().highAvailability().mode()); + Assertions.assertEquals("ppofmxaxcfjpgdd", model.properties().parameterGroup().parameterGroupResourceId()); + Assertions.assertEquals(ParameterApplyMethod.IMMEDIATE, model.properties().parameterGroup().applyMethod()); + Assertions.assertEquals(ScheduledMaintenanceManagementType.SYSTEM, + model.properties().scheduledMaintenance().maintenanceManagementType()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PoolForPatchUpdate model = new PoolForPatchUpdate() + .withTags(mapOf("kajionpim", "dxkqpx", "txgcpodgmaajr", "xg", "lwhijcoejctbzaq", "vdjwzrlovm")) + .withProperties(new PoolPropertiesForPatchUpdate() + .withComputeModel(new PoolComputeModelForPatchUpdate().withType(PoolComputeModelType.PROVISIONED) + .withComputeProcessor(ComputeProcessorType.INTEL) + .withComputeGeneration(1508721218) + .withVCores(544085929)) + .withNodeCount(1619207085) + .withHighAvailability(new PoolHighAvailabilityPatch().withMode(PoolHighAvailabilityMode.ANY_ZONE)) + .withParameterGroup( + new PoolParameterGroupReferenceForPatchUpdate().withParameterGroupResourceId("ppofmxaxcfjpgdd") + .withApplyMethod(ParameterApplyMethod.IMMEDIATE)) + .withScheduledMaintenance(new ScheduledMaintenancePropertiesForPatchUpdate() + .withMaintenanceManagementType(ScheduledMaintenanceManagementType.SYSTEM))); + model = BinaryData.fromObject(model).toObject(PoolForPatchUpdate.class); + Assertions.assertEquals("dxkqpx", model.tags().get("kajionpim")); + Assertions.assertEquals(PoolComputeModelType.PROVISIONED, model.properties().computeModel().type()); + Assertions.assertEquals(ComputeProcessorType.INTEL, model.properties().computeModel().computeProcessor()); + Assertions.assertEquals(1508721218, model.properties().computeModel().computeGeneration()); + Assertions.assertEquals(544085929, model.properties().computeModel().vCores()); + Assertions.assertEquals(1619207085, model.properties().nodeCount()); + Assertions.assertEquals(PoolHighAvailabilityMode.ANY_ZONE, model.properties().highAvailability().mode()); + Assertions.assertEquals("ppofmxaxcfjpgdd", model.properties().parameterGroup().parameterGroupResourceId()); + Assertions.assertEquals(ParameterApplyMethod.IMMEDIATE, model.properties().parameterGroup().applyMethod()); + Assertions.assertEquals(ScheduledMaintenanceManagementType.SYSTEM, + model.properties().scheduledMaintenance().maintenanceManagementType()); + } + + // 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/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolHighAvailabilityPatchTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolHighAvailabilityPatchTests.java new file mode 100644 index 0000000000000..74f7af6835cb5 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolHighAvailabilityPatchTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.PoolHighAvailabilityMode; +import com.azure.resourcemanager.horizondb.models.PoolHighAvailabilityPatch; +import org.junit.jupiter.api.Assertions; + +public final class PoolHighAvailabilityPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PoolHighAvailabilityPatch model + = BinaryData.fromString("{\"mode\":\"AnyZone\"}").toObject(PoolHighAvailabilityPatch.class); + Assertions.assertEquals(PoolHighAvailabilityMode.ANY_ZONE, model.mode()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PoolHighAvailabilityPatch model = new PoolHighAvailabilityPatch().withMode(PoolHighAvailabilityMode.ANY_ZONE); + model = BinaryData.fromObject(model).toObject(PoolHighAvailabilityPatch.class); + Assertions.assertEquals(PoolHighAvailabilityMode.ANY_ZONE, model.mode()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolHighAvailabilityTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolHighAvailabilityTests.java new file mode 100644 index 0000000000000..14a73d3141b18 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolHighAvailabilityTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.PoolHighAvailability; +import com.azure.resourcemanager.horizondb.models.PoolHighAvailabilityMode; +import org.junit.jupiter.api.Assertions; + +public final class PoolHighAvailabilityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PoolHighAvailability model + = BinaryData.fromString("{\"mode\":\"AnyZone\"}").toObject(PoolHighAvailability.class); + Assertions.assertEquals(PoolHighAvailabilityMode.ANY_ZONE, model.mode()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PoolHighAvailability model = new PoolHighAvailability().withMode(PoolHighAvailabilityMode.ANY_ZONE); + model = BinaryData.fromObject(model).toObject(PoolHighAvailability.class); + Assertions.assertEquals(PoolHighAvailabilityMode.ANY_ZONE, model.mode()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolInnerTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolInnerTests.java new file mode 100644 index 0000000000000..ef25e73f6851a --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolInnerTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.fluent.models.PoolInner; +import com.azure.resourcemanager.horizondb.models.ComputeProcessorType; +import com.azure.resourcemanager.horizondb.models.ParameterApplyMethod; +import com.azure.resourcemanager.horizondb.models.PoolComputeModel; +import com.azure.resourcemanager.horizondb.models.PoolComputeModelType; +import com.azure.resourcemanager.horizondb.models.PoolHighAvailability; +import com.azure.resourcemanager.horizondb.models.PoolHighAvailabilityMode; +import com.azure.resourcemanager.horizondb.models.PoolParameterGroupReference; +import com.azure.resourcemanager.horizondb.models.PoolProperties; +import com.azure.resourcemanager.horizondb.models.ScheduledMaintenanceProperties; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class PoolInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PoolInner model = BinaryData.fromString( + "{\"properties\":{\"state\":\"Stopped\",\"computeModel\":{\"type\":\"Provisioned\",\"computeProcessor\":\"Intel\",\"computeGeneration\":614073164,\"vCores\":62079989},\"nodeCount\":1667085881,\"highAvailability\":{\"mode\":\"ZoneRedundant\"},\"parameterGroup\":{\"parameterGroupResourceId\":\"xsqwpgrjbznorc\",\"applyMethod\":\"Immediate\",\"syncStatus\":\"Applying\"},\"scheduledMaintenance\":{\"maintenanceManagementType\":\"ScheduledMaintenanceProperties\"},\"provisioningState\":\"Succeeded\"},\"tags\":{\"zafb\":\"abnmocpcyshu\",\"oq\":\"jjgpb\"},\"id\":\"mkljavb\",\"name\":\"idtqajzyu\",\"type\":\"pku\"}") + .toObject(PoolInner.class); + Assertions.assertEquals(PoolComputeModelType.PROVISIONED, model.properties().computeModel().type()); + Assertions.assertEquals(ComputeProcessorType.INTEL, model.properties().computeModel().computeProcessor()); + Assertions.assertEquals(614073164, model.properties().computeModel().computeGeneration()); + Assertions.assertEquals(62079989, model.properties().computeModel().vCores()); + Assertions.assertEquals(1667085881, model.properties().nodeCount()); + Assertions.assertEquals(PoolHighAvailabilityMode.ZONE_REDUNDANT, model.properties().highAvailability().mode()); + Assertions.assertEquals("xsqwpgrjbznorc", model.properties().parameterGroup().parameterGroupResourceId()); + Assertions.assertEquals(ParameterApplyMethod.IMMEDIATE, model.properties().parameterGroup().applyMethod()); + Assertions.assertEquals("abnmocpcyshu", model.tags().get("zafb")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PoolInner model = new PoolInner() + .withProperties(new PoolProperties() + .withComputeModel(new PoolComputeModel().withType(PoolComputeModelType.PROVISIONED) + .withComputeProcessor(ComputeProcessorType.INTEL) + .withComputeGeneration(614073164) + .withVCores(62079989)) + .withNodeCount(1667085881) + .withHighAvailability(new PoolHighAvailability().withMode(PoolHighAvailabilityMode.ZONE_REDUNDANT)) + .withParameterGroup(new PoolParameterGroupReference().withParameterGroupResourceId("xsqwpgrjbznorc") + .withApplyMethod(ParameterApplyMethod.IMMEDIATE)) + .withScheduledMaintenance(new ScheduledMaintenanceProperties())) + .withTags(mapOf("zafb", "abnmocpcyshu", "oq", "jjgpb")); + model = BinaryData.fromObject(model).toObject(PoolInner.class); + Assertions.assertEquals(PoolComputeModelType.PROVISIONED, model.properties().computeModel().type()); + Assertions.assertEquals(ComputeProcessorType.INTEL, model.properties().computeModel().computeProcessor()); + Assertions.assertEquals(614073164, model.properties().computeModel().computeGeneration()); + Assertions.assertEquals(62079989, model.properties().computeModel().vCores()); + Assertions.assertEquals(1667085881, model.properties().nodeCount()); + Assertions.assertEquals(PoolHighAvailabilityMode.ZONE_REDUNDANT, model.properties().highAvailability().mode()); + Assertions.assertEquals("xsqwpgrjbznorc", model.properties().parameterGroup().parameterGroupResourceId()); + Assertions.assertEquals(ParameterApplyMethod.IMMEDIATE, model.properties().parameterGroup().applyMethod()); + Assertions.assertEquals("abnmocpcyshu", model.tags().get("zafb")); + } + + // 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/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolListResultTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolListResultTests.java new file mode 100644 index 0000000000000..dd145f2ff3f0b --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolListResultTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.implementation.models.PoolListResult; +import com.azure.resourcemanager.horizondb.models.ComputeProcessorType; +import com.azure.resourcemanager.horizondb.models.ParameterApplyMethod; +import com.azure.resourcemanager.horizondb.models.PoolComputeModelType; +import com.azure.resourcemanager.horizondb.models.PoolHighAvailabilityMode; +import org.junit.jupiter.api.Assertions; + +public final class PoolListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PoolListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"state\":\"Deleting\",\"computeModel\":{\"type\":\"Provisioned\",\"computeProcessor\":\"AMD\",\"computeGeneration\":920917148,\"vCores\":1516038621},\"nodeCount\":1222275240,\"highAvailability\":{\"mode\":\"AnyZone\"},\"parameterGroup\":{\"parameterGroupResourceId\":\"qciwqvhkhixuigdt\",\"applyMethod\":\"Immediate\",\"syncStatus\":\"FailedToApply\"},\"scheduledMaintenance\":{\"maintenanceManagementType\":\"ScheduledMaintenanceProperties\"},\"provisioningState\":\"InProgress\"},\"tags\":{\"w\":\"m\"},\"id\":\"m\",\"name\":\"uhrzayvvt\",\"type\":\"gvdfgiotkftutq\"},{\"properties\":{\"state\":\"Starting\",\"computeModel\":{\"type\":\"Provisioned\",\"computeProcessor\":\"AMD\",\"computeGeneration\":1915071310,\"vCores\":1542158785},\"nodeCount\":628151950,\"highAvailability\":{\"mode\":\"AnyZone\"},\"parameterGroup\":{\"parameterGroupResourceId\":\"gnxkrxdqmidtth\",\"applyMethod\":\"Immediate\",\"syncStatus\":\"PendingReboot\"},\"scheduledMaintenance\":{\"maintenanceManagementType\":\"ScheduledMaintenanceProperties\"},\"provisioningState\":\"InProgress\"},\"tags\":{\"oqfbowskanyk\":\"jybige\",\"nhzgpphrcgyn\":\"zlcuiywgqywgndrv\",\"fsxlzevgbmqjqa\":\"ocpecfvmmco\",\"pmivkwlzu\":\"c\"},\"id\":\"c\",\"name\":\"wnfnbacf\",\"type\":\"onlebxetqgtzxdpn\"},{\"properties\":{\"state\":\"Inaccessible\",\"computeModel\":{\"type\":\"Provisioned\",\"computeProcessor\":\"AMD\",\"computeGeneration\":2122264998,\"vCores\":588288126},\"nodeCount\":19464895,\"highAvailability\":{\"mode\":\"Disabled\"},\"parameterGroup\":{\"parameterGroupResourceId\":\"al\",\"applyMethod\":\"PendingReboot\",\"syncStatus\":\"Applying\"},\"scheduledMaintenance\":{\"maintenanceManagementType\":\"ScheduledMaintenanceProperties\"},\"provisioningState\":\"InProgress\"},\"tags\":{\"ochcbonqvpkvl\":\"jampmngnzscxaqw\",\"ase\":\"xnj\"},\"id\":\"heoflokeyyienjbd\",\"name\":\"wtgrhpdjpj\",\"type\":\"masxazjpqyegu\"}],\"nextLink\":\"hb\"}") + .toObject(PoolListResult.class); + Assertions.assertEquals(PoolComputeModelType.PROVISIONED, + model.value().get(0).properties().computeModel().type()); + Assertions.assertEquals(ComputeProcessorType.AMD, + model.value().get(0).properties().computeModel().computeProcessor()); + Assertions.assertEquals(920917148, model.value().get(0).properties().computeModel().computeGeneration()); + Assertions.assertEquals(1516038621, model.value().get(0).properties().computeModel().vCores()); + Assertions.assertEquals(1222275240, model.value().get(0).properties().nodeCount()); + Assertions.assertEquals(PoolHighAvailabilityMode.ANY_ZONE, + model.value().get(0).properties().highAvailability().mode()); + Assertions.assertEquals("qciwqvhkhixuigdt", + model.value().get(0).properties().parameterGroup().parameterGroupResourceId()); + Assertions.assertEquals(ParameterApplyMethod.IMMEDIATE, + model.value().get(0).properties().parameterGroup().applyMethod()); + Assertions.assertEquals("m", model.value().get(0).tags().get("w")); + Assertions.assertEquals("hb", model.nextLink()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolParameterGroupReferenceForPatchUpdateTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolParameterGroupReferenceForPatchUpdateTests.java new file mode 100644 index 0000000000000..0735ae26ef2b6 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolParameterGroupReferenceForPatchUpdateTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ParameterApplyMethod; +import com.azure.resourcemanager.horizondb.models.PoolParameterGroupReferenceForPatchUpdate; +import org.junit.jupiter.api.Assertions; + +public final class PoolParameterGroupReferenceForPatchUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PoolParameterGroupReferenceForPatchUpdate model + = BinaryData.fromString("{\"parameterGroupResourceId\":\"vuhrhcffcyddgl\",\"applyMethod\":\"Immediate\"}") + .toObject(PoolParameterGroupReferenceForPatchUpdate.class); + Assertions.assertEquals("vuhrhcffcyddgl", model.parameterGroupResourceId()); + Assertions.assertEquals(ParameterApplyMethod.IMMEDIATE, model.applyMethod()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PoolParameterGroupReferenceForPatchUpdate model + = new PoolParameterGroupReferenceForPatchUpdate().withParameterGroupResourceId("vuhrhcffcyddgl") + .withApplyMethod(ParameterApplyMethod.IMMEDIATE); + model = BinaryData.fromObject(model).toObject(PoolParameterGroupReferenceForPatchUpdate.class); + Assertions.assertEquals("vuhrhcffcyddgl", model.parameterGroupResourceId()); + Assertions.assertEquals(ParameterApplyMethod.IMMEDIATE, model.applyMethod()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolParameterGroupReferenceTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolParameterGroupReferenceTests.java new file mode 100644 index 0000000000000..8d9ec0e95e0dc --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolParameterGroupReferenceTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ParameterApplyMethod; +import com.azure.resourcemanager.horizondb.models.PoolParameterGroupReference; +import org.junit.jupiter.api.Assertions; + +public final class PoolParameterGroupReferenceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PoolParameterGroupReference model = BinaryData.fromString( + "{\"parameterGroupResourceId\":\"hhbcsglummajtjao\",\"applyMethod\":\"PendingReboot\",\"syncStatus\":\"PendingReboot\"}") + .toObject(PoolParameterGroupReference.class); + Assertions.assertEquals("hhbcsglummajtjao", model.parameterGroupResourceId()); + Assertions.assertEquals(ParameterApplyMethod.PENDING_REBOOT, model.applyMethod()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PoolParameterGroupReference model + = new PoolParameterGroupReference().withParameterGroupResourceId("hhbcsglummajtjao") + .withApplyMethod(ParameterApplyMethod.PENDING_REBOOT); + model = BinaryData.fromObject(model).toObject(PoolParameterGroupReference.class); + Assertions.assertEquals("hhbcsglummajtjao", model.parameterGroupResourceId()); + Assertions.assertEquals(ParameterApplyMethod.PENDING_REBOOT, model.applyMethod()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolPropertiesForPatchUpdateTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolPropertiesForPatchUpdateTests.java new file mode 100644 index 0000000000000..8d93039127b3a --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolPropertiesForPatchUpdateTests.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ComputeProcessorType; +import com.azure.resourcemanager.horizondb.models.ParameterApplyMethod; +import com.azure.resourcemanager.horizondb.models.PoolComputeModelForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.PoolComputeModelType; +import com.azure.resourcemanager.horizondb.models.PoolHighAvailabilityMode; +import com.azure.resourcemanager.horizondb.models.PoolHighAvailabilityPatch; +import com.azure.resourcemanager.horizondb.models.PoolParameterGroupReferenceForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.PoolPropertiesForPatchUpdate; +import com.azure.resourcemanager.horizondb.models.ScheduledMaintenanceManagementType; +import com.azure.resourcemanager.horizondb.models.ScheduledMaintenancePropertiesForPatchUpdate; +import org.junit.jupiter.api.Assertions; + +public final class PoolPropertiesForPatchUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PoolPropertiesForPatchUpdate model = BinaryData.fromString( + "{\"computeModel\":{\"type\":\"Provisioned\",\"computeProcessor\":\"Intel\",\"computeGeneration\":805352848,\"vCores\":292042706},\"nodeCount\":2146697807,\"highAvailability\":{\"mode\":\"Disabled\"},\"parameterGroup\":{\"parameterGroupResourceId\":\"ojnxqbzvdd\",\"applyMethod\":\"PendingReboot\"},\"scheduledMaintenance\":{\"maintenanceManagementType\":\"System\"}}") + .toObject(PoolPropertiesForPatchUpdate.class); + Assertions.assertEquals(PoolComputeModelType.PROVISIONED, model.computeModel().type()); + Assertions.assertEquals(ComputeProcessorType.INTEL, model.computeModel().computeProcessor()); + Assertions.assertEquals(805352848, model.computeModel().computeGeneration()); + Assertions.assertEquals(292042706, model.computeModel().vCores()); + Assertions.assertEquals(2146697807, model.nodeCount()); + Assertions.assertEquals(PoolHighAvailabilityMode.DISABLED, model.highAvailability().mode()); + Assertions.assertEquals("ojnxqbzvdd", model.parameterGroup().parameterGroupResourceId()); + Assertions.assertEquals(ParameterApplyMethod.PENDING_REBOOT, model.parameterGroup().applyMethod()); + Assertions.assertEquals(ScheduledMaintenanceManagementType.SYSTEM, + model.scheduledMaintenance().maintenanceManagementType()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PoolPropertiesForPatchUpdate model = new PoolPropertiesForPatchUpdate() + .withComputeModel(new PoolComputeModelForPatchUpdate().withType(PoolComputeModelType.PROVISIONED) + .withComputeProcessor(ComputeProcessorType.INTEL) + .withComputeGeneration(805352848) + .withVCores(292042706)) + .withNodeCount(2146697807) + .withHighAvailability(new PoolHighAvailabilityPatch().withMode(PoolHighAvailabilityMode.DISABLED)) + .withParameterGroup( + new PoolParameterGroupReferenceForPatchUpdate().withParameterGroupResourceId("ojnxqbzvdd") + .withApplyMethod(ParameterApplyMethod.PENDING_REBOOT)) + .withScheduledMaintenance(new ScheduledMaintenancePropertiesForPatchUpdate() + .withMaintenanceManagementType(ScheduledMaintenanceManagementType.SYSTEM)); + model = BinaryData.fromObject(model).toObject(PoolPropertiesForPatchUpdate.class); + Assertions.assertEquals(PoolComputeModelType.PROVISIONED, model.computeModel().type()); + Assertions.assertEquals(ComputeProcessorType.INTEL, model.computeModel().computeProcessor()); + Assertions.assertEquals(805352848, model.computeModel().computeGeneration()); + Assertions.assertEquals(292042706, model.computeModel().vCores()); + Assertions.assertEquals(2146697807, model.nodeCount()); + Assertions.assertEquals(PoolHighAvailabilityMode.DISABLED, model.highAvailability().mode()); + Assertions.assertEquals("ojnxqbzvdd", model.parameterGroup().parameterGroupResourceId()); + Assertions.assertEquals(ParameterApplyMethod.PENDING_REBOOT, model.parameterGroup().applyMethod()); + Assertions.assertEquals(ScheduledMaintenanceManagementType.SYSTEM, + model.scheduledMaintenance().maintenanceManagementType()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolPropertiesTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolPropertiesTests.java new file mode 100644 index 0000000000000..88674ae207bfa --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolPropertiesTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ComputeProcessorType; +import com.azure.resourcemanager.horizondb.models.ParameterApplyMethod; +import com.azure.resourcemanager.horizondb.models.PoolComputeModel; +import com.azure.resourcemanager.horizondb.models.PoolComputeModelType; +import com.azure.resourcemanager.horizondb.models.PoolHighAvailability; +import com.azure.resourcemanager.horizondb.models.PoolHighAvailabilityMode; +import com.azure.resourcemanager.horizondb.models.PoolParameterGroupReference; +import com.azure.resourcemanager.horizondb.models.PoolProperties; +import com.azure.resourcemanager.horizondb.models.ScheduledMaintenanceProperties; +import org.junit.jupiter.api.Assertions; + +public final class PoolPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PoolProperties model = BinaryData.fromString( + "{\"state\":\"Updating\",\"computeModel\":{\"type\":\"Provisioned\",\"computeProcessor\":\"Intel\",\"computeGeneration\":623997191,\"vCores\":1898258461},\"nodeCount\":1234306466,\"highAvailability\":{\"mode\":\"AnyZone\"},\"parameterGroup\":{\"parameterGroupResourceId\":\"hfepgzgqex\",\"applyMethod\":\"Immediate\",\"syncStatus\":\"Applying\"},\"scheduledMaintenance\":{\"maintenanceManagementType\":\"ScheduledMaintenanceProperties\"},\"provisioningState\":\"InProgress\"}") + .toObject(PoolProperties.class); + Assertions.assertEquals(PoolComputeModelType.PROVISIONED, model.computeModel().type()); + Assertions.assertEquals(ComputeProcessorType.INTEL, model.computeModel().computeProcessor()); + Assertions.assertEquals(623997191, model.computeModel().computeGeneration()); + Assertions.assertEquals(1898258461, model.computeModel().vCores()); + Assertions.assertEquals(1234306466, model.nodeCount()); + Assertions.assertEquals(PoolHighAvailabilityMode.ANY_ZONE, model.highAvailability().mode()); + Assertions.assertEquals("hfepgzgqex", model.parameterGroup().parameterGroupResourceId()); + Assertions.assertEquals(ParameterApplyMethod.IMMEDIATE, model.parameterGroup().applyMethod()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PoolProperties model = new PoolProperties() + .withComputeModel(new PoolComputeModel().withType(PoolComputeModelType.PROVISIONED) + .withComputeProcessor(ComputeProcessorType.INTEL) + .withComputeGeneration(623997191) + .withVCores(1898258461)) + .withNodeCount(1234306466) + .withHighAvailability(new PoolHighAvailability().withMode(PoolHighAvailabilityMode.ANY_ZONE)) + .withParameterGroup(new PoolParameterGroupReference().withParameterGroupResourceId("hfepgzgqex") + .withApplyMethod(ParameterApplyMethod.IMMEDIATE)) + .withScheduledMaintenance(new ScheduledMaintenanceProperties()); + model = BinaryData.fromObject(model).toObject(PoolProperties.class); + Assertions.assertEquals(PoolComputeModelType.PROVISIONED, model.computeModel().type()); + Assertions.assertEquals(ComputeProcessorType.INTEL, model.computeModel().computeProcessor()); + Assertions.assertEquals(623997191, model.computeModel().computeGeneration()); + Assertions.assertEquals(1898258461, model.computeModel().vCores()); + Assertions.assertEquals(1234306466, model.nodeCount()); + Assertions.assertEquals(PoolHighAvailabilityMode.ANY_ZONE, model.highAvailability().mode()); + Assertions.assertEquals("hfepgzgqex", model.parameterGroup().parameterGroupResourceId()); + Assertions.assertEquals(ParameterApplyMethod.IMMEDIATE, model.parameterGroup().applyMethod()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolsCreateOrReplaceMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolsCreateOrReplaceMockTests.java new file mode 100644 index 0000000000000..b2bb9748a4ff9 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolsCreateOrReplaceMockTests.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.horizondb.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.horizondb.HorizonDbManager; +import com.azure.resourcemanager.horizondb.models.ComputeProcessorType; +import com.azure.resourcemanager.horizondb.models.ParameterApplyMethod; +import com.azure.resourcemanager.horizondb.models.Pool; +import com.azure.resourcemanager.horizondb.models.PoolComputeModel; +import com.azure.resourcemanager.horizondb.models.PoolComputeModelType; +import com.azure.resourcemanager.horizondb.models.PoolHighAvailability; +import com.azure.resourcemanager.horizondb.models.PoolHighAvailabilityMode; +import com.azure.resourcemanager.horizondb.models.PoolParameterGroupReference; +import com.azure.resourcemanager.horizondb.models.PoolProperties; +import com.azure.resourcemanager.horizondb.models.ScheduledMaintenanceProperties; +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 PoolsCreateOrReplaceMockTests { + @Test + public void testCreateOrReplace() throws Exception { + String responseStr + = "{\"properties\":{\"state\":\"Restarting\",\"computeModel\":{\"type\":\"Provisioned\",\"computeProcessor\":\"Intel\",\"computeGeneration\":1041320877,\"vCores\":1109693907},\"nodeCount\":851546423,\"highAvailability\":{\"mode\":\"ZoneRedundant\"},\"parameterGroup\":{\"parameterGroupResourceId\":\"jfutacoebj\",\"applyMethod\":\"PendingReboot\",\"syncStatus\":\"PendingReboot\"},\"scheduledMaintenance\":{\"maintenanceManagementType\":\"ScheduledMaintenanceProperties\"},\"provisioningState\":\"Succeeded\"},\"tags\":{\"kahzo\":\"wcpmguaadraufac\"},\"id\":\"jjziuxxpsh\",\"name\":\"eekulfgslqubkwd\",\"type\":\"enr\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HorizonDbManager manager = HorizonDbManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + Pool response = manager.pools() + .define("dyg") + .withExistingCluster("fwsrtawcoezbrhu", "skh") + .withTags(mapOf("vyvnqqyb", "zf", "yjkqabqgzslesjcb", "ryeu")) + .withProperties(new PoolProperties() + .withComputeModel(new PoolComputeModel().withType(PoolComputeModelType.PROVISIONED) + .withComputeProcessor(ComputeProcessorType.AMD) + .withComputeGeneration(2146938073) + .withVCores(870237510)) + .withNodeCount(280222728) + .withHighAvailability(new PoolHighAvailability().withMode(PoolHighAvailabilityMode.DISABLED)) + .withParameterGroup(new PoolParameterGroupReference().withParameterGroupResourceId("vleo") + .withApplyMethod(ParameterApplyMethod.PENDING_REBOOT)) + .withScheduledMaintenance(new ScheduledMaintenanceProperties())) + .create(); + + Assertions.assertEquals(PoolComputeModelType.PROVISIONED, response.properties().computeModel().type()); + Assertions.assertEquals(ComputeProcessorType.INTEL, response.properties().computeModel().computeProcessor()); + Assertions.assertEquals(1041320877, response.properties().computeModel().computeGeneration()); + Assertions.assertEquals(1109693907, response.properties().computeModel().vCores()); + Assertions.assertEquals(851546423, response.properties().nodeCount()); + Assertions.assertEquals(PoolHighAvailabilityMode.ZONE_REDUNDANT, + response.properties().highAvailability().mode()); + Assertions.assertEquals("jfutacoebj", response.properties().parameterGroup().parameterGroupResourceId()); + Assertions.assertEquals(ParameterApplyMethod.PENDING_REBOOT, + response.properties().parameterGroup().applyMethod()); + Assertions.assertEquals("wcpmguaadraufac", response.tags().get("kahzo")); + } + + // 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/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolsGetWithResponseMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolsGetWithResponseMockTests.java new file mode 100644 index 0000000000000..0038311c9d65b --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolsGetWithResponseMockTests.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.horizondb.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.horizondb.HorizonDbManager; +import com.azure.resourcemanager.horizondb.models.ComputeProcessorType; +import com.azure.resourcemanager.horizondb.models.ParameterApplyMethod; +import com.azure.resourcemanager.horizondb.models.Pool; +import com.azure.resourcemanager.horizondb.models.PoolComputeModelType; +import com.azure.resourcemanager.horizondb.models.PoolHighAvailabilityMode; +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 PoolsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"state\":\"Ready\",\"computeModel\":{\"type\":\"Provisioned\",\"computeProcessor\":\"Intel\",\"computeGeneration\":1937777224,\"vCores\":441101019},\"nodeCount\":1249979629,\"highAvailability\":{\"mode\":\"AnyZone\"},\"parameterGroup\":{\"parameterGroupResourceId\":\"pdso\",\"applyMethod\":\"PendingReboot\",\"syncStatus\":\"InSync\"},\"scheduledMaintenance\":{\"maintenanceManagementType\":\"ScheduledMaintenanceProperties\"},\"provisioningState\":\"Succeeded\"},\"tags\":{\"yybyc\":\"uswdv\",\"ikyzirtxdy\":\"unvjsrtkfawnopq\",\"ejnt\":\"x\"},\"id\":\"ewgioilqukrydxt\",\"name\":\"mieoxorgguf\",\"type\":\"yaomtb\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HorizonDbManager manager = HorizonDbManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + Pool response = manager.pools() + .getWithResponse("gnyhmossxkkg", "h", "rghxjb", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals(PoolComputeModelType.PROVISIONED, response.properties().computeModel().type()); + Assertions.assertEquals(ComputeProcessorType.INTEL, response.properties().computeModel().computeProcessor()); + Assertions.assertEquals(1937777224, response.properties().computeModel().computeGeneration()); + Assertions.assertEquals(441101019, response.properties().computeModel().vCores()); + Assertions.assertEquals(1249979629, response.properties().nodeCount()); + Assertions.assertEquals(PoolHighAvailabilityMode.ANY_ZONE, response.properties().highAvailability().mode()); + Assertions.assertEquals("pdso", response.properties().parameterGroup().parameterGroupResourceId()); + Assertions.assertEquals(ParameterApplyMethod.PENDING_REBOOT, + response.properties().parameterGroup().applyMethod()); + Assertions.assertEquals("uswdv", response.tags().get("yybyc")); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolsListMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolsListMockTests.java new file mode 100644 index 0000000000000..345a9b4c8f3ba --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolsListMockTests.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.horizondb.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.horizondb.HorizonDbManager; +import com.azure.resourcemanager.horizondb.models.ComputeProcessorType; +import com.azure.resourcemanager.horizondb.models.ParameterApplyMethod; +import com.azure.resourcemanager.horizondb.models.Pool; +import com.azure.resourcemanager.horizondb.models.PoolComputeModelType; +import com.azure.resourcemanager.horizondb.models.PoolHighAvailabilityMode; +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 PoolsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"state\":\"Stopping\",\"computeModel\":{\"type\":\"Provisioned\",\"computeProcessor\":\"AMD\",\"computeGeneration\":1758314943,\"vCores\":504672156},\"nodeCount\":1832898132,\"highAvailability\":{\"mode\":\"ZoneRedundant\"},\"parameterGroup\":{\"parameterGroupResourceId\":\"cluyovwxnbkf\",\"applyMethod\":\"PendingReboot\",\"syncStatus\":\"PendingReboot\"},\"scheduledMaintenance\":{\"maintenanceManagementType\":\"ScheduledMaintenanceProperties\"},\"provisioningState\":\"Failed\"},\"tags\":{\"zbomvzzbtdcqvpni\":\"zdgiruj\",\"n\":\"ujviylwdshfs\",\"rymsgaojfmw\":\"bgye\"},\"id\":\"otmrfhir\",\"name\":\"tymoxoftp\",\"type\":\"piwyczuhxacpqjl\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HorizonDbManager manager = HorizonDbManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.pools().list("hhavgrvkffovjz", "pjbi", com.azure.core.util.Context.NONE); + + Assertions.assertEquals(PoolComputeModelType.PROVISIONED, + response.iterator().next().properties().computeModel().type()); + Assertions.assertEquals(ComputeProcessorType.AMD, + response.iterator().next().properties().computeModel().computeProcessor()); + Assertions.assertEquals(1758314943, response.iterator().next().properties().computeModel().computeGeneration()); + Assertions.assertEquals(504672156, response.iterator().next().properties().computeModel().vCores()); + Assertions.assertEquals(1832898132, response.iterator().next().properties().nodeCount()); + Assertions.assertEquals(PoolHighAvailabilityMode.ZONE_REDUNDANT, + response.iterator().next().properties().highAvailability().mode()); + Assertions.assertEquals("cluyovwxnbkf", + response.iterator().next().properties().parameterGroup().parameterGroupResourceId()); + Assertions.assertEquals(ParameterApplyMethod.PENDING_REBOOT, + response.iterator().next().properties().parameterGroup().applyMethod()); + Assertions.assertEquals("zdgiruj", response.iterator().next().tags().get("zbomvzzbtdcqvpni")); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolsRestartMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolsRestartMockTests.java new file mode 100644 index 0000000000000..8f056b30507bf --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolsRestartMockTests.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.horizondb.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.horizondb.HorizonDbManager; +import com.azure.resourcemanager.horizondb.models.ComputeProcessorType; +import com.azure.resourcemanager.horizondb.models.ParameterApplyMethod; +import com.azure.resourcemanager.horizondb.models.Pool; +import com.azure.resourcemanager.horizondb.models.PoolComputeModelType; +import com.azure.resourcemanager.horizondb.models.PoolHighAvailabilityMode; +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 PoolsRestartMockTests { + @Test + public void testRestart() throws Exception { + String responseStr + = "{\"properties\":{\"state\":\"Restarting\",\"computeModel\":{\"type\":\"Provisioned\",\"computeProcessor\":\"Intel\",\"computeGeneration\":136056515,\"vCores\":1790769124},\"nodeCount\":1494813827,\"highAvailability\":{\"mode\":\"ZoneRedundant\"},\"parameterGroup\":{\"parameterGroupResourceId\":\"heyd\",\"applyMethod\":\"PendingReboot\",\"syncStatus\":\"PendingReboot\"},\"scheduledMaintenance\":{\"maintenanceManagementType\":\"ScheduledMaintenanceProperties\"},\"provisioningState\":\"Succeeded\"},\"tags\":{\"ltfnhtbaxkgx\":\"aehvbbxuri\",\"yklyhpluodpvruud\":\"wrck\",\"xeclzedqbcvhzlhp\":\"gzibthostgktstv\"},\"id\":\"dqkdlwwqfbu\",\"name\":\"lkxt\",\"type\":\"qjfsmlmbtxhw\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HorizonDbManager manager = HorizonDbManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + Pool response = manager.pools().restart("knssxmojm", "vpkjpr", "kwcf", com.azure.core.util.Context.NONE); + + Assertions.assertEquals(PoolComputeModelType.PROVISIONED, response.properties().computeModel().type()); + Assertions.assertEquals(ComputeProcessorType.INTEL, response.properties().computeModel().computeProcessor()); + Assertions.assertEquals(136056515, response.properties().computeModel().computeGeneration()); + Assertions.assertEquals(1790769124, response.properties().computeModel().vCores()); + Assertions.assertEquals(1494813827, response.properties().nodeCount()); + Assertions.assertEquals(PoolHighAvailabilityMode.ZONE_REDUNDANT, + response.properties().highAvailability().mode()); + Assertions.assertEquals("heyd", response.properties().parameterGroup().parameterGroupResourceId()); + Assertions.assertEquals(ParameterApplyMethod.PENDING_REBOOT, + response.properties().parameterGroup().applyMethod()); + Assertions.assertEquals("aehvbbxuri", response.tags().get("ltfnhtbaxkgx")); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolsStartMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolsStartMockTests.java new file mode 100644 index 0000000000000..b325a867508ea --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolsStartMockTests.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.horizondb.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.horizondb.HorizonDbManager; +import com.azure.resourcemanager.horizondb.models.ComputeProcessorType; +import com.azure.resourcemanager.horizondb.models.ParameterApplyMethod; +import com.azure.resourcemanager.horizondb.models.Pool; +import com.azure.resourcemanager.horizondb.models.PoolComputeModelType; +import com.azure.resourcemanager.horizondb.models.PoolHighAvailabilityMode; +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 PoolsStartMockTests { + @Test + public void testStart() throws Exception { + String responseStr + = "{\"properties\":{\"state\":\"Updating\",\"computeModel\":{\"type\":\"Provisioned\",\"computeProcessor\":\"AMD\",\"computeGeneration\":1190049726,\"vCores\":856089944},\"nodeCount\":866301348,\"highAvailability\":{\"mode\":\"Disabled\"},\"parameterGroup\":{\"parameterGroupResourceId\":\"xurisjnhnyt\",\"applyMethod\":\"Immediate\",\"syncStatus\":\"FailedToApply\"},\"scheduledMaintenance\":{\"maintenanceManagementType\":\"ScheduledMaintenanceProperties\"},\"provisioningState\":\"Succeeded\"},\"tags\":{\"upauut\":\"rhublwpcesutrg\",\"qg\":\"woqhihe\",\"foimwkslircizjxv\":\"zpnfqntcypsxj\"},\"id\":\"fceacvlhvygd\",\"name\":\"ftumrtwnawjslbiw\",\"type\":\"ojgcyzt\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HorizonDbManager manager = HorizonDbManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + Pool response = manager.pools().start("h", "yuspskas", "vlmfwdgzxulucv", com.azure.core.util.Context.NONE); + + Assertions.assertEquals(PoolComputeModelType.PROVISIONED, response.properties().computeModel().type()); + Assertions.assertEquals(ComputeProcessorType.AMD, response.properties().computeModel().computeProcessor()); + Assertions.assertEquals(1190049726, response.properties().computeModel().computeGeneration()); + Assertions.assertEquals(856089944, response.properties().computeModel().vCores()); + Assertions.assertEquals(866301348, response.properties().nodeCount()); + Assertions.assertEquals(PoolHighAvailabilityMode.DISABLED, response.properties().highAvailability().mode()); + Assertions.assertEquals("xurisjnhnyt", response.properties().parameterGroup().parameterGroupResourceId()); + Assertions.assertEquals(ParameterApplyMethod.IMMEDIATE, response.properties().parameterGroup().applyMethod()); + Assertions.assertEquals("rhublwpcesutrg", response.tags().get("upauut")); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolsStopMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolsStopMockTests.java new file mode 100644 index 0000000000000..435b5f9509830 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PoolsStopMockTests.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.horizondb.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.horizondb.HorizonDbManager; +import com.azure.resourcemanager.horizondb.models.ComputeProcessorType; +import com.azure.resourcemanager.horizondb.models.ParameterApplyMethod; +import com.azure.resourcemanager.horizondb.models.Pool; +import com.azure.resourcemanager.horizondb.models.PoolComputeModelType; +import com.azure.resourcemanager.horizondb.models.PoolHighAvailabilityMode; +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 PoolsStopMockTests { + @Test + public void testStop() throws Exception { + String responseStr + = "{\"properties\":{\"state\":\"Provisioning\",\"computeModel\":{\"type\":\"Provisioned\",\"computeProcessor\":\"AMD\",\"computeGeneration\":2009278020,\"vCores\":172604162},\"nodeCount\":741141390,\"highAvailability\":{\"mode\":\"ZoneRedundant\"},\"parameterGroup\":{\"parameterGroupResourceId\":\"dznx\",\"applyMethod\":\"PendingReboot\",\"syncStatus\":\"InSync\"},\"scheduledMaintenance\":{\"maintenanceManagementType\":\"ScheduledMaintenanceProperties\"},\"provisioningState\":\"Succeeded\"},\"tags\":{\"v\":\"volvtn\"},\"id\":\"zgemjdftuljlt\",\"name\":\"ucea\",\"type\":\"tmczuomejwcwwqi\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HorizonDbManager manager = HorizonDbManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + Pool response + = manager.pools().stop("fmznba", "qphchqnrnrpxehuw", "ykqgaifmvik", com.azure.core.util.Context.NONE); + + Assertions.assertEquals(PoolComputeModelType.PROVISIONED, response.properties().computeModel().type()); + Assertions.assertEquals(ComputeProcessorType.AMD, response.properties().computeModel().computeProcessor()); + Assertions.assertEquals(2009278020, response.properties().computeModel().computeGeneration()); + Assertions.assertEquals(172604162, response.properties().computeModel().vCores()); + Assertions.assertEquals(741141390, response.properties().nodeCount()); + Assertions.assertEquals(PoolHighAvailabilityMode.ZONE_REDUNDANT, + response.properties().highAvailability().mode()); + Assertions.assertEquals("dznx", response.properties().parameterGroup().parameterGroupResourceId()); + Assertions.assertEquals(ParameterApplyMethod.PENDING_REBOOT, + response.properties().parameterGroup().applyMethod()); + Assertions.assertEquals("volvtn", response.tags().get("v")); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PostgreSqlVersionCapabilityTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PostgreSqlVersionCapabilityTests.java new file mode 100644 index 0000000000000..eb4b55eab6f42 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PostgreSqlVersionCapabilityTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.PostgreSqlVersionCapability; + +public final class PostgreSqlVersionCapabilityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PostgreSqlVersionCapability model + = BinaryData.fromString("{\"name\":\"17\",\"supportedVersionsToUpgrade\":[\"18\"]}") + .toObject(PostgreSqlVersionCapability.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionPropertiesTests.java index 6c834450f3f0f..0dd8c206d4fc7 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionPropertiesTests.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionPropertiesTests.java @@ -15,12 +15,12 @@ public final class PrivateEndpointConnectionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateEndpointConnectionProperties model = BinaryData.fromString( - "{\"groupIds\":[\"l\",\"kudjkrlkhb\",\"hfepgzgqex\"],\"privateEndpoint\":{\"id\":\"c\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"aierhhb\",\"actionsRequired\":\"glu\"},\"provisioningState\":\"Succeeded\"}") + "{\"groupIds\":[\"kacspkw\",\"hzdobpxjmflbvvnc\"],\"privateEndpoint\":{\"id\":\"cciw\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"qkhr\",\"actionsRequired\":\"jiwkuofoskghsau\"},\"provisioningState\":\"Failed\"}") .toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("aierhhb", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("glu", model.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("qkhr", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("jiwkuofoskghsau", model.privateLinkServiceConnectionState().actionsRequired()); } @org.junit.jupiter.api.Test @@ -28,13 +28,13 @@ public void testSerialize() throws Exception { PrivateEndpointConnectionProperties model = new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint()) .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) - .withDescription("aierhhb") - .withActionsRequired("glu")); + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.PENDING) + .withDescription("qkhr") + .withActionsRequired("jiwkuofoskghsau")); model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("aierhhb", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("glu", model.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("qkhr", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("jiwkuofoskghsau", model.privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionResourceInnerTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionResourceInnerTests.java index 37276ed218614..97051a5576ee7 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionResourceInnerTests.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionResourceInnerTests.java @@ -16,12 +16,12 @@ public final class PrivateEndpointConnectionResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateEndpointConnectionResourceInner model = BinaryData.fromString( - "{\"properties\":{\"groupIds\":[\"yip\"],\"privateEndpoint\":{\"id\":\"qwpgrjbzn\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"xv\",\"actionsRequired\":\"byxqabn\"},\"provisioningState\":\"Succeeded\"},\"id\":\"cyshurzafbljjgp\",\"name\":\"toqcjmklja\",\"type\":\"bqidtqaj\"}") + "{\"properties\":{\"groupIds\":[\"exim\",\"ryocfsfksymdd\",\"stkiiuxhqyud\"],\"privateEndpoint\":{\"id\":\"rq\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"czvyifq\",\"actionsRequired\":\"kdvjsll\"},\"provisioningState\":\"Failed\"},\"id\":\"d\",\"name\":\"watkpnpulexxb\",\"type\":\"zwtruwiqzbqjvsov\"}") .toObject(PrivateEndpointConnectionResourceInner.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, model.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("xv", model.properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("byxqabn", model.properties().privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("czvyifq", model.properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("kdvjsll", model.properties().privateLinkServiceConnectionState().actionsRequired()); } @org.junit.jupiter.api.Test @@ -30,13 +30,13 @@ public void testSerialize() throws Exception { = new PrivateEndpointConnectionResourceInner() .withProperties(new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint()) .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) - .withDescription("xv") - .withActionsRequired("byxqabn"))); + .withStatus(PrivateEndpointServiceConnectionStatus.PENDING) + .withDescription("czvyifq") + .withActionsRequired("kdvjsll"))); model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionResourceInner.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, model.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("xv", model.properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("byxqabn", model.properties().privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("czvyifq", model.properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("kdvjsll", model.properties().privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionResourceListResultTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionResourceListResultTests.java index fd7bad93b39b8..192b52e61b671 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionResourceListResultTests.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionResourceListResultTests.java @@ -13,14 +13,14 @@ public final class PrivateEndpointConnectionResourceListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateEndpointConnectionResourceListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"groupIds\":[\"cp\"],\"privateEndpoint\":{\"id\":\"maajrmvdjwzrlo\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"whijcoejctbza\",\"actionsRequired\":\"qsycbkbfkgu\"},\"provisioningState\":\"Creating\"},\"id\":\"xxppofm\",\"name\":\"axcfjpgddtocjjx\",\"type\":\"vpmouexhdzxib\"},{\"properties\":{\"groupIds\":[\"nxqbzvddn\",\"wndeicbtwnp\",\"aoqvuh\",\"hcffcyddglmjthjq\"],\"privateEndpoint\":{\"id\":\"yeicxmqciwqvhk\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"igdtopbob\",\"actionsRequired\":\"ghmewuam\"},\"provisioningState\":\"Failed\"},\"id\":\"z\",\"name\":\"yvvtpgvdfgio\",\"type\":\"kftutqxlngxlefg\"}],\"nextLink\":\"nxkrx\"}") + "{\"value\":[{\"properties\":{\"groupIds\":[\"onpc\",\"hocohslkev\",\"eggzfb\"],\"privateEndpoint\":{\"id\":\"mvfaxkffeiith\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"zy\",\"actionsRequired\":\"hxmzsbbzoggig\"},\"provisioningState\":\"Failed\"},\"id\":\"ur\",\"name\":\"jx\",\"type\":\"jnspydp\"}],\"nextLink\":\"oenkouknvudwti\"}") .toObject(PrivateEndpointConnectionResourceListResult.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, model.value().get(0).properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("whijcoejctbza", + Assertions.assertEquals("zy", model.value().get(0).properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("qsycbkbfkgu", + Assertions.assertEquals("hxmzsbbzoggig", model.value().get(0).properties().privateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals("nxkrx", model.nextLink()); + Assertions.assertEquals("oenkouknvudwti", model.nextLink()); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateEndpointConnectionsUpdateStatusWithResponseMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionsApproveOrRejectMockTests.java similarity index 54% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateEndpointConnectionsUpdateStatusWithResponseMockTests.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionsApproveOrRejectMockTests.java index 82dc48c816196..20c2a344e6b3a 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateEndpointConnectionsUpdateStatusWithResponseMockTests.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionsApproveOrRejectMockTests.java @@ -10,7 +10,6 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.horizondb.HorizonDbManager; -import com.azure.resourcemanager.horizondb.fluent.models.PrivateEndpointConnectionResourceInner; import com.azure.resourcemanager.horizondb.models.PrivateEndpoint; import com.azure.resourcemanager.horizondb.models.PrivateEndpointConnectionProperties; import com.azure.resourcemanager.horizondb.models.PrivateEndpointConnectionResource; @@ -22,11 +21,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class HorizonDbPrivateEndpointConnectionsUpdateStatusWithResponseMockTests { +public final class PrivateEndpointConnectionsApproveOrRejectMockTests { @Test - public void testUpdateStatusWithResponse() throws Exception { + public void testApproveOrReject() throws Exception { String responseStr - = "{\"properties\":{\"groupIds\":[\"wnwxuqlcvyd\",\"patdooaojkniodko\",\"ebwnujhe\",\"msbvdkcrodtjinf\"],\"privateEndpoint\":{\"id\":\"fltkacjv\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"lfoakg\",\"actionsRequired\":\"fpagaowpulp\"},\"provisioningState\":\"Succeeded\"},\"id\":\"lsyxkqjnsjervt\",\"name\":\"agxsdszuemps\",\"type\":\"zkfzbeyv\"}"; + = "{\"properties\":{\"groupIds\":[\"i\",\"pfhoqcaaewdao\"],\"privateEndpoint\":{\"id\":\"vlp\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"zb\",\"actionsRequired\":\"sgeivsiy\"},\"provisioningState\":\"Succeeded\"},\"id\":\"ncj\",\"name\":\"xonbzoggculapz\",\"type\":\"y\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,21 +34,21 @@ public void testUpdateStatusWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PrivateEndpointConnectionResource response = manager.horizonDbPrivateEndpointConnections() - .updateStatusWithResponse("ayffim", "zrtuzq", "gsexne", - new PrivateEndpointConnectionResourceInner() - .withProperties(new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) - .withDescription("qbrqubpaxhexiili") - .withActionsRequired("dtiirqt"))), - com.azure.core.util.Context.NONE) - .getValue(); + PrivateEndpointConnectionResource response + = manager.privateEndpointConnections() + .define("nobaiyhddviacegf") + .withExistingCluster("stcyohpfkyrkdbd", "iogsjkmnwq") + .withProperties(new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint()) + .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() + .withStatus(PrivateEndpointServiceConnectionStatus.PENDING) + .withDescription("wsmystuluqypf") + .withActionsRequired("lerchpq"))) + .create(); Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, response.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("lfoakg", response.properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("fpagaowpulp", + Assertions.assertEquals("zb", response.properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("sgeivsiy", response.properties().privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateEndpointConnectionsGetWithResponseMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java similarity index 64% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateEndpointConnectionsGetWithResponseMockTests.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java index 81ee037cb1a6b..2d6bfcf8ed0a3 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateEndpointConnectionsGetWithResponseMockTests.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java @@ -18,11 +18,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class HorizonDbPrivateEndpointConnectionsGetWithResponseMockTests { +public final class PrivateEndpointConnectionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"groupIds\":[\"pjrvxagl\"],\"privateEndpoint\":{\"id\":\"mjwosytx\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"kfcktqum\",\"actionsRequired\":\"kkezzikhlyfjhdgq\"},\"provisioningState\":\"Creating\"},\"id\":\"dunyg\",\"name\":\"eqidbqfatpx\",\"type\":\"lr\"}"; + = "{\"properties\":{\"groupIds\":[\"x\"],\"privateEndpoint\":{\"id\":\"xrxc\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"savokqdzf\",\"actionsRequired\":\"zivj\"},\"provisioningState\":\"Failed\"},\"id\":\"ttbaj\",\"name\":\"katnwxyi\",\"type\":\"pidkqqfkuvscxkdm\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,14 +31,13 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PrivateEndpointConnectionResource response = manager.horizonDbPrivateEndpointConnections() - .getWithResponse("elpcirelsfeaenwa", "fatkld", "xbjhwuaanozjosph", com.azure.core.util.Context.NONE) + PrivateEndpointConnectionResource response = manager.privateEndpointConnections() + .getWithResponse("bdyhgkfminsgowz", "ttsttktlahbqact", "tgzukxitmmqt", com.azure.core.util.Context.NONE) .getValue(); Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, response.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("kfcktqum", response.properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("kkezzikhlyfjhdgq", - response.properties().privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("savokqdzf", response.properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("zivj", response.properties().privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateEndpointConnectionsListMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionsListMockTests.java similarity index 74% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateEndpointConnectionsListMockTests.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionsListMockTests.java index 5742323033f7c..3b880b7590fe3 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateEndpointConnectionsListMockTests.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointConnectionsListMockTests.java @@ -19,11 +19,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class HorizonDbPrivateEndpointConnectionsListMockTests { +public final class PrivateEndpointConnectionsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"groupIds\":[\"x\",\"rw\",\"yc\"],\"privateEndpoint\":{\"id\":\"hp\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"ymareqnajxqugj\",\"actionsRequired\":\"ycubeddgs\"},\"provisioningState\":\"Deleting\"},\"id\":\"qmzqalkrmnjijpx\",\"name\":\"cqqudf\",\"type\":\"byxbaaabjy\"}]}"; + = "{\"value\":[{\"properties\":{\"groupIds\":[\"rb\",\"eoybfhjxakvvjgs\"],\"privateEndpoint\":{\"id\":\"dilmyww\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"xnyed\",\"actionsRequired\":\"gyvudtjuewbc\"},\"provisioningState\":\"Creating\"},\"id\":\"uwhcjyxccybv\",\"name\":\"ayakkudzpx\",\"type\":\"wjplma\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,14 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.horizonDbPrivateEndpointConnections() - .list("cyjmoadsuvarmy", "dmjsjqb", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.privateEndpointConnections().list("igovi", "rxkpmloazuruoc", com.azure.core.util.Context.NONE); Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, response.iterator().next().properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ymareqnajxqugj", + Assertions.assertEquals("xnyed", response.iterator().next().properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("ycubeddgs", + Assertions.assertEquals("gyvudtjuewbc", response.iterator().next().properties().privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointTests.java index 06e68d4df417f..552504af11693 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointTests.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateEndpointTests.java @@ -10,7 +10,7 @@ public final class PrivateEndpointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateEndpoint model = BinaryData.fromString("{\"id\":\"tjaodxobnb\"}").toObject(PrivateEndpoint.class); + PrivateEndpoint model = BinaryData.fromString("{\"id\":\"mvxi\"}").toObject(PrivateEndpoint.class); } @org.junit.jupiter.api.Test diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateLinkResourceInnerTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateLinkResourceInnerTests.java new file mode 100644 index 0000000000000..a9d45fb84c5e6 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateLinkResourceInnerTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.fluent.models.PrivateLinkResourceInner; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkResourceInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkResourceInner model = BinaryData.fromString( + "{\"properties\":{\"groupId\":\"ldngkpoci\",\"requiredMembers\":[\"yxoegukgjnp\"],\"requiredZoneNames\":[\"gygev\",\"zntypmrb\"]},\"id\":\"zcdrqjsdpydnfyhx\",\"name\":\"eoejzic\",\"type\":\"ifsjttgzfbishcb\"}") + .toObject(PrivateLinkResourceInner.class); + Assertions.assertEquals("gygev", model.properties().requiredZoneNames().get(0)); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateLinkResourceListResultTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateLinkResourceListResultTests.java new file mode 100644 index 0000000000000..b16902663359a --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateLinkResourceListResultTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.implementation.models.PrivateLinkResourceListResult; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkResourceListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkResourceListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"groupId\":\"icohoqqnwvl\",\"requiredMembers\":[\"vwhheunmmqhgyx\",\"konocu\",\"oklyaxuconuq\"],\"requiredZoneNames\":[\"kbeype\",\"rmjmwvvjektc\"]},\"id\":\"enhwlrs\",\"name\":\"frzpwvlqdqgb\",\"type\":\"qylihkaetckt\"},{\"properties\":{\"groupId\":\"ivfsnk\",\"requiredMembers\":[\"ctq\",\"jf\",\"ebrjcxe\"],\"requiredZoneNames\":[\"wutttxfvjrbi\",\"phxepcyvahf\",\"ljkyqxjvuuj\",\"gidokgjljyoxgvcl\"]},\"id\":\"gsncghkjeszz\",\"name\":\"bijhtxfvgxbf\",\"type\":\"mxnehmp\"}],\"nextLink\":\"cxgod\"}") + .toObject(PrivateLinkResourceListResult.class); + Assertions.assertEquals("kbeype", model.value().get(0).properties().requiredZoneNames().get(0)); + Assertions.assertEquals("cxgod", model.nextLink()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateLinkResourcePropertiesTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateLinkResourcePropertiesTests.java index 4e58925fbb39d..634f3ae3c1072 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateLinkResourcePropertiesTests.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateLinkResourcePropertiesTests.java @@ -12,8 +12,8 @@ public final class PrivateLinkResourcePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateLinkResourceProperties model = BinaryData.fromString( - "{\"groupId\":\"cpecfvmmcoofs\",\"requiredMembers\":[\"evgbmqjq\",\"bcypmi\"],\"requiredZoneNames\":[\"lzu\"]}") + "{\"groupId\":\"ajdeyeamdphaga\",\"requiredMembers\":[\"uxwgipwho\",\"ow\"],\"requiredZoneNames\":[\"hwankixzbinjepu\",\"tmryw\",\"uzoqft\",\"yqzrnkcqvyxlw\"]}") .toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("lzu", model.requiredZoneNames().get(0)); + Assertions.assertEquals("hwankixzbinjepu", model.requiredZoneNames().get(0)); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateLinkResourcesGetWithResponseMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateLinkResourcesGetWithResponseMockTests.java new file mode 100644 index 0000000000000..fde08697ea166 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateLinkResourcesGetWithResponseMockTests.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.horizondb.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.horizondb.HorizonDbManager; +import com.azure.resourcemanager.horizondb.models.PrivateLinkResource; +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 PrivateLinkResourcesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"groupId\":\"of\",\"requiredMembers\":[\"vfcibyfmowux\",\"kjpvdwxf\",\"wiivwzjbhyzsx\"],\"requiredZoneNames\":[\"ambtrnegvm\",\"vuqeqvldspast\",\"bkkd\",\"flvestmjlxrrilo\"]},\"id\":\"peewchpxlkt\",\"name\":\"kuziycsle\",\"type\":\"ufuztcktyhjtq\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HorizonDbManager manager = HorizonDbManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PrivateLinkResource response = manager.privateLinkResources() + .getWithResponse("pgogtqxepny", "b", "uajlyj", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("ambtrnegvm", response.properties().requiredZoneNames().get(0)); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateLinkResourcesListMockTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateLinkResourcesListMockTests.java similarity index 65% rename from sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateLinkResourcesListMockTests.java rename to sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateLinkResourcesListMockTests.java index 1d95bfc4deb5e..4ee53f36043f1 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/HorizonDbPrivateLinkResourcesListMockTests.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateLinkResourcesListMockTests.java @@ -11,18 +11,18 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.horizondb.HorizonDbManager; -import com.azure.resourcemanager.horizondb.models.HorizonDbPrivateLinkResource; +import com.azure.resourcemanager.horizondb.models.PrivateLinkResource; 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 HorizonDbPrivateLinkResourcesListMockTests { +public final class PrivateLinkResourcesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"groupId\":\"lxqtvcofudfl\",\"requiredMembers\":[\"jub\"],\"requiredZoneNames\":[\"nnqvsa\",\"nqntorudsgsahm\",\"yc\"]},\"id\":\"auwjuetaebu\",\"name\":\"u\",\"type\":\"dmovsm\"}]}"; + = "{\"value\":[{\"properties\":{\"groupId\":\"jvpglydzgk\",\"requiredMembers\":[\"eevt\",\"epr\"],\"requiredZoneNames\":[\"nwy\"]},\"id\":\"zdmovzv\",\"name\":\"va\",\"type\":\"wzqa\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.horizonDbPrivateLinkResources().list("nvxbvt", "udutnco", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.privateLinkResources().list("dcgzul", "mmrqz", com.azure.core.util.Context.NONE); - Assertions.assertEquals("nnqvsa", response.iterator().next().properties().requiredZoneNames().get(0)); + Assertions.assertEquals("nwy", response.iterator().next().properties().requiredZoneNames().get(0)); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateLinkServiceConnectionStateTests.java index c54547b206293..87966a7422e6c 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateLinkServiceConnectionStateTests.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/PrivateLinkServiceConnectionStateTests.java @@ -13,22 +13,22 @@ public final class PrivateLinkServiceConnectionStateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateLinkServiceConnectionState model = BinaryData - .fromString("{\"status\":\"Pending\",\"description\":\"pxokajionp\",\"actionsRequired\":\"ex\"}") + .fromString("{\"status\":\"Rejected\",\"description\":\"gidyjrrf\",\"actionsRequired\":\"aos\"}") .toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, model.status()); - Assertions.assertEquals("pxokajionp", model.description()); - Assertions.assertEquals("ex", model.actionsRequired()); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, model.status()); + Assertions.assertEquals("gidyjrrf", model.description()); + Assertions.assertEquals("aos", model.actionsRequired()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PrivateLinkServiceConnectionState model - = new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.PENDING) - .withDescription("pxokajionp") - .withActionsRequired("ex"); + = new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) + .withDescription("gidyjrrf") + .withActionsRequired("aos"); model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, model.status()); - Assertions.assertEquals("pxokajionp", model.description()); - Assertions.assertEquals("ex", model.actionsRequired()); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, model.status()); + Assertions.assertEquals("gidyjrrf", model.description()); + Assertions.assertEquals("aos", model.actionsRequired()); } } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ProvisionedComputeModelCapabilityTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ProvisionedComputeModelCapabilityTests.java new file mode 100644 index 0000000000000..cd2cd6c7e1efe --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ProvisionedComputeModelCapabilityTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ProvisionedComputeModelCapability; + +public final class ProvisionedComputeModelCapabilityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ProvisionedComputeModelCapability model = BinaryData.fromString( + "{\"type\":\"Provisioned\",\"recommendedVCoreCount\":962942512,\"supportedComputeSizes\":[{\"vCores\":1094512246,\"memoryPerVCoreInMb\":7486974753555951605},{\"vCores\":375105800,\"memoryPerVCoreInMb\":3819884003908031717},{\"vCores\":1602539584,\"memoryPerVCoreInMb\":93373909409037668}]}") + .toObject(ProvisionedComputeModelCapability.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ReadWritePoolPropertiesTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ReadWritePoolPropertiesTests.java new file mode 100644 index 0000000000000..9f0055e02f3f1 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ReadWritePoolPropertiesTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ReadWritePoolProperties; + +public final class ReadWritePoolPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ReadWritePoolProperties model = BinaryData.fromString("{\"designatedPoolResourceId\":\"yqkgfg\"}") + .toObject(ReadWritePoolProperties.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ScheduledMaintenancePropertiesForPatchUpdateTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ScheduledMaintenancePropertiesForPatchUpdateTests.java new file mode 100644 index 0000000000000..151cc28b6df7a --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ScheduledMaintenancePropertiesForPatchUpdateTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ScheduledMaintenanceManagementType; +import com.azure.resourcemanager.horizondb.models.ScheduledMaintenancePropertiesForPatchUpdate; +import org.junit.jupiter.api.Assertions; + +public final class ScheduledMaintenancePropertiesForPatchUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScheduledMaintenancePropertiesForPatchUpdate model + = BinaryData.fromString("{\"maintenanceManagementType\":\"System\"}") + .toObject(ScheduledMaintenancePropertiesForPatchUpdate.class); + Assertions.assertEquals(ScheduledMaintenanceManagementType.SYSTEM, model.maintenanceManagementType()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ScheduledMaintenancePropertiesForPatchUpdate model = new ScheduledMaintenancePropertiesForPatchUpdate() + .withMaintenanceManagementType(ScheduledMaintenanceManagementType.SYSTEM); + model = BinaryData.fromObject(model).toObject(ScheduledMaintenancePropertiesForPatchUpdate.class); + Assertions.assertEquals(ScheduledMaintenanceManagementType.SYSTEM, model.maintenanceManagementType()); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ScheduledMaintenancePropertiesTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ScheduledMaintenancePropertiesTests.java new file mode 100644 index 0000000000000..4122cc2ef3af5 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/ScheduledMaintenancePropertiesTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.ScheduledMaintenanceProperties; + +public final class ScheduledMaintenancePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScheduledMaintenanceProperties model + = BinaryData.fromString("{\"maintenanceManagementType\":\"ScheduledMaintenanceProperties\"}") + .toObject(ScheduledMaintenanceProperties.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ScheduledMaintenanceProperties model = new ScheduledMaintenanceProperties(); + model = BinaryData.fromObject(model).toObject(ScheduledMaintenanceProperties.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/SystemScheduledMaintenancePropertiesTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/SystemScheduledMaintenancePropertiesTests.java new file mode 100644 index 0000000000000..ba2838311a720 --- /dev/null +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/SystemScheduledMaintenancePropertiesTests.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.horizondb.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.horizondb.models.SystemScheduledMaintenanceProperties; + +public final class SystemScheduledMaintenancePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SystemScheduledMaintenanceProperties model = BinaryData.fromString("{\"maintenanceManagementType\":\"System\"}") + .toObject(SystemScheduledMaintenanceProperties.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SystemScheduledMaintenanceProperties model = new SystemScheduledMaintenanceProperties(); + model = BinaryData.fromObject(model).toObject(SystemScheduledMaintenanceProperties.class); + } +} diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/UserAssignedIdentityTests.java b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/UserAssignedIdentityTests.java index dd4cd05e2e141..226f82dfa56b0 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/UserAssignedIdentityTests.java +++ b/sdk/horizondb/azure-resourcemanager-horizondb/src/test/java/com/azure/resourcemanager/horizondb/generated/UserAssignedIdentityTests.java @@ -10,7 +10,7 @@ public final class UserAssignedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UserAssignedIdentity model = BinaryData.fromString("{\"principalId\":\"yoqpsoaccta\",\"clientId\":\"kljla\"}") + UserAssignedIdentity model = BinaryData.fromString("{\"principalId\":\"jgzjaoyfhrtx\",\"clientId\":\"n\"}") .toObject(UserAssignedIdentity.class); } diff --git a/sdk/horizondb/azure-resourcemanager-horizondb/tsp-location.yaml b/sdk/horizondb/azure-resourcemanager-horizondb/tsp-location.yaml index 99a86da7b0958..e206c7aa48829 100644 --- a/sdk/horizondb/azure-resourcemanager-horizondb/tsp-location.yaml +++ b/sdk/horizondb/azure-resourcemanager-horizondb/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/horizondb/resource-manager/Microsoft.HorizonDb/HorizonDb -commit: f868cf045de6223d605ed9b7bf2a9ce2947c808f +commit: 90e63e5fe2c596e8bd807aad7dd9d62cee1746dd repo: Azure/azure-rest-api-specs additionalDirectories: