From 0a847e455ae3b43b7a93f19d482a9f1f1375f2dd Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 7 Oct 2021 20:16:20 +0000 Subject: [PATCH] CodeGen from PR 16199 in Azure/azure-rest-api-specs Merge 2f338561be19487dcfae71c4f2b664748ee31f31 into 2ebe584103a362fa87f2f60c9bab89ab410c7571 --- .../CHANGELOG.md | 4 +- .../azure-resourcemanager-synapse/README.md | 5 +- .../azure-resourcemanager-synapse/pom.xml | 2 +- .../synapse/SynapseManager.java | 117 +- .../synapse/fluent/KustoOperationsClient.java | 36 + ...lAttachedDatabaseConfigurationsClient.java | 248 ++ .../fluent/KustoPoolChildResourcesClient.java | 52 + .../KustoPoolDataConnectionsClient.java | 510 +++ ...oolDatabasePrincipalAssignmentsClient.java | 325 ++ .../fluent/KustoPoolDatabasesClient.java | 318 ++ .../KustoPoolPrincipalAssignmentsClient.java | 286 ++ .../synapse/fluent/KustoPoolsClient.java | 36 + .../fluent/KustoPoolsOperationsClient.java | 838 ++++ .../fluent/SynapseManagementClient.java | 63 + .../fluent/models/AadAdminProperties.java | 128 - .../AttachedDatabaseConfigurationInner.java | 221 + .../models/AvailableRpOperationInner.java | 36 +- .../AzureADOnlyAuthenticationInner.java | 41 +- .../AzureADOnlyAuthenticationProperties.java | 82 - .../fluent/models/AzureResourceSkuInner.java | 110 + .../models/BigDataPoolResourceInfoInner.java | 283 +- .../models/BigDataPoolResourceProperties.java | 512 --- .../fluent/models/CheckNameResultInner.java | 132 + .../ClusterPrincipalAssignmentInner.java | 199 + .../models/CmdkeySetupTypeProperties.java | 123 - .../fluent/models/DataConnectionInner.java | 85 + .../models/DataConnectionValidationInner.java | 79 + ...taConnectionValidationListResultInner.java | 55 + .../fluent/models/DataMaskingPolicyInner.java | 64 +- .../models/DataMaskingPolicyProperties.java | 122 - .../fluent/models/DataMaskingRuleInner.java | 185 +- .../models/DataMaskingRuleProperties.java | 379 -- .../DataWarehouseUserActivitiesInner.java | 28 +- ...DataWarehouseUserActivitiesProperties.java | 42 - .../synapse/fluent/models/DatabaseInner.java | 79 + .../DatabasePrincipalAssignmentInner.java | 199 + .../models/EncryptionProtectorInner.java | 66 +- .../models/EncryptionProtectorProperties.java | 128 - ...nvironmentVariableSetupTypeProperties.java | 88 - ...ExtendedServerBlobAuditingPolicyInner.java | 246 +- ...dedServerBlobAuditingPolicyProperties.java | 526 --- ...xtendedSqlPoolBlobAuditingPolicyInner.java | 246 +- ...edSqlPoolBlobAuditingPolicyProperties.java | 526 --- .../FollowerDatabaseDefinitionInner.java | 111 + .../fluent/models/GeoBackupPolicyInner.java | 43 +- .../models/GeoBackupPolicyProperties.java | 71 - .../models/IpFirewallRuleInfoInner.java | 47 +- .../synapse/fluent/models/KeyInner.java | 38 +- .../synapse/fluent/models/KeyProperties.java | 76 - .../synapse/fluent/models/KustoPoolInner.java | 312 ++ .../models/KustoPoolListResultInner.java | 54 + .../fluent/models/LanguageExtensionInner.java | 51 + .../fluent/models/LibraryResourceInner.java | 120 +- .../LicensedComponentSetupTypeProperties.java | 86 - .../models/MaintenanceWindowOptionsInner.java | 105 +- .../MaintenanceWindowOptionsProperties.java | 218 - .../models/MaintenanceWindowsInner.java | 30 +- .../models/MaintenanceWindowsProperties.java | 55 - ...dIdentitySqlControlSettingsModelInner.java | 33 +- ...titySqlControlSettingsModelProperties.java | 59 - ...ntegrationRuntimeStatusTypeProperties.java | 100 - ...nagedIntegrationRuntimeTypeProperties.java | 85 - .../models/MetadataSyncConfigInner.java | 38 +- .../models/MetadataSyncConfigProperties.java | 76 - .../synapse/fluent/models/OperationInner.java | 133 + .../models/OperationMetaPropertyInfo.java | 54 - ...pointConnectionForPrivateLinkHubInner.java | 1 + .../PrivateEndpointConnectionInner.java | 50 +- .../fluent/models/PrivateLinkHubInner.java | 62 +- .../models/PrivateLinkHubProperties.java | 70 - ...endedSensitivityLabelUpdateProperties.java | 153 - .../models/RecoverableSqlPoolInner.java | 48 +- .../models/RecoverableSqlPoolProperties.java | 85 - .../fluent/models/ReplicationLinkInner.java | 101 +- .../models/ReplicationLinkProperties.java | 179 - .../models/RestorableDroppedSqlPoolInner.java | 84 +- .../RestorableDroppedSqlPoolProperties.java | 145 - .../fluent/models/RestorePointInner.java | 52 +- .../fluent/models/RestorePointProperties.java | 86 - .../models/SecurityAlertPolicyProperties.java | 244 - ...ntegrationRuntimeStatusTypeProperties.java | 329 -- ...ostedIntegrationRuntimeTypeProperties.java | 54 - .../fluent/models/SensitivityLabelInner.java | 117 +- .../models/SensitivityLabelProperties.java | 218 - .../models/SensitivityLabelUpdateInner.java | 78 +- ...SensitivityLabelUpdatePropertiesInner.java | 182 - .../models/ServerBlobAuditingPolicyInner.java | 233 +- .../ServerBlobAuditingPolicyProperties.java | 497 --- .../ServerSecurityAlertPolicyInner.java | 117 +- .../ServerSecurityAlertPolicyProperties.java | 244 - .../ServerVulnerabilityAssessmentInner.java | 71 +- ...rverVulnerabilityAssessmentProperties.java | 154 - .../fluent/models/SkuDescriptionInner.java | 119 + .../fluent/models/SparkConfigurationInfo.java | 190 - .../SparkConfigurationResourceInner.java | 97 +- .../SqlPoolBlobAuditingPolicyInner.java | 215 +- .../SqlPoolBlobAuditingPolicyProperties.java | 446 -- .../fluent/models/SqlPoolColumnInner.java | 33 +- .../models/SqlPoolColumnProperties.java | 66 - .../models/SqlPoolConnectionPolicyInner.java | 107 +- .../SqlPoolConnectionPolicyProperties.java | 206 - .../synapse/fluent/models/SqlPoolInner.java | 235 +- .../fluent/models/SqlPoolOperationInner.java | 128 +- .../models/SqlPoolOperationProperties.java | 236 - .../models/SqlPoolResourceProperties.java | 312 -- .../SqlPoolSecurityAlertPolicyInner.java | 117 +- .../SqlPoolVulnerabilityAssessmentInner.java | 72 +- ...PoolVulnerabilityAssessmentProperties.java | 150 - ...nerabilityAssessmentRuleBaselineInner.java | 30 +- ...ilityAssessmentRuleBaselineProperties.java | 63 - ...abilityAssessmentScanExportProperties.java | 42 - ...lnerabilityAssessmentScansExportInner.java | 29 +- .../TransparentDataEncryptionInner.java | 29 +- .../TransparentDataEncryptionProperties.java | 51 - ...ulnerabilityAssessmentScanRecordInner.java | 81 +- ...abilityAssessmentScanRecordProperties.java | 152 - .../models/WorkloadClassifierInner.java | 90 +- .../models/WorkloadClassifierProperties.java | 186 - .../fluent/models/WorkloadGroupInner.java | 90 +- .../models/WorkloadGroupProperties.java | 180 - .../models/WorkspaceAadAdminInfoInner.java | 64 +- .../synapse/fluent/models/WorkspaceInner.java | 314 +- .../models/WorkspacePatchProperties.java | 214 - .../fluent/models/WorkspaceProperties.java | 547 --- .../AttachedDatabaseConfigurationImpl.java | 242 + .../AzureADOnlyAuthenticationImpl.java | 4 +- .../implementation/AzureResourceSkuImpl.java | 42 + .../BigDataPoolResourceInfoImpl.java | 2 +- .../implementation/CheckNameResultImpl.java | 45 + .../ClusterPrincipalAssignmentImpl.java | 208 + .../implementation/DataConnectionImpl.java | 49 + .../DataConnectionValidationImpl.java | 43 + ...ataConnectionValidationListResultImpl.java | 41 + .../synapse/implementation/DatabaseImpl.java | 48 + .../DatabasePrincipalAssignmentImpl.java | 223 + .../FollowerDatabaseDefinitionImpl.java | 40 + .../KustoOperationsClientImpl.java | 270 ++ .../implementation/KustoOperationsImpl.java | 46 + ...achedDatabaseConfigurationsClientImpl.java | 1241 ++++++ ...oolAttachedDatabaseConfigurationsImpl.java | 267 ++ .../KustoPoolChildResourcesClientImpl.java | 270 ++ .../KustoPoolChildResourcesImpl.java | 71 + .../KustoPoolDataConnectionsClientImpl.java | 2351 ++++++++++ .../KustoPoolDataConnectionsImpl.java | 283 ++ ...atabasePrincipalAssignmentsClientImpl.java | 1598 +++++++ ...oPoolDatabasePrincipalAssignmentsImpl.java | 343 ++ .../KustoPoolDatabasesClientImpl.java | 1495 +++++++ .../KustoPoolDatabasesImpl.java | 155 + .../synapse/implementation/KustoPoolImpl.java | 401 ++ .../KustoPoolListResultImpl.java | 47 + ...stoPoolPrincipalAssignmentsClientImpl.java | 1418 ++++++ .../KustoPoolPrincipalAssignmentsImpl.java | 290 ++ .../implementation/KustoPoolsClientImpl.java | 194 + .../implementation/KustoPoolsImpl.java | 46 + .../KustoPoolsOperationsClientImpl.java | 3912 +++++++++++++++++ .../KustoPoolsOperationsImpl.java | 361 ++ .../implementation/LanguageExtensionImpl.java | 33 + .../synapse/implementation/OperationImpl.java | 44 + ...dpointConnectionForPrivateLinkHubImpl.java | 2 +- .../SensitivityLabelUpdatePropertiesImpl.java | 57 - .../implementation/SkuDescriptionImpl.java | 70 + .../synapse/implementation/SqlPoolImpl.java | 5 +- .../SynapseManagementClientImpl.java | 126 + .../implementation/WorkloadGroupImpl.java | 12 +- .../models/AttachedDatabaseConfiguration.java | 323 ++ ...tachedDatabaseConfigurationListResult.java | 55 + .../models/AzureADOnlyAuthentication.java | 4 +- .../synapse/models/AzureCapacity.java | 133 + .../synapse/models/AzureResourceSku.java | 38 + .../synapse/models/AzureScaleType.java | 37 + .../synapse/models/AzureSku.java | 110 + .../models/BigDataPoolResourceInfo.java | 1 - .../synapse/models/BlobStorageEventType.java | 36 + .../synapse/models/CheckNameResult.java | 46 + .../models/ClusterPrincipalAssignment.java | 273 ++ ...erPrincipalAssignmentCheckNameRequest.java | 88 + .../ClusterPrincipalAssignmentListResult.java | 55 + .../synapse/models/ClusterPrincipalRole.java | 34 + .../synapse/models/CmdkeySetup.java | 65 +- .../synapse/models/ComponentSetup.java | 46 +- .../synapse/models/Compression.java | 34 + .../synapse/models/CreateMode.java | 40 + .../synapse/models/DataConnection.java | 53 + .../DataConnectionCheckNameRequest.java | 88 + .../synapse/models/DataConnectionKind.java | 37 + .../models/DataConnectionListResult.java | 55 + .../models/DataConnectionValidation.java | 31 + .../DataConnectionValidationListResult.java | 25 + .../DataConnectionValidationResult.java | 50 + .../synapse/models/Database.java | 53 + .../models/DatabaseCheckNameRequest.java | 87 + .../synapse/models/DatabaseListResult.java | 55 + .../models/DatabasePrincipalAssignment.java | 275 ++ ...sePrincipalAssignmentCheckNameRequest.java | 90 + ...DatabasePrincipalAssignmentListResult.java | 55 + .../synapse/models/DatabasePrincipalRole.java | 46 + .../synapse/models/DatabaseStatistics.java | 51 + .../DefaultPrincipalsModificationKind.java | 37 + .../models/EnvironmentVariableSetup.java | 48 +- .../models/EventGridDataConnection.java | 275 ++ .../synapse/models/EventGridDataFormat.java | 76 + .../models/EventHubDataConnection.java | 247 ++ .../synapse/models/EventHubDataFormat.java | 76 + .../models/FollowerDatabaseDefinition.java | 40 + .../models/FollowerDatabaseListResult.java | 55 + .../synapse/models/IotHubDataConnection.java | 247 ++ .../synapse/models/IotHubDataFormat.java | 76 + .../models/IpFirewallRuleProperties.java | 3 +- .../resourcemanager/synapse/models/Kind.java | 34 + .../synapse/models/KustoOperations.java | 31 + .../synapse/models/KustoPool.java | 581 +++ ...stoPoolAttachedDatabaseConfigurations.java | 161 + .../models/KustoPoolCheckNameRequest.java | 86 + .../models/KustoPoolChildResources.java | 46 + .../models/KustoPoolDataConnections.java | 303 ++ ...KustoPoolDatabasePrincipalAssignments.java | 219 + .../synapse/models/KustoPoolDatabases.java | 183 + .../synapse/models/KustoPoolListResult.java | 25 + .../models/KustoPoolPrincipalAssignments.java | 198 + .../synapse/models/KustoPoolUpdate.java | 285 ++ .../synapse/models/KustoPools.java | 31 + .../synapse/models/KustoPoolsOperations.java | 415 ++ .../synapse/models/LanguageExtension.java | 24 + .../synapse/models/LanguageExtensionName.java | 34 + .../models/LanguageExtensionsList.java | 55 + .../{fluent => }/models/LibraryInfo.java | 2 +- .../models/ListResourceSkusResult.java | 55 + .../models/ManagedIntegrationRuntime.java | 66 +- .../ManagedIntegrationRuntimeStatus.java | 63 +- .../synapse/models/Operation.java | 45 + .../synapse/models/OperationDisplay.java | 128 + .../synapse/models/OperationListResult.java | 73 + .../synapse/models/OptimizedAutoscale.java | 129 + .../synapse/models/PrincipalType.java | 37 + ...teEndpointConnectionForPrivateLinkHub.java | 1 - ...pointConnectionForPrivateLinkHubBasic.java | 55 +- ...onForPrivateLinkHubBasicAutoGenerated.java | 1 - .../PrivateEndpointConnectionProperties.java | 4 +- .../synapse/models/ReadWriteDatabase.java | 144 + .../synapse/models/Reason.java | 34 + .../RecommendedSensitivityLabelUpdate.java | 65 +- .../ReplaceAllIpFirewallRulesRequest.java | 1 - .../models/ResourceProvisioningState.java | 49 + .../models/SelfHostedIntegrationRuntime.java | 47 +- .../SelfHostedIntegrationRuntimeStatus.java | 182 +- .../SensitivityLabelUpdateProperties.java | 52 - .../synapse/models/SkuDescription.java | 60 + .../synapse/models/SkuDescriptionList.java | 44 + .../synapse/models/SkuLocationInfoItem.java | 82 + .../synapse/models/SkuName.java | 34 + .../synapse/models/SkuSize.java | 40 + .../synapse/models/SqlPool.java | 70 +- .../synapse/models/SqlPoolPatchInfo.java | 207 +- .../resourcemanager/synapse/models/State.java | 55 + .../models/TableLevelSharingProperties.java | 181 + .../resourcemanager/synapse/models/Type.java | 48 + .../synapse/models/WorkloadGroup.java | 18 +- .../synapse/models/WorkspacePatchInfo.java | 113 +- ...ureADOnlyAuthenticationsCreateSamples.java | 28 - .../AzureADOnlyAuthenticationsGetSamples.java | 26 - ...AzureADOnlyAuthenticationsListSamples.java | 23 - .../BigDataPoolsCreateOrUpdateSamples.java | 54 - .../generated/BigDataPoolsDeleteSamples.java | 22 - .../generated/BigDataPoolsGetSamples.java | 22 - .../BigDataPoolsListByWorkspaceSamples.java | 22 - .../generated/BigDataPoolsUpdateSamples.java | 41 - ...aMaskingPoliciesCreateOrUpdateSamples.java | 45 - .../DataMaskingPoliciesGetSamples.java | 24 - ...DataMaskingRulesCreateOrUpdateSamples.java | 100 - .../generated/DataMaskingRulesGetSamples.java | 24 - .../DataMaskingRulesListBySqlPoolSamples.java | 24 - ...AuditingPoliciesCreateOrUpdateSamples.java | 84 - ...SqlPoolBlobAuditingPoliciesGetSamples.java | 25 - ...bAuditingPoliciesListBySqlPoolSamples.java | 25 - ...onRuntimeAuthKeysOperationListSamples.java | 24 - ...imeAuthKeysOperationRegenerateSamples.java | 31 - ...ationRuntimeConnectionInfosGetSamples.java | 24 - ...egrationRuntimeCredentialsSyncSamples.java | 24 - ...ationRuntimeMonitoringDataListSamples.java | 24 - ...ntimeNodeIpAddressOperationGetSamples.java | 25 - .../IntegrationRuntimeNodesDeleteSamples.java | 25 - .../IntegrationRuntimeNodesGetSamples.java | 25 - .../IntegrationRuntimeNodesUpdateSamples.java | 31 - ...ationRuntimeObjectMetadataListSamples.java | 30 - ...onRuntimeObjectMetadataRefreshSamples.java | 24 - ...ationRuntimeStatusOperationGetSamples.java | 24 - .../IntegrationRuntimesCreateSamples.java | 27 - .../IntegrationRuntimesDeleteSamples.java | 24 - ...untimesDisableInteractiveQuerySamples.java | 25 - ...RuntimesEnableInteractiveQuerySamples.java | 25 - .../IntegrationRuntimesGetSamples.java | 25 - ...grationRuntimesListByWorkspaceSamples.java | 22 - ...ndNetworkDependenciesEndpointsSamples.java | 25 - .../IntegrationRuntimesStartSamples.java | 24 - .../IntegrationRuntimesStopSamples.java | 24 - .../IntegrationRuntimesUpdateSamples.java | 30 - .../IntegrationRuntimesUpgradeSamples.java | 24 - .../IpFirewallRulesCreateOrUpdateSamples.java | 26 - .../IpFirewallRulesDeleteSamples.java | 24 - .../generated/IpFirewallRulesGetSamples.java | 24 - ...IpFirewallRulesListByWorkspaceSamples.java | 22 - .../IpFirewallRulesReplaceAllSamples.java | 53 - .../generated/KeysCreateOrUpdateSamples.java | 26 - .../synapse/generated/KeysDeleteSamples.java | 22 - .../synapse/generated/KeysGetSamples.java | 22 - .../generated/KeysListByWorkspaceSamples.java | 22 - ...rariesOperationListByWorkspaceSamples.java | 22 - .../synapse/generated/LibraryGetSamples.java | 24 - ...perationsCheckNameAvailabilitySamples.java | 46 - ...tionsGetAzureAsyncHeaderResultSamples.java | 25 - ...rationsGetLocationHeaderResultSamples.java | 25 - .../generated/OperationsListSamples.java | 22 - ...ivateEndpointConnectionsCreateSamples.java | 30 - ...ivateEndpointConnectionsDeleteSamples.java | 24 - .../PrivateEndpointConnectionsGetSamples.java | 25 - ...PrivateEndpointConnectionsListSamples.java | 23 - ...ntConnectionsPrivateLinkHubGetSamples.java | 24 - ...tConnectionsPrivateLinkHubListSamples.java | 22 - ...LinkHubPrivateLinkResourcesGetSamples.java | 25 - ...inkHubPrivateLinkResourcesListSamples.java | 25 - .../PrivateLinkHubsCreateOrUpdateSamples.java | 40 - .../PrivateLinkHubsDeleteSamples.java | 22 - ...vateLinkHubsGetByResourceGroupSamples.java | 22 - ...ateLinkHubsListByResourceGroupSamples.java | 22 - .../generated/PrivateLinkHubsListSamples.java | 22 - .../PrivateLinkHubsUpdateSamples.java | 41 - .../PrivateLinkResourcesGetSamples.java | 22 - .../PrivateLinkResourcesListSamples.java | 22 - .../RestorableDroppedSqlPoolsGetSamples.java | 28 - ...DroppedSqlPoolsListByWorkspaceSamples.java | 24 - .../SparkConfigurationGetSamples.java | 24 - ...ationsOperationListByWorkspaceSamples.java | 24 - ...AuditingPoliciesCreateOrUpdateSamples.java | 64 - ...SqlPoolBlobAuditingPoliciesGetSamples.java | 25 - ...bAuditingPoliciesListBySqlPoolSamples.java | 24 - .../generated/SqlPoolColumnsGetSamples.java | 24 - .../SqlPoolConnectionPoliciesGetSamples.java | 27 - ...DataWarehouseUserActivitiesGetSamples.java | 26 - ...eoBackupPoliciesCreateOrUpdateSamples.java | 28 - .../SqlPoolGeoBackupPoliciesGetSamples.java | 26 - .../SqlPoolGeoBackupPoliciesListSamples.java | 22 - ...oolMaintenanceWindowOptionsGetSamples.java | 25 - ...intenanceWindowsCreateOrUpdateSamples.java | 42 - .../SqlPoolMaintenanceWindowsGetSamples.java | 25 - ...lPoolMetadataSyncConfigsCreateSamples.java | 31 - .../SqlPoolMetadataSyncConfigsGetSamples.java | 25 - ...ResultsGetLocationHeaderResultSamples.java | 30 - .../SqlPoolOperationsListSamples.java | 23 - ...mmendedSensitivityLabelsUpdateSamples.java | 52 - ...lPoolReplicationLinksGetByNameSamples.java | 26 - .../SqlPoolReplicationLinksListSamples.java | 23 - .../SqlPoolRestorePointsCreateSamples.java | 30 - .../SqlPoolRestorePointsDeleteSamples.java | 24 - .../SqlPoolRestorePointsGetSamples.java | 24 - .../SqlPoolRestorePointsListSamples.java | 23 - .../generated/SqlPoolSchemasGetSamples.java | 22 - .../generated/SqlPoolSchemasListSamples.java | 22 - ...ityAlertPoliciesCreateOrUpdateSamples.java | 62 - ...qlPoolSecurityAlertPoliciesGetSamples.java | 26 - ...lPoolSecurityAlertPoliciesListSamples.java | 22 - ...SqlPoolSensitivityLabelsDeleteSamples.java | 25 - ...ityLabelsDisableRecommendationSamples.java | 26 - ...vityLabelsEnableRecommendationSamples.java | 26 - .../SqlPoolSensitivityLabelsGetSamples.java | 33 - ...olSensitivityLabelsListCurrentSamples.java | 23 - ...nsitivityLabelsListRecommendedSamples.java | 25 - ...SqlPoolSensitivityLabelsUpdateSamples.java | 68 - ...oolTableColumnsListByTableNameSamples.java | 25 - .../generated/SqlPoolTablesGetSamples.java | 22 - .../SqlPoolTablesListBySchemaSamples.java | 23 - ...tDataEncryptionsCreateOrUpdateSamples.java | 29 - ...lTransparentDataEncryptionsGetSamples.java | 31 - ...TransparentDataEncryptionsListSamples.java | 25 - .../generated/SqlPoolUsagesListSamples.java | 22 - ...entRuleBaselinesCreateOrUpdateSamples.java | 44 - ...yAssessmentRuleBaselinesDeleteSamples.java | 34 - ...lityAssessmentRuleBaselinesGetSamples.java | 34 - ...erabilityAssessmentScansExportSamples.java | 32 - ...ulnerabilityAssessmentScansGetSamples.java | 32 - ...ityAssessmentScansInitiateScanSamples.java | 32 - ...lnerabilityAssessmentScansListSamples.java | 31 - ...ilityAssessmentsCreateOrUpdateSamples.java | 79 - ...VulnerabilityAssessmentsDeleteSamples.java | 31 - ...oolVulnerabilityAssessmentsGetSamples.java | 30 - ...olVulnerabilityAssessmentsListSamples.java | 25 - ...rkloadClassifierCreateOrUpdateSamples.java | 49 - ...qlPoolWorkloadClassifierDeleteSamples.java | 31 - .../SqlPoolWorkloadClassifierGetSamples.java | 31 - .../SqlPoolWorkloadClassifierListSamples.java | 25 - ...oolWorkloadGroupCreateOrUpdateSamples.java | 51 - .../SqlPoolWorkloadGroupDeleteSamples.java | 25 - .../SqlPoolWorkloadGroupGetSamples.java | 24 - .../SqlPoolWorkloadGroupListSamples.java | 23 - .../generated/SqlPoolsCreateSamples.java | 49 - .../generated/SqlPoolsDeleteSamples.java | 22 - .../synapse/generated/SqlPoolsGetSamples.java | 22 - .../SqlPoolsListByWorkspaceSamples.java | 35 - .../generated/SqlPoolsPauseSamples.java | 22 - .../generated/SqlPoolsRenameSamples.java | 32 - .../generated/SqlPoolsResumeSamples.java | 22 - .../generated/SqlPoolsUpdateSamples.java | 54 - ...rkspaceAadAdminsCreateOrUpdateSamples.java | 34 - .../WorkspaceAadAdminsDeleteSamples.java | 22 - .../WorkspaceAadAdminsGetSamples.java | 22 - ...lControlSettingsCreateOrUpdateSamples.java | 37 - ...dIdentitySqlControlSettingsGetSamples.java | 24 - ...AuditingPoliciesCreateOrUpdateSamples.java | 66 - ...lServerBlobAuditingPoliciesGetSamples.java | 26 - ...uditingPoliciesListByWorkspaceSamples.java | 25 - ...ryptionProtectorCreateOrUpdateSamples.java | 53 - ...qlServerEncryptionProtectorGetSamples.java | 26 - ...lServerEncryptionProtectorListSamples.java | 23 - ...rEncryptionProtectorRevalidateSamples.java | 25 - ...AuditingPoliciesCreateOrUpdateSamples.java | 68 - ...xtendedBlobAuditingPoliciesGetSamples.java | 26 - ...uditingPoliciesListByWorkspaceSamples.java | 25 - ...qlServerRecoverableSqlPoolsGetSamples.java | 24 - ...lServerRecoverableSqlPoolsListSamples.java | 22 - ...urityAlertPolicyCreateOrUpdateSamples.java | 69 - ...qlServerSecurityAlertPolicyGetSamples.java | 26 - ...lServerSecurityAlertPolicyListSamples.java | 23 - ...paceManagedSqlServerUsagesListSamples.java | 23 - ...ilityAssessmentsCreateOrUpdateSamples.java | 79 - ...VulnerabilityAssessmentsDeleteSamples.java | 26 - ...verVulnerabilityAssessmentsGetSamples.java | 26 - ...erVulnerabilityAssessmentsListSamples.java | 23 - ...paceSqlAadAdminsCreateOrUpdateSamples.java | 34 - .../WorkspaceSqlAadAdminsDeleteSamples.java | 22 - .../WorkspaceSqlAadAdminsGetSamples.java | 22 - .../WorkspacesCreateOrUpdateSamples.java | 104 - .../generated/WorkspacesDeleteSamples.java | 22 - .../WorkspacesGetByResourceGroupSamples.java | 22 - .../WorkspacesListByResourceGroupSamples.java | 22 - .../generated/WorkspacesListSamples.java | 22 - .../generated/WorkspacesUpdateSamples.java | 83 - 435 files changed, 31799 insertions(+), 16965 deletions(-) create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoOperationsClient.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolAttachedDatabaseConfigurationsClient.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolChildResourcesClient.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolDataConnectionsClient.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolDatabasePrincipalAssignmentsClient.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolDatabasesClient.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolPrincipalAssignmentsClient.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolsClient.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolsOperationsClient.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AadAdminProperties.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AttachedDatabaseConfigurationInner.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AzureADOnlyAuthenticationProperties.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AzureResourceSkuInner.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/BigDataPoolResourceProperties.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/CheckNameResultInner.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ClusterPrincipalAssignmentInner.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/CmdkeySetupTypeProperties.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataConnectionInner.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataConnectionValidationInner.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataConnectionValidationListResultInner.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataMaskingPolicyProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataMaskingRuleProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataWarehouseUserActivitiesProperties.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DatabaseInner.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DatabasePrincipalAssignmentInner.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/EncryptionProtectorProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/EnvironmentVariableSetupTypeProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ExtendedServerBlobAuditingPolicyProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ExtendedSqlPoolBlobAuditingPolicyProperties.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/FollowerDatabaseDefinitionInner.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/GeoBackupPolicyProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/KeyProperties.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/KustoPoolInner.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/KustoPoolListResultInner.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/LanguageExtensionInner.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/LicensedComponentSetupTypeProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MaintenanceWindowOptionsProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MaintenanceWindowsProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ManagedIdentitySqlControlSettingsModelProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ManagedIntegrationRuntimeStatusTypeProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ManagedIntegrationRuntimeTypeProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MetadataSyncConfigProperties.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/OperationInner.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/OperationMetaPropertyInfo.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateLinkHubProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RecommendedSensitivityLabelUpdateProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RecoverableSqlPoolProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ReplicationLinkProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RestorableDroppedSqlPoolProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RestorePointProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SecurityAlertPolicyProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SelfHostedIntegrationRuntimeStatusTypeProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SelfHostedIntegrationRuntimeTypeProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SensitivityLabelProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SensitivityLabelUpdatePropertiesInner.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerBlobAuditingPolicyProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerSecurityAlertPolicyProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerVulnerabilityAssessmentProperties.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SkuDescriptionInner.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SparkConfigurationInfo.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolBlobAuditingPolicyProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolColumnProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolConnectionPolicyProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolOperationProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolResourceProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentRuleBaselineProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentScanExportProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/TransparentDataEncryptionProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/VulnerabilityAssessmentScanRecordProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkloadClassifierProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkloadGroupProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspacePatchProperties.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspaceProperties.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/AttachedDatabaseConfigurationImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/AzureResourceSkuImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/CheckNameResultImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/ClusterPrincipalAssignmentImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/DataConnectionImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/DataConnectionValidationImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/DataConnectionValidationListResultImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/DatabaseImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/DatabasePrincipalAssignmentImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/FollowerDatabaseDefinitionImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoOperationsClientImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoOperationsImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolAttachedDatabaseConfigurationsClientImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolAttachedDatabaseConfigurationsImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolChildResourcesClientImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolChildResourcesImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDataConnectionsClientImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDataConnectionsImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDatabasePrincipalAssignmentsClientImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDatabasePrincipalAssignmentsImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDatabasesClientImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDatabasesImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolListResultImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolPrincipalAssignmentsClientImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolPrincipalAssignmentsImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolsClientImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolsImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolsOperationsClientImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolsOperationsImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/LanguageExtensionImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/OperationImpl.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SensitivityLabelUpdatePropertiesImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SkuDescriptionImpl.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AttachedDatabaseConfiguration.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AttachedDatabaseConfigurationListResult.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AzureCapacity.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AzureResourceSku.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AzureScaleType.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AzureSku.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/BlobStorageEventType.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/CheckNameResult.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ClusterPrincipalAssignment.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ClusterPrincipalAssignmentCheckNameRequest.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ClusterPrincipalAssignmentListResult.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ClusterPrincipalRole.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/Compression.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/CreateMode.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DataConnection.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DataConnectionCheckNameRequest.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DataConnectionKind.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DataConnectionListResult.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DataConnectionValidation.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DataConnectionValidationListResult.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DataConnectionValidationResult.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/Database.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DatabaseCheckNameRequest.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DatabaseListResult.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DatabasePrincipalAssignment.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DatabasePrincipalAssignmentCheckNameRequest.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DatabasePrincipalAssignmentListResult.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DatabasePrincipalRole.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DatabaseStatistics.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DefaultPrincipalsModificationKind.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/EventGridDataConnection.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/EventGridDataFormat.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/EventHubDataConnection.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/EventHubDataFormat.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/FollowerDatabaseDefinition.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/FollowerDatabaseListResult.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/IotHubDataConnection.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/IotHubDataFormat.java rename sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/{fluent => }/models/IpFirewallRuleProperties.java (95%) create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/Kind.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoOperations.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPool.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolAttachedDatabaseConfigurations.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolCheckNameRequest.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolChildResources.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolDataConnections.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolDatabasePrincipalAssignments.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolDatabases.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolListResult.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolPrincipalAssignments.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolUpdate.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPools.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolsOperations.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/LanguageExtension.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/LanguageExtensionName.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/LanguageExtensionsList.java rename sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/{fluent => }/models/LibraryInfo.java (98%) create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ListResourceSkusResult.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/Operation.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/OperationDisplay.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/OperationListResult.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/OptimizedAutoscale.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrincipalType.java rename sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/{fluent => }/models/PrivateEndpointConnectionProperties.java (94%) create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ReadWriteDatabase.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/Reason.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ResourceProvisioningState.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SensitivityLabelUpdateProperties.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SkuDescription.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SkuDescriptionList.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SkuLocationInfoItem.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SkuName.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SkuSize.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/State.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/TableLevelSharingProperties.java create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/Type.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationsCreateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationsGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationsListSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsCreateOrUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsDeleteSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsListByWorkspaceSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingPoliciesCreateOrUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingPoliciesGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulesCreateOrUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulesGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulesListBySqlPoolSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/ExtendedSqlPoolBlobAuditingPoliciesCreateOrUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/ExtendedSqlPoolBlobAuditingPoliciesGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/ExtendedSqlPoolBlobAuditingPoliciesListBySqlPoolSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeAuthKeysOperationListSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeAuthKeysOperationRegenerateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeConnectionInfosGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeCredentialsSyncSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeMonitoringDataListSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodeIpAddressOperationGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodesDeleteSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodesGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodesUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeObjectMetadataListSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeObjectMetadataRefreshSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeStatusOperationGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesCreateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesDeleteSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesDisableInteractiveQuerySamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesEnableInteractiveQuerySamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesListByWorkspaceSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesListOutboundNetworkDependenciesEndpointsSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesStartSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesStopSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesUpgradeSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesCreateOrUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesDeleteSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesListByWorkspaceSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesReplaceAllSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/KeysCreateOrUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/KeysDeleteSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/KeysGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/KeysListByWorkspaceSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/LibrariesOperationListByWorkspaceSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/LibraryGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/OperationsCheckNameAvailabilitySamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/OperationsGetAzureAsyncHeaderResultSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/OperationsGetLocationHeaderResultSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/OperationsListSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsCreateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsDeleteSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsListSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsPrivateLinkHubGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsPrivateLinkHubListSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubPrivateLinkResourcesGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubPrivateLinkResourcesListSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsCreateOrUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsDeleteSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsGetByResourceGroupSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsListByResourceGroupSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsListSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourcesGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourcesListSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/RestorableDroppedSqlPoolsGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/RestorableDroppedSqlPoolsListByWorkspaceSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SparkConfigurationGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SparkConfigurationsOperationListByWorkspaceSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolBlobAuditingPoliciesCreateOrUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolBlobAuditingPoliciesGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolBlobAuditingPoliciesListBySqlPoolSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolColumnsGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolConnectionPoliciesGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolDataWarehouseUserActivitiesGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolGeoBackupPoliciesCreateOrUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolGeoBackupPoliciesGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolGeoBackupPoliciesListSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMaintenanceWindowOptionsGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMaintenanceWindowsCreateOrUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMaintenanceWindowsGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMetadataSyncConfigsCreateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMetadataSyncConfigsGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolOperationResultsGetLocationHeaderResultSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolOperationsListSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRecommendedSensitivityLabelsUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolReplicationLinksGetByNameSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolReplicationLinksListSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsCreateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsDeleteSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsListSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSchemasGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSchemasListSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSecurityAlertPoliciesCreateOrUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSecurityAlertPoliciesGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSecurityAlertPoliciesListSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsDeleteSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsDisableRecommendationSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsEnableRecommendationSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsListCurrentSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsListRecommendedSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTableColumnsListByTableNameSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTablesGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTablesListBySchemaSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTransparentDataEncryptionsCreateOrUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTransparentDataEncryptionsGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTransparentDataEncryptionsListSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolUsagesListSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinesDeleteSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinesGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansExportSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansInitiateScanSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansListSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsCreateOrUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsDeleteSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsListSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifierCreateOrUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifierDeleteSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifierGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifierListSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupCreateOrUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupDeleteSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupListSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsCreateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsDeleteSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsListByWorkspaceSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsPauseSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsRenameSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsResumeSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminsCreateOrUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminsDeleteSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminsGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedIdentitySqlControlSettingsCreateOrUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedIdentitySqlControlSettingsGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerBlobAuditingPoliciesCreateOrUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerBlobAuditingPoliciesGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerBlobAuditingPoliciesListByWorkspaceSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorCreateOrUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorListSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorRevalidateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesCreateOrUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesListByWorkspaceSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerRecoverableSqlPoolsGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerRecoverableSqlPoolsListSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerSecurityAlertPolicyCreateOrUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerSecurityAlertPolicyGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerSecurityAlertPolicyListSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerUsagesListSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsCreateOrUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsDeleteSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsListSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceSqlAadAdminsCreateOrUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceSqlAadAdminsDeleteSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceSqlAadAdminsGetSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesCreateOrUpdateSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesDeleteSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesGetByResourceGroupSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesListByResourceGroupSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesListSamples.java delete mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesUpdateSamples.java diff --git a/sdk/synapse/azure-resourcemanager-synapse/CHANGELOG.md b/sdk/synapse/azure-resourcemanager-synapse/CHANGELOG.md index e3ef0cf97946a..e31f6ee4226b4 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/CHANGELOG.md +++ b/sdk/synapse/azure-resourcemanager-synapse/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.3 (Unreleased) +## 1.0.0-beta.1 (2021-10-07) + +- Azure Resource Manager Synapse client library for Java. This package contains Microsoft Azure SDK for Synapse Management SDK. Azure Synapse Analytics Management Client. Package tag package-composite-v2. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/synapse/azure-resourcemanager-synapse/README.md b/sdk/synapse/azure-resourcemanager-synapse/README.md index 2882404371339..027ee23be203d 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/README.md +++ b/sdk/synapse/azure-resourcemanager-synapse/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Synapse client library for Java. -This package contains Microsoft Azure SDK for Synapse Management SDK. Azure Synapse Analytics Management Client. Package tag package-composite-v1. 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 Synapse Management SDK. Azure Synapse Analytics Management Client. Package tag package-composite-v2. 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-synapse - 1.0.0-beta.2 + 1.0.0-beta.3 ``` [//]: # ({x-version-update-end}) @@ -74,7 +74,6 @@ See [API design][design] for general introduction on design and key concepts on ## Examples -[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/synapse/azure-resourcemanager-synapse/SAMPLE.md) ## Troubleshooting diff --git a/sdk/synapse/azure-resourcemanager-synapse/pom.xml b/sdk/synapse/azure-resourcemanager-synapse/pom.xml index 52394cee93f9c..feb7983d5f42d 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/pom.xml +++ b/sdk/synapse/azure-resourcemanager-synapse/pom.xml @@ -13,7 +13,7 @@ jar Microsoft Azure SDK for Synapse Management - This package contains Microsoft Azure SDK for Synapse Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Synapse Analytics Management Client. Package tag package-composite-v1. + This package contains Microsoft Azure SDK for Synapse Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Synapse Analytics Management Client. Package tag package-composite-v2. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/SynapseManager.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/SynapseManager.java index 6a0c4e7b3918f..139339b375bad 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/SynapseManager.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/SynapseManager.java @@ -37,6 +37,15 @@ import com.azure.resourcemanager.synapse.implementation.IntegrationRuntimesImpl; import com.azure.resourcemanager.synapse.implementation.IpFirewallRulesImpl; import com.azure.resourcemanager.synapse.implementation.KeysImpl; +import com.azure.resourcemanager.synapse.implementation.KustoOperationsImpl; +import com.azure.resourcemanager.synapse.implementation.KustoPoolAttachedDatabaseConfigurationsImpl; +import com.azure.resourcemanager.synapse.implementation.KustoPoolChildResourcesImpl; +import com.azure.resourcemanager.synapse.implementation.KustoPoolDataConnectionsImpl; +import com.azure.resourcemanager.synapse.implementation.KustoPoolDatabasePrincipalAssignmentsImpl; +import com.azure.resourcemanager.synapse.implementation.KustoPoolDatabasesImpl; +import com.azure.resourcemanager.synapse.implementation.KustoPoolPrincipalAssignmentsImpl; +import com.azure.resourcemanager.synapse.implementation.KustoPoolsImpl; +import com.azure.resourcemanager.synapse.implementation.KustoPoolsOperationsImpl; import com.azure.resourcemanager.synapse.implementation.LibrariesImpl; import com.azure.resourcemanager.synapse.implementation.LibrariesOperationsImpl; import com.azure.resourcemanager.synapse.implementation.OperationsImpl; @@ -102,6 +111,15 @@ import com.azure.resourcemanager.synapse.models.IntegrationRuntimes; import com.azure.resourcemanager.synapse.models.IpFirewallRules; import com.azure.resourcemanager.synapse.models.Keys; +import com.azure.resourcemanager.synapse.models.KustoOperations; +import com.azure.resourcemanager.synapse.models.KustoPoolAttachedDatabaseConfigurations; +import com.azure.resourcemanager.synapse.models.KustoPoolChildResources; +import com.azure.resourcemanager.synapse.models.KustoPoolDataConnections; +import com.azure.resourcemanager.synapse.models.KustoPoolDatabasePrincipalAssignments; +import com.azure.resourcemanager.synapse.models.KustoPoolDatabases; +import com.azure.resourcemanager.synapse.models.KustoPoolPrincipalAssignments; +import com.azure.resourcemanager.synapse.models.KustoPools; +import com.azure.resourcemanager.synapse.models.KustoPoolsOperations; import com.azure.resourcemanager.synapse.models.Libraries; import com.azure.resourcemanager.synapse.models.LibrariesOperations; import com.azure.resourcemanager.synapse.models.Operations; @@ -286,6 +304,24 @@ public final class SynapseManager { private SparkConfigurationsOperations sparkConfigurationsOperations; + private KustoOperations kustoOperations; + + private KustoPools kustoPools; + + private KustoPoolsOperations kustoPoolsOperations; + + private KustoPoolChildResources kustoPoolChildResources; + + private KustoPoolAttachedDatabaseConfigurations kustoPoolAttachedDatabaseConfigurations; + + private KustoPoolDatabases kustoPoolDatabases; + + private KustoPoolDataConnections kustoPoolDataConnections; + + private KustoPoolPrincipalAssignments kustoPoolPrincipalAssignments; + + private KustoPoolDatabasePrincipalAssignments kustoPoolDatabasePrincipalAssignments; + private final SynapseManagementClient clientObject; private SynapseManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -422,7 +458,7 @@ public SynapseManager authenticate(TokenCredential credential, AzureProfile prof .append("-") .append("com.azure.resourcemanager.synapse") .append("/") - .append("1.0.0-beta.2"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -1028,6 +1064,85 @@ public SparkConfigurationsOperations sparkConfigurationsOperations() { return sparkConfigurationsOperations; } + /** @return Resource collection API of KustoOperations. */ + public KustoOperations kustoOperations() { + if (this.kustoOperations == null) { + this.kustoOperations = new KustoOperationsImpl(clientObject.getKustoOperations(), this); + } + return kustoOperations; + } + + /** @return Resource collection API of KustoPools. */ + public KustoPools kustoPools() { + if (this.kustoPools == null) { + this.kustoPools = new KustoPoolsImpl(clientObject.getKustoPools(), this); + } + return kustoPools; + } + + /** @return Resource collection API of KustoPoolsOperations. */ + public KustoPoolsOperations kustoPoolsOperations() { + if (this.kustoPoolsOperations == null) { + this.kustoPoolsOperations = new KustoPoolsOperationsImpl(clientObject.getKustoPoolsOperations(), this); + } + return kustoPoolsOperations; + } + + /** @return Resource collection API of KustoPoolChildResources. */ + public KustoPoolChildResources kustoPoolChildResources() { + if (this.kustoPoolChildResources == null) { + this.kustoPoolChildResources = + new KustoPoolChildResourcesImpl(clientObject.getKustoPoolChildResources(), this); + } + return kustoPoolChildResources; + } + + /** @return Resource collection API of KustoPoolAttachedDatabaseConfigurations. */ + public KustoPoolAttachedDatabaseConfigurations kustoPoolAttachedDatabaseConfigurations() { + if (this.kustoPoolAttachedDatabaseConfigurations == null) { + this.kustoPoolAttachedDatabaseConfigurations = + new KustoPoolAttachedDatabaseConfigurationsImpl( + clientObject.getKustoPoolAttachedDatabaseConfigurations(), this); + } + return kustoPoolAttachedDatabaseConfigurations; + } + + /** @return Resource collection API of KustoPoolDatabases. */ + public KustoPoolDatabases kustoPoolDatabases() { + if (this.kustoPoolDatabases == null) { + this.kustoPoolDatabases = new KustoPoolDatabasesImpl(clientObject.getKustoPoolDatabases(), this); + } + return kustoPoolDatabases; + } + + /** @return Resource collection API of KustoPoolDataConnections. */ + public KustoPoolDataConnections kustoPoolDataConnections() { + if (this.kustoPoolDataConnections == null) { + this.kustoPoolDataConnections = + new KustoPoolDataConnectionsImpl(clientObject.getKustoPoolDataConnections(), this); + } + return kustoPoolDataConnections; + } + + /** @return Resource collection API of KustoPoolPrincipalAssignments. */ + public KustoPoolPrincipalAssignments kustoPoolPrincipalAssignments() { + if (this.kustoPoolPrincipalAssignments == null) { + this.kustoPoolPrincipalAssignments = + new KustoPoolPrincipalAssignmentsImpl(clientObject.getKustoPoolPrincipalAssignments(), this); + } + return kustoPoolPrincipalAssignments; + } + + /** @return Resource collection API of KustoPoolDatabasePrincipalAssignments. */ + public KustoPoolDatabasePrincipalAssignments kustoPoolDatabasePrincipalAssignments() { + if (this.kustoPoolDatabasePrincipalAssignments == null) { + this.kustoPoolDatabasePrincipalAssignments = + new KustoPoolDatabasePrincipalAssignmentsImpl( + clientObject.getKustoPoolDatabasePrincipalAssignments(), this); + } + return kustoPoolDatabasePrincipalAssignments; + } + /** * @return Wrapped service client SynapseManagementClient providing direct access to the underlying auto-generated * API implementation, based on Azure REST API. diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoOperationsClient.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoOperationsClient.java new file mode 100644 index 0000000000000..9a791f5052173 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoOperationsClient.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.synapse.fluent.models.OperationInner; + +/** An instance of this class provides access to all the operations defined in KustoOperationsClient. */ +public interface KustoOperationsClient { + /** + * Lists available operations for the Kusto sub-resources inside Microsoft.Synapse provider. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to list REST API operations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Lists available operations for the Kusto sub-resources inside Microsoft.Synapse provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to list REST API operations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolAttachedDatabaseConfigurationsClient.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolAttachedDatabaseConfigurationsClient.java new file mode 100644 index 0000000000000..3043f891b595d --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolAttachedDatabaseConfigurationsClient.java @@ -0,0 +1,248 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.synapse.fluent.models.AttachedDatabaseConfigurationInner; + +/** + * An instance of this class provides access to all the operations defined in + * KustoPoolAttachedDatabaseConfigurationsClient. + */ +public interface KustoPoolAttachedDatabaseConfigurationsClient { + /** + * Returns the list of attached database configurations of the given Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list attached database configurations operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByKustoPool( + String workspaceName, String kustoPoolName, String resourceGroupName); + + /** + * Returns the list of attached database configurations of the given Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list attached database configurations operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByKustoPool( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context); + + /** + * Returns an attached database configuration. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing an attached database configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AttachedDatabaseConfigurationInner get( + String workspaceName, String kustoPoolName, String attachedDatabaseConfigurationName, String resourceGroupName); + + /** + * Returns an attached database configuration. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing an attached database configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName, + Context context); + + /** + * Creates or updates an attached database configuration. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing an attached database configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, AttachedDatabaseConfigurationInner> beginCreateOrUpdate( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName, + AttachedDatabaseConfigurationInner parameters); + + /** + * Creates or updates an attached database configuration. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The database parameters supplied to the CreateOrUpdate 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 class representing an attached database configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, AttachedDatabaseConfigurationInner> beginCreateOrUpdate( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName, + AttachedDatabaseConfigurationInner parameters, + Context context); + + /** + * Creates or updates an attached database configuration. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing an attached database configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AttachedDatabaseConfigurationInner createOrUpdate( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName, + AttachedDatabaseConfigurationInner parameters); + + /** + * Creates or updates an attached database configuration. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The database parameters supplied to the CreateOrUpdate 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 class representing an attached database configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AttachedDatabaseConfigurationInner createOrUpdate( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName, + AttachedDatabaseConfigurationInner parameters, + Context context); + + /** + * Deletes the attached database configuration with the given name. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDelete( + String workspaceName, String kustoPoolName, String attachedDatabaseConfigurationName, String resourceGroupName); + + /** + * Deletes the attached database configuration with the given name. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDelete( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName, + Context context); + + /** + * Deletes the attached database configuration with the given name. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete( + String workspaceName, String kustoPoolName, String attachedDatabaseConfigurationName, String resourceGroupName); + + /** + * Deletes the attached database configuration with the given name. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName, + Context context); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolChildResourcesClient.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolChildResourcesClient.java new file mode 100644 index 0000000000000..006cc76935a5f --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolChildResourcesClient.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.synapse.fluent.models.CheckNameResultInner; +import com.azure.resourcemanager.synapse.models.DatabaseCheckNameRequest; + +/** An instance of this class provides access to all the operations defined in KustoPoolChildResourcesClient. */ +public interface KustoPoolChildResourcesClient { + /** + * Checks that the Kusto Pool child resource name is valid and is not already in use. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Kusto Pool child 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 result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CheckNameResultInner checkNameAvailability( + String workspaceName, String kustoPoolName, String resourceGroupName, DatabaseCheckNameRequest resourceName); + + /** + * Checks that the Kusto Pool child resource name is valid and is not already in use. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Kusto Pool child resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response checkNameAvailabilityWithResponse( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + DatabaseCheckNameRequest resourceName, + Context context); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolDataConnectionsClient.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolDataConnectionsClient.java new file mode 100644 index 0000000000000..a46940c870e44 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolDataConnectionsClient.java @@ -0,0 +1,510 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.synapse.fluent.models.CheckNameResultInner; +import com.azure.resourcemanager.synapse.fluent.models.DataConnectionInner; +import com.azure.resourcemanager.synapse.fluent.models.DataConnectionValidationInner; +import com.azure.resourcemanager.synapse.fluent.models.DataConnectionValidationListResultInner; +import com.azure.resourcemanager.synapse.models.DataConnectionCheckNameRequest; + +/** An instance of this class provides access to all the operations defined in KustoPoolDataConnectionsClient. */ +public interface KustoPoolDataConnectionsClient { + /** + * Checks that the data connection name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CheckNameResultInner checkNameAvailability( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DataConnectionCheckNameRequest dataConnectionName); + + /** + * Checks that the data connection name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response checkNameAvailabilityWithResponse( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DataConnectionCheckNameRequest dataConnectionName, + Context context); + + /** + * Checks that the data connection parameters are valid. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto data connection validation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, DataConnectionValidationListResultInner> + beginDataConnectionValidation( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DataConnectionValidationInner parameters); + + /** + * Checks that the data connection parameters are valid. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The data connection parameters supplied to the CreateOrUpdate 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 list Kusto data connection validation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, DataConnectionValidationListResultInner> + beginDataConnectionValidation( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DataConnectionValidationInner parameters, + Context context); + + /** + * Checks that the data connection parameters are valid. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto data connection validation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataConnectionValidationListResultInner dataConnectionValidation( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DataConnectionValidationInner parameters); + + /** + * Checks that the data connection parameters are valid. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The data connection parameters supplied to the CreateOrUpdate 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 list Kusto data connection validation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataConnectionValidationListResultInner dataConnectionValidation( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DataConnectionValidationInner parameters, + Context context); + + /** + * Returns the list of data connections of the given Kusto pool database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 list Kusto data connections operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName); + + /** + * Returns the list of data connections of the given Kusto pool database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 list Kusto data connections operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByDatabase( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName, Context context); + + /** + * Returns a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataConnectionInner get( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName); + + /** + * Returns a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + Context context); + + /** + * Creates or updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, DataConnectionInner> beginCreateOrUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters); + + /** + * Creates or updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the CreateOrUpdate 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 class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, DataConnectionInner> beginCreateOrUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters, + Context context); + + /** + * Creates or updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataConnectionInner createOrUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters); + + /** + * Creates or updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the CreateOrUpdate 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 class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataConnectionInner createOrUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters, + Context context); + + /** + * Updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, DataConnectionInner> beginUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters); + + /** + * Updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the Update 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 class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, DataConnectionInner> beginUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters, + Context context); + + /** + * Updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataConnectionInner update( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters); + + /** + * Updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the Update 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 class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataConnectionInner update( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters, + Context context); + + /** + * Deletes the data connection with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDelete( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName); + + /** + * Deletes the data connection with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDelete( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + Context context); + + /** + * Deletes the data connection with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName); + + /** + * Deletes the data connection with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + Context context); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolDatabasePrincipalAssignmentsClient.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolDatabasePrincipalAssignmentsClient.java new file mode 100644 index 0000000000000..7032eb37ca7f1 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolDatabasePrincipalAssignmentsClient.java @@ -0,0 +1,325 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.synapse.fluent.models.CheckNameResultInner; +import com.azure.resourcemanager.synapse.fluent.models.DatabasePrincipalAssignmentInner; +import com.azure.resourcemanager.synapse.models.DatabasePrincipalAssignmentCheckNameRequest; + +/** + * An instance of this class provides access to all the operations defined in + * KustoPoolDatabasePrincipalAssignmentsClient. + */ +public interface KustoPoolDatabasePrincipalAssignmentsClient { + /** + * Checks that the database principal assignment is valid and is not already in use. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param principalAssignmentName The name of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CheckNameResultInner checkNameAvailability( + String workspaceName, + String kustoPoolName, + String databaseName, + String resourceGroupName, + DatabasePrincipalAssignmentCheckNameRequest principalAssignmentName); + + /** + * Checks that the database principal assignment is valid and is not already in use. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param principalAssignmentName The name of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response checkNameAvailabilityWithResponse( + String workspaceName, + String kustoPoolName, + String databaseName, + String resourceGroupName, + DatabasePrincipalAssignmentCheckNameRequest principalAssignmentName, + Context context); + + /** + * Lists all Kusto pool database principalAssignments. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto database principal assignments operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String workspaceName, String kustoPoolName, String databaseName, String resourceGroupName); + + /** + * Lists all Kusto pool database principalAssignments. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto database principal assignments operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String workspaceName, String kustoPoolName, String databaseName, String resourceGroupName, Context context); + + /** + * Gets a Kusto pool database principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Kusto pool database principalAssignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DatabasePrincipalAssignmentInner get( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName); + + /** + * Gets a Kusto pool database principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Kusto pool database principalAssignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName, + Context context); + + /** + * Creates a Kusto pool database principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The Kusto principalAssignments parameters supplied for the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a database principal assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, DatabasePrincipalAssignmentInner> beginCreateOrUpdate( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName, + DatabasePrincipalAssignmentInner parameters); + + /** + * Creates a Kusto pool database principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The Kusto principalAssignments parameters supplied for the 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 class representing a database principal assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, DatabasePrincipalAssignmentInner> beginCreateOrUpdate( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName, + DatabasePrincipalAssignmentInner parameters, + Context context); + + /** + * Creates a Kusto pool database principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The Kusto principalAssignments parameters supplied for the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a database principal assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DatabasePrincipalAssignmentInner createOrUpdate( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName, + DatabasePrincipalAssignmentInner parameters); + + /** + * Creates a Kusto pool database principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The Kusto principalAssignments parameters supplied for the 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 class representing a database principal assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DatabasePrincipalAssignmentInner createOrUpdate( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName, + DatabasePrincipalAssignmentInner parameters, + Context context); + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDelete( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName); + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDelete( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName, + Context context); + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName); + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName, + Context context); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolDatabasesClient.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolDatabasesClient.java new file mode 100644 index 0000000000000..536f408e558da --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolDatabasesClient.java @@ -0,0 +1,318 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.synapse.fluent.models.DatabaseInner; + +/** An instance of this class provides access to all the operations defined in KustoPoolDatabasesClient. */ +public interface KustoPoolDatabasesClient { + /** + * Returns the list of databases of the given Kusto pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto 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 list Kusto databases operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByKustoPool(String resourceGroupName, String workspaceName, String kustoPoolName); + + /** + * Returns the list of databases of the given Kusto pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto 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 list Kusto databases operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByKustoPool( + String resourceGroupName, String workspaceName, String kustoPoolName, Context context); + + /** + * Returns a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DatabaseInner get(String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName); + + /** + * Returns a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName, Context context); + + /** + * Creates or updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, DatabaseInner> beginCreateOrUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters); + + /** + * Creates or updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the CreateOrUpdate 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 class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, DatabaseInner> beginCreateOrUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters, + Context context); + + /** + * Creates or updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DatabaseInner createOrUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters); + + /** + * Creates or updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the CreateOrUpdate 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 class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DatabaseInner createOrUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters, + Context context); + + /** + * Updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, DatabaseInner> beginUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters); + + /** + * Updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the Update 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 class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, DatabaseInner> beginUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters, + Context context); + + /** + * Updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DatabaseInner update( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters); + + /** + * Updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the Update 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 class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DatabaseInner update( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters, + Context context); + + /** + * Deletes the database with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDelete( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName); + + /** + * Deletes the database with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDelete( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName, Context context); + + /** + * Deletes the database with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 workspaceName, String kustoPoolName, String databaseName); + + /** + * Deletes the database with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 workspaceName, String kustoPoolName, String databaseName, Context context); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolPrincipalAssignmentsClient.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolPrincipalAssignmentsClient.java new file mode 100644 index 0000000000000..863586333bce3 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolPrincipalAssignmentsClient.java @@ -0,0 +1,286 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.synapse.fluent.models.CheckNameResultInner; +import com.azure.resourcemanager.synapse.fluent.models.ClusterPrincipalAssignmentInner; +import com.azure.resourcemanager.synapse.models.ClusterPrincipalAssignmentCheckNameRequest; + +/** An instance of this class provides access to all the operations defined in KustoPoolPrincipalAssignmentsClient. */ +public interface KustoPoolPrincipalAssignmentsClient { + /** + * Checks that the principal assignment name is valid and is not already in use. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param principalAssignmentName The name of the principal 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 result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CheckNameResultInner checkNameAvailability( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + ClusterPrincipalAssignmentCheckNameRequest principalAssignmentName); + + /** + * Checks that the principal assignment name is valid and is not already in use. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param principalAssignmentName The name of the principal 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 result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response checkNameAvailabilityWithResponse( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + ClusterPrincipalAssignmentCheckNameRequest principalAssignmentName, + Context context); + + /** + * Lists all Kusto pool principalAssignments. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto cluster principal assignments operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String workspaceName, String kustoPoolName, String resourceGroupName); + + /** + * Lists all Kusto pool principalAssignments. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto cluster principal assignments operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context); + + /** + * Gets a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Kusto pool principalAssignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ClusterPrincipalAssignmentInner get( + String workspaceName, String kustoPoolName, String principalAssignmentName, String resourceGroupName); + + /** + * Gets a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Kusto pool principalAssignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String workspaceName, + String kustoPoolName, + String principalAssignmentName, + String resourceGroupName, + Context context); + + /** + * Create a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The Kusto pool principalAssignment's parameters supplied for the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a cluster principal assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, ClusterPrincipalAssignmentInner> beginCreateOrUpdate( + String workspaceName, + String kustoPoolName, + String principalAssignmentName, + String resourceGroupName, + ClusterPrincipalAssignmentInner parameters); + + /** + * Create a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The Kusto pool principalAssignment's parameters supplied for the 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 class representing a cluster principal assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, ClusterPrincipalAssignmentInner> beginCreateOrUpdate( + String workspaceName, + String kustoPoolName, + String principalAssignmentName, + String resourceGroupName, + ClusterPrincipalAssignmentInner parameters, + Context context); + + /** + * Create a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The Kusto pool principalAssignment's parameters supplied for the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a cluster principal assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ClusterPrincipalAssignmentInner createOrUpdate( + String workspaceName, + String kustoPoolName, + String principalAssignmentName, + String resourceGroupName, + ClusterPrincipalAssignmentInner parameters); + + /** + * Create a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The Kusto pool principalAssignment's parameters supplied for the 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 class representing a cluster principal assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ClusterPrincipalAssignmentInner createOrUpdate( + String workspaceName, + String kustoPoolName, + String principalAssignmentName, + String resourceGroupName, + ClusterPrincipalAssignmentInner parameters, + Context context); + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDelete( + String workspaceName, String kustoPoolName, String principalAssignmentName, String resourceGroupName); + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDelete( + String workspaceName, + String kustoPoolName, + String principalAssignmentName, + String resourceGroupName, + Context context); + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String workspaceName, String kustoPoolName, String principalAssignmentName, String resourceGroupName); + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete( + String workspaceName, + String kustoPoolName, + String principalAssignmentName, + String resourceGroupName, + Context context); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolsClient.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolsClient.java new file mode 100644 index 0000000000000..2e0d19091eada --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolsClient.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.synapse.fluent.models.SkuDescriptionInner; + +/** An instance of this class provides access to all the operations defined in KustoPoolsClient. */ +public interface KustoPoolsClient { + /** + * Lists eligible SKUs for Kusto Pool resource. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the SKU descriptions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Lists eligible SKUs for Kusto Pool resource. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the SKU descriptions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolsOperationsClient.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolsOperationsClient.java new file mode 100644 index 0000000000000..6d145da837573 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/KustoPoolsOperationsClient.java @@ -0,0 +1,838 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.synapse.fluent.models.AzureResourceSkuInner; +import com.azure.resourcemanager.synapse.fluent.models.CheckNameResultInner; +import com.azure.resourcemanager.synapse.fluent.models.FollowerDatabaseDefinitionInner; +import com.azure.resourcemanager.synapse.fluent.models.KustoPoolInner; +import com.azure.resourcemanager.synapse.fluent.models.KustoPoolListResultInner; +import com.azure.resourcemanager.synapse.fluent.models.LanguageExtensionInner; +import com.azure.resourcemanager.synapse.models.KustoPoolCheckNameRequest; +import com.azure.resourcemanager.synapse.models.KustoPoolUpdate; +import com.azure.resourcemanager.synapse.models.LanguageExtensionsList; + +/** An instance of this class provides access to all the operations defined in KustoPoolsOperationsClient. */ +public interface KustoPoolsOperationsClient { + /** + * Checks that the kusto pool name is valid and is not already in use. + * + * @param location The name of Azure region. + * @param kustoPoolName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CheckNameResultInner checkNameAvailability(String location, KustoPoolCheckNameRequest kustoPoolName); + + /** + * Checks that the kusto pool name is valid and is not already in use. + * + * @param location The name of Azure region. + * @param kustoPoolName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response checkNameAvailabilityWithResponse( + String location, KustoPoolCheckNameRequest kustoPoolName, Context context); + + /** + * List all Kusto pools. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto pools operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + KustoPoolListResultInner listByWorkspace(String resourceGroupName, String workspaceName); + + /** + * List all Kusto pools. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto pools operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listByWorkspaceWithResponse( + String resourceGroupName, String workspaceName, Context context); + + /** + * Gets a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + KustoPoolInner get(String workspaceName, String kustoPoolName, String resourceGroupName); + + /** + * Gets a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context); + + /** + * Create or update a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the CreateOrUpdate operation. + * @param ifMatch The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new Kusto Pool to be created, but to prevent updating an existing Kusto + * Pool. Other values will result in a 412 Pre-condition Failed response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, KustoPoolInner> beginCreateOrUpdate( + String workspaceName, + String resourceGroupName, + String kustoPoolName, + KustoPoolInner parameters, + String ifMatch, + String ifNoneMatch); + + /** + * Create or update a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the CreateOrUpdate operation. + * @param ifMatch The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new Kusto Pool to be created, but to prevent updating an existing Kusto + * Pool. Other values will result in a 412 Pre-condition Failed response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, KustoPoolInner> beginCreateOrUpdate( + String workspaceName, + String resourceGroupName, + String kustoPoolName, + KustoPoolInner parameters, + String ifMatch, + String ifNoneMatch, + Context context); + + /** + * Create or update a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the CreateOrUpdate operation. + * @param ifMatch The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new Kusto Pool to be created, but to prevent updating an existing Kusto + * Pool. Other values will result in a 412 Pre-condition Failed response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + KustoPoolInner createOrUpdate( + String workspaceName, + String resourceGroupName, + String kustoPoolName, + KustoPoolInner parameters, + String ifMatch, + String ifNoneMatch); + + /** + * Create or update a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + KustoPoolInner createOrUpdate( + String workspaceName, String resourceGroupName, String kustoPoolName, KustoPoolInner parameters); + + /** + * Create or update a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the CreateOrUpdate operation. + * @param ifMatch The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new Kusto Pool to be created, but to prevent updating an existing Kusto + * Pool. Other values will result in a 412 Pre-condition Failed response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + KustoPoolInner createOrUpdate( + String workspaceName, + String resourceGroupName, + String kustoPoolName, + KustoPoolInner parameters, + String ifMatch, + String ifNoneMatch, + Context context); + + /** + * Update a Kusto Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the Update operation. + * @param ifMatch The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, KustoPoolInner> beginUpdate( + String workspaceName, + String resourceGroupName, + String kustoPoolName, + KustoPoolUpdate parameters, + String ifMatch); + + /** + * Update a Kusto Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the Update operation. + * @param ifMatch The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, KustoPoolInner> beginUpdate( + String workspaceName, + String resourceGroupName, + String kustoPoolName, + KustoPoolUpdate parameters, + String ifMatch, + Context context); + + /** + * Update a Kusto Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the Update operation. + * @param ifMatch The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + KustoPoolInner update( + String workspaceName, + String resourceGroupName, + String kustoPoolName, + KustoPoolUpdate parameters, + String ifMatch); + + /** + * Update a Kusto Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + KustoPoolInner update( + String workspaceName, String resourceGroupName, String kustoPoolName, KustoPoolUpdate parameters); + + /** + * Update a Kusto Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the Update operation. + * @param ifMatch The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + KustoPoolInner update( + String workspaceName, + String resourceGroupName, + String kustoPoolName, + KustoPoolUpdate parameters, + String ifMatch, + Context context); + + /** + * Deletes a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDelete( + String workspaceName, String resourceGroupName, String kustoPoolName); + + /** + * Deletes a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDelete( + String workspaceName, String resourceGroupName, String kustoPoolName, Context context); + + /** + * Deletes a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto 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 workspaceName, String resourceGroupName, String kustoPoolName); + + /** + * Deletes a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto 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 workspaceName, String resourceGroupName, String kustoPoolName, Context context); + + /** + * Stops a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginStop(String workspaceName, String kustoPoolName, String resourceGroupName); + + /** + * Stops a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginStop( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context); + + /** + * Stops a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void stop(String workspaceName, String kustoPoolName, String resourceGroupName); + + /** + * Stops a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void stop(String workspaceName, String kustoPoolName, String resourceGroupName, Context context); + + /** + * Starts a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginStart(String workspaceName, String kustoPoolName, String resourceGroupName); + + /** + * Starts a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginStart( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context); + + /** + * Starts a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void start(String workspaceName, String kustoPoolName, String resourceGroupName); + + /** + * Starts a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void start(String workspaceName, String kustoPoolName, String resourceGroupName, Context context); + + /** + * Returns the SKUs available for the provided resource. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available SKUs for a Kusto Pool. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSkusByResource( + String workspaceName, String kustoPoolName, String resourceGroupName); + + /** + * Returns the SKUs available for the provided resource. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available SKUs for a Kusto Pool. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSkusByResource( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context); + + /** + * Returns a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of language extension objects. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listLanguageExtensions( + String workspaceName, String kustoPoolName, String resourceGroupName); + + /** + * Returns a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of language extension objects. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listLanguageExtensions( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context); + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToAdd The language extensions to add. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginAddLanguageExtensions( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToAdd); + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToAdd The language extensions to add. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginAddLanguageExtensions( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToAdd, + Context context); + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToAdd The language extensions to add. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 addLanguageExtensions( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToAdd); + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToAdd The language extensions to add. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 addLanguageExtensions( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToAdd, + Context context); + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToRemove The language extensions to remove. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginRemoveLanguageExtensions( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToRemove); + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToRemove The language extensions to remove. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginRemoveLanguageExtensions( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToRemove, + Context context); + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToRemove The language extensions to remove. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 removeLanguageExtensions( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToRemove); + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToRemove The language extensions to remove. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 removeLanguageExtensions( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToRemove, + Context context); + + /** + * Returns a list of databases that are owned by this Kusto Pool and were followed by another Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto database principals operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listFollowerDatabases( + String workspaceName, String kustoPoolName, String resourceGroupName); + + /** + * Returns a list of databases that are owned by this Kusto Pool and were followed by another Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto database principals operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listFollowerDatabases( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context); + + /** + * Detaches all followers of a database owned by this Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param followerDatabaseToRemove The follower databases properties to remove. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDetachFollowerDatabases( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + FollowerDatabaseDefinitionInner followerDatabaseToRemove); + + /** + * Detaches all followers of a database owned by this Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param followerDatabaseToRemove The follower databases properties to remove. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDetachFollowerDatabases( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + FollowerDatabaseDefinitionInner followerDatabaseToRemove, + Context context); + + /** + * Detaches all followers of a database owned by this Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param followerDatabaseToRemove The follower databases properties to remove. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 detachFollowerDatabases( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + FollowerDatabaseDefinitionInner followerDatabaseToRemove); + + /** + * Detaches all followers of a database owned by this Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param followerDatabaseToRemove The follower databases properties to remove. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 detachFollowerDatabases( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + FollowerDatabaseDefinitionInner followerDatabaseToRemove, + Context context); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/SynapseManagementClient.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/SynapseManagementClient.java index 9b58bccbba2c0..8986c082e05b3 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/SynapseManagementClient.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/SynapseManagementClient.java @@ -485,4 +485,67 @@ public interface SynapseManagementClient { * @return the SparkConfigurationsOperationsClient object. */ SparkConfigurationsOperationsClient getSparkConfigurationsOperations(); + + /** + * Gets the KustoOperationsClient object to access its operations. + * + * @return the KustoOperationsClient object. + */ + KustoOperationsClient getKustoOperations(); + + /** + * Gets the KustoPoolsClient object to access its operations. + * + * @return the KustoPoolsClient object. + */ + KustoPoolsClient getKustoPools(); + + /** + * Gets the KustoPoolsOperationsClient object to access its operations. + * + * @return the KustoPoolsOperationsClient object. + */ + KustoPoolsOperationsClient getKustoPoolsOperations(); + + /** + * Gets the KustoPoolChildResourcesClient object to access its operations. + * + * @return the KustoPoolChildResourcesClient object. + */ + KustoPoolChildResourcesClient getKustoPoolChildResources(); + + /** + * Gets the KustoPoolAttachedDatabaseConfigurationsClient object to access its operations. + * + * @return the KustoPoolAttachedDatabaseConfigurationsClient object. + */ + KustoPoolAttachedDatabaseConfigurationsClient getKustoPoolAttachedDatabaseConfigurations(); + + /** + * Gets the KustoPoolDatabasesClient object to access its operations. + * + * @return the KustoPoolDatabasesClient object. + */ + KustoPoolDatabasesClient getKustoPoolDatabases(); + + /** + * Gets the KustoPoolDataConnectionsClient object to access its operations. + * + * @return the KustoPoolDataConnectionsClient object. + */ + KustoPoolDataConnectionsClient getKustoPoolDataConnections(); + + /** + * Gets the KustoPoolPrincipalAssignmentsClient object to access its operations. + * + * @return the KustoPoolPrincipalAssignmentsClient object. + */ + KustoPoolPrincipalAssignmentsClient getKustoPoolPrincipalAssignments(); + + /** + * Gets the KustoPoolDatabasePrincipalAssignmentsClient object to access its operations. + * + * @return the KustoPoolDatabasePrincipalAssignmentsClient object. + */ + KustoPoolDatabasePrincipalAssignmentsClient getKustoPoolDatabasePrincipalAssignments(); } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AadAdminProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AadAdminProperties.java deleted file mode 100644 index 8560d43e331ff..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AadAdminProperties.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Workspace active directory administrator properties. */ -@Fluent -public final class AadAdminProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AadAdminProperties.class); - - /* - * Tenant ID of the workspace active directory administrator - */ - @JsonProperty(value = "tenantId") - private String tenantId; - - /* - * Login of the workspace active directory administrator - */ - @JsonProperty(value = "login") - private String login; - - /* - * Workspace active directory administrator type - */ - @JsonProperty(value = "administratorType") - private String administratorType; - - /* - * Object ID of the workspace active directory administrator - */ - @JsonProperty(value = "sid") - private String sid; - - /** - * Get the tenantId property: Tenant ID of the workspace active directory administrator. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Set the tenantId property: Tenant ID of the workspace active directory administrator. - * - * @param tenantId the tenantId value to set. - * @return the AadAdminProperties object itself. - */ - public AadAdminProperties withTenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Get the login property: Login of the workspace active directory administrator. - * - * @return the login value. - */ - public String login() { - return this.login; - } - - /** - * Set the login property: Login of the workspace active directory administrator. - * - * @param login the login value to set. - * @return the AadAdminProperties object itself. - */ - public AadAdminProperties withLogin(String login) { - this.login = login; - return this; - } - - /** - * Get the administratorType property: Workspace active directory administrator type. - * - * @return the administratorType value. - */ - public String administratorType() { - return this.administratorType; - } - - /** - * Set the administratorType property: Workspace active directory administrator type. - * - * @param administratorType the administratorType value to set. - * @return the AadAdminProperties object itself. - */ - public AadAdminProperties withAdministratorType(String administratorType) { - this.administratorType = administratorType; - return this; - } - - /** - * Get the sid property: Object ID of the workspace active directory administrator. - * - * @return the sid value. - */ - public String sid() { - return this.sid; - } - - /** - * Set the sid property: Object ID of the workspace active directory administrator. - * - * @param sid the sid value to set. - * @return the AadAdminProperties object itself. - */ - public AadAdminProperties withSid(String sid) { - this.sid = sid; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AttachedDatabaseConfigurationInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AttachedDatabaseConfigurationInner.java new file mode 100644 index 0000000000000..455eff1bd52ce --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AttachedDatabaseConfigurationInner.java @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.models.DefaultPrincipalsModificationKind; +import com.azure.resourcemanager.synapse.models.ResourceProvisioningState; +import com.azure.resourcemanager.synapse.models.TableLevelSharingProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Class representing an attached database configuration. */ +@JsonFlatten +@Fluent +public class AttachedDatabaseConfigurationInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AttachedDatabaseConfigurationInner.class); + + /* + * Resource location. + */ + @JsonProperty(value = "location") + private String location; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy + * information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /* + * The provisioned state of the resource. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ResourceProvisioningState provisioningState; + + /* + * The name of the database which you would like to attach, use * if you + * want to follow all current and future databases. + */ + @JsonProperty(value = "properties.databaseName") + private String databaseName; + + /* + * The resource id of the kusto pool where the databases you would like to + * attach reside. + */ + @JsonProperty(value = "properties.clusterResourceId") + private String kustoPoolResourceId; + + /* + * The list of databases from the clusterResourceId which are currently + * attached to the kusto pool. + */ + @JsonProperty(value = "properties.attachedDatabaseNames", access = JsonProperty.Access.WRITE_ONLY) + private List attachedDatabaseNames; + + /* + * The default principals modification kind + */ + @JsonProperty(value = "properties.defaultPrincipalsModificationKind") + private DefaultPrincipalsModificationKind defaultPrincipalsModificationKind; + + /* + * Table level sharing specifications + */ + @JsonProperty(value = "properties.tableLevelSharingProperties") + private TableLevelSharingProperties tableLevelSharingProperties; + + /** + * Get the location property: Resource location. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Resource location. + * + * @param location the location value to set. + * @return the AttachedDatabaseConfigurationInner object itself. + */ + public AttachedDatabaseConfigurationInner withLocation(String location) { + this.location = location; + 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 provisioningState property: The provisioned state of the resource. + * + * @return the provisioningState value. + */ + public ResourceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the databaseName property: The name of the database which you would like to attach, use * if you want to + * follow all current and future databases. + * + * @return the databaseName value. + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Set the databaseName property: The name of the database which you would like to attach, use * if you want to + * follow all current and future databases. + * + * @param databaseName the databaseName value to set. + * @return the AttachedDatabaseConfigurationInner object itself. + */ + public AttachedDatabaseConfigurationInner withDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Get the kustoPoolResourceId property: The resource id of the kusto pool where the databases you would like to + * attach reside. + * + * @return the kustoPoolResourceId value. + */ + public String kustoPoolResourceId() { + return this.kustoPoolResourceId; + } + + /** + * Set the kustoPoolResourceId property: The resource id of the kusto pool where the databases you would like to + * attach reside. + * + * @param kustoPoolResourceId the kustoPoolResourceId value to set. + * @return the AttachedDatabaseConfigurationInner object itself. + */ + public AttachedDatabaseConfigurationInner withKustoPoolResourceId(String kustoPoolResourceId) { + this.kustoPoolResourceId = kustoPoolResourceId; + return this; + } + + /** + * Get the attachedDatabaseNames property: The list of databases from the clusterResourceId which are currently + * attached to the kusto pool. + * + * @return the attachedDatabaseNames value. + */ + public List attachedDatabaseNames() { + return this.attachedDatabaseNames; + } + + /** + * Get the defaultPrincipalsModificationKind property: The default principals modification kind. + * + * @return the defaultPrincipalsModificationKind value. + */ + public DefaultPrincipalsModificationKind defaultPrincipalsModificationKind() { + return this.defaultPrincipalsModificationKind; + } + + /** + * Set the defaultPrincipalsModificationKind property: The default principals modification kind. + * + * @param defaultPrincipalsModificationKind the defaultPrincipalsModificationKind value to set. + * @return the AttachedDatabaseConfigurationInner object itself. + */ + public AttachedDatabaseConfigurationInner withDefaultPrincipalsModificationKind( + DefaultPrincipalsModificationKind defaultPrincipalsModificationKind) { + this.defaultPrincipalsModificationKind = defaultPrincipalsModificationKind; + return this; + } + + /** + * Get the tableLevelSharingProperties property: Table level sharing specifications. + * + * @return the tableLevelSharingProperties value. + */ + public TableLevelSharingProperties tableLevelSharingProperties() { + return this.tableLevelSharingProperties; + } + + /** + * Set the tableLevelSharingProperties property: Table level sharing specifications. + * + * @param tableLevelSharingProperties the tableLevelSharingProperties value to set. + * @return the AttachedDatabaseConfigurationInner object itself. + */ + public AttachedDatabaseConfigurationInner withTableLevelSharingProperties( + TableLevelSharingProperties tableLevelSharingProperties) { + this.tableLevelSharingProperties = tableLevelSharingProperties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (tableLevelSharingProperties() != null) { + tableLevelSharingProperties().validate(); + } + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AvailableRpOperationInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AvailableRpOperationInner.java index b5b2ab132ba82..9910f145d2835 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AvailableRpOperationInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AvailableRpOperationInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.AvailableRpOperationDisplayInfo; import com.azure.resourcemanager.synapse.models.OperationMetaServiceSpecification; @@ -12,8 +13,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** An operation that is available in this resource provider. */ +@JsonFlatten @Fluent -public final class AvailableRpOperationInner { +public class AvailableRpOperationInner { @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailableRpOperationInner.class); /* @@ -34,18 +36,18 @@ public final class AvailableRpOperationInner { @JsonProperty(value = "name") private String name; - /* - * Operation properties - */ - @JsonProperty(value = "properties") - private OperationMetaPropertyInfo innerProperties; - /* * Operation origin */ @JsonProperty(value = "origin") private String origin; + /* + * Operation service specification + */ + @JsonProperty(value = "properties.serviceSpecification") + private OperationMetaServiceSpecification serviceSpecification; + /** * Get the display property: Display properties of the operation. * @@ -106,15 +108,6 @@ public AvailableRpOperationInner withName(String name) { return this; } - /** - * Get the innerProperties property: Operation properties. - * - * @return the innerProperties value. - */ - private OperationMetaPropertyInfo innerProperties() { - return this.innerProperties; - } - /** * Get the origin property: Operation origin. * @@ -141,7 +134,7 @@ public AvailableRpOperationInner withOrigin(String origin) { * @return the serviceSpecification value. */ public OperationMetaServiceSpecification serviceSpecification() { - return this.innerProperties() == null ? null : this.innerProperties().serviceSpecification(); + return this.serviceSpecification; } /** @@ -151,10 +144,7 @@ public OperationMetaServiceSpecification serviceSpecification() { * @return the AvailableRpOperationInner object itself. */ public AvailableRpOperationInner withServiceSpecification(OperationMetaServiceSpecification serviceSpecification) { - if (this.innerProperties() == null) { - this.innerProperties = new OperationMetaPropertyInfo(); - } - this.innerProperties().withServiceSpecification(serviceSpecification); + this.serviceSpecification = serviceSpecification; return this; } @@ -167,8 +157,8 @@ public void validate() { if (display() != null) { display().validate(); } - if (innerProperties() != null) { - innerProperties().validate(); + if (serviceSpecification() != null) { + serviceSpecification().validate(); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AzureADOnlyAuthenticationInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AzureADOnlyAuthenticationInner.java index 71889b98060db..339ec1ee81218 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AzureADOnlyAuthenticationInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AzureADOnlyAuthenticationInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.StateValue; @@ -13,24 +14,28 @@ import java.time.OffsetDateTime; /** Azure Active Directory Only Authentication Info. */ +@JsonFlatten @Fluent -public final class AzureADOnlyAuthenticationInner extends ProxyResource { +public class AzureADOnlyAuthenticationInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureADOnlyAuthenticationInner.class); /* - * azureADOnlyAuthentication resource properties + * Azure Active Directory only Authentication enabled. */ - @JsonProperty(value = "properties") - private AzureADOnlyAuthenticationProperties innerProperties; + @JsonProperty(value = "properties.azureADOnlyAuthentication") + private Boolean azureADOnlyAuthentication; - /** - * Get the innerProperties property: azureADOnlyAuthentication resource properties. - * - * @return the innerProperties value. + /* + * property configuration state */ - private AzureADOnlyAuthenticationProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) + private StateValue state; + + /* + * property configuration date + */ + @JsonProperty(value = "properties.creationDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime creationDate; /** * Get the azureADOnlyAuthentication property: Azure Active Directory only Authentication enabled. @@ -38,7 +43,7 @@ private AzureADOnlyAuthenticationProperties innerProperties() { * @return the azureADOnlyAuthentication value. */ public Boolean azureADOnlyAuthentication() { - return this.innerProperties() == null ? null : this.innerProperties().azureADOnlyAuthentication(); + return this.azureADOnlyAuthentication; } /** @@ -48,10 +53,7 @@ public Boolean azureADOnlyAuthentication() { * @return the AzureADOnlyAuthenticationInner object itself. */ public AzureADOnlyAuthenticationInner withAzureADOnlyAuthentication(Boolean azureADOnlyAuthentication) { - if (this.innerProperties() == null) { - this.innerProperties = new AzureADOnlyAuthenticationProperties(); - } - this.innerProperties().withAzureADOnlyAuthentication(azureADOnlyAuthentication); + this.azureADOnlyAuthentication = azureADOnlyAuthentication; return this; } @@ -61,7 +63,7 @@ public AzureADOnlyAuthenticationInner withAzureADOnlyAuthentication(Boolean azur * @return the state value. */ public StateValue state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); + return this.state; } /** @@ -70,7 +72,7 @@ public StateValue state() { * @return the creationDate value. */ public OffsetDateTime creationDate() { - return this.innerProperties() == null ? null : this.innerProperties().creationDate(); + return this.creationDate; } /** @@ -79,8 +81,5 @@ public OffsetDateTime creationDate() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AzureADOnlyAuthenticationProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AzureADOnlyAuthenticationProperties.java deleted file mode 100644 index 59a1e1a0dd1be..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AzureADOnlyAuthenticationProperties.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.StateValue; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Properties of a active directory only authentication. */ -@Fluent -public final class AzureADOnlyAuthenticationProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureADOnlyAuthenticationProperties.class); - - /* - * Azure Active Directory only Authentication enabled. - */ - @JsonProperty(value = "azureADOnlyAuthentication", required = true) - private boolean azureADOnlyAuthentication; - - /* - * property configuration state - */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) - private StateValue state; - - /* - * property configuration date - */ - @JsonProperty(value = "creationDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime creationDate; - - /** - * Get the azureADOnlyAuthentication property: Azure Active Directory only Authentication enabled. - * - * @return the azureADOnlyAuthentication value. - */ - public boolean azureADOnlyAuthentication() { - return this.azureADOnlyAuthentication; - } - - /** - * Set the azureADOnlyAuthentication property: Azure Active Directory only Authentication enabled. - * - * @param azureADOnlyAuthentication the azureADOnlyAuthentication value to set. - * @return the AzureADOnlyAuthenticationProperties object itself. - */ - public AzureADOnlyAuthenticationProperties withAzureADOnlyAuthentication(boolean azureADOnlyAuthentication) { - this.azureADOnlyAuthentication = azureADOnlyAuthentication; - return this; - } - - /** - * Get the state property: property configuration state. - * - * @return the state value. - */ - public StateValue state() { - return this.state; - } - - /** - * Get the creationDate property: property configuration date. - * - * @return the creationDate value. - */ - public OffsetDateTime creationDate() { - return this.creationDate; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AzureResourceSkuInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AzureResourceSkuInner.java new file mode 100644 index 0000000000000..d239ed869d544 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AzureResourceSkuInner.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.models.AzureCapacity; +import com.azure.resourcemanager.synapse.models.AzureSku; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Azure resource SKU definition. */ +@Fluent +public final class AzureResourceSkuInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureResourceSkuInner.class); + + /* + * Resource Namespace and Type. + */ + @JsonProperty(value = "resourceType") + private String resourceType; + + /* + * The SKU details. + */ + @JsonProperty(value = "sku") + private AzureSku sku; + + /* + * The number of instances of the cluster. + */ + @JsonProperty(value = "capacity") + private AzureCapacity capacity; + + /** + * Get the resourceType property: Resource Namespace and Type. + * + * @return the resourceType value. + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Set the resourceType property: Resource Namespace and Type. + * + * @param resourceType the resourceType value to set. + * @return the AzureResourceSkuInner object itself. + */ + public AzureResourceSkuInner withResourceType(String resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Get the sku property: The SKU details. + * + * @return the sku value. + */ + public AzureSku sku() { + return this.sku; + } + + /** + * Set the sku property: The SKU details. + * + * @param sku the sku value to set. + * @return the AzureResourceSkuInner object itself. + */ + public AzureResourceSkuInner withSku(AzureSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the capacity property: The number of instances of the cluster. + * + * @return the capacity value. + */ + public AzureCapacity capacity() { + return this.capacity; + } + + /** + * Set the capacity property: The number of instances of the cluster. + * + * @param capacity the capacity value to set. + * @return the AzureResourceSkuInner object itself. + */ + public AzureResourceSkuInner withCapacity(AzureCapacity capacity) { + this.capacity = capacity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sku() != null) { + sku().validate(); + } + if (capacity() != null) { + capacity().validate(); + } + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/BigDataPoolResourceInfoInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/BigDataPoolResourceInfoInner.java index 140295794564b..c21a2bc733420 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/BigDataPoolResourceInfoInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/BigDataPoolResourceInfoInner.java @@ -5,11 +5,13 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.AutoPauseProperties; import com.azure.resourcemanager.synapse.models.AutoScaleProperties; import com.azure.resourcemanager.synapse.models.DynamicExecutorAllocation; +import com.azure.resourcemanager.synapse.models.LibraryInfo; import com.azure.resourcemanager.synapse.models.LibraryRequirements; import com.azure.resourcemanager.synapse.models.NodeSize; import com.azure.resourcemanager.synapse.models.NodeSizeFamily; @@ -21,38 +23,119 @@ import java.util.Map; /** Big Data pool A Big Data pool. */ +@JsonFlatten @Fluent -public final class BigDataPoolResourceInfoInner extends Resource { +public class BigDataPoolResourceInfoInner extends Resource { @JsonIgnore private final ClientLogger logger = new ClientLogger(BigDataPoolResourceInfoInner.class); /* - * Spark pool properties Big Data pool properties + * The state of the Big Data pool. */ - @JsonProperty(value = "properties") - private BigDataPoolResourceProperties innerProperties; + @JsonProperty(value = "properties.provisioningState") + private String provisioningState; - /** - * Get the innerProperties property: Spark pool properties Big Data pool properties. - * - * @return the innerProperties value. + /* + * Spark pool auto-scaling properties Auto-scaling properties */ - private BigDataPoolResourceProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.autoScale") + private AutoScaleProperties autoScale; - /** {@inheritDoc} */ - @Override - public BigDataPoolResourceInfoInner withLocation(String location) { - super.withLocation(location); - return this; - } + /* + * The time when the Big Data pool was created. + */ + @JsonProperty(value = "properties.creationDate") + private OffsetDateTime creationDate; - /** {@inheritDoc} */ - @Override - public BigDataPoolResourceInfoInner withTags(Map tags) { - super.withTags(tags); - return this; - } + /* + * Spark pool auto-pausing properties Auto-pausing properties + */ + @JsonProperty(value = "properties.autoPause") + private AutoPauseProperties autoPause; + + /* + * Whether compute isolation is required or not. + */ + @JsonProperty(value = "properties.isComputeIsolationEnabled") + private Boolean isComputeIsolationEnabled; + + /* + * Whether session level packages enabled. + */ + @JsonProperty(value = "properties.sessionLevelPackagesEnabled") + private Boolean sessionLevelPackagesEnabled; + + /* + * The cache size + */ + @JsonProperty(value = "properties.cacheSize") + private Integer cacheSize; + + /* + * Dynamic Executor Allocation + */ + @JsonProperty(value = "properties.dynamicExecutorAllocation") + private DynamicExecutorAllocation dynamicExecutorAllocation; + + /* + * The Spark events folder + */ + @JsonProperty(value = "properties.sparkEventsFolder") + private String sparkEventsFolder; + + /* + * The number of nodes in the Big Data pool. + */ + @JsonProperty(value = "properties.nodeCount") + private Integer nodeCount; + + /* + * Spark pool library version requirements Library version requirements + */ + @JsonProperty(value = "properties.libraryRequirements") + private LibraryRequirements libraryRequirements; + + /* + * List of custom libraries/packages associated with the spark pool. + */ + @JsonProperty(value = "properties.customLibraries") + private List customLibraries; + + /* + * Spark pool Config Properties Spark configuration file to specify + * additional properties + */ + @JsonProperty(value = "properties.sparkConfigProperties") + private SparkConfigProperties sparkConfigProperties; + + /* + * The Apache Spark version. + */ + @JsonProperty(value = "properties.sparkVersion") + private String sparkVersion; + + /* + * The default folder where Spark logs will be written. + */ + @JsonProperty(value = "properties.defaultSparkLogFolder") + private String defaultSparkLogFolder; + + /* + * The level of compute power that each node in the Big Data pool has. + */ + @JsonProperty(value = "properties.nodeSize") + private NodeSize nodeSize; + + /* + * The kind of nodes that the Big Data pool provides. + */ + @JsonProperty(value = "properties.nodeSizeFamily") + private NodeSizeFamily nodeSizeFamily; + + /* + * The time when the Big Data pool was updated successfully. + */ + @JsonProperty(value = "properties.lastSucceededTimestamp", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastSucceededTimestamp; /** * Get the provisioningState property: The state of the Big Data pool. @@ -60,7 +143,7 @@ public BigDataPoolResourceInfoInner withTags(Map tags) { * @return the provisioningState value. */ public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + return this.provisioningState; } /** @@ -70,10 +153,7 @@ public String provisioningState() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withProvisioningState(String provisioningState) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withProvisioningState(provisioningState); + this.provisioningState = provisioningState; return this; } @@ -83,7 +163,7 @@ public BigDataPoolResourceInfoInner withProvisioningState(String provisioningSta * @return the autoScale value. */ public AutoScaleProperties autoScale() { - return this.innerProperties() == null ? null : this.innerProperties().autoScale(); + return this.autoScale; } /** @@ -93,10 +173,7 @@ public AutoScaleProperties autoScale() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withAutoScale(AutoScaleProperties autoScale) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withAutoScale(autoScale); + this.autoScale = autoScale; return this; } @@ -106,7 +183,7 @@ public BigDataPoolResourceInfoInner withAutoScale(AutoScaleProperties autoScale) * @return the creationDate value. */ public OffsetDateTime creationDate() { - return this.innerProperties() == null ? null : this.innerProperties().creationDate(); + return this.creationDate; } /** @@ -116,10 +193,7 @@ public OffsetDateTime creationDate() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withCreationDate(OffsetDateTime creationDate) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withCreationDate(creationDate); + this.creationDate = creationDate; return this; } @@ -129,7 +203,7 @@ public BigDataPoolResourceInfoInner withCreationDate(OffsetDateTime creationDate * @return the autoPause value. */ public AutoPauseProperties autoPause() { - return this.innerProperties() == null ? null : this.innerProperties().autoPause(); + return this.autoPause; } /** @@ -139,10 +213,7 @@ public AutoPauseProperties autoPause() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withAutoPause(AutoPauseProperties autoPause) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withAutoPause(autoPause); + this.autoPause = autoPause; return this; } @@ -152,7 +223,7 @@ public BigDataPoolResourceInfoInner withAutoPause(AutoPauseProperties autoPause) * @return the isComputeIsolationEnabled value. */ public Boolean isComputeIsolationEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().isComputeIsolationEnabled(); + return this.isComputeIsolationEnabled; } /** @@ -162,10 +233,7 @@ public Boolean isComputeIsolationEnabled() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withIsComputeIsolationEnabled(Boolean isComputeIsolationEnabled) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withIsComputeIsolationEnabled(isComputeIsolationEnabled); + this.isComputeIsolationEnabled = isComputeIsolationEnabled; return this; } @@ -175,7 +243,7 @@ public BigDataPoolResourceInfoInner withIsComputeIsolationEnabled(Boolean isComp * @return the sessionLevelPackagesEnabled value. */ public Boolean sessionLevelPackagesEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().sessionLevelPackagesEnabled(); + return this.sessionLevelPackagesEnabled; } /** @@ -185,10 +253,7 @@ public Boolean sessionLevelPackagesEnabled() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withSessionLevelPackagesEnabled(Boolean sessionLevelPackagesEnabled) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withSessionLevelPackagesEnabled(sessionLevelPackagesEnabled); + this.sessionLevelPackagesEnabled = sessionLevelPackagesEnabled; return this; } @@ -198,7 +263,7 @@ public BigDataPoolResourceInfoInner withSessionLevelPackagesEnabled(Boolean sess * @return the cacheSize value. */ public Integer cacheSize() { - return this.innerProperties() == null ? null : this.innerProperties().cacheSize(); + return this.cacheSize; } /** @@ -208,10 +273,7 @@ public Integer cacheSize() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withCacheSize(Integer cacheSize) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withCacheSize(cacheSize); + this.cacheSize = cacheSize; return this; } @@ -221,7 +283,7 @@ public BigDataPoolResourceInfoInner withCacheSize(Integer cacheSize) { * @return the dynamicExecutorAllocation value. */ public DynamicExecutorAllocation dynamicExecutorAllocation() { - return this.innerProperties() == null ? null : this.innerProperties().dynamicExecutorAllocation(); + return this.dynamicExecutorAllocation; } /** @@ -232,10 +294,7 @@ public DynamicExecutorAllocation dynamicExecutorAllocation() { */ public BigDataPoolResourceInfoInner withDynamicExecutorAllocation( DynamicExecutorAllocation dynamicExecutorAllocation) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withDynamicExecutorAllocation(dynamicExecutorAllocation); + this.dynamicExecutorAllocation = dynamicExecutorAllocation; return this; } @@ -245,7 +304,7 @@ public BigDataPoolResourceInfoInner withDynamicExecutorAllocation( * @return the sparkEventsFolder value. */ public String sparkEventsFolder() { - return this.innerProperties() == null ? null : this.innerProperties().sparkEventsFolder(); + return this.sparkEventsFolder; } /** @@ -255,10 +314,7 @@ public String sparkEventsFolder() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withSparkEventsFolder(String sparkEventsFolder) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withSparkEventsFolder(sparkEventsFolder); + this.sparkEventsFolder = sparkEventsFolder; return this; } @@ -268,7 +324,7 @@ public BigDataPoolResourceInfoInner withSparkEventsFolder(String sparkEventsFold * @return the nodeCount value. */ public Integer nodeCount() { - return this.innerProperties() == null ? null : this.innerProperties().nodeCount(); + return this.nodeCount; } /** @@ -278,10 +334,7 @@ public Integer nodeCount() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withNodeCount(Integer nodeCount) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withNodeCount(nodeCount); + this.nodeCount = nodeCount; return this; } @@ -291,7 +344,7 @@ public BigDataPoolResourceInfoInner withNodeCount(Integer nodeCount) { * @return the libraryRequirements value. */ public LibraryRequirements libraryRequirements() { - return this.innerProperties() == null ? null : this.innerProperties().libraryRequirements(); + return this.libraryRequirements; } /** @@ -301,10 +354,7 @@ public LibraryRequirements libraryRequirements() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withLibraryRequirements(LibraryRequirements libraryRequirements) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withLibraryRequirements(libraryRequirements); + this.libraryRequirements = libraryRequirements; return this; } @@ -314,7 +364,7 @@ public BigDataPoolResourceInfoInner withLibraryRequirements(LibraryRequirements * @return the customLibraries value. */ public List customLibraries() { - return this.innerProperties() == null ? null : this.innerProperties().customLibraries(); + return this.customLibraries; } /** @@ -324,10 +374,7 @@ public List customLibraries() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withCustomLibraries(List customLibraries) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withCustomLibraries(customLibraries); + this.customLibraries = customLibraries; return this; } @@ -338,7 +385,7 @@ public BigDataPoolResourceInfoInner withCustomLibraries(List custom * @return the sparkConfigProperties value. */ public SparkConfigProperties sparkConfigProperties() { - return this.innerProperties() == null ? null : this.innerProperties().sparkConfigProperties(); + return this.sparkConfigProperties; } /** @@ -349,10 +396,7 @@ public SparkConfigProperties sparkConfigProperties() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withSparkConfigProperties(SparkConfigProperties sparkConfigProperties) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withSparkConfigProperties(sparkConfigProperties); + this.sparkConfigProperties = sparkConfigProperties; return this; } @@ -362,7 +406,7 @@ public BigDataPoolResourceInfoInner withSparkConfigProperties(SparkConfigPropert * @return the sparkVersion value. */ public String sparkVersion() { - return this.innerProperties() == null ? null : this.innerProperties().sparkVersion(); + return this.sparkVersion; } /** @@ -372,10 +416,7 @@ public String sparkVersion() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withSparkVersion(String sparkVersion) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withSparkVersion(sparkVersion); + this.sparkVersion = sparkVersion; return this; } @@ -385,7 +426,7 @@ public BigDataPoolResourceInfoInner withSparkVersion(String sparkVersion) { * @return the defaultSparkLogFolder value. */ public String defaultSparkLogFolder() { - return this.innerProperties() == null ? null : this.innerProperties().defaultSparkLogFolder(); + return this.defaultSparkLogFolder; } /** @@ -395,10 +436,7 @@ public String defaultSparkLogFolder() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withDefaultSparkLogFolder(String defaultSparkLogFolder) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withDefaultSparkLogFolder(defaultSparkLogFolder); + this.defaultSparkLogFolder = defaultSparkLogFolder; return this; } @@ -408,7 +446,7 @@ public BigDataPoolResourceInfoInner withDefaultSparkLogFolder(String defaultSpar * @return the nodeSize value. */ public NodeSize nodeSize() { - return this.innerProperties() == null ? null : this.innerProperties().nodeSize(); + return this.nodeSize; } /** @@ -418,10 +456,7 @@ public NodeSize nodeSize() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withNodeSize(NodeSize nodeSize) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withNodeSize(nodeSize); + this.nodeSize = nodeSize; return this; } @@ -431,7 +466,7 @@ public BigDataPoolResourceInfoInner withNodeSize(NodeSize nodeSize) { * @return the nodeSizeFamily value. */ public NodeSizeFamily nodeSizeFamily() { - return this.innerProperties() == null ? null : this.innerProperties().nodeSizeFamily(); + return this.nodeSizeFamily; } /** @@ -441,10 +476,7 @@ public NodeSizeFamily nodeSizeFamily() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withNodeSizeFamily(NodeSizeFamily nodeSizeFamily) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withNodeSizeFamily(nodeSizeFamily); + this.nodeSizeFamily = nodeSizeFamily; return this; } @@ -454,7 +486,21 @@ public BigDataPoolResourceInfoInner withNodeSizeFamily(NodeSizeFamily nodeSizeFa * @return the lastSucceededTimestamp value. */ public OffsetDateTime lastSucceededTimestamp() { - return this.innerProperties() == null ? null : this.innerProperties().lastSucceededTimestamp(); + return this.lastSucceededTimestamp; + } + + /** {@inheritDoc} */ + @Override + public BigDataPoolResourceInfoInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public BigDataPoolResourceInfoInner withTags(Map tags) { + super.withTags(tags); + return this; } /** @@ -463,8 +509,23 @@ public OffsetDateTime lastSucceededTimestamp() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (autoScale() != null) { + autoScale().validate(); + } + if (autoPause() != null) { + autoPause().validate(); + } + if (dynamicExecutorAllocation() != null) { + dynamicExecutorAllocation().validate(); + } + if (libraryRequirements() != null) { + libraryRequirements().validate(); + } + if (customLibraries() != null) { + customLibraries().forEach(e -> e.validate()); + } + if (sparkConfigProperties() != null) { + sparkConfigProperties().validate(); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/BigDataPoolResourceProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/BigDataPoolResourceProperties.java deleted file mode 100644 index 918608da1d773..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/BigDataPoolResourceProperties.java +++ /dev/null @@ -1,512 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.AutoPauseProperties; -import com.azure.resourcemanager.synapse.models.AutoScaleProperties; -import com.azure.resourcemanager.synapse.models.DynamicExecutorAllocation; -import com.azure.resourcemanager.synapse.models.LibraryRequirements; -import com.azure.resourcemanager.synapse.models.NodeSize; -import com.azure.resourcemanager.synapse.models.NodeSizeFamily; -import com.azure.resourcemanager.synapse.models.SparkConfigProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Spark pool properties Properties of a Big Data pool powered by Apache Spark. */ -@Fluent -public final class BigDataPoolResourceProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BigDataPoolResourceProperties.class); - - /* - * The state of the Big Data pool. - */ - @JsonProperty(value = "provisioningState") - private String provisioningState; - - /* - * Spark pool auto-scaling properties Auto-scaling properties - */ - @JsonProperty(value = "autoScale") - private AutoScaleProperties autoScale; - - /* - * The time when the Big Data pool was created. - */ - @JsonProperty(value = "creationDate") - private OffsetDateTime creationDate; - - /* - * Spark pool auto-pausing properties Auto-pausing properties - */ - @JsonProperty(value = "autoPause") - private AutoPauseProperties autoPause; - - /* - * Whether compute isolation is required or not. - */ - @JsonProperty(value = "isComputeIsolationEnabled") - private Boolean isComputeIsolationEnabled; - - /* - * Whether session level packages enabled. - */ - @JsonProperty(value = "sessionLevelPackagesEnabled") - private Boolean sessionLevelPackagesEnabled; - - /* - * The cache size - */ - @JsonProperty(value = "cacheSize") - private Integer cacheSize; - - /* - * Dynamic Executor Allocation - */ - @JsonProperty(value = "dynamicExecutorAllocation") - private DynamicExecutorAllocation dynamicExecutorAllocation; - - /* - * The Spark events folder - */ - @JsonProperty(value = "sparkEventsFolder") - private String sparkEventsFolder; - - /* - * The number of nodes in the Big Data pool. - */ - @JsonProperty(value = "nodeCount") - private Integer nodeCount; - - /* - * Spark pool library version requirements Library version requirements - */ - @JsonProperty(value = "libraryRequirements") - private LibraryRequirements libraryRequirements; - - /* - * List of custom libraries/packages associated with the spark pool. - */ - @JsonProperty(value = "customLibraries") - private List customLibraries; - - /* - * Spark pool Config Properties Spark configuration file to specify - * additional properties - */ - @JsonProperty(value = "sparkConfigProperties") - private SparkConfigProperties sparkConfigProperties; - - /* - * The Apache Spark version. - */ - @JsonProperty(value = "sparkVersion") - private String sparkVersion; - - /* - * The default folder where Spark logs will be written. - */ - @JsonProperty(value = "defaultSparkLogFolder") - private String defaultSparkLogFolder; - - /* - * The level of compute power that each node in the Big Data pool has. - */ - @JsonProperty(value = "nodeSize") - private NodeSize nodeSize; - - /* - * The kind of nodes that the Big Data pool provides. - */ - @JsonProperty(value = "nodeSizeFamily") - private NodeSizeFamily nodeSizeFamily; - - /* - * The time when the Big Data pool was updated successfully. - */ - @JsonProperty(value = "lastSucceededTimestamp", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastSucceededTimestamp; - - /** - * Get the provisioningState property: The state of the Big Data pool. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState property: The state of the Big Data pool. - * - * @param provisioningState the provisioningState value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the autoScale property: Spark pool auto-scaling properties Auto-scaling properties. - * - * @return the autoScale value. - */ - public AutoScaleProperties autoScale() { - return this.autoScale; - } - - /** - * Set the autoScale property: Spark pool auto-scaling properties Auto-scaling properties. - * - * @param autoScale the autoScale value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withAutoScale(AutoScaleProperties autoScale) { - this.autoScale = autoScale; - return this; - } - - /** - * Get the creationDate property: The time when the Big Data pool was created. - * - * @return the creationDate value. - */ - public OffsetDateTime creationDate() { - return this.creationDate; - } - - /** - * Set the creationDate property: The time when the Big Data pool was created. - * - * @param creationDate the creationDate value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withCreationDate(OffsetDateTime creationDate) { - this.creationDate = creationDate; - return this; - } - - /** - * Get the autoPause property: Spark pool auto-pausing properties Auto-pausing properties. - * - * @return the autoPause value. - */ - public AutoPauseProperties autoPause() { - return this.autoPause; - } - - /** - * Set the autoPause property: Spark pool auto-pausing properties Auto-pausing properties. - * - * @param autoPause the autoPause value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withAutoPause(AutoPauseProperties autoPause) { - this.autoPause = autoPause; - return this; - } - - /** - * Get the isComputeIsolationEnabled property: Whether compute isolation is required or not. - * - * @return the isComputeIsolationEnabled value. - */ - public Boolean isComputeIsolationEnabled() { - return this.isComputeIsolationEnabled; - } - - /** - * Set the isComputeIsolationEnabled property: Whether compute isolation is required or not. - * - * @param isComputeIsolationEnabled the isComputeIsolationEnabled value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withIsComputeIsolationEnabled(Boolean isComputeIsolationEnabled) { - this.isComputeIsolationEnabled = isComputeIsolationEnabled; - return this; - } - - /** - * Get the sessionLevelPackagesEnabled property: Whether session level packages enabled. - * - * @return the sessionLevelPackagesEnabled value. - */ - public Boolean sessionLevelPackagesEnabled() { - return this.sessionLevelPackagesEnabled; - } - - /** - * Set the sessionLevelPackagesEnabled property: Whether session level packages enabled. - * - * @param sessionLevelPackagesEnabled the sessionLevelPackagesEnabled value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withSessionLevelPackagesEnabled(Boolean sessionLevelPackagesEnabled) { - this.sessionLevelPackagesEnabled = sessionLevelPackagesEnabled; - return this; - } - - /** - * Get the cacheSize property: The cache size. - * - * @return the cacheSize value. - */ - public Integer cacheSize() { - return this.cacheSize; - } - - /** - * Set the cacheSize property: The cache size. - * - * @param cacheSize the cacheSize value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withCacheSize(Integer cacheSize) { - this.cacheSize = cacheSize; - return this; - } - - /** - * Get the dynamicExecutorAllocation property: Dynamic Executor Allocation. - * - * @return the dynamicExecutorAllocation value. - */ - public DynamicExecutorAllocation dynamicExecutorAllocation() { - return this.dynamicExecutorAllocation; - } - - /** - * Set the dynamicExecutorAllocation property: Dynamic Executor Allocation. - * - * @param dynamicExecutorAllocation the dynamicExecutorAllocation value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withDynamicExecutorAllocation( - DynamicExecutorAllocation dynamicExecutorAllocation) { - this.dynamicExecutorAllocation = dynamicExecutorAllocation; - return this; - } - - /** - * Get the sparkEventsFolder property: The Spark events folder. - * - * @return the sparkEventsFolder value. - */ - public String sparkEventsFolder() { - return this.sparkEventsFolder; - } - - /** - * Set the sparkEventsFolder property: The Spark events folder. - * - * @param sparkEventsFolder the sparkEventsFolder value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withSparkEventsFolder(String sparkEventsFolder) { - this.sparkEventsFolder = sparkEventsFolder; - return this; - } - - /** - * Get the nodeCount property: The number of nodes in the Big Data pool. - * - * @return the nodeCount value. - */ - public Integer nodeCount() { - return this.nodeCount; - } - - /** - * Set the nodeCount property: The number of nodes in the Big Data pool. - * - * @param nodeCount the nodeCount value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withNodeCount(Integer nodeCount) { - this.nodeCount = nodeCount; - return this; - } - - /** - * Get the libraryRequirements property: Spark pool library version requirements Library version requirements. - * - * @return the libraryRequirements value. - */ - public LibraryRequirements libraryRequirements() { - return this.libraryRequirements; - } - - /** - * Set the libraryRequirements property: Spark pool library version requirements Library version requirements. - * - * @param libraryRequirements the libraryRequirements value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withLibraryRequirements(LibraryRequirements libraryRequirements) { - this.libraryRequirements = libraryRequirements; - return this; - } - - /** - * Get the customLibraries property: List of custom libraries/packages associated with the spark pool. - * - * @return the customLibraries value. - */ - public List customLibraries() { - return this.customLibraries; - } - - /** - * Set the customLibraries property: List of custom libraries/packages associated with the spark pool. - * - * @param customLibraries the customLibraries value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withCustomLibraries(List customLibraries) { - this.customLibraries = customLibraries; - return this; - } - - /** - * Get the sparkConfigProperties property: Spark pool Config Properties Spark configuration file to specify - * additional properties. - * - * @return the sparkConfigProperties value. - */ - public SparkConfigProperties sparkConfigProperties() { - return this.sparkConfigProperties; - } - - /** - * Set the sparkConfigProperties property: Spark pool Config Properties Spark configuration file to specify - * additional properties. - * - * @param sparkConfigProperties the sparkConfigProperties value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withSparkConfigProperties(SparkConfigProperties sparkConfigProperties) { - this.sparkConfigProperties = sparkConfigProperties; - return this; - } - - /** - * Get the sparkVersion property: The Apache Spark version. - * - * @return the sparkVersion value. - */ - public String sparkVersion() { - return this.sparkVersion; - } - - /** - * Set the sparkVersion property: The Apache Spark version. - * - * @param sparkVersion the sparkVersion value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withSparkVersion(String sparkVersion) { - this.sparkVersion = sparkVersion; - return this; - } - - /** - * Get the defaultSparkLogFolder property: The default folder where Spark logs will be written. - * - * @return the defaultSparkLogFolder value. - */ - public String defaultSparkLogFolder() { - return this.defaultSparkLogFolder; - } - - /** - * Set the defaultSparkLogFolder property: The default folder where Spark logs will be written. - * - * @param defaultSparkLogFolder the defaultSparkLogFolder value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withDefaultSparkLogFolder(String defaultSparkLogFolder) { - this.defaultSparkLogFolder = defaultSparkLogFolder; - return this; - } - - /** - * Get the nodeSize property: The level of compute power that each node in the Big Data pool has. - * - * @return the nodeSize value. - */ - public NodeSize nodeSize() { - return this.nodeSize; - } - - /** - * Set the nodeSize property: The level of compute power that each node in the Big Data pool has. - * - * @param nodeSize the nodeSize value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withNodeSize(NodeSize nodeSize) { - this.nodeSize = nodeSize; - return this; - } - - /** - * Get the nodeSizeFamily property: The kind of nodes that the Big Data pool provides. - * - * @return the nodeSizeFamily value. - */ - public NodeSizeFamily nodeSizeFamily() { - return this.nodeSizeFamily; - } - - /** - * Set the nodeSizeFamily property: The kind of nodes that the Big Data pool provides. - * - * @param nodeSizeFamily the nodeSizeFamily value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withNodeSizeFamily(NodeSizeFamily nodeSizeFamily) { - this.nodeSizeFamily = nodeSizeFamily; - return this; - } - - /** - * Get the lastSucceededTimestamp property: The time when the Big Data pool was updated successfully. - * - * @return the lastSucceededTimestamp value. - */ - public OffsetDateTime lastSucceededTimestamp() { - return this.lastSucceededTimestamp; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (autoScale() != null) { - autoScale().validate(); - } - if (autoPause() != null) { - autoPause().validate(); - } - if (dynamicExecutorAllocation() != null) { - dynamicExecutorAllocation().validate(); - } - if (libraryRequirements() != null) { - libraryRequirements().validate(); - } - if (customLibraries() != null) { - customLibraries().forEach(e -> e.validate()); - } - if (sparkConfigProperties() != null) { - sparkConfigProperties().validate(); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/CheckNameResultInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/CheckNameResultInner.java new file mode 100644 index 0000000000000..a2a72a787e0de --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/CheckNameResultInner.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.models.Reason; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The result returned from a check name availability request. */ +@Fluent +public final class CheckNameResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CheckNameResultInner.class); + + /* + * Specifies a Boolean value that indicates if the name is available. + */ + @JsonProperty(value = "nameAvailable") + private Boolean nameAvailable; + + /* + * The name that was checked. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Message indicating an unavailable name due to a conflict, or a + * description of the naming rules that are violated. + */ + @JsonProperty(value = "message") + private String message; + + /* + * Message providing the reason why the given name is invalid. + */ + @JsonProperty(value = "reason") + private Reason reason; + + /** + * Get the nameAvailable property: Specifies a Boolean value that indicates if the name is available. + * + * @return the nameAvailable value. + */ + public Boolean nameAvailable() { + return this.nameAvailable; + } + + /** + * Set the nameAvailable property: Specifies a Boolean value that indicates if the name is available. + * + * @param nameAvailable the nameAvailable value to set. + * @return the CheckNameResultInner object itself. + */ + public CheckNameResultInner withNameAvailable(Boolean nameAvailable) { + this.nameAvailable = nameAvailable; + return this; + } + + /** + * Get the name property: The name that was checked. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name that was checked. + * + * @param name the name value to set. + * @return the CheckNameResultInner object itself. + */ + public CheckNameResultInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the message property: Message indicating an unavailable name due to a conflict, or a description of the + * naming rules that are violated. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: Message indicating an unavailable name due to a conflict, or a description of the + * naming rules that are violated. + * + * @param message the message value to set. + * @return the CheckNameResultInner object itself. + */ + public CheckNameResultInner withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the reason property: Message providing the reason why the given name is invalid. + * + * @return the reason value. + */ + public Reason reason() { + return this.reason; + } + + /** + * Set the reason property: Message providing the reason why the given name is invalid. + * + * @param reason the reason value to set. + * @return the CheckNameResultInner object itself. + */ + public CheckNameResultInner withReason(Reason reason) { + this.reason = reason; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ClusterPrincipalAssignmentInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ClusterPrincipalAssignmentInner.java new file mode 100644 index 0000000000000..a353fd8051a0d --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ClusterPrincipalAssignmentInner.java @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.models.ClusterPrincipalRole; +import com.azure.resourcemanager.synapse.models.PrincipalType; +import com.azure.resourcemanager.synapse.models.ResourceProvisioningState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Class representing a cluster principal assignment. */ +@JsonFlatten +@Fluent +public class ClusterPrincipalAssignmentInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterPrincipalAssignmentInner.class); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy + * information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /* + * The principal ID assigned to the cluster principal. It can be a user + * email, application ID, or security group name. + */ + @JsonProperty(value = "properties.principalId") + private String principalId; + + /* + * Cluster principal role. + */ + @JsonProperty(value = "properties.role") + private ClusterPrincipalRole role; + + /* + * The tenant id of the principal + */ + @JsonProperty(value = "properties.tenantId") + private String tenantId; + + /* + * Principal type. + */ + @JsonProperty(value = "properties.principalType") + private PrincipalType principalType; + + /* + * The tenant name of the principal + */ + @JsonProperty(value = "properties.tenantName", access = JsonProperty.Access.WRITE_ONLY) + private String tenantName; + + /* + * The principal name + */ + @JsonProperty(value = "properties.principalName", access = JsonProperty.Access.WRITE_ONLY) + private String principalName; + + /* + * The provisioned state of the resource. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ResourceProvisioningState provisioningState; + + /** + * 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 principalId property: The principal ID assigned to the cluster principal. It can be a user email, + * application ID, or security group name. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Set the principalId property: The principal ID assigned to the cluster principal. It can be a user email, + * application ID, or security group name. + * + * @param principalId the principalId value to set. + * @return the ClusterPrincipalAssignmentInner object itself. + */ + public ClusterPrincipalAssignmentInner withPrincipalId(String principalId) { + this.principalId = principalId; + return this; + } + + /** + * Get the role property: Cluster principal role. + * + * @return the role value. + */ + public ClusterPrincipalRole role() { + return this.role; + } + + /** + * Set the role property: Cluster principal role. + * + * @param role the role value to set. + * @return the ClusterPrincipalAssignmentInner object itself. + */ + public ClusterPrincipalAssignmentInner withRole(ClusterPrincipalRole role) { + this.role = role; + return this; + } + + /** + * Get the tenantId property: The tenant id of the principal. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: The tenant id of the principal. + * + * @param tenantId the tenantId value to set. + * @return the ClusterPrincipalAssignmentInner object itself. + */ + public ClusterPrincipalAssignmentInner withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the principalType property: Principal type. + * + * @return the principalType value. + */ + public PrincipalType principalType() { + return this.principalType; + } + + /** + * Set the principalType property: Principal type. + * + * @param principalType the principalType value to set. + * @return the ClusterPrincipalAssignmentInner object itself. + */ + public ClusterPrincipalAssignmentInner withPrincipalType(PrincipalType principalType) { + this.principalType = principalType; + return this; + } + + /** + * Get the tenantName property: The tenant name of the principal. + * + * @return the tenantName value. + */ + public String tenantName() { + return this.tenantName; + } + + /** + * Get the principalName property: The principal name. + * + * @return the principalName value. + */ + public String principalName() { + return this.principalName; + } + + /** + * Get the provisioningState property: The provisioned state of the resource. + * + * @return the provisioningState value. + */ + public ResourceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/CmdkeySetupTypeProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/CmdkeySetupTypeProperties.java deleted file mode 100644 index c10079d1d9415..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/CmdkeySetupTypeProperties.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.SecretBase; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Cmdkey command custom setup type properties. */ -@Fluent -public final class CmdkeySetupTypeProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CmdkeySetupTypeProperties.class); - - /* - * The server name of data source access. - */ - @JsonProperty(value = "targetName", required = true) - private Object targetName; - - /* - * The user name of data source access. - */ - @JsonProperty(value = "userName", required = true) - private Object username; - - /* - * The password of data source access. - */ - @JsonProperty(value = "password", required = true) - private SecretBase password; - - /** - * Get the targetName property: The server name of data source access. - * - * @return the targetName value. - */ - public Object targetName() { - return this.targetName; - } - - /** - * Set the targetName property: The server name of data source access. - * - * @param targetName the targetName value to set. - * @return the CmdkeySetupTypeProperties object itself. - */ - public CmdkeySetupTypeProperties withTargetName(Object targetName) { - this.targetName = targetName; - return this; - } - - /** - * Get the username property: The user name of data source access. - * - * @return the username value. - */ - public Object username() { - return this.username; - } - - /** - * Set the username property: The user name of data source access. - * - * @param username the username value to set. - * @return the CmdkeySetupTypeProperties object itself. - */ - public CmdkeySetupTypeProperties withUsername(Object username) { - this.username = username; - return this; - } - - /** - * Get the password property: The password of data source access. - * - * @return the password value. - */ - public SecretBase password() { - return this.password; - } - - /** - * Set the password property: The password of data source access. - * - * @param password the password value to set. - * @return the CmdkeySetupTypeProperties object itself. - */ - public CmdkeySetupTypeProperties withPassword(SecretBase password) { - this.password = password; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (targetName() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property targetName in model CmdkeySetupTypeProperties")); - } - if (username() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property username in model CmdkeySetupTypeProperties")); - } - if (password() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property password in model CmdkeySetupTypeProperties")); - } else { - password().validate(); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataConnectionInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataConnectionInner.java new file mode 100644 index 0000000000000..5dc679d9dd9d2 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataConnectionInner.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.models.EventGridDataConnection; +import com.azure.resourcemanager.synapse.models.EventHubDataConnection; +import com.azure.resourcemanager.synapse.models.IotHubDataConnection; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Class representing a data connection. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "kind", + defaultImpl = DataConnectionInner.class) +@JsonTypeName("DataConnection") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "EventHub", value = EventHubDataConnection.class), + @JsonSubTypes.Type(name = "IotHub", value = IotHubDataConnection.class), + @JsonSubTypes.Type(name = "EventGrid", value = EventGridDataConnection.class) +}) +@Fluent +public class DataConnectionInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DataConnectionInner.class); + + /* + * Resource location. + */ + @JsonProperty(value = "location") + private String location; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy + * information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the location property: Resource location. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Resource location. + * + * @param location the location value to set. + * @return the DataConnectionInner object itself. + */ + public DataConnectionInner withLocation(String location) { + this.location = location; + 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataConnectionValidationInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataConnectionValidationInner.java new file mode 100644 index 0000000000000..3c35d9f3e3856 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataConnectionValidationInner.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Class representing an data connection validation. */ +@Fluent +public final class DataConnectionValidationInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DataConnectionValidationInner.class); + + /* + * The name of the data connection. + */ + @JsonProperty(value = "dataConnectionName") + private String dataConnectionName; + + /* + * The data connection properties to validate. + */ + @JsonProperty(value = "properties") + private DataConnectionInner properties; + + /** + * Get the dataConnectionName property: The name of the data connection. + * + * @return the dataConnectionName value. + */ + public String dataConnectionName() { + return this.dataConnectionName; + } + + /** + * Set the dataConnectionName property: The name of the data connection. + * + * @param dataConnectionName the dataConnectionName value to set. + * @return the DataConnectionValidationInner object itself. + */ + public DataConnectionValidationInner withDataConnectionName(String dataConnectionName) { + this.dataConnectionName = dataConnectionName; + return this; + } + + /** + * Get the properties property: The data connection properties to validate. + * + * @return the properties value. + */ + public DataConnectionInner properties() { + return this.properties; + } + + /** + * Set the properties property: The data connection properties to validate. + * + * @param properties the properties value to set. + * @return the DataConnectionValidationInner object itself. + */ + public DataConnectionValidationInner withProperties(DataConnectionInner properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataConnectionValidationListResultInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataConnectionValidationListResultInner.java new file mode 100644 index 0000000000000..bda1e067fd5bb --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataConnectionValidationListResultInner.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.models.DataConnectionValidationResult; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The list Kusto data connection validation result. */ +@Fluent +public final class DataConnectionValidationListResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DataConnectionValidationListResultInner.class); + + /* + * The list of Kusto data connection validation errors. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value property: The list of Kusto data connection validation errors. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of Kusto data connection validation errors. + * + * @param value the value value to set. + * @return the DataConnectionValidationListResultInner object itself. + */ + public DataConnectionValidationListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataMaskingPolicyInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataMaskingPolicyInner.java index 470e12f14cfe4..aeacd91bf3303 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataMaskingPolicyInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataMaskingPolicyInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.DataMaskingState; @@ -12,16 +13,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** The DataMaskingPolicy model. */ +@JsonFlatten @Fluent -public final class DataMaskingPolicyInner extends ProxyResource { +public class DataMaskingPolicyInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(DataMaskingPolicyInner.class); - /* - * The properties of the data masking policy. - */ - @JsonProperty(value = "properties") - private DataMaskingPolicyProperties innerProperties; - /* * The location of the data masking policy. */ @@ -40,14 +36,33 @@ public final class DataMaskingPolicyInner extends ProxyResource { @JsonProperty(value = "managedBy", access = JsonProperty.Access.WRITE_ONLY) private String managedBy; - /** - * Get the innerProperties property: The properties of the data masking policy. - * - * @return the innerProperties value. + /* + * The state of the data masking policy. */ - private DataMaskingPolicyProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.dataMaskingState") + private DataMaskingState dataMaskingState; + + /* + * The list of the exempt principals. Specifies the semicolon-separated + * list of database users for which the data masking policy does not apply. + * The specified users receive data results without masking for all of the + * database queries. + */ + @JsonProperty(value = "properties.exemptPrincipals") + private String exemptPrincipals; + + /* + * The list of the application principals. This is a legacy parameter and + * is no longer used. + */ + @JsonProperty(value = "properties.applicationPrincipals", access = JsonProperty.Access.WRITE_ONLY) + private String applicationPrincipals; + + /* + * The masking level. This is a legacy parameter and is no longer used. + */ + @JsonProperty(value = "properties.maskingLevel", access = JsonProperty.Access.WRITE_ONLY) + private String maskingLevel; /** * Get the location property: The location of the data masking policy. @@ -82,7 +97,7 @@ public String managedBy() { * @return the dataMaskingState value. */ public DataMaskingState dataMaskingState() { - return this.innerProperties() == null ? null : this.innerProperties().dataMaskingState(); + return this.dataMaskingState; } /** @@ -92,10 +107,7 @@ public DataMaskingState dataMaskingState() { * @return the DataMaskingPolicyInner object itself. */ public DataMaskingPolicyInner withDataMaskingState(DataMaskingState dataMaskingState) { - if (this.innerProperties() == null) { - this.innerProperties = new DataMaskingPolicyProperties(); - } - this.innerProperties().withDataMaskingState(dataMaskingState); + this.dataMaskingState = dataMaskingState; return this; } @@ -107,7 +119,7 @@ public DataMaskingPolicyInner withDataMaskingState(DataMaskingState dataMaskingS * @return the exemptPrincipals value. */ public String exemptPrincipals() { - return this.innerProperties() == null ? null : this.innerProperties().exemptPrincipals(); + return this.exemptPrincipals; } /** @@ -119,10 +131,7 @@ public String exemptPrincipals() { * @return the DataMaskingPolicyInner object itself. */ public DataMaskingPolicyInner withExemptPrincipals(String exemptPrincipals) { - if (this.innerProperties() == null) { - this.innerProperties = new DataMaskingPolicyProperties(); - } - this.innerProperties().withExemptPrincipals(exemptPrincipals); + this.exemptPrincipals = exemptPrincipals; return this; } @@ -133,7 +142,7 @@ public DataMaskingPolicyInner withExemptPrincipals(String exemptPrincipals) { * @return the applicationPrincipals value. */ public String applicationPrincipals() { - return this.innerProperties() == null ? null : this.innerProperties().applicationPrincipals(); + return this.applicationPrincipals; } /** @@ -142,7 +151,7 @@ public String applicationPrincipals() { * @return the maskingLevel value. */ public String maskingLevel() { - return this.innerProperties() == null ? null : this.innerProperties().maskingLevel(); + return this.maskingLevel; } /** @@ -151,8 +160,5 @@ public String maskingLevel() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataMaskingPolicyProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataMaskingPolicyProperties.java deleted file mode 100644 index 13e48242bca62..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataMaskingPolicyProperties.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.DataMaskingState; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The properties of a database data masking policy. */ -@Fluent -public final class DataMaskingPolicyProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataMaskingPolicyProperties.class); - - /* - * The state of the data masking policy. - */ - @JsonProperty(value = "dataMaskingState", required = true) - private DataMaskingState dataMaskingState; - - /* - * The list of the exempt principals. Specifies the semicolon-separated - * list of database users for which the data masking policy does not apply. - * The specified users receive data results without masking for all of the - * database queries. - */ - @JsonProperty(value = "exemptPrincipals") - private String exemptPrincipals; - - /* - * The list of the application principals. This is a legacy parameter and - * is no longer used. - */ - @JsonProperty(value = "applicationPrincipals", access = JsonProperty.Access.WRITE_ONLY) - private String applicationPrincipals; - - /* - * The masking level. This is a legacy parameter and is no longer used. - */ - @JsonProperty(value = "maskingLevel", access = JsonProperty.Access.WRITE_ONLY) - private String maskingLevel; - - /** - * Get the dataMaskingState property: The state of the data masking policy. - * - * @return the dataMaskingState value. - */ - public DataMaskingState dataMaskingState() { - return this.dataMaskingState; - } - - /** - * Set the dataMaskingState property: The state of the data masking policy. - * - * @param dataMaskingState the dataMaskingState value to set. - * @return the DataMaskingPolicyProperties object itself. - */ - public DataMaskingPolicyProperties withDataMaskingState(DataMaskingState dataMaskingState) { - this.dataMaskingState = dataMaskingState; - return this; - } - - /** - * Get the exemptPrincipals property: The list of the exempt principals. Specifies the semicolon-separated list of - * database users for which the data masking policy does not apply. The specified users receive data results without - * masking for all of the database queries. - * - * @return the exemptPrincipals value. - */ - public String exemptPrincipals() { - return this.exemptPrincipals; - } - - /** - * Set the exemptPrincipals property: The list of the exempt principals. Specifies the semicolon-separated list of - * database users for which the data masking policy does not apply. The specified users receive data results without - * masking for all of the database queries. - * - * @param exemptPrincipals the exemptPrincipals value to set. - * @return the DataMaskingPolicyProperties object itself. - */ - public DataMaskingPolicyProperties withExemptPrincipals(String exemptPrincipals) { - this.exemptPrincipals = exemptPrincipals; - return this; - } - - /** - * Get the applicationPrincipals property: The list of the application principals. This is a legacy parameter and is - * no longer used. - * - * @return the applicationPrincipals value. - */ - public String applicationPrincipals() { - return this.applicationPrincipals; - } - - /** - * Get the maskingLevel property: The masking level. This is a legacy parameter and is no longer used. - * - * @return the maskingLevel value. - */ - public String maskingLevel() { - return this.maskingLevel; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dataMaskingState() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataMaskingState in model DataMaskingPolicyProperties")); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataMaskingRuleInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataMaskingRuleInner.java index dc513b3d8a8df..f801f9b098336 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataMaskingRuleInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataMaskingRuleInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.DataMaskingFunction; @@ -13,16 +14,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** Represents a Sql pool data masking rule. */ +@JsonFlatten @Fluent -public final class DataMaskingRuleInner extends ProxyResource { +public class DataMaskingRuleInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(DataMaskingRuleInner.class); - /* - * The properties of the resource. - */ - @JsonProperty(value = "properties") - private DataMaskingRuleProperties innerProperties; - /* * The location of the data masking rule. */ @@ -35,14 +31,89 @@ public final class DataMaskingRuleInner extends ProxyResource { @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) private String kind; - /** - * Get the innerProperties property: The properties of the resource. - * - * @return the innerProperties value. + /* + * The rule Id. */ - private DataMaskingRuleProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.id", access = JsonProperty.Access.WRITE_ONLY) + private String idPropertiesId; + + /* + * The alias name. This is a legacy parameter and is no longer used. + */ + @JsonProperty(value = "properties.aliasName") + private String aliasName; + + /* + * The rule state. Used to delete a rule. To delete an existing rule, + * specify the schemaName, tableName, columnName, maskingFunction, and + * specify ruleState as disabled. However, if the rule doesn't already + * exist, the rule will be created with ruleState set to enabled, + * regardless of the provided value of ruleState. + */ + @JsonProperty(value = "properties.ruleState") + private DataMaskingRuleState ruleState; + + /* + * The schema name on which the data masking rule is applied. + */ + @JsonProperty(value = "properties.schemaName") + private String schemaName; + + /* + * The table name on which the data masking rule is applied. + */ + @JsonProperty(value = "properties.tableName") + private String tableName; + + /* + * The column name on which the data masking rule is applied. + */ + @JsonProperty(value = "properties.columnName") + private String columnName; + + /* + * The masking function that is used for the data masking rule. + */ + @JsonProperty(value = "properties.maskingFunction") + private DataMaskingFunction maskingFunction; + + /* + * The numberFrom property of the masking rule. Required if maskingFunction + * is set to Number, otherwise this parameter will be ignored. + */ + @JsonProperty(value = "properties.numberFrom") + private String numberFrom; + + /* + * The numberTo property of the data masking rule. Required if + * maskingFunction is set to Number, otherwise this parameter will be + * ignored. + */ + @JsonProperty(value = "properties.numberTo") + private String numberTo; + + /* + * If maskingFunction is set to Text, the number of characters to show + * unmasked in the beginning of the string. Otherwise, this parameter will + * be ignored. + */ + @JsonProperty(value = "properties.prefixSize") + private String prefixSize; + + /* + * If maskingFunction is set to Text, the number of characters to show + * unmasked at the end of the string. Otherwise, this parameter will be + * ignored. + */ + @JsonProperty(value = "properties.suffixSize") + private String suffixSize; + + /* + * If maskingFunction is set to Text, the character to use for masking the + * unexposed part of the string. Otherwise, this parameter will be ignored. + */ + @JsonProperty(value = "properties.replacementString") + private String replacementString; /** * Get the location property: The location of the data masking rule. @@ -63,12 +134,12 @@ public String kind() { } /** - * Get the id property: The rule Id. + * Get the idPropertiesId property: The rule Id. * - * @return the id value. + * @return the idPropertiesId value. */ public String idPropertiesId() { - return this.innerProperties() == null ? null : this.innerProperties().id(); + return this.idPropertiesId; } /** @@ -77,7 +148,7 @@ public String idPropertiesId() { * @return the aliasName value. */ public String aliasName() { - return this.innerProperties() == null ? null : this.innerProperties().aliasName(); + return this.aliasName; } /** @@ -87,10 +158,7 @@ public String aliasName() { * @return the DataMaskingRuleInner object itself. */ public DataMaskingRuleInner withAliasName(String aliasName) { - if (this.innerProperties() == null) { - this.innerProperties = new DataMaskingRuleProperties(); - } - this.innerProperties().withAliasName(aliasName); + this.aliasName = aliasName; return this; } @@ -103,7 +171,7 @@ public DataMaskingRuleInner withAliasName(String aliasName) { * @return the ruleState value. */ public DataMaskingRuleState ruleState() { - return this.innerProperties() == null ? null : this.innerProperties().ruleState(); + return this.ruleState; } /** @@ -116,10 +184,7 @@ public DataMaskingRuleState ruleState() { * @return the DataMaskingRuleInner object itself. */ public DataMaskingRuleInner withRuleState(DataMaskingRuleState ruleState) { - if (this.innerProperties() == null) { - this.innerProperties = new DataMaskingRuleProperties(); - } - this.innerProperties().withRuleState(ruleState); + this.ruleState = ruleState; return this; } @@ -129,7 +194,7 @@ public DataMaskingRuleInner withRuleState(DataMaskingRuleState ruleState) { * @return the schemaName value. */ public String schemaName() { - return this.innerProperties() == null ? null : this.innerProperties().schemaName(); + return this.schemaName; } /** @@ -139,10 +204,7 @@ public String schemaName() { * @return the DataMaskingRuleInner object itself. */ public DataMaskingRuleInner withSchemaName(String schemaName) { - if (this.innerProperties() == null) { - this.innerProperties = new DataMaskingRuleProperties(); - } - this.innerProperties().withSchemaName(schemaName); + this.schemaName = schemaName; return this; } @@ -152,7 +214,7 @@ public DataMaskingRuleInner withSchemaName(String schemaName) { * @return the tableName value. */ public String tableName() { - return this.innerProperties() == null ? null : this.innerProperties().tableName(); + return this.tableName; } /** @@ -162,10 +224,7 @@ public String tableName() { * @return the DataMaskingRuleInner object itself. */ public DataMaskingRuleInner withTableName(String tableName) { - if (this.innerProperties() == null) { - this.innerProperties = new DataMaskingRuleProperties(); - } - this.innerProperties().withTableName(tableName); + this.tableName = tableName; return this; } @@ -175,7 +234,7 @@ public DataMaskingRuleInner withTableName(String tableName) { * @return the columnName value. */ public String columnName() { - return this.innerProperties() == null ? null : this.innerProperties().columnName(); + return this.columnName; } /** @@ -185,10 +244,7 @@ public String columnName() { * @return the DataMaskingRuleInner object itself. */ public DataMaskingRuleInner withColumnName(String columnName) { - if (this.innerProperties() == null) { - this.innerProperties = new DataMaskingRuleProperties(); - } - this.innerProperties().withColumnName(columnName); + this.columnName = columnName; return this; } @@ -198,7 +254,7 @@ public DataMaskingRuleInner withColumnName(String columnName) { * @return the maskingFunction value. */ public DataMaskingFunction maskingFunction() { - return this.innerProperties() == null ? null : this.innerProperties().maskingFunction(); + return this.maskingFunction; } /** @@ -208,10 +264,7 @@ public DataMaskingFunction maskingFunction() { * @return the DataMaskingRuleInner object itself. */ public DataMaskingRuleInner withMaskingFunction(DataMaskingFunction maskingFunction) { - if (this.innerProperties() == null) { - this.innerProperties = new DataMaskingRuleProperties(); - } - this.innerProperties().withMaskingFunction(maskingFunction); + this.maskingFunction = maskingFunction; return this; } @@ -222,7 +275,7 @@ public DataMaskingRuleInner withMaskingFunction(DataMaskingFunction maskingFunct * @return the numberFrom value. */ public String numberFrom() { - return this.innerProperties() == null ? null : this.innerProperties().numberFrom(); + return this.numberFrom; } /** @@ -233,10 +286,7 @@ public String numberFrom() { * @return the DataMaskingRuleInner object itself. */ public DataMaskingRuleInner withNumberFrom(String numberFrom) { - if (this.innerProperties() == null) { - this.innerProperties = new DataMaskingRuleProperties(); - } - this.innerProperties().withNumberFrom(numberFrom); + this.numberFrom = numberFrom; return this; } @@ -247,7 +297,7 @@ public DataMaskingRuleInner withNumberFrom(String numberFrom) { * @return the numberTo value. */ public String numberTo() { - return this.innerProperties() == null ? null : this.innerProperties().numberTo(); + return this.numberTo; } /** @@ -258,10 +308,7 @@ public String numberTo() { * @return the DataMaskingRuleInner object itself. */ public DataMaskingRuleInner withNumberTo(String numberTo) { - if (this.innerProperties() == null) { - this.innerProperties = new DataMaskingRuleProperties(); - } - this.innerProperties().withNumberTo(numberTo); + this.numberTo = numberTo; return this; } @@ -272,7 +319,7 @@ public DataMaskingRuleInner withNumberTo(String numberTo) { * @return the prefixSize value. */ public String prefixSize() { - return this.innerProperties() == null ? null : this.innerProperties().prefixSize(); + return this.prefixSize; } /** @@ -283,10 +330,7 @@ public String prefixSize() { * @return the DataMaskingRuleInner object itself. */ public DataMaskingRuleInner withPrefixSize(String prefixSize) { - if (this.innerProperties() == null) { - this.innerProperties = new DataMaskingRuleProperties(); - } - this.innerProperties().withPrefixSize(prefixSize); + this.prefixSize = prefixSize; return this; } @@ -297,7 +341,7 @@ public DataMaskingRuleInner withPrefixSize(String prefixSize) { * @return the suffixSize value. */ public String suffixSize() { - return this.innerProperties() == null ? null : this.innerProperties().suffixSize(); + return this.suffixSize; } /** @@ -308,10 +352,7 @@ public String suffixSize() { * @return the DataMaskingRuleInner object itself. */ public DataMaskingRuleInner withSuffixSize(String suffixSize) { - if (this.innerProperties() == null) { - this.innerProperties = new DataMaskingRuleProperties(); - } - this.innerProperties().withSuffixSize(suffixSize); + this.suffixSize = suffixSize; return this; } @@ -322,7 +363,7 @@ public DataMaskingRuleInner withSuffixSize(String suffixSize) { * @return the replacementString value. */ public String replacementString() { - return this.innerProperties() == null ? null : this.innerProperties().replacementString(); + return this.replacementString; } /** @@ -333,10 +374,7 @@ public String replacementString() { * @return the DataMaskingRuleInner object itself. */ public DataMaskingRuleInner withReplacementString(String replacementString) { - if (this.innerProperties() == null) { - this.innerProperties = new DataMaskingRuleProperties(); - } - this.innerProperties().withReplacementString(replacementString); + this.replacementString = replacementString; return this; } @@ -346,8 +384,5 @@ public DataMaskingRuleInner withReplacementString(String replacementString) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataMaskingRuleProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataMaskingRuleProperties.java deleted file mode 100644 index ce77df378ab24..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataMaskingRuleProperties.java +++ /dev/null @@ -1,379 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.DataMaskingFunction; -import com.azure.resourcemanager.synapse.models.DataMaskingRuleState; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The properties of a Sql pool data masking rule. */ -@Fluent -public final class DataMaskingRuleProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataMaskingRuleProperties.class); - - /* - * The rule Id. - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /* - * The alias name. This is a legacy parameter and is no longer used. - */ - @JsonProperty(value = "aliasName") - private String aliasName; - - /* - * The rule state. Used to delete a rule. To delete an existing rule, - * specify the schemaName, tableName, columnName, maskingFunction, and - * specify ruleState as disabled. However, if the rule doesn't already - * exist, the rule will be created with ruleState set to enabled, - * regardless of the provided value of ruleState. - */ - @JsonProperty(value = "ruleState") - private DataMaskingRuleState ruleState; - - /* - * The schema name on which the data masking rule is applied. - */ - @JsonProperty(value = "schemaName", required = true) - private String schemaName; - - /* - * The table name on which the data masking rule is applied. - */ - @JsonProperty(value = "tableName", required = true) - private String tableName; - - /* - * The column name on which the data masking rule is applied. - */ - @JsonProperty(value = "columnName", required = true) - private String columnName; - - /* - * The masking function that is used for the data masking rule. - */ - @JsonProperty(value = "maskingFunction", required = true) - private DataMaskingFunction maskingFunction; - - /* - * The numberFrom property of the masking rule. Required if maskingFunction - * is set to Number, otherwise this parameter will be ignored. - */ - @JsonProperty(value = "numberFrom") - private String numberFrom; - - /* - * The numberTo property of the data masking rule. Required if - * maskingFunction is set to Number, otherwise this parameter will be - * ignored. - */ - @JsonProperty(value = "numberTo") - private String numberTo; - - /* - * If maskingFunction is set to Text, the number of characters to show - * unmasked in the beginning of the string. Otherwise, this parameter will - * be ignored. - */ - @JsonProperty(value = "prefixSize") - private String prefixSize; - - /* - * If maskingFunction is set to Text, the number of characters to show - * unmasked at the end of the string. Otherwise, this parameter will be - * ignored. - */ - @JsonProperty(value = "suffixSize") - private String suffixSize; - - /* - * If maskingFunction is set to Text, the character to use for masking the - * unexposed part of the string. Otherwise, this parameter will be ignored. - */ - @JsonProperty(value = "replacementString") - private String replacementString; - - /** - * Get the id property: The rule Id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the aliasName property: The alias name. This is a legacy parameter and is no longer used. - * - * @return the aliasName value. - */ - public String aliasName() { - return this.aliasName; - } - - /** - * Set the aliasName property: The alias name. This is a legacy parameter and is no longer used. - * - * @param aliasName the aliasName value to set. - * @return the DataMaskingRuleProperties object itself. - */ - public DataMaskingRuleProperties withAliasName(String aliasName) { - this.aliasName = aliasName; - return this; - } - - /** - * Get the ruleState property: The rule state. Used to delete a rule. To delete an existing rule, specify the - * schemaName, tableName, columnName, maskingFunction, and specify ruleState as disabled. However, if the rule - * doesn't already exist, the rule will be created with ruleState set to enabled, regardless of the provided value - * of ruleState. - * - * @return the ruleState value. - */ - public DataMaskingRuleState ruleState() { - return this.ruleState; - } - - /** - * Set the ruleState property: The rule state. Used to delete a rule. To delete an existing rule, specify the - * schemaName, tableName, columnName, maskingFunction, and specify ruleState as disabled. However, if the rule - * doesn't already exist, the rule will be created with ruleState set to enabled, regardless of the provided value - * of ruleState. - * - * @param ruleState the ruleState value to set. - * @return the DataMaskingRuleProperties object itself. - */ - public DataMaskingRuleProperties withRuleState(DataMaskingRuleState ruleState) { - this.ruleState = ruleState; - return this; - } - - /** - * Get the schemaName property: The schema name on which the data masking rule is applied. - * - * @return the schemaName value. - */ - public String schemaName() { - return this.schemaName; - } - - /** - * Set the schemaName property: The schema name on which the data masking rule is applied. - * - * @param schemaName the schemaName value to set. - * @return the DataMaskingRuleProperties object itself. - */ - public DataMaskingRuleProperties withSchemaName(String schemaName) { - this.schemaName = schemaName; - return this; - } - - /** - * Get the tableName property: The table name on which the data masking rule is applied. - * - * @return the tableName value. - */ - public String tableName() { - return this.tableName; - } - - /** - * Set the tableName property: The table name on which the data masking rule is applied. - * - * @param tableName the tableName value to set. - * @return the DataMaskingRuleProperties object itself. - */ - public DataMaskingRuleProperties withTableName(String tableName) { - this.tableName = tableName; - return this; - } - - /** - * Get the columnName property: The column name on which the data masking rule is applied. - * - * @return the columnName value. - */ - public String columnName() { - return this.columnName; - } - - /** - * Set the columnName property: The column name on which the data masking rule is applied. - * - * @param columnName the columnName value to set. - * @return the DataMaskingRuleProperties object itself. - */ - public DataMaskingRuleProperties withColumnName(String columnName) { - this.columnName = columnName; - return this; - } - - /** - * Get the maskingFunction property: The masking function that is used for the data masking rule. - * - * @return the maskingFunction value. - */ - public DataMaskingFunction maskingFunction() { - return this.maskingFunction; - } - - /** - * Set the maskingFunction property: The masking function that is used for the data masking rule. - * - * @param maskingFunction the maskingFunction value to set. - * @return the DataMaskingRuleProperties object itself. - */ - public DataMaskingRuleProperties withMaskingFunction(DataMaskingFunction maskingFunction) { - this.maskingFunction = maskingFunction; - return this; - } - - /** - * Get the numberFrom property: The numberFrom property of the masking rule. Required if maskingFunction is set to - * Number, otherwise this parameter will be ignored. - * - * @return the numberFrom value. - */ - public String numberFrom() { - return this.numberFrom; - } - - /** - * Set the numberFrom property: The numberFrom property of the masking rule. Required if maskingFunction is set to - * Number, otherwise this parameter will be ignored. - * - * @param numberFrom the numberFrom value to set. - * @return the DataMaskingRuleProperties object itself. - */ - public DataMaskingRuleProperties withNumberFrom(String numberFrom) { - this.numberFrom = numberFrom; - return this; - } - - /** - * Get the numberTo property: The numberTo property of the data masking rule. Required if maskingFunction is set to - * Number, otherwise this parameter will be ignored. - * - * @return the numberTo value. - */ - public String numberTo() { - return this.numberTo; - } - - /** - * Set the numberTo property: The numberTo property of the data masking rule. Required if maskingFunction is set to - * Number, otherwise this parameter will be ignored. - * - * @param numberTo the numberTo value to set. - * @return the DataMaskingRuleProperties object itself. - */ - public DataMaskingRuleProperties withNumberTo(String numberTo) { - this.numberTo = numberTo; - return this; - } - - /** - * Get the prefixSize property: If maskingFunction is set to Text, the number of characters to show unmasked in the - * beginning of the string. Otherwise, this parameter will be ignored. - * - * @return the prefixSize value. - */ - public String prefixSize() { - return this.prefixSize; - } - - /** - * Set the prefixSize property: If maskingFunction is set to Text, the number of characters to show unmasked in the - * beginning of the string. Otherwise, this parameter will be ignored. - * - * @param prefixSize the prefixSize value to set. - * @return the DataMaskingRuleProperties object itself. - */ - public DataMaskingRuleProperties withPrefixSize(String prefixSize) { - this.prefixSize = prefixSize; - return this; - } - - /** - * Get the suffixSize property: If maskingFunction is set to Text, the number of characters to show unmasked at the - * end of the string. Otherwise, this parameter will be ignored. - * - * @return the suffixSize value. - */ - public String suffixSize() { - return this.suffixSize; - } - - /** - * Set the suffixSize property: If maskingFunction is set to Text, the number of characters to show unmasked at the - * end of the string. Otherwise, this parameter will be ignored. - * - * @param suffixSize the suffixSize value to set. - * @return the DataMaskingRuleProperties object itself. - */ - public DataMaskingRuleProperties withSuffixSize(String suffixSize) { - this.suffixSize = suffixSize; - return this; - } - - /** - * Get the replacementString property: If maskingFunction is set to Text, the character to use for masking the - * unexposed part of the string. Otherwise, this parameter will be ignored. - * - * @return the replacementString value. - */ - public String replacementString() { - return this.replacementString; - } - - /** - * Set the replacementString property: If maskingFunction is set to Text, the character to use for masking the - * unexposed part of the string. Otherwise, this parameter will be ignored. - * - * @param replacementString the replacementString value to set. - * @return the DataMaskingRuleProperties object itself. - */ - public DataMaskingRuleProperties withReplacementString(String replacementString) { - this.replacementString = replacementString; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (schemaName() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property schemaName in model DataMaskingRuleProperties")); - } - if (tableName() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property tableName in model DataMaskingRuleProperties")); - } - if (columnName() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property columnName in model DataMaskingRuleProperties")); - } - if (maskingFunction() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property maskingFunction in model DataMaskingRuleProperties")); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataWarehouseUserActivitiesInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataWarehouseUserActivitiesInner.java index 8cb5cdf54d5b1..836be594beb56 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataWarehouseUserActivitiesInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataWarehouseUserActivitiesInner.java @@ -4,31 +4,24 @@ package com.azure.resourcemanager.synapse.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** User activities of a data warehouse. */ -@Fluent -public final class DataWarehouseUserActivitiesInner extends ProxyResource { +@JsonFlatten +@Immutable +public class DataWarehouseUserActivitiesInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(DataWarehouseUserActivitiesInner.class); /* - * Resource properties. + * Count of running and suspended queries. */ - @JsonProperty(value = "properties") - private DataWarehouseUserActivitiesProperties innerProperties; - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private DataWarehouseUserActivitiesProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.activeQueriesCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer activeQueriesCount; /** * Get the activeQueriesCount property: Count of running and suspended queries. @@ -36,7 +29,7 @@ private DataWarehouseUserActivitiesProperties innerProperties() { * @return the activeQueriesCount value. */ public Integer activeQueriesCount() { - return this.innerProperties() == null ? null : this.innerProperties().activeQueriesCount(); + return this.activeQueriesCount; } /** @@ -45,8 +38,5 @@ public Integer activeQueriesCount() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataWarehouseUserActivitiesProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataWarehouseUserActivitiesProperties.java deleted file mode 100644 index f97af82488749..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataWarehouseUserActivitiesProperties.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * User activities of a data warehouse. This currently includes the count of running or suspended queries. For more - * information, please view the sys.dm_pdw_exec_requests dynamic management view (DMV). - */ -@Immutable -public final class DataWarehouseUserActivitiesProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataWarehouseUserActivitiesProperties.class); - - /* - * Count of running and suspended queries. - */ - @JsonProperty(value = "activeQueriesCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer activeQueriesCount; - - /** - * Get the activeQueriesCount property: Count of running and suspended queries. - * - * @return the activeQueriesCount value. - */ - public Integer activeQueriesCount() { - return this.activeQueriesCount; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DatabaseInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DatabaseInner.java new file mode 100644 index 0000000000000..7ce06d4f38f01 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DatabaseInner.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.models.ReadWriteDatabase; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Class representing a Kusto database. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "kind", + defaultImpl = DatabaseInner.class) +@JsonTypeName("Database") +@JsonSubTypes({@JsonSubTypes.Type(name = "ReadWrite", value = ReadWriteDatabase.class)}) +@Fluent +public class DatabaseInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabaseInner.class); + + /* + * Resource location. + */ + @JsonProperty(value = "location") + private String location; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy + * information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the location property: Resource location. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Resource location. + * + * @param location the location value to set. + * @return the DatabaseInner object itself. + */ + public DatabaseInner withLocation(String location) { + this.location = location; + 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DatabasePrincipalAssignmentInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DatabasePrincipalAssignmentInner.java new file mode 100644 index 0000000000000..a9902e37bfba5 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DatabasePrincipalAssignmentInner.java @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.models.DatabasePrincipalRole; +import com.azure.resourcemanager.synapse.models.PrincipalType; +import com.azure.resourcemanager.synapse.models.ResourceProvisioningState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Class representing a database principal assignment. */ +@JsonFlatten +@Fluent +public class DatabasePrincipalAssignmentInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabasePrincipalAssignmentInner.class); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy + * information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /* + * The principal ID assigned to the database principal. It can be a user + * email, application ID, or security group name. + */ + @JsonProperty(value = "properties.principalId") + private String principalId; + + /* + * Database principal role. + */ + @JsonProperty(value = "properties.role") + private DatabasePrincipalRole role; + + /* + * The tenant id of the principal + */ + @JsonProperty(value = "properties.tenantId") + private String tenantId; + + /* + * Principal type. + */ + @JsonProperty(value = "properties.principalType") + private PrincipalType principalType; + + /* + * The tenant name of the principal + */ + @JsonProperty(value = "properties.tenantName", access = JsonProperty.Access.WRITE_ONLY) + private String tenantName; + + /* + * The principal name + */ + @JsonProperty(value = "properties.principalName", access = JsonProperty.Access.WRITE_ONLY) + private String principalName; + + /* + * The provisioned state of the resource. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ResourceProvisioningState provisioningState; + + /** + * 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 principalId property: The principal ID assigned to the database principal. It can be a user email, + * application ID, or security group name. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Set the principalId property: The principal ID assigned to the database principal. It can be a user email, + * application ID, or security group name. + * + * @param principalId the principalId value to set. + * @return the DatabasePrincipalAssignmentInner object itself. + */ + public DatabasePrincipalAssignmentInner withPrincipalId(String principalId) { + this.principalId = principalId; + return this; + } + + /** + * Get the role property: Database principal role. + * + * @return the role value. + */ + public DatabasePrincipalRole role() { + return this.role; + } + + /** + * Set the role property: Database principal role. + * + * @param role the role value to set. + * @return the DatabasePrincipalAssignmentInner object itself. + */ + public DatabasePrincipalAssignmentInner withRole(DatabasePrincipalRole role) { + this.role = role; + return this; + } + + /** + * Get the tenantId property: The tenant id of the principal. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: The tenant id of the principal. + * + * @param tenantId the tenantId value to set. + * @return the DatabasePrincipalAssignmentInner object itself. + */ + public DatabasePrincipalAssignmentInner withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the principalType property: Principal type. + * + * @return the principalType value. + */ + public PrincipalType principalType() { + return this.principalType; + } + + /** + * Set the principalType property: Principal type. + * + * @param principalType the principalType value to set. + * @return the DatabasePrincipalAssignmentInner object itself. + */ + public DatabasePrincipalAssignmentInner withPrincipalType(PrincipalType principalType) { + this.principalType = principalType; + return this; + } + + /** + * Get the tenantName property: The tenant name of the principal. + * + * @return the tenantName value. + */ + public String tenantName() { + return this.tenantName; + } + + /** + * Get the principalName property: The principal name. + * + * @return the principalName value. + */ + public String principalName() { + return this.principalName; + } + + /** + * Get the provisioningState property: The provisioned state of the resource. + * + * @return the provisioningState value. + */ + public ResourceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/EncryptionProtectorInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/EncryptionProtectorInner.java index eed2f9cdf343c..5d19d8ddd463f 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/EncryptionProtectorInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/EncryptionProtectorInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.ServerKeyType; @@ -12,8 +13,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** The server encryption protector. */ +@JsonFlatten @Fluent -public final class EncryptionProtectorInner extends ProxyResource { +public class EncryptionProtectorInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(EncryptionProtectorInner.class); /* @@ -30,10 +32,34 @@ public final class EncryptionProtectorInner extends ProxyResource { private String location; /* - * Resource properties. + * Subregion of the encryption protector. */ - @JsonProperty(value = "properties") - private EncryptionProtectorProperties innerProperties; + @JsonProperty(value = "properties.subregion", access = JsonProperty.Access.WRITE_ONLY) + private String subregion; + + /* + * The name of the server key. + */ + @JsonProperty(value = "properties.serverKeyName") + private String serverKeyName; + + /* + * The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. + */ + @JsonProperty(value = "properties.serverKeyType") + private ServerKeyType serverKeyType; + + /* + * The URI of the server key. + */ + @JsonProperty(value = "properties.uri", access = JsonProperty.Access.WRITE_ONLY) + private String uri; + + /* + * Thumbprint of the server key. + */ + @JsonProperty(value = "properties.thumbprint", access = JsonProperty.Access.WRITE_ONLY) + private String thumbprint; /** * Get the kind property: Kind of encryption protector. This is metadata used for the Azure portal experience. @@ -53,22 +79,13 @@ public String location() { return this.location; } - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private EncryptionProtectorProperties innerProperties() { - return this.innerProperties; - } - /** * Get the subregion property: Subregion of the encryption protector. * * @return the subregion value. */ public String subregion() { - return this.innerProperties() == null ? null : this.innerProperties().subregion(); + return this.subregion; } /** @@ -77,7 +94,7 @@ public String subregion() { * @return the serverKeyName value. */ public String serverKeyName() { - return this.innerProperties() == null ? null : this.innerProperties().serverKeyName(); + return this.serverKeyName; } /** @@ -87,10 +104,7 @@ public String serverKeyName() { * @return the EncryptionProtectorInner object itself. */ public EncryptionProtectorInner withServerKeyName(String serverKeyName) { - if (this.innerProperties() == null) { - this.innerProperties = new EncryptionProtectorProperties(); - } - this.innerProperties().withServerKeyName(serverKeyName); + this.serverKeyName = serverKeyName; return this; } @@ -100,7 +114,7 @@ public EncryptionProtectorInner withServerKeyName(String serverKeyName) { * @return the serverKeyType value. */ public ServerKeyType serverKeyType() { - return this.innerProperties() == null ? null : this.innerProperties().serverKeyType(); + return this.serverKeyType; } /** @@ -110,10 +124,7 @@ public ServerKeyType serverKeyType() { * @return the EncryptionProtectorInner object itself. */ public EncryptionProtectorInner withServerKeyType(ServerKeyType serverKeyType) { - if (this.innerProperties() == null) { - this.innerProperties = new EncryptionProtectorProperties(); - } - this.innerProperties().withServerKeyType(serverKeyType); + this.serverKeyType = serverKeyType; return this; } @@ -123,7 +134,7 @@ public EncryptionProtectorInner withServerKeyType(ServerKeyType serverKeyType) { * @return the uri value. */ public String uri() { - return this.innerProperties() == null ? null : this.innerProperties().uri(); + return this.uri; } /** @@ -132,7 +143,7 @@ public String uri() { * @return the thumbprint value. */ public String thumbprint() { - return this.innerProperties() == null ? null : this.innerProperties().thumbprint(); + return this.thumbprint; } /** @@ -141,8 +152,5 @@ public String thumbprint() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/EncryptionProtectorProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/EncryptionProtectorProperties.java deleted file mode 100644 index 319cdf2c452ae..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/EncryptionProtectorProperties.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.ServerKeyType; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties for an encryption protector execution. */ -@Fluent -public final class EncryptionProtectorProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EncryptionProtectorProperties.class); - - /* - * Subregion of the encryption protector. - */ - @JsonProperty(value = "subregion", access = JsonProperty.Access.WRITE_ONLY) - private String subregion; - - /* - * The name of the server key. - */ - @JsonProperty(value = "serverKeyName") - private String serverKeyName; - - /* - * The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. - */ - @JsonProperty(value = "serverKeyType", required = true) - private ServerKeyType serverKeyType; - - /* - * The URI of the server key. - */ - @JsonProperty(value = "uri", access = JsonProperty.Access.WRITE_ONLY) - private String uri; - - /* - * Thumbprint of the server key. - */ - @JsonProperty(value = "thumbprint", access = JsonProperty.Access.WRITE_ONLY) - private String thumbprint; - - /** - * Get the subregion property: Subregion of the encryption protector. - * - * @return the subregion value. - */ - public String subregion() { - return this.subregion; - } - - /** - * Get the serverKeyName property: The name of the server key. - * - * @return the serverKeyName value. - */ - public String serverKeyName() { - return this.serverKeyName; - } - - /** - * Set the serverKeyName property: The name of the server key. - * - * @param serverKeyName the serverKeyName value to set. - * @return the EncryptionProtectorProperties object itself. - */ - public EncryptionProtectorProperties withServerKeyName(String serverKeyName) { - this.serverKeyName = serverKeyName; - return this; - } - - /** - * Get the serverKeyType property: The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. - * - * @return the serverKeyType value. - */ - public ServerKeyType serverKeyType() { - return this.serverKeyType; - } - - /** - * Set the serverKeyType property: The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. - * - * @param serverKeyType the serverKeyType value to set. - * @return the EncryptionProtectorProperties object itself. - */ - public EncryptionProtectorProperties withServerKeyType(ServerKeyType serverKeyType) { - this.serverKeyType = serverKeyType; - return this; - } - - /** - * Get the uri property: The URI of the server key. - * - * @return the uri value. - */ - public String uri() { - return this.uri; - } - - /** - * Get the thumbprint property: Thumbprint of the server key. - * - * @return the thumbprint value. - */ - public String thumbprint() { - return this.thumbprint; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (serverKeyType() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property serverKeyType in model EncryptionProtectorProperties")); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/EnvironmentVariableSetupTypeProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/EnvironmentVariableSetupTypeProperties.java deleted file mode 100644 index a5bf321c39e90..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/EnvironmentVariableSetupTypeProperties.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Environment variable custom setup type properties. */ -@Fluent -public final class EnvironmentVariableSetupTypeProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EnvironmentVariableSetupTypeProperties.class); - - /* - * The name of the environment variable. - */ - @JsonProperty(value = "variableName", required = true) - private String variableName; - - /* - * The value of the environment variable. - */ - @JsonProperty(value = "variableValue", required = true) - private String variableValue; - - /** - * Get the variableName property: The name of the environment variable. - * - * @return the variableName value. - */ - public String variableName() { - return this.variableName; - } - - /** - * Set the variableName property: The name of the environment variable. - * - * @param variableName the variableName value to set. - * @return the EnvironmentVariableSetupTypeProperties object itself. - */ - public EnvironmentVariableSetupTypeProperties withVariableName(String variableName) { - this.variableName = variableName; - return this; - } - - /** - * Get the variableValue property: The value of the environment variable. - * - * @return the variableValue value. - */ - public String variableValue() { - return this.variableValue; - } - - /** - * Set the variableValue property: The value of the environment variable. - * - * @param variableValue the variableValue value to set. - * @return the EnvironmentVariableSetupTypeProperties object itself. - */ - public EnvironmentVariableSetupTypeProperties withVariableValue(String variableValue) { - this.variableValue = variableValue; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (variableName() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property variableName in model EnvironmentVariableSetupTypeProperties")); - } - if (variableValue() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property variableValue in model EnvironmentVariableSetupTypeProperties")); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ExtendedServerBlobAuditingPolicyInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ExtendedServerBlobAuditingPolicyInner.java index 9d1729622a90d..8e9571ae50d8b 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ExtendedServerBlobAuditingPolicyInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ExtendedServerBlobAuditingPolicyInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.BlobAuditingPolicyState; @@ -14,24 +15,176 @@ import java.util.UUID; /** An extended server blob auditing policy. */ +@JsonFlatten @Fluent -public final class ExtendedServerBlobAuditingPolicyInner extends ProxyResource { +public class ExtendedServerBlobAuditingPolicyInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(ExtendedServerBlobAuditingPolicyInner.class); /* - * Resource properties. + * Specifies condition of where clause when creating an audit. */ - @JsonProperty(value = "properties") - private ExtendedServerBlobAuditingPolicyProperties innerProperties; + @JsonProperty(value = "properties.predicateExpression") + private String predicateExpression; - /** - * Get the innerProperties property: Resource properties. + /* + * Specifies the state of the policy. If state is Enabled, storageEndpoint + * or isAzureMonitorTargetEnabled are required. + */ + @JsonProperty(value = "properties.state") + private BlobAuditingPolicyState state; + + /* + * Specifies the blob storage endpoint (e.g. + * https://MyAccount.blob.core.windows.net). If state is Enabled, + * storageEndpoint or isAzureMonitorTargetEnabled is required. + */ + @JsonProperty(value = "properties.storageEndpoint") + private String storageEndpoint; + + /* + * Specifies the identifier key of the auditing storage account. + * If state is Enabled and storageEndpoint is specified, not specifying the + * storageAccountAccessKey will use SQL server system-assigned managed + * identity to access the storage. + * Prerequisites for using managed identity authentication: + * 1. Assign SQL Server a system-assigned managed identity in Azure Active + * Directory (AAD). + * 2. Grant SQL Server identity access to the storage account by adding + * 'Storage Blob Data Contributor' RBAC role to the server identity. + * For more information, see [Auditing to storage using Managed Identity + * authentication](https://go.microsoft.com/fwlink/?linkid=2114355) + */ + @JsonProperty(value = "properties.storageAccountAccessKey") + private String storageAccountAccessKey; + + /* + * Specifies the number of days to keep in the audit logs in the storage + * account. + */ + @JsonProperty(value = "properties.retentionDays") + private Integer retentionDays; + + /* + * Specifies the Actions-Groups and Actions to audit. + * + * The recommended set of action groups to use is the following combination + * - this will audit all the queries and stored procedures executed against + * the database, as well as successful and failed logins: + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default + * when enabling auditing from the Azure portal. + * + * The supported action groups to audit are (note: choose only specific + * groups that cover your auditing needs. Using unnecessary groups could + * lead to very large quantities of audit records): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * + * These are groups that cover all sql statements and stored procedures + * executed against the database, and should not be used in combination + * with other groups as this will result in duplicate audit logs. + * + * For more information, see [Database-Level Audit Action + * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + * + * For Database auditing policy, specific Actions can also be specified + * (note that Actions cannot be specified for Server auditing policy). The + * supported actions to audit are: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE + * REFERENCES + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note that in the above format can refer to an object like a + * table, view, or stored procedure, or an entire database or schema. For + * the latter cases, the forms DATABASE::{db_name} and + * SCHEMA::{schema_name} are used, respectively. * - * @return the innerProperties value. + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For more information, see [Database-Level Audit + * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) */ - private ExtendedServerBlobAuditingPolicyProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.auditActionsAndGroups") + private List auditActionsAndGroups; + + /* + * Specifies the blob storage subscription Id. + */ + @JsonProperty(value = "properties.storageAccountSubscriptionId") + private UUID storageAccountSubscriptionId; + + /* + * Specifies whether storageAccountAccessKey value is the storage's + * secondary key. + */ + @JsonProperty(value = "properties.isStorageSecondaryKeyInUse") + private Boolean isStorageSecondaryKeyInUse; + + /* + * Specifies whether audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'state' as + * 'Enabled' and 'isAzureMonitorTargetEnabled' as true. + * + * When using REST API to configure auditing, Diagnostic Settings with + * 'SQLSecurityAuditEvents' diagnostic logs category on the database should + * be also created. + * Note that for server level audit you should use the 'master' database as + * {databaseName}. + * + * Diagnostic Settings URI format: + * PUT + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + * + * For more information, see [Diagnostic Settings REST + * API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings + * PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + * + */ + @JsonProperty(value = "properties.isAzureMonitorTargetEnabled") + private Boolean isAzureMonitorTargetEnabled; + + /* + * Specifies the amount of time in milliseconds that can elapse before + * audit actions are forced to be processed. + * The default minimum value is 1000 (1 second). The maximum is + * 2,147,483,647. + */ + @JsonProperty(value = "properties.queueDelayMs") + private Integer queueDelayMs; /** * Get the predicateExpression property: Specifies condition of where clause when creating an audit. @@ -39,7 +192,7 @@ private ExtendedServerBlobAuditingPolicyProperties innerProperties() { * @return the predicateExpression value. */ public String predicateExpression() { - return this.innerProperties() == null ? null : this.innerProperties().predicateExpression(); + return this.predicateExpression; } /** @@ -49,10 +202,7 @@ public String predicateExpression() { * @return the ExtendedServerBlobAuditingPolicyInner object itself. */ public ExtendedServerBlobAuditingPolicyInner withPredicateExpression(String predicateExpression) { - if (this.innerProperties() == null) { - this.innerProperties = new ExtendedServerBlobAuditingPolicyProperties(); - } - this.innerProperties().withPredicateExpression(predicateExpression); + this.predicateExpression = predicateExpression; return this; } @@ -63,7 +213,7 @@ public ExtendedServerBlobAuditingPolicyInner withPredicateExpression(String pred * @return the state value. */ public BlobAuditingPolicyState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); + return this.state; } /** @@ -74,10 +224,7 @@ public BlobAuditingPolicyState state() { * @return the ExtendedServerBlobAuditingPolicyInner object itself. */ public ExtendedServerBlobAuditingPolicyInner withState(BlobAuditingPolicyState state) { - if (this.innerProperties() == null) { - this.innerProperties = new ExtendedServerBlobAuditingPolicyProperties(); - } - this.innerProperties().withState(state); + this.state = state; return this; } @@ -89,7 +236,7 @@ public ExtendedServerBlobAuditingPolicyInner withState(BlobAuditingPolicyState s * @return the storageEndpoint value. */ public String storageEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().storageEndpoint(); + return this.storageEndpoint; } /** @@ -101,10 +248,7 @@ public String storageEndpoint() { * @return the ExtendedServerBlobAuditingPolicyInner object itself. */ public ExtendedServerBlobAuditingPolicyInner withStorageEndpoint(String storageEndpoint) { - if (this.innerProperties() == null) { - this.innerProperties = new ExtendedServerBlobAuditingPolicyProperties(); - } - this.innerProperties().withStorageEndpoint(storageEndpoint); + this.storageEndpoint = storageEndpoint; return this; } @@ -120,7 +264,7 @@ public ExtendedServerBlobAuditingPolicyInner withStorageEndpoint(String storageE * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { - return this.innerProperties() == null ? null : this.innerProperties().storageAccountAccessKey(); + return this.storageAccountAccessKey; } /** @@ -136,10 +280,7 @@ public String storageAccountAccessKey() { * @return the ExtendedServerBlobAuditingPolicyInner object itself. */ public ExtendedServerBlobAuditingPolicyInner withStorageAccountAccessKey(String storageAccountAccessKey) { - if (this.innerProperties() == null) { - this.innerProperties = new ExtendedServerBlobAuditingPolicyProperties(); - } - this.innerProperties().withStorageAccountAccessKey(storageAccountAccessKey); + this.storageAccountAccessKey = storageAccountAccessKey; return this; } @@ -149,7 +290,7 @@ public ExtendedServerBlobAuditingPolicyInner withStorageAccountAccessKey(String * @return the retentionDays value. */ public Integer retentionDays() { - return this.innerProperties() == null ? null : this.innerProperties().retentionDays(); + return this.retentionDays; } /** @@ -159,10 +300,7 @@ public Integer retentionDays() { * @return the ExtendedServerBlobAuditingPolicyInner object itself. */ public ExtendedServerBlobAuditingPolicyInner withRetentionDays(Integer retentionDays) { - if (this.innerProperties() == null) { - this.innerProperties = new ExtendedServerBlobAuditingPolicyProperties(); - } - this.innerProperties().withRetentionDays(retentionDays); + this.retentionDays = retentionDays; return this; } @@ -212,7 +350,7 @@ public ExtendedServerBlobAuditingPolicyInner withRetentionDays(Integer retention * @return the auditActionsAndGroups value. */ public List auditActionsAndGroups() { - return this.innerProperties() == null ? null : this.innerProperties().auditActionsAndGroups(); + return this.auditActionsAndGroups; } /** @@ -262,10 +400,7 @@ public List auditActionsAndGroups() { * @return the ExtendedServerBlobAuditingPolicyInner object itself. */ public ExtendedServerBlobAuditingPolicyInner withAuditActionsAndGroups(List auditActionsAndGroups) { - if (this.innerProperties() == null) { - this.innerProperties = new ExtendedServerBlobAuditingPolicyProperties(); - } - this.innerProperties().withAuditActionsAndGroups(auditActionsAndGroups); + this.auditActionsAndGroups = auditActionsAndGroups; return this; } @@ -275,7 +410,7 @@ public ExtendedServerBlobAuditingPolicyInner withAuditActionsAndGroups(List in the above format can refer to an object like a - * table, view, or stored procedure, or an entire database or schema. For - * the latter cases, the forms DATABASE::{db_name} and - * SCHEMA::{schema_name} are used, respectively. - * - * For example: - * SELECT on dbo.myTable by public - * SELECT on DATABASE::myDatabase by public - * SELECT on SCHEMA::mySchema by public - * - * For more information, see [Database-Level Audit - * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - */ - @JsonProperty(value = "auditActionsAndGroups") - private List auditActionsAndGroups; - - /* - * Specifies the blob storage subscription Id. - */ - @JsonProperty(value = "storageAccountSubscriptionId") - private UUID storageAccountSubscriptionId; - - /* - * Specifies whether storageAccountAccessKey value is the storage's - * secondary key. - */ - @JsonProperty(value = "isStorageSecondaryKeyInUse") - private Boolean isStorageSecondaryKeyInUse; - - /* - * Specifies whether audit events are sent to Azure Monitor. - * In order to send the events to Azure Monitor, specify 'state' as - * 'Enabled' and 'isAzureMonitorTargetEnabled' as true. - * - * When using REST API to configure auditing, Diagnostic Settings with - * 'SQLSecurityAuditEvents' diagnostic logs category on the database should - * be also created. - * Note that for server level audit you should use the 'master' database as - * {databaseName}. - * - * Diagnostic Settings URI format: - * PUT - * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - * For more information, see [Diagnostic Settings REST - * API](https://go.microsoft.com/fwlink/?linkid=2033207) - * or [Diagnostic Settings - * PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - * - */ - @JsonProperty(value = "isAzureMonitorTargetEnabled") - private Boolean isAzureMonitorTargetEnabled; - - /* - * Specifies the amount of time in milliseconds that can elapse before - * audit actions are forced to be processed. - * The default minimum value is 1000 (1 second). The maximum is - * 2,147,483,647. - */ - @JsonProperty(value = "queueDelayMs") - private Integer queueDelayMs; - - /** - * Get the predicateExpression property: Specifies condition of where clause when creating an audit. - * - * @return the predicateExpression value. - */ - public String predicateExpression() { - return this.predicateExpression; - } - - /** - * Set the predicateExpression property: Specifies condition of where clause when creating an audit. - * - * @param predicateExpression the predicateExpression value to set. - * @return the ExtendedServerBlobAuditingPolicyProperties object itself. - */ - public ExtendedServerBlobAuditingPolicyProperties withPredicateExpression(String predicateExpression) { - this.predicateExpression = predicateExpression; - return this; - } - - /** - * Get the state property: Specifies the state of the policy. If state is Enabled, storageEndpoint or - * isAzureMonitorTargetEnabled are required. - * - * @return the state value. - */ - public BlobAuditingPolicyState state() { - return this.state; - } - - /** - * Set the state property: Specifies the state of the policy. If state is Enabled, storageEndpoint or - * isAzureMonitorTargetEnabled are required. - * - * @param state the state value to set. - * @return the ExtendedServerBlobAuditingPolicyProperties object itself. - */ - public ExtendedServerBlobAuditingPolicyProperties withState(BlobAuditingPolicyState state) { - this.state = state; - return this; - } - - /** - * Get the storageEndpoint property: Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is - * required. - * - * @return the storageEndpoint value. - */ - public String storageEndpoint() { - return this.storageEndpoint; - } - - /** - * Set the storageEndpoint property: Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is - * required. - * - * @param storageEndpoint the storageEndpoint value to set. - * @return the ExtendedServerBlobAuditingPolicyProperties object itself. - */ - public ExtendedServerBlobAuditingPolicyProperties withStorageEndpoint(String storageEndpoint) { - this.storageEndpoint = storageEndpoint; - return this; - } - - /** - * Get the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server - * system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication: - * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 2. Grant SQL Server - * identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server - * identity. For more information, see [Auditing to storage using Managed Identity - * authentication](https://go.microsoft.com/fwlink/?linkid=2114355). - * - * @return the storageAccountAccessKey value. - */ - public String storageAccountAccessKey() { - return this.storageAccountAccessKey; - } - - /** - * Set the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server - * system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication: - * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 2. Grant SQL Server - * identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server - * identity. For more information, see [Auditing to storage using Managed Identity - * authentication](https://go.microsoft.com/fwlink/?linkid=2114355). - * - * @param storageAccountAccessKey the storageAccountAccessKey value to set. - * @return the ExtendedServerBlobAuditingPolicyProperties object itself. - */ - public ExtendedServerBlobAuditingPolicyProperties withStorageAccountAccessKey(String storageAccountAccessKey) { - this.storageAccountAccessKey = storageAccountAccessKey; - return this; - } - - /** - * Get the retentionDays property: Specifies the number of days to keep in the audit logs in the storage account. - * - * @return the retentionDays value. - */ - public Integer retentionDays() { - return this.retentionDays; - } - - /** - * Set the retentionDays property: Specifies the number of days to keep in the audit logs in the storage account. - * - * @param retentionDays the retentionDays value to set. - * @return the ExtendedServerBlobAuditingPolicyProperties object itself. - */ - public ExtendedServerBlobAuditingPolicyProperties withRetentionDays(Integer retentionDays) { - this.retentionDays = retentionDays; - return this; - } - - /** - * Get the auditActionsAndGroups property: Specifies the Actions-Groups and Actions to audit. - * - *

The recommended set of action groups to use is the following combination - this will audit all the queries and - * stored procedures executed against the database, as well as successful and failed logins: - * - *

BATCH_COMPLETED_GROUP, SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP. - * - *

This above combination is also the set that is configured by default when enabling auditing from the Azure - * portal. - * - *

The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. - * Using unnecessary groups could lead to very large quantities of audit records): - * - *

APPLICATION_ROLE_CHANGE_PASSWORD_GROUP BACKUP_RESTORE_GROUP DATABASE_LOGOUT_GROUP DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP USER_CHANGE_PASSWORD_GROUP BATCH_STARTED_GROUP BATCH_COMPLETED_GROUP - * - *

These are groups that cover all sql statements and stored procedures executed against the database, and should - * not be used in combination with other groups as this will result in duplicate audit logs. - * - *

For more information, see [Database-Level Audit Action - * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * - *

For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified - * for Server auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE EXECUTE RECEIVE - * REFERENCES - * - *

The general form for defining an action to be audited is: {action} ON {object} BY {principal} - * - *

Note that <object> in the above format can refer to an object like a table, view, or stored procedure, - * or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} - * are used, respectively. - * - *

For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on - * SCHEMA::mySchema by public - * - *

For more information, see [Database-Level Audit - * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions). - * - * @return the auditActionsAndGroups value. - */ - public List auditActionsAndGroups() { - return this.auditActionsAndGroups; - } - - /** - * Set the auditActionsAndGroups property: Specifies the Actions-Groups and Actions to audit. - * - *

The recommended set of action groups to use is the following combination - this will audit all the queries and - * stored procedures executed against the database, as well as successful and failed logins: - * - *

BATCH_COMPLETED_GROUP, SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP. - * - *

This above combination is also the set that is configured by default when enabling auditing from the Azure - * portal. - * - *

The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. - * Using unnecessary groups could lead to very large quantities of audit records): - * - *

APPLICATION_ROLE_CHANGE_PASSWORD_GROUP BACKUP_RESTORE_GROUP DATABASE_LOGOUT_GROUP DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP USER_CHANGE_PASSWORD_GROUP BATCH_STARTED_GROUP BATCH_COMPLETED_GROUP - * - *

These are groups that cover all sql statements and stored procedures executed against the database, and should - * not be used in combination with other groups as this will result in duplicate audit logs. - * - *

For more information, see [Database-Level Audit Action - * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * - *

For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified - * for Server auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE EXECUTE RECEIVE - * REFERENCES - * - *

The general form for defining an action to be audited is: {action} ON {object} BY {principal} - * - *

Note that <object> in the above format can refer to an object like a table, view, or stored procedure, - * or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} - * are used, respectively. - * - *

For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on - * SCHEMA::mySchema by public - * - *

For more information, see [Database-Level Audit - * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions). - * - * @param auditActionsAndGroups the auditActionsAndGroups value to set. - * @return the ExtendedServerBlobAuditingPolicyProperties object itself. - */ - public ExtendedServerBlobAuditingPolicyProperties withAuditActionsAndGroups(List auditActionsAndGroups) { - this.auditActionsAndGroups = auditActionsAndGroups; - return this; - } - - /** - * Get the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * - * @return the storageAccountSubscriptionId value. - */ - public UUID storageAccountSubscriptionId() { - return this.storageAccountSubscriptionId; - } - - /** - * Set the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * - * @param storageAccountSubscriptionId the storageAccountSubscriptionId value to set. - * @return the ExtendedServerBlobAuditingPolicyProperties object itself. - */ - public ExtendedServerBlobAuditingPolicyProperties withStorageAccountSubscriptionId( - UUID storageAccountSubscriptionId) { - this.storageAccountSubscriptionId = storageAccountSubscriptionId; - return this; - } - - /** - * Get the isStorageSecondaryKeyInUse property: Specifies whether storageAccountAccessKey value is the storage's - * secondary key. - * - * @return the isStorageSecondaryKeyInUse value. - */ - public Boolean isStorageSecondaryKeyInUse() { - return this.isStorageSecondaryKeyInUse; - } - - /** - * Set the isStorageSecondaryKeyInUse property: Specifies whether storageAccountAccessKey value is the storage's - * secondary key. - * - * @param isStorageSecondaryKeyInUse the isStorageSecondaryKeyInUse value to set. - * @return the ExtendedServerBlobAuditingPolicyProperties object itself. - */ - public ExtendedServerBlobAuditingPolicyProperties withIsStorageSecondaryKeyInUse( - Boolean isStorageSecondaryKeyInUse) { - this.isStorageSecondaryKeyInUse = isStorageSecondaryKeyInUse; - return this; - } - - /** - * Get the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. In order - * to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true. - * - *

When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs - * category on the database should be also created. Note that for server level audit you should use the 'master' - * database as {databaseName}. - * - *

Diagnostic Settings URI format: PUT - * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * - * @return the isAzureMonitorTargetEnabled value. - */ - public Boolean isAzureMonitorTargetEnabled() { - return this.isAzureMonitorTargetEnabled; - } - - /** - * Set the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. In order - * to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true. - * - *

When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs - * category on the database should be also created. Note that for server level audit you should use the 'master' - * database as {databaseName}. - * - *

Diagnostic Settings URI format: PUT - * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * - * @param isAzureMonitorTargetEnabled the isAzureMonitorTargetEnabled value to set. - * @return the ExtendedServerBlobAuditingPolicyProperties object itself. - */ - public ExtendedServerBlobAuditingPolicyProperties withIsAzureMonitorTargetEnabled( - Boolean isAzureMonitorTargetEnabled) { - this.isAzureMonitorTargetEnabled = isAzureMonitorTargetEnabled; - return this; - } - - /** - * Get the queueDelayMs property: Specifies the amount of time in milliseconds that can elapse before audit actions - * are forced to be processed. The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. - * - * @return the queueDelayMs value. - */ - public Integer queueDelayMs() { - return this.queueDelayMs; - } - - /** - * Set the queueDelayMs property: Specifies the amount of time in milliseconds that can elapse before audit actions - * are forced to be processed. The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. - * - * @param queueDelayMs the queueDelayMs value to set. - * @return the ExtendedServerBlobAuditingPolicyProperties object itself. - */ - public ExtendedServerBlobAuditingPolicyProperties withQueueDelayMs(Integer queueDelayMs) { - this.queueDelayMs = queueDelayMs; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (state() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property state in model ExtendedServerBlobAuditingPolicyProperties")); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ExtendedSqlPoolBlobAuditingPolicyInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ExtendedSqlPoolBlobAuditingPolicyInner.java index 79391c0665502..385eb11be45a6 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ExtendedSqlPoolBlobAuditingPolicyInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ExtendedSqlPoolBlobAuditingPolicyInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.BlobAuditingPolicyState; @@ -14,24 +15,176 @@ import java.util.UUID; /** An extended Sql pool blob auditing policy. */ +@JsonFlatten @Fluent -public final class ExtendedSqlPoolBlobAuditingPolicyInner extends ProxyResource { +public class ExtendedSqlPoolBlobAuditingPolicyInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(ExtendedSqlPoolBlobAuditingPolicyInner.class); /* - * Resource properties. + * Specifies condition of where clause when creating an audit. */ - @JsonProperty(value = "properties") - private ExtendedSqlPoolBlobAuditingPolicyProperties innerProperties; + @JsonProperty(value = "properties.predicateExpression") + private String predicateExpression; - /** - * Get the innerProperties property: Resource properties. + /* + * Specifies the state of the policy. If state is Enabled, storageEndpoint + * or isAzureMonitorTargetEnabled are required. + */ + @JsonProperty(value = "properties.state") + private BlobAuditingPolicyState state; + + /* + * Specifies the blob storage endpoint (e.g. + * https://MyAccount.blob.core.windows.net). If state is Enabled, + * storageEndpoint or isAzureMonitorTargetEnabled is required. + */ + @JsonProperty(value = "properties.storageEndpoint") + private String storageEndpoint; + + /* + * Specifies the identifier key of the auditing storage account. + * If state is Enabled and storageEndpoint is specified, not specifying the + * storageAccountAccessKey will use SQL server system-assigned managed + * identity to access the storage. + * Prerequisites for using managed identity authentication: + * 1. Assign SQL Server a system-assigned managed identity in Azure Active + * Directory (AAD). + * 2. Grant SQL Server identity access to the storage account by adding + * 'Storage Blob Data Contributor' RBAC role to the server identity. + * For more information, see [Auditing to storage using Managed Identity + * authentication](https://go.microsoft.com/fwlink/?linkid=2114355) + */ + @JsonProperty(value = "properties.storageAccountAccessKey") + private String storageAccountAccessKey; + + /* + * Specifies the number of days to keep in the audit logs in the storage + * account. + */ + @JsonProperty(value = "properties.retentionDays") + private Integer retentionDays; + + /* + * Specifies the Actions-Groups and Actions to audit. + * + * The recommended set of action groups to use is the following combination + * - this will audit all the queries and stored procedures executed against + * the database, as well as successful and failed logins: + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default + * when enabling auditing from the Azure portal. + * + * The supported action groups to audit are (note: choose only specific + * groups that cover your auditing needs. Using unnecessary groups could + * lead to very large quantities of audit records): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * + * These are groups that cover all sql statements and stored procedures + * executed against the database, and should not be used in combination + * with other groups as this will result in duplicate audit logs. + * + * For more information, see [Database-Level Audit Action + * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + * + * For Database auditing policy, specific Actions can also be specified + * (note that Actions cannot be specified for Server auditing policy). The + * supported actions to audit are: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE + * REFERENCES + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note that in the above format can refer to an object like a + * table, view, or stored procedure, or an entire database or schema. For + * the latter cases, the forms DATABASE::{db_name} and + * SCHEMA::{schema_name} are used, respectively. * - * @return the innerProperties value. + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For more information, see [Database-Level Audit + * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) */ - private ExtendedSqlPoolBlobAuditingPolicyProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.auditActionsAndGroups") + private List auditActionsAndGroups; + + /* + * Specifies the blob storage subscription Id. + */ + @JsonProperty(value = "properties.storageAccountSubscriptionId") + private UUID storageAccountSubscriptionId; + + /* + * Specifies whether storageAccountAccessKey value is the storage's + * secondary key. + */ + @JsonProperty(value = "properties.isStorageSecondaryKeyInUse") + private Boolean isStorageSecondaryKeyInUse; + + /* + * Specifies whether audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'state' as + * 'Enabled' and 'isAzureMonitorTargetEnabled' as true. + * + * When using REST API to configure auditing, Diagnostic Settings with + * 'SQLSecurityAuditEvents' diagnostic logs category on the database should + * be also created. + * Note that for server level audit you should use the 'master' database as + * {databaseName}. + * + * Diagnostic Settings URI format: + * PUT + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + * + * For more information, see [Diagnostic Settings REST + * API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings + * PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + * + */ + @JsonProperty(value = "properties.isAzureMonitorTargetEnabled") + private Boolean isAzureMonitorTargetEnabled; + + /* + * Specifies the amount of time in milliseconds that can elapse before + * audit actions are forced to be processed. + * The default minimum value is 1000 (1 second). The maximum is + * 2,147,483,647. + */ + @JsonProperty(value = "properties.queueDelayMs") + private Integer queueDelayMs; /** * Get the predicateExpression property: Specifies condition of where clause when creating an audit. @@ -39,7 +192,7 @@ private ExtendedSqlPoolBlobAuditingPolicyProperties innerProperties() { * @return the predicateExpression value. */ public String predicateExpression() { - return this.innerProperties() == null ? null : this.innerProperties().predicateExpression(); + return this.predicateExpression; } /** @@ -49,10 +202,7 @@ public String predicateExpression() { * @return the ExtendedSqlPoolBlobAuditingPolicyInner object itself. */ public ExtendedSqlPoolBlobAuditingPolicyInner withPredicateExpression(String predicateExpression) { - if (this.innerProperties() == null) { - this.innerProperties = new ExtendedSqlPoolBlobAuditingPolicyProperties(); - } - this.innerProperties().withPredicateExpression(predicateExpression); + this.predicateExpression = predicateExpression; return this; } @@ -63,7 +213,7 @@ public ExtendedSqlPoolBlobAuditingPolicyInner withPredicateExpression(String pre * @return the state value. */ public BlobAuditingPolicyState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); + return this.state; } /** @@ -74,10 +224,7 @@ public BlobAuditingPolicyState state() { * @return the ExtendedSqlPoolBlobAuditingPolicyInner object itself. */ public ExtendedSqlPoolBlobAuditingPolicyInner withState(BlobAuditingPolicyState state) { - if (this.innerProperties() == null) { - this.innerProperties = new ExtendedSqlPoolBlobAuditingPolicyProperties(); - } - this.innerProperties().withState(state); + this.state = state; return this; } @@ -89,7 +236,7 @@ public ExtendedSqlPoolBlobAuditingPolicyInner withState(BlobAuditingPolicyState * @return the storageEndpoint value. */ public String storageEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().storageEndpoint(); + return this.storageEndpoint; } /** @@ -101,10 +248,7 @@ public String storageEndpoint() { * @return the ExtendedSqlPoolBlobAuditingPolicyInner object itself. */ public ExtendedSqlPoolBlobAuditingPolicyInner withStorageEndpoint(String storageEndpoint) { - if (this.innerProperties() == null) { - this.innerProperties = new ExtendedSqlPoolBlobAuditingPolicyProperties(); - } - this.innerProperties().withStorageEndpoint(storageEndpoint); + this.storageEndpoint = storageEndpoint; return this; } @@ -120,7 +264,7 @@ public ExtendedSqlPoolBlobAuditingPolicyInner withStorageEndpoint(String storage * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { - return this.innerProperties() == null ? null : this.innerProperties().storageAccountAccessKey(); + return this.storageAccountAccessKey; } /** @@ -136,10 +280,7 @@ public String storageAccountAccessKey() { * @return the ExtendedSqlPoolBlobAuditingPolicyInner object itself. */ public ExtendedSqlPoolBlobAuditingPolicyInner withStorageAccountAccessKey(String storageAccountAccessKey) { - if (this.innerProperties() == null) { - this.innerProperties = new ExtendedSqlPoolBlobAuditingPolicyProperties(); - } - this.innerProperties().withStorageAccountAccessKey(storageAccountAccessKey); + this.storageAccountAccessKey = storageAccountAccessKey; return this; } @@ -149,7 +290,7 @@ public ExtendedSqlPoolBlobAuditingPolicyInner withStorageAccountAccessKey(String * @return the retentionDays value. */ public Integer retentionDays() { - return this.innerProperties() == null ? null : this.innerProperties().retentionDays(); + return this.retentionDays; } /** @@ -159,10 +300,7 @@ public Integer retentionDays() { * @return the ExtendedSqlPoolBlobAuditingPolicyInner object itself. */ public ExtendedSqlPoolBlobAuditingPolicyInner withRetentionDays(Integer retentionDays) { - if (this.innerProperties() == null) { - this.innerProperties = new ExtendedSqlPoolBlobAuditingPolicyProperties(); - } - this.innerProperties().withRetentionDays(retentionDays); + this.retentionDays = retentionDays; return this; } @@ -212,7 +350,7 @@ public ExtendedSqlPoolBlobAuditingPolicyInner withRetentionDays(Integer retentio * @return the auditActionsAndGroups value. */ public List auditActionsAndGroups() { - return this.innerProperties() == null ? null : this.innerProperties().auditActionsAndGroups(); + return this.auditActionsAndGroups; } /** @@ -262,10 +400,7 @@ public List auditActionsAndGroups() { * @return the ExtendedSqlPoolBlobAuditingPolicyInner object itself. */ public ExtendedSqlPoolBlobAuditingPolicyInner withAuditActionsAndGroups(List auditActionsAndGroups) { - if (this.innerProperties() == null) { - this.innerProperties = new ExtendedSqlPoolBlobAuditingPolicyProperties(); - } - this.innerProperties().withAuditActionsAndGroups(auditActionsAndGroups); + this.auditActionsAndGroups = auditActionsAndGroups; return this; } @@ -275,7 +410,7 @@ public ExtendedSqlPoolBlobAuditingPolicyInner withAuditActionsAndGroups(List in the above format can refer to an object like a - * table, view, or stored procedure, or an entire database or schema. For - * the latter cases, the forms DATABASE::{db_name} and - * SCHEMA::{schema_name} are used, respectively. - * - * For example: - * SELECT on dbo.myTable by public - * SELECT on DATABASE::myDatabase by public - * SELECT on SCHEMA::mySchema by public - * - * For more information, see [Database-Level Audit - * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - */ - @JsonProperty(value = "auditActionsAndGroups") - private List auditActionsAndGroups; - - /* - * Specifies the blob storage subscription Id. - */ - @JsonProperty(value = "storageAccountSubscriptionId") - private UUID storageAccountSubscriptionId; - - /* - * Specifies whether storageAccountAccessKey value is the storage's - * secondary key. - */ - @JsonProperty(value = "isStorageSecondaryKeyInUse") - private Boolean isStorageSecondaryKeyInUse; - - /* - * Specifies whether audit events are sent to Azure Monitor. - * In order to send the events to Azure Monitor, specify 'state' as - * 'Enabled' and 'isAzureMonitorTargetEnabled' as true. - * - * When using REST API to configure auditing, Diagnostic Settings with - * 'SQLSecurityAuditEvents' diagnostic logs category on the database should - * be also created. - * Note that for server level audit you should use the 'master' database as - * {databaseName}. - * - * Diagnostic Settings URI format: - * PUT - * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - * For more information, see [Diagnostic Settings REST - * API](https://go.microsoft.com/fwlink/?linkid=2033207) - * or [Diagnostic Settings - * PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - * - */ - @JsonProperty(value = "isAzureMonitorTargetEnabled") - private Boolean isAzureMonitorTargetEnabled; - - /* - * Specifies the amount of time in milliseconds that can elapse before - * audit actions are forced to be processed. - * The default minimum value is 1000 (1 second). The maximum is - * 2,147,483,647. - */ - @JsonProperty(value = "queueDelayMs") - private Integer queueDelayMs; - - /** - * Get the predicateExpression property: Specifies condition of where clause when creating an audit. - * - * @return the predicateExpression value. - */ - public String predicateExpression() { - return this.predicateExpression; - } - - /** - * Set the predicateExpression property: Specifies condition of where clause when creating an audit. - * - * @param predicateExpression the predicateExpression value to set. - * @return the ExtendedSqlPoolBlobAuditingPolicyProperties object itself. - */ - public ExtendedSqlPoolBlobAuditingPolicyProperties withPredicateExpression(String predicateExpression) { - this.predicateExpression = predicateExpression; - return this; - } - - /** - * Get the state property: Specifies the state of the policy. If state is Enabled, storageEndpoint or - * isAzureMonitorTargetEnabled are required. - * - * @return the state value. - */ - public BlobAuditingPolicyState state() { - return this.state; - } - - /** - * Set the state property: Specifies the state of the policy. If state is Enabled, storageEndpoint or - * isAzureMonitorTargetEnabled are required. - * - * @param state the state value to set. - * @return the ExtendedSqlPoolBlobAuditingPolicyProperties object itself. - */ - public ExtendedSqlPoolBlobAuditingPolicyProperties withState(BlobAuditingPolicyState state) { - this.state = state; - return this; - } - - /** - * Get the storageEndpoint property: Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is - * required. - * - * @return the storageEndpoint value. - */ - public String storageEndpoint() { - return this.storageEndpoint; - } - - /** - * Set the storageEndpoint property: Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is - * required. - * - * @param storageEndpoint the storageEndpoint value to set. - * @return the ExtendedSqlPoolBlobAuditingPolicyProperties object itself. - */ - public ExtendedSqlPoolBlobAuditingPolicyProperties withStorageEndpoint(String storageEndpoint) { - this.storageEndpoint = storageEndpoint; - return this; - } - - /** - * Get the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server - * system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication: - * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 2. Grant SQL Server - * identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server - * identity. For more information, see [Auditing to storage using Managed Identity - * authentication](https://go.microsoft.com/fwlink/?linkid=2114355). - * - * @return the storageAccountAccessKey value. - */ - public String storageAccountAccessKey() { - return this.storageAccountAccessKey; - } - - /** - * Set the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server - * system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication: - * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 2. Grant SQL Server - * identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server - * identity. For more information, see [Auditing to storage using Managed Identity - * authentication](https://go.microsoft.com/fwlink/?linkid=2114355). - * - * @param storageAccountAccessKey the storageAccountAccessKey value to set. - * @return the ExtendedSqlPoolBlobAuditingPolicyProperties object itself. - */ - public ExtendedSqlPoolBlobAuditingPolicyProperties withStorageAccountAccessKey(String storageAccountAccessKey) { - this.storageAccountAccessKey = storageAccountAccessKey; - return this; - } - - /** - * Get the retentionDays property: Specifies the number of days to keep in the audit logs in the storage account. - * - * @return the retentionDays value. - */ - public Integer retentionDays() { - return this.retentionDays; - } - - /** - * Set the retentionDays property: Specifies the number of days to keep in the audit logs in the storage account. - * - * @param retentionDays the retentionDays value to set. - * @return the ExtendedSqlPoolBlobAuditingPolicyProperties object itself. - */ - public ExtendedSqlPoolBlobAuditingPolicyProperties withRetentionDays(Integer retentionDays) { - this.retentionDays = retentionDays; - return this; - } - - /** - * Get the auditActionsAndGroups property: Specifies the Actions-Groups and Actions to audit. - * - *

The recommended set of action groups to use is the following combination - this will audit all the queries and - * stored procedures executed against the database, as well as successful and failed logins: - * - *

BATCH_COMPLETED_GROUP, SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP. - * - *

This above combination is also the set that is configured by default when enabling auditing from the Azure - * portal. - * - *

The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. - * Using unnecessary groups could lead to very large quantities of audit records): - * - *

APPLICATION_ROLE_CHANGE_PASSWORD_GROUP BACKUP_RESTORE_GROUP DATABASE_LOGOUT_GROUP DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP USER_CHANGE_PASSWORD_GROUP BATCH_STARTED_GROUP BATCH_COMPLETED_GROUP - * - *

These are groups that cover all sql statements and stored procedures executed against the database, and should - * not be used in combination with other groups as this will result in duplicate audit logs. - * - *

For more information, see [Database-Level Audit Action - * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * - *

For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified - * for Server auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE EXECUTE RECEIVE - * REFERENCES - * - *

The general form for defining an action to be audited is: {action} ON {object} BY {principal} - * - *

Note that <object> in the above format can refer to an object like a table, view, or stored procedure, - * or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} - * are used, respectively. - * - *

For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on - * SCHEMA::mySchema by public - * - *

For more information, see [Database-Level Audit - * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions). - * - * @return the auditActionsAndGroups value. - */ - public List auditActionsAndGroups() { - return this.auditActionsAndGroups; - } - - /** - * Set the auditActionsAndGroups property: Specifies the Actions-Groups and Actions to audit. - * - *

The recommended set of action groups to use is the following combination - this will audit all the queries and - * stored procedures executed against the database, as well as successful and failed logins: - * - *

BATCH_COMPLETED_GROUP, SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP. - * - *

This above combination is also the set that is configured by default when enabling auditing from the Azure - * portal. - * - *

The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. - * Using unnecessary groups could lead to very large quantities of audit records): - * - *

APPLICATION_ROLE_CHANGE_PASSWORD_GROUP BACKUP_RESTORE_GROUP DATABASE_LOGOUT_GROUP DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP USER_CHANGE_PASSWORD_GROUP BATCH_STARTED_GROUP BATCH_COMPLETED_GROUP - * - *

These are groups that cover all sql statements and stored procedures executed against the database, and should - * not be used in combination with other groups as this will result in duplicate audit logs. - * - *

For more information, see [Database-Level Audit Action - * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * - *

For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified - * for Server auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE EXECUTE RECEIVE - * REFERENCES - * - *

The general form for defining an action to be audited is: {action} ON {object} BY {principal} - * - *

Note that <object> in the above format can refer to an object like a table, view, or stored procedure, - * or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} - * are used, respectively. - * - *

For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on - * SCHEMA::mySchema by public - * - *

For more information, see [Database-Level Audit - * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions). - * - * @param auditActionsAndGroups the auditActionsAndGroups value to set. - * @return the ExtendedSqlPoolBlobAuditingPolicyProperties object itself. - */ - public ExtendedSqlPoolBlobAuditingPolicyProperties withAuditActionsAndGroups(List auditActionsAndGroups) { - this.auditActionsAndGroups = auditActionsAndGroups; - return this; - } - - /** - * Get the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * - * @return the storageAccountSubscriptionId value. - */ - public UUID storageAccountSubscriptionId() { - return this.storageAccountSubscriptionId; - } - - /** - * Set the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * - * @param storageAccountSubscriptionId the storageAccountSubscriptionId value to set. - * @return the ExtendedSqlPoolBlobAuditingPolicyProperties object itself. - */ - public ExtendedSqlPoolBlobAuditingPolicyProperties withStorageAccountSubscriptionId( - UUID storageAccountSubscriptionId) { - this.storageAccountSubscriptionId = storageAccountSubscriptionId; - return this; - } - - /** - * Get the isStorageSecondaryKeyInUse property: Specifies whether storageAccountAccessKey value is the storage's - * secondary key. - * - * @return the isStorageSecondaryKeyInUse value. - */ - public Boolean isStorageSecondaryKeyInUse() { - return this.isStorageSecondaryKeyInUse; - } - - /** - * Set the isStorageSecondaryKeyInUse property: Specifies whether storageAccountAccessKey value is the storage's - * secondary key. - * - * @param isStorageSecondaryKeyInUse the isStorageSecondaryKeyInUse value to set. - * @return the ExtendedSqlPoolBlobAuditingPolicyProperties object itself. - */ - public ExtendedSqlPoolBlobAuditingPolicyProperties withIsStorageSecondaryKeyInUse( - Boolean isStorageSecondaryKeyInUse) { - this.isStorageSecondaryKeyInUse = isStorageSecondaryKeyInUse; - return this; - } - - /** - * Get the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. In order - * to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true. - * - *

When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs - * category on the database should be also created. Note that for server level audit you should use the 'master' - * database as {databaseName}. - * - *

Diagnostic Settings URI format: PUT - * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * - * @return the isAzureMonitorTargetEnabled value. - */ - public Boolean isAzureMonitorTargetEnabled() { - return this.isAzureMonitorTargetEnabled; - } - - /** - * Set the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. In order - * to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true. - * - *

When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs - * category on the database should be also created. Note that for server level audit you should use the 'master' - * database as {databaseName}. - * - *

Diagnostic Settings URI format: PUT - * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * - * @param isAzureMonitorTargetEnabled the isAzureMonitorTargetEnabled value to set. - * @return the ExtendedSqlPoolBlobAuditingPolicyProperties object itself. - */ - public ExtendedSqlPoolBlobAuditingPolicyProperties withIsAzureMonitorTargetEnabled( - Boolean isAzureMonitorTargetEnabled) { - this.isAzureMonitorTargetEnabled = isAzureMonitorTargetEnabled; - return this; - } - - /** - * Get the queueDelayMs property: Specifies the amount of time in milliseconds that can elapse before audit actions - * are forced to be processed. The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. - * - * @return the queueDelayMs value. - */ - public Integer queueDelayMs() { - return this.queueDelayMs; - } - - /** - * Set the queueDelayMs property: Specifies the amount of time in milliseconds that can elapse before audit actions - * are forced to be processed. The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. - * - * @param queueDelayMs the queueDelayMs value to set. - * @return the ExtendedSqlPoolBlobAuditingPolicyProperties object itself. - */ - public ExtendedSqlPoolBlobAuditingPolicyProperties withQueueDelayMs(Integer queueDelayMs) { - this.queueDelayMs = queueDelayMs; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (state() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property state in model ExtendedSqlPoolBlobAuditingPolicyProperties")); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/FollowerDatabaseDefinitionInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/FollowerDatabaseDefinitionInner.java new file mode 100644 index 0000000000000..7168f4c386f97 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/FollowerDatabaseDefinitionInner.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A class representing follower database request. */ +@Fluent +public final class FollowerDatabaseDefinitionInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(FollowerDatabaseDefinitionInner.class); + + /* + * Resource id of the cluster that follows a database owned by this + * cluster. + */ + @JsonProperty(value = "clusterResourceId", required = true) + private String kustoPoolResourceId; + + /* + * Resource name of the attached database configuration in the follower + * cluster. + */ + @JsonProperty(value = "attachedDatabaseConfigurationName", required = true) + private String attachedDatabaseConfigurationName; + + /* + * The database name owned by this cluster that was followed. * in case + * following all databases. + */ + @JsonProperty(value = "databaseName", access = JsonProperty.Access.WRITE_ONLY) + private String databaseName; + + /** + * Get the kustoPoolResourceId property: Resource id of the cluster that follows a database owned by this cluster. + * + * @return the kustoPoolResourceId value. + */ + public String kustoPoolResourceId() { + return this.kustoPoolResourceId; + } + + /** + * Set the kustoPoolResourceId property: Resource id of the cluster that follows a database owned by this cluster. + * + * @param kustoPoolResourceId the kustoPoolResourceId value to set. + * @return the FollowerDatabaseDefinitionInner object itself. + */ + public FollowerDatabaseDefinitionInner withKustoPoolResourceId(String kustoPoolResourceId) { + this.kustoPoolResourceId = kustoPoolResourceId; + return this; + } + + /** + * Get the attachedDatabaseConfigurationName property: Resource name of the attached database configuration in the + * follower cluster. + * + * @return the attachedDatabaseConfigurationName value. + */ + public String attachedDatabaseConfigurationName() { + return this.attachedDatabaseConfigurationName; + } + + /** + * Set the attachedDatabaseConfigurationName property: Resource name of the attached database configuration in the + * follower cluster. + * + * @param attachedDatabaseConfigurationName the attachedDatabaseConfigurationName value to set. + * @return the FollowerDatabaseDefinitionInner object itself. + */ + public FollowerDatabaseDefinitionInner withAttachedDatabaseConfigurationName( + String attachedDatabaseConfigurationName) { + this.attachedDatabaseConfigurationName = attachedDatabaseConfigurationName; + return this; + } + + /** + * Get the databaseName property: The database name owned by this cluster that was followed. * in case following all + * databases. + * + * @return the databaseName value. + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (kustoPoolResourceId() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property kustoPoolResourceId in model FollowerDatabaseDefinitionInner")); + } + if (attachedDatabaseConfigurationName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property attachedDatabaseConfigurationName in model" + + " FollowerDatabaseDefinitionInner")); + } + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/GeoBackupPolicyInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/GeoBackupPolicyInner.java index e51359b8040ea..82c90f398caaa 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/GeoBackupPolicyInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/GeoBackupPolicyInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.GeoBackupPolicyState; @@ -12,16 +13,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** A database geo backup policy. */ +@JsonFlatten @Fluent -public final class GeoBackupPolicyInner extends ProxyResource { +public class GeoBackupPolicyInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(GeoBackupPolicyInner.class); - /* - * The properties of the geo backup policy. - */ - @JsonProperty(value = "properties", required = true) - private GeoBackupPolicyProperties innerProperties = new GeoBackupPolicyProperties(); - /* * Kind of geo backup policy. This is metadata used for the Azure portal * experience. @@ -35,14 +31,17 @@ public final class GeoBackupPolicyInner extends ProxyResource { @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) private String location; - /** - * Get the innerProperties property: The properties of the geo backup policy. - * - * @return the innerProperties value. + /* + * The state of the geo backup policy. */ - private GeoBackupPolicyProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.state", required = true) + private GeoBackupPolicyState state; + + /* + * The storage type of the geo backup policy. + */ + @JsonProperty(value = "properties.storageType", access = JsonProperty.Access.WRITE_ONLY) + private String storageType; /** * Get the kind property: Kind of geo backup policy. This is metadata used for the Azure portal experience. @@ -68,7 +67,7 @@ public String location() { * @return the state value. */ public GeoBackupPolicyState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); + return this.state; } /** @@ -78,10 +77,7 @@ public GeoBackupPolicyState state() { * @return the GeoBackupPolicyInner object itself. */ public GeoBackupPolicyInner withState(GeoBackupPolicyState state) { - if (this.innerProperties() == null) { - this.innerProperties = new GeoBackupPolicyProperties(); - } - this.innerProperties().withState(state); + this.state = state; return this; } @@ -91,7 +87,7 @@ public GeoBackupPolicyInner withState(GeoBackupPolicyState state) { * @return the storageType value. */ public String storageType() { - return this.innerProperties() == null ? null : this.innerProperties().storageType(); + return this.storageType; } /** @@ -100,13 +96,10 @@ public String storageType() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() == null) { + if (state() == null) { throw logger .logExceptionAsError( - new IllegalArgumentException( - "Missing required property innerProperties in model GeoBackupPolicyInner")); - } else { - innerProperties().validate(); + new IllegalArgumentException("Missing required property state in model GeoBackupPolicyInner")); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/GeoBackupPolicyProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/GeoBackupPolicyProperties.java deleted file mode 100644 index 5e1a23b645292..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/GeoBackupPolicyProperties.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.GeoBackupPolicyState; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The properties of the geo backup policy. */ -@Fluent -public final class GeoBackupPolicyProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GeoBackupPolicyProperties.class); - - /* - * The state of the geo backup policy. - */ - @JsonProperty(value = "state", required = true) - private GeoBackupPolicyState state; - - /* - * The storage type of the geo backup policy. - */ - @JsonProperty(value = "storageType", access = JsonProperty.Access.WRITE_ONLY) - private String storageType; - - /** - * Get the state property: The state of the geo backup policy. - * - * @return the state value. - */ - public GeoBackupPolicyState state() { - return this.state; - } - - /** - * Set the state property: The state of the geo backup policy. - * - * @param state the state value to set. - * @return the GeoBackupPolicyProperties object itself. - */ - public GeoBackupPolicyProperties withState(GeoBackupPolicyState state) { - this.state = state; - return this; - } - - /** - * Get the storageType property: The storage type of the geo backup policy. - * - * @return the storageType value. - */ - public String storageType() { - return this.storageType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (state() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property state in model GeoBackupPolicyProperties")); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/IpFirewallRuleInfoInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/IpFirewallRuleInfoInner.java index 669d87ce87bd6..b979ef0074928 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/IpFirewallRuleInfoInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/IpFirewallRuleInfoInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.ProvisioningState; @@ -12,24 +13,29 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** IP firewall rule. */ +@JsonFlatten @Fluent -public final class IpFirewallRuleInfoInner extends ProxyResource { +public class IpFirewallRuleInfoInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(IpFirewallRuleInfoInner.class); /* - * IP firewall rule properties + * The end IP address of the firewall rule. Must be IPv4 format. Must be + * greater than or equal to startIpAddress */ - @JsonProperty(value = "properties") - private IpFirewallRuleProperties innerProperties; + @JsonProperty(value = "properties.endIpAddress") + private String endIpAddress; - /** - * Get the innerProperties property: IP firewall rule properties. - * - * @return the innerProperties value. + /* + * Resource provisioning state */ - private IpFirewallRuleProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * The start IP address of the firewall rule. Must be IPv4 format + */ + @JsonProperty(value = "properties.startIpAddress") + private String startIpAddress; /** * Get the endIpAddress property: The end IP address of the firewall rule. Must be IPv4 format. Must be greater than @@ -38,7 +44,7 @@ private IpFirewallRuleProperties innerProperties() { * @return the endIpAddress value. */ public String endIpAddress() { - return this.innerProperties() == null ? null : this.innerProperties().endIpAddress(); + return this.endIpAddress; } /** @@ -49,10 +55,7 @@ public String endIpAddress() { * @return the IpFirewallRuleInfoInner object itself. */ public IpFirewallRuleInfoInner withEndIpAddress(String endIpAddress) { - if (this.innerProperties() == null) { - this.innerProperties = new IpFirewallRuleProperties(); - } - this.innerProperties().withEndIpAddress(endIpAddress); + this.endIpAddress = endIpAddress; return this; } @@ -62,7 +65,7 @@ public IpFirewallRuleInfoInner withEndIpAddress(String endIpAddress) { * @return the provisioningState value. */ public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + return this.provisioningState; } /** @@ -71,7 +74,7 @@ public ProvisioningState provisioningState() { * @return the startIpAddress value. */ public String startIpAddress() { - return this.innerProperties() == null ? null : this.innerProperties().startIpAddress(); + return this.startIpAddress; } /** @@ -81,10 +84,7 @@ public String startIpAddress() { * @return the IpFirewallRuleInfoInner object itself. */ public IpFirewallRuleInfoInner withStartIpAddress(String startIpAddress) { - if (this.innerProperties() == null) { - this.innerProperties = new IpFirewallRuleProperties(); - } - this.innerProperties().withStartIpAddress(startIpAddress); + this.startIpAddress = startIpAddress; return this; } @@ -94,8 +94,5 @@ public IpFirewallRuleInfoInner withStartIpAddress(String startIpAddress) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/KeyInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/KeyInner.java index c719a460976cf..7cb05a3f23620 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/KeyInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/KeyInner.java @@ -5,30 +5,29 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A workspace key. */ +@JsonFlatten @Fluent -public final class KeyInner extends ProxyResource { +public class KeyInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(KeyInner.class); /* - * Keys resource properties + * Used to activate the workspace after a customer managed key is provided. */ - @JsonProperty(value = "properties") - private KeyProperties innerProperties; + @JsonProperty(value = "properties.isActiveCMK") + private Boolean isActiveCmk; - /** - * Get the innerProperties property: Keys resource properties. - * - * @return the innerProperties value. + /* + * The Key Vault Url of the workspace key. */ - private KeyProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.keyVaultUrl") + private String keyVaultUrl; /** * Get the isActiveCmk property: Used to activate the workspace after a customer managed key is provided. @@ -36,7 +35,7 @@ private KeyProperties innerProperties() { * @return the isActiveCmk value. */ public Boolean isActiveCmk() { - return this.innerProperties() == null ? null : this.innerProperties().isActiveCmk(); + return this.isActiveCmk; } /** @@ -46,10 +45,7 @@ public Boolean isActiveCmk() { * @return the KeyInner object itself. */ public KeyInner withIsActiveCmk(Boolean isActiveCmk) { - if (this.innerProperties() == null) { - this.innerProperties = new KeyProperties(); - } - this.innerProperties().withIsActiveCmk(isActiveCmk); + this.isActiveCmk = isActiveCmk; return this; } @@ -59,7 +55,7 @@ public KeyInner withIsActiveCmk(Boolean isActiveCmk) { * @return the keyVaultUrl value. */ public String keyVaultUrl() { - return this.innerProperties() == null ? null : this.innerProperties().keyVaultUrl(); + return this.keyVaultUrl; } /** @@ -69,10 +65,7 @@ public String keyVaultUrl() { * @return the KeyInner object itself. */ public KeyInner withKeyVaultUrl(String keyVaultUrl) { - if (this.innerProperties() == null) { - this.innerProperties = new KeyProperties(); - } - this.innerProperties().withKeyVaultUrl(keyVaultUrl); + this.keyVaultUrl = keyVaultUrl; return this; } @@ -82,8 +75,5 @@ public KeyInner withKeyVaultUrl(String keyVaultUrl) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/KeyProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/KeyProperties.java deleted file mode 100644 index 61703cd3a18aa..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/KeyProperties.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Key properties. */ -@Fluent -public final class KeyProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(KeyProperties.class); - - /* - * Used to activate the workspace after a customer managed key is provided. - */ - @JsonProperty(value = "isActiveCMK") - private Boolean isActiveCmk; - - /* - * The Key Vault Url of the workspace key. - */ - @JsonProperty(value = "keyVaultUrl") - private String keyVaultUrl; - - /** - * Get the isActiveCmk property: Used to activate the workspace after a customer managed key is provided. - * - * @return the isActiveCmk value. - */ - public Boolean isActiveCmk() { - return this.isActiveCmk; - } - - /** - * Set the isActiveCmk property: Used to activate the workspace after a customer managed key is provided. - * - * @param isActiveCmk the isActiveCmk value to set. - * @return the KeyProperties object itself. - */ - public KeyProperties withIsActiveCmk(Boolean isActiveCmk) { - this.isActiveCmk = isActiveCmk; - return this; - } - - /** - * Get the keyVaultUrl property: The Key Vault Url of the workspace key. - * - * @return the keyVaultUrl value. - */ - public String keyVaultUrl() { - return this.keyVaultUrl; - } - - /** - * Set the keyVaultUrl property: The Key Vault Url of the workspace key. - * - * @param keyVaultUrl the keyVaultUrl value to set. - * @return the KeyProperties object itself. - */ - public KeyProperties withKeyVaultUrl(String keyVaultUrl) { - this.keyVaultUrl = keyVaultUrl; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/KustoPoolInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/KustoPoolInner.java new file mode 100644 index 0000000000000..7d1caa0ddd3ed --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/KustoPoolInner.java @@ -0,0 +1,312 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.models.AzureSku; +import com.azure.resourcemanager.synapse.models.LanguageExtensionsList; +import com.azure.resourcemanager.synapse.models.OptimizedAutoscale; +import com.azure.resourcemanager.synapse.models.ResourceProvisioningState; +import com.azure.resourcemanager.synapse.models.State; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Class representing a Kusto kusto pool. */ +@JsonFlatten +@Fluent +public class KustoPoolInner extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KustoPoolInner.class); + + /* + * The SKU of the kusto pool. + */ + @JsonProperty(value = "sku", required = true) + private AzureSku sku; + + /* + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy + * information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /* + * The state of the resource. + */ + @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) + private State state; + + /* + * The provisioned state of the resource. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ResourceProvisioningState provisioningState; + + /* + * The Kusto Pool URI. + */ + @JsonProperty(value = "properties.uri", access = JsonProperty.Access.WRITE_ONLY) + private String uri; + + /* + * The Kusto Pool data ingestion URI. + */ + @JsonProperty(value = "properties.dataIngestionUri", access = JsonProperty.Access.WRITE_ONLY) + private String dataIngestionUri; + + /* + * The reason for the Kusto Pool's current state. + */ + @JsonProperty(value = "properties.stateReason", access = JsonProperty.Access.WRITE_ONLY) + private String stateReason; + + /* + * Optimized auto scale definition. + */ + @JsonProperty(value = "properties.optimizedAutoscale") + private OptimizedAutoscale optimizedAutoscale; + + /* + * A boolean value that indicates if the streaming ingest is enabled. + */ + @JsonProperty(value = "properties.enableStreamingIngest") + private Boolean enableStreamingIngest; + + /* + * A boolean value that indicates if the purge operations are enabled. + */ + @JsonProperty(value = "properties.enablePurge") + private Boolean enablePurge; + + /* + * List of the Kusto Pool's language extensions. + */ + @JsonProperty(value = "properties.languageExtensions", access = JsonProperty.Access.WRITE_ONLY) + private LanguageExtensionsList languageExtensions; + + /* + * The workspace unique identifier. + */ + @JsonProperty(value = "properties.workspaceUID") + private String workspaceUid; + + /** + * Get the sku property: The SKU of the kusto pool. + * + * @return the sku value. + */ + public AzureSku sku() { + return this.sku; + } + + /** + * Set the sku property: The SKU of the kusto pool. + * + * @param sku the sku value to set. + * @return the KustoPoolInner object itself. + */ + public KustoPoolInner withSku(AzureSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the etag property: A unique read-only string that changes whenever the resource is updated. + * + * @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 state property: The state of the resource. + * + * @return the state value. + */ + public State state() { + return this.state; + } + + /** + * Get the provisioningState property: The provisioned state of the resource. + * + * @return the provisioningState value. + */ + public ResourceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the uri property: The Kusto Pool URI. + * + * @return the uri value. + */ + public String uri() { + return this.uri; + } + + /** + * Get the dataIngestionUri property: The Kusto Pool data ingestion URI. + * + * @return the dataIngestionUri value. + */ + public String dataIngestionUri() { + return this.dataIngestionUri; + } + + /** + * Get the stateReason property: The reason for the Kusto Pool's current state. + * + * @return the stateReason value. + */ + public String stateReason() { + return this.stateReason; + } + + /** + * Get the optimizedAutoscale property: Optimized auto scale definition. + * + * @return the optimizedAutoscale value. + */ + public OptimizedAutoscale optimizedAutoscale() { + return this.optimizedAutoscale; + } + + /** + * Set the optimizedAutoscale property: Optimized auto scale definition. + * + * @param optimizedAutoscale the optimizedAutoscale value to set. + * @return the KustoPoolInner object itself. + */ + public KustoPoolInner withOptimizedAutoscale(OptimizedAutoscale optimizedAutoscale) { + this.optimizedAutoscale = optimizedAutoscale; + return this; + } + + /** + * Get the enableStreamingIngest property: A boolean value that indicates if the streaming ingest is enabled. + * + * @return the enableStreamingIngest value. + */ + public Boolean enableStreamingIngest() { + return this.enableStreamingIngest; + } + + /** + * Set the enableStreamingIngest property: A boolean value that indicates if the streaming ingest is enabled. + * + * @param enableStreamingIngest the enableStreamingIngest value to set. + * @return the KustoPoolInner object itself. + */ + public KustoPoolInner withEnableStreamingIngest(Boolean enableStreamingIngest) { + this.enableStreamingIngest = enableStreamingIngest; + return this; + } + + /** + * Get the enablePurge property: A boolean value that indicates if the purge operations are enabled. + * + * @return the enablePurge value. + */ + public Boolean enablePurge() { + return this.enablePurge; + } + + /** + * Set the enablePurge property: A boolean value that indicates if the purge operations are enabled. + * + * @param enablePurge the enablePurge value to set. + * @return the KustoPoolInner object itself. + */ + public KustoPoolInner withEnablePurge(Boolean enablePurge) { + this.enablePurge = enablePurge; + return this; + } + + /** + * Get the languageExtensions property: List of the Kusto Pool's language extensions. + * + * @return the languageExtensions value. + */ + public LanguageExtensionsList languageExtensions() { + return this.languageExtensions; + } + + /** + * Get the workspaceUid property: The workspace unique identifier. + * + * @return the workspaceUid value. + */ + public String workspaceUid() { + return this.workspaceUid; + } + + /** + * Set the workspaceUid property: The workspace unique identifier. + * + * @param workspaceUid the workspaceUid value to set. + * @return the KustoPoolInner object itself. + */ + public KustoPoolInner withWorkspaceUid(String workspaceUid) { + this.workspaceUid = workspaceUid; + return this; + } + + /** {@inheritDoc} */ + @Override + public KustoPoolInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public KustoPoolInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sku() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property sku in model KustoPoolInner")); + } else { + sku().validate(); + } + if (optimizedAutoscale() != null) { + optimizedAutoscale().validate(); + } + if (languageExtensions() != null) { + languageExtensions().validate(); + } + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/KustoPoolListResultInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/KustoPoolListResultInner.java new file mode 100644 index 0000000000000..87a40a6a4e282 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/KustoPoolListResultInner.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The list Kusto pools operation response. */ +@Fluent +public final class KustoPoolListResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KustoPoolListResultInner.class); + + /* + * The list of Kusto pools. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value property: The list of Kusto pools. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of Kusto pools. + * + * @param value the value value to set. + * @return the KustoPoolListResultInner object itself. + */ + public KustoPoolListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/LanguageExtensionInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/LanguageExtensionInner.java new file mode 100644 index 0000000000000..20f541989c0a4 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/LanguageExtensionInner.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.models.LanguageExtensionName; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The language extension object. */ +@Fluent +public final class LanguageExtensionInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LanguageExtensionInner.class); + + /* + * The language extension name. + */ + @JsonProperty(value = "languageExtensionName") + private LanguageExtensionName languageExtensionName; + + /** + * Get the languageExtensionName property: The language extension name. + * + * @return the languageExtensionName value. + */ + public LanguageExtensionName languageExtensionName() { + return this.languageExtensionName; + } + + /** + * Set the languageExtensionName property: The language extension name. + * + * @param languageExtensionName the languageExtensionName value to set. + * @return the LanguageExtensionInner object itself. + */ + public LanguageExtensionInner withLanguageExtensionName(LanguageExtensionName languageExtensionName) { + this.languageExtensionName = languageExtensionName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/LibraryResourceInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/LibraryResourceInner.java index 13194de1c3c1e..60b9aa9e00338 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/LibraryResourceInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/LibraryResourceInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.EntityResource; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -12,47 +13,70 @@ import java.time.OffsetDateTime; /** Library response details. */ +@JsonFlatten @Fluent -public final class LibraryResourceInner extends EntityResource { +public class LibraryResourceInner extends EntityResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(LibraryResourceInner.class); /* - * Information about a library/package created at the workspace level. - * Library/package properties. + * Name of the library. */ - @JsonProperty(value = "properties", required = true) - private LibraryInfo innerProperties = new LibraryInfo(); + @JsonProperty(value = "properties.name") + private String namePropertiesName; - /** - * Get the innerProperties property: Information about a library/package created at the workspace level. - * Library/package properties. - * - * @return the innerProperties value. + /* + * Storage blob path of library. */ - private LibraryInfo innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.path") + private String path; + + /* + * Storage blob container name. + */ + @JsonProperty(value = "properties.containerName") + private String containerName; + + /* + * The last update time of the library. + */ + @JsonProperty(value = "properties.uploadedTimestamp") + private OffsetDateTime uploadedTimestamp; + + /* + * Type of the library. + */ + @JsonProperty(value = "properties.type") + private String typePropertiesType; + + /* + * Provisioning status of the library/package. + */ + @JsonProperty(value = "properties.provisioningStatus", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningStatus; + + /* + * Creator Id of the library/package. + */ + @JsonProperty(value = "properties.creatorId", access = JsonProperty.Access.WRITE_ONLY) + private String creatorId; /** - * Get the name property: Name of the library. + * Get the namePropertiesName property: Name of the library. * - * @return the name value. + * @return the namePropertiesName value. */ public String namePropertiesName() { - return this.innerProperties() == null ? null : this.innerProperties().name(); + return this.namePropertiesName; } /** - * Set the name property: Name of the library. + * Set the namePropertiesName property: Name of the library. * - * @param name the name value to set. + * @param namePropertiesName the namePropertiesName value to set. * @return the LibraryResourceInner object itself. */ - public LibraryResourceInner withNamePropertiesName(String name) { - if (this.innerProperties() == null) { - this.innerProperties = new LibraryInfo(); - } - this.innerProperties().withName(name); + public LibraryResourceInner withNamePropertiesName(String namePropertiesName) { + this.namePropertiesName = namePropertiesName; return this; } @@ -62,7 +86,7 @@ public LibraryResourceInner withNamePropertiesName(String name) { * @return the path value. */ public String path() { - return this.innerProperties() == null ? null : this.innerProperties().path(); + return this.path; } /** @@ -72,10 +96,7 @@ public String path() { * @return the LibraryResourceInner object itself. */ public LibraryResourceInner withPath(String path) { - if (this.innerProperties() == null) { - this.innerProperties = new LibraryInfo(); - } - this.innerProperties().withPath(path); + this.path = path; return this; } @@ -85,7 +106,7 @@ public LibraryResourceInner withPath(String path) { * @return the containerName value. */ public String containerName() { - return this.innerProperties() == null ? null : this.innerProperties().containerName(); + return this.containerName; } /** @@ -95,10 +116,7 @@ public String containerName() { * @return the LibraryResourceInner object itself. */ public LibraryResourceInner withContainerName(String containerName) { - if (this.innerProperties() == null) { - this.innerProperties = new LibraryInfo(); - } - this.innerProperties().withContainerName(containerName); + this.containerName = containerName; return this; } @@ -108,7 +126,7 @@ public LibraryResourceInner withContainerName(String containerName) { * @return the uploadedTimestamp value. */ public OffsetDateTime uploadedTimestamp() { - return this.innerProperties() == null ? null : this.innerProperties().uploadedTimestamp(); + return this.uploadedTimestamp; } /** @@ -118,33 +136,27 @@ public OffsetDateTime uploadedTimestamp() { * @return the LibraryResourceInner object itself. */ public LibraryResourceInner withUploadedTimestamp(OffsetDateTime uploadedTimestamp) { - if (this.innerProperties() == null) { - this.innerProperties = new LibraryInfo(); - } - this.innerProperties().withUploadedTimestamp(uploadedTimestamp); + this.uploadedTimestamp = uploadedTimestamp; return this; } /** - * Get the type property: Type of the library. + * Get the typePropertiesType property: Type of the library. * - * @return the type value. + * @return the typePropertiesType value. */ public String typePropertiesType() { - return this.innerProperties() == null ? null : this.innerProperties().type(); + return this.typePropertiesType; } /** - * Set the type property: Type of the library. + * Set the typePropertiesType property: Type of the library. * - * @param type the type value to set. + * @param typePropertiesType the typePropertiesType value to set. * @return the LibraryResourceInner object itself. */ - public LibraryResourceInner withTypePropertiesType(String type) { - if (this.innerProperties() == null) { - this.innerProperties = new LibraryInfo(); - } - this.innerProperties().withType(type); + public LibraryResourceInner withTypePropertiesType(String typePropertiesType) { + this.typePropertiesType = typePropertiesType; return this; } @@ -154,7 +166,7 @@ public LibraryResourceInner withTypePropertiesType(String type) { * @return the provisioningStatus value. */ public String provisioningStatus() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningStatus(); + return this.provisioningStatus; } /** @@ -163,7 +175,7 @@ public String provisioningStatus() { * @return the creatorId value. */ public String creatorId() { - return this.innerProperties() == null ? null : this.innerProperties().creatorId(); + return this.creatorId; } /** @@ -174,13 +186,5 @@ public String creatorId() { @Override public void validate() { super.validate(); - if (innerProperties() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property innerProperties in model LibraryResourceInner")); - } else { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/LicensedComponentSetupTypeProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/LicensedComponentSetupTypeProperties.java deleted file mode 100644 index 73627ad917cba..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/LicensedComponentSetupTypeProperties.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.SecretBase; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Installation of licensed component setup type properties. */ -@Fluent -public final class LicensedComponentSetupTypeProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LicensedComponentSetupTypeProperties.class); - - /* - * The name of the 3rd party component. - */ - @JsonProperty(value = "componentName", required = true) - private String componentName; - - /* - * The license key to activate the component. - */ - @JsonProperty(value = "licenseKey") - private SecretBase licenseKey; - - /** - * Get the componentName property: The name of the 3rd party component. - * - * @return the componentName value. - */ - public String componentName() { - return this.componentName; - } - - /** - * Set the componentName property: The name of the 3rd party component. - * - * @param componentName the componentName value to set. - * @return the LicensedComponentSetupTypeProperties object itself. - */ - public LicensedComponentSetupTypeProperties withComponentName(String componentName) { - this.componentName = componentName; - return this; - } - - /** - * Get the licenseKey property: The license key to activate the component. - * - * @return the licenseKey value. - */ - public SecretBase licenseKey() { - return this.licenseKey; - } - - /** - * Set the licenseKey property: The license key to activate the component. - * - * @param licenseKey the licenseKey value to set. - * @return the LicensedComponentSetupTypeProperties object itself. - */ - public LicensedComponentSetupTypeProperties withLicenseKey(SecretBase licenseKey) { - this.licenseKey = licenseKey; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (componentName() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property componentName in model LicensedComponentSetupTypeProperties")); - } - if (licenseKey() != null) { - licenseKey().validate(); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MaintenanceWindowOptionsInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MaintenanceWindowOptionsInner.java index cc1d75ed77c9c..2d2fb50ebe3af 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MaintenanceWindowOptionsInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MaintenanceWindowOptionsInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.MaintenanceWindowTimeRange; @@ -13,24 +14,53 @@ import java.util.List; /** Maintenance window options. */ +@JsonFlatten @Fluent -public final class MaintenanceWindowOptionsInner extends ProxyResource { +public class MaintenanceWindowOptionsInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(MaintenanceWindowOptionsInner.class); /* - * Resource properties. + * Whether maintenance windows are enabled for the database. */ - @JsonProperty(value = "properties") - private MaintenanceWindowOptionsProperties innerProperties; + @JsonProperty(value = "properties.isEnabled") + private Boolean isEnabled; - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. + /* + * Available maintenance cycles e.g. {Saturday, 0, 48*60}, {Wednesday, 0, + * 24*60}. */ - private MaintenanceWindowOptionsProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.maintenanceWindowCycles") + private List maintenanceWindowCycles; + + /* + * Minimum duration of maintenance window. + */ + @JsonProperty(value = "properties.minDurationInMinutes") + private Integer minDurationInMinutes; + + /* + * Default duration for maintenance window. + */ + @JsonProperty(value = "properties.defaultDurationInMinutes") + private Integer defaultDurationInMinutes; + + /* + * Minimum number of maintenance windows cycles to be set on the database. + */ + @JsonProperty(value = "properties.minCycles") + private Integer minCycles; + + /* + * Time granularity in minutes for maintenance windows. + */ + @JsonProperty(value = "properties.timeGranularityInMinutes") + private Integer timeGranularityInMinutes; + + /* + * Whether we allow multiple maintenance windows per cycle. + */ + @JsonProperty(value = "properties.allowMultipleMaintenanceWindowsPerCycle") + private Boolean allowMultipleMaintenanceWindowsPerCycle; /** * Get the isEnabled property: Whether maintenance windows are enabled for the database. @@ -38,7 +68,7 @@ private MaintenanceWindowOptionsProperties innerProperties() { * @return the isEnabled value. */ public Boolean isEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().isEnabled(); + return this.isEnabled; } /** @@ -48,10 +78,7 @@ public Boolean isEnabled() { * @return the MaintenanceWindowOptionsInner object itself. */ public MaintenanceWindowOptionsInner withIsEnabled(Boolean isEnabled) { - if (this.innerProperties() == null) { - this.innerProperties = new MaintenanceWindowOptionsProperties(); - } - this.innerProperties().withIsEnabled(isEnabled); + this.isEnabled = isEnabled; return this; } @@ -62,7 +89,7 @@ public MaintenanceWindowOptionsInner withIsEnabled(Boolean isEnabled) { * @return the maintenanceWindowCycles value. */ public List maintenanceWindowCycles() { - return this.innerProperties() == null ? null : this.innerProperties().maintenanceWindowCycles(); + return this.maintenanceWindowCycles; } /** @@ -74,10 +101,7 @@ public List maintenanceWindowCycles() { */ public MaintenanceWindowOptionsInner withMaintenanceWindowCycles( List maintenanceWindowCycles) { - if (this.innerProperties() == null) { - this.innerProperties = new MaintenanceWindowOptionsProperties(); - } - this.innerProperties().withMaintenanceWindowCycles(maintenanceWindowCycles); + this.maintenanceWindowCycles = maintenanceWindowCycles; return this; } @@ -87,7 +111,7 @@ public MaintenanceWindowOptionsInner withMaintenanceWindowCycles( * @return the minDurationInMinutes value. */ public Integer minDurationInMinutes() { - return this.innerProperties() == null ? null : this.innerProperties().minDurationInMinutes(); + return this.minDurationInMinutes; } /** @@ -97,10 +121,7 @@ public Integer minDurationInMinutes() { * @return the MaintenanceWindowOptionsInner object itself. */ public MaintenanceWindowOptionsInner withMinDurationInMinutes(Integer minDurationInMinutes) { - if (this.innerProperties() == null) { - this.innerProperties = new MaintenanceWindowOptionsProperties(); - } - this.innerProperties().withMinDurationInMinutes(minDurationInMinutes); + this.minDurationInMinutes = minDurationInMinutes; return this; } @@ -110,7 +131,7 @@ public MaintenanceWindowOptionsInner withMinDurationInMinutes(Integer minDuratio * @return the defaultDurationInMinutes value. */ public Integer defaultDurationInMinutes() { - return this.innerProperties() == null ? null : this.innerProperties().defaultDurationInMinutes(); + return this.defaultDurationInMinutes; } /** @@ -120,10 +141,7 @@ public Integer defaultDurationInMinutes() { * @return the MaintenanceWindowOptionsInner object itself. */ public MaintenanceWindowOptionsInner withDefaultDurationInMinutes(Integer defaultDurationInMinutes) { - if (this.innerProperties() == null) { - this.innerProperties = new MaintenanceWindowOptionsProperties(); - } - this.innerProperties().withDefaultDurationInMinutes(defaultDurationInMinutes); + this.defaultDurationInMinutes = defaultDurationInMinutes; return this; } @@ -133,7 +151,7 @@ public MaintenanceWindowOptionsInner withDefaultDurationInMinutes(Integer defaul * @return the minCycles value. */ public Integer minCycles() { - return this.innerProperties() == null ? null : this.innerProperties().minCycles(); + return this.minCycles; } /** @@ -143,10 +161,7 @@ public Integer minCycles() { * @return the MaintenanceWindowOptionsInner object itself. */ public MaintenanceWindowOptionsInner withMinCycles(Integer minCycles) { - if (this.innerProperties() == null) { - this.innerProperties = new MaintenanceWindowOptionsProperties(); - } - this.innerProperties().withMinCycles(minCycles); + this.minCycles = minCycles; return this; } @@ -156,7 +171,7 @@ public MaintenanceWindowOptionsInner withMinCycles(Integer minCycles) { * @return the timeGranularityInMinutes value. */ public Integer timeGranularityInMinutes() { - return this.innerProperties() == null ? null : this.innerProperties().timeGranularityInMinutes(); + return this.timeGranularityInMinutes; } /** @@ -166,10 +181,7 @@ public Integer timeGranularityInMinutes() { * @return the MaintenanceWindowOptionsInner object itself. */ public MaintenanceWindowOptionsInner withTimeGranularityInMinutes(Integer timeGranularityInMinutes) { - if (this.innerProperties() == null) { - this.innerProperties = new MaintenanceWindowOptionsProperties(); - } - this.innerProperties().withTimeGranularityInMinutes(timeGranularityInMinutes); + this.timeGranularityInMinutes = timeGranularityInMinutes; return this; } @@ -180,7 +192,7 @@ public MaintenanceWindowOptionsInner withTimeGranularityInMinutes(Integer timeGr * @return the allowMultipleMaintenanceWindowsPerCycle value. */ public Boolean allowMultipleMaintenanceWindowsPerCycle() { - return this.innerProperties() == null ? null : this.innerProperties().allowMultipleMaintenanceWindowsPerCycle(); + return this.allowMultipleMaintenanceWindowsPerCycle; } /** @@ -192,10 +204,7 @@ public Boolean allowMultipleMaintenanceWindowsPerCycle() { */ public MaintenanceWindowOptionsInner withAllowMultipleMaintenanceWindowsPerCycle( Boolean allowMultipleMaintenanceWindowsPerCycle) { - if (this.innerProperties() == null) { - this.innerProperties = new MaintenanceWindowOptionsProperties(); - } - this.innerProperties().withAllowMultipleMaintenanceWindowsPerCycle(allowMultipleMaintenanceWindowsPerCycle); + this.allowMultipleMaintenanceWindowsPerCycle = allowMultipleMaintenanceWindowsPerCycle; return this; } @@ -205,8 +214,8 @@ public MaintenanceWindowOptionsInner withAllowMultipleMaintenanceWindowsPerCycle * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (maintenanceWindowCycles() != null) { + maintenanceWindowCycles().forEach(e -> e.validate()); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MaintenanceWindowOptionsProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MaintenanceWindowOptionsProperties.java deleted file mode 100644 index cf7b8954921ea..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MaintenanceWindowOptionsProperties.java +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.MaintenanceWindowTimeRange; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Maintenance window options properties. */ -@Fluent -public final class MaintenanceWindowOptionsProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MaintenanceWindowOptionsProperties.class); - - /* - * Whether maintenance windows are enabled for the database. - */ - @JsonProperty(value = "isEnabled") - private Boolean isEnabled; - - /* - * Available maintenance cycles e.g. {Saturday, 0, 48*60}, {Wednesday, 0, - * 24*60}. - */ - @JsonProperty(value = "maintenanceWindowCycles") - private List maintenanceWindowCycles; - - /* - * Minimum duration of maintenance window. - */ - @JsonProperty(value = "minDurationInMinutes") - private Integer minDurationInMinutes; - - /* - * Default duration for maintenance window. - */ - @JsonProperty(value = "defaultDurationInMinutes") - private Integer defaultDurationInMinutes; - - /* - * Minimum number of maintenance windows cycles to be set on the database. - */ - @JsonProperty(value = "minCycles") - private Integer minCycles; - - /* - * Time granularity in minutes for maintenance windows. - */ - @JsonProperty(value = "timeGranularityInMinutes") - private Integer timeGranularityInMinutes; - - /* - * Whether we allow multiple maintenance windows per cycle. - */ - @JsonProperty(value = "allowMultipleMaintenanceWindowsPerCycle") - private Boolean allowMultipleMaintenanceWindowsPerCycle; - - /** - * Get the isEnabled property: Whether maintenance windows are enabled for the database. - * - * @return the isEnabled value. - */ - public Boolean isEnabled() { - return this.isEnabled; - } - - /** - * Set the isEnabled property: Whether maintenance windows are enabled for the database. - * - * @param isEnabled the isEnabled value to set. - * @return the MaintenanceWindowOptionsProperties object itself. - */ - public MaintenanceWindowOptionsProperties withIsEnabled(Boolean isEnabled) { - this.isEnabled = isEnabled; - return this; - } - - /** - * Get the maintenanceWindowCycles property: Available maintenance cycles e.g. {Saturday, 0, 48*60}, {Wednesday, 0, - * 24*60}. - * - * @return the maintenanceWindowCycles value. - */ - public List maintenanceWindowCycles() { - return this.maintenanceWindowCycles; - } - - /** - * Set the maintenanceWindowCycles property: Available maintenance cycles e.g. {Saturday, 0, 48*60}, {Wednesday, 0, - * 24*60}. - * - * @param maintenanceWindowCycles the maintenanceWindowCycles value to set. - * @return the MaintenanceWindowOptionsProperties object itself. - */ - public MaintenanceWindowOptionsProperties withMaintenanceWindowCycles( - List maintenanceWindowCycles) { - this.maintenanceWindowCycles = maintenanceWindowCycles; - return this; - } - - /** - * Get the minDurationInMinutes property: Minimum duration of maintenance window. - * - * @return the minDurationInMinutes value. - */ - public Integer minDurationInMinutes() { - return this.minDurationInMinutes; - } - - /** - * Set the minDurationInMinutes property: Minimum duration of maintenance window. - * - * @param minDurationInMinutes the minDurationInMinutes value to set. - * @return the MaintenanceWindowOptionsProperties object itself. - */ - public MaintenanceWindowOptionsProperties withMinDurationInMinutes(Integer minDurationInMinutes) { - this.minDurationInMinutes = minDurationInMinutes; - return this; - } - - /** - * Get the defaultDurationInMinutes property: Default duration for maintenance window. - * - * @return the defaultDurationInMinutes value. - */ - public Integer defaultDurationInMinutes() { - return this.defaultDurationInMinutes; - } - - /** - * Set the defaultDurationInMinutes property: Default duration for maintenance window. - * - * @param defaultDurationInMinutes the defaultDurationInMinutes value to set. - * @return the MaintenanceWindowOptionsProperties object itself. - */ - public MaintenanceWindowOptionsProperties withDefaultDurationInMinutes(Integer defaultDurationInMinutes) { - this.defaultDurationInMinutes = defaultDurationInMinutes; - return this; - } - - /** - * Get the minCycles property: Minimum number of maintenance windows cycles to be set on the database. - * - * @return the minCycles value. - */ - public Integer minCycles() { - return this.minCycles; - } - - /** - * Set the minCycles property: Minimum number of maintenance windows cycles to be set on the database. - * - * @param minCycles the minCycles value to set. - * @return the MaintenanceWindowOptionsProperties object itself. - */ - public MaintenanceWindowOptionsProperties withMinCycles(Integer minCycles) { - this.minCycles = minCycles; - return this; - } - - /** - * Get the timeGranularityInMinutes property: Time granularity in minutes for maintenance windows. - * - * @return the timeGranularityInMinutes value. - */ - public Integer timeGranularityInMinutes() { - return this.timeGranularityInMinutes; - } - - /** - * Set the timeGranularityInMinutes property: Time granularity in minutes for maintenance windows. - * - * @param timeGranularityInMinutes the timeGranularityInMinutes value to set. - * @return the MaintenanceWindowOptionsProperties object itself. - */ - public MaintenanceWindowOptionsProperties withTimeGranularityInMinutes(Integer timeGranularityInMinutes) { - this.timeGranularityInMinutes = timeGranularityInMinutes; - return this; - } - - /** - * Get the allowMultipleMaintenanceWindowsPerCycle property: Whether we allow multiple maintenance windows per - * cycle. - * - * @return the allowMultipleMaintenanceWindowsPerCycle value. - */ - public Boolean allowMultipleMaintenanceWindowsPerCycle() { - return this.allowMultipleMaintenanceWindowsPerCycle; - } - - /** - * Set the allowMultipleMaintenanceWindowsPerCycle property: Whether we allow multiple maintenance windows per - * cycle. - * - * @param allowMultipleMaintenanceWindowsPerCycle the allowMultipleMaintenanceWindowsPerCycle value to set. - * @return the MaintenanceWindowOptionsProperties object itself. - */ - public MaintenanceWindowOptionsProperties withAllowMultipleMaintenanceWindowsPerCycle( - Boolean allowMultipleMaintenanceWindowsPerCycle) { - this.allowMultipleMaintenanceWindowsPerCycle = allowMultipleMaintenanceWindowsPerCycle; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (maintenanceWindowCycles() != null) { - maintenanceWindowCycles().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MaintenanceWindowsInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MaintenanceWindowsInner.java index 70327e4c26a5d..41b69243f26c6 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MaintenanceWindowsInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MaintenanceWindowsInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.MaintenanceWindowTimeRange; @@ -13,24 +14,16 @@ import java.util.List; /** Maintenance windows. */ +@JsonFlatten @Fluent -public final class MaintenanceWindowsInner extends ProxyResource { +public class MaintenanceWindowsInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(MaintenanceWindowsInner.class); /* - * Resource properties. + * The timeRanges property. */ - @JsonProperty(value = "properties") - private MaintenanceWindowsProperties innerProperties; - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private MaintenanceWindowsProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.timeRanges") + private List timeRanges; /** * Get the timeRanges property: The timeRanges property. @@ -38,7 +31,7 @@ private MaintenanceWindowsProperties innerProperties() { * @return the timeRanges value. */ public List timeRanges() { - return this.innerProperties() == null ? null : this.innerProperties().timeRanges(); + return this.timeRanges; } /** @@ -48,10 +41,7 @@ public List timeRanges() { * @return the MaintenanceWindowsInner object itself. */ public MaintenanceWindowsInner withTimeRanges(List timeRanges) { - if (this.innerProperties() == null) { - this.innerProperties = new MaintenanceWindowsProperties(); - } - this.innerProperties().withTimeRanges(timeRanges); + this.timeRanges = timeRanges; return this; } @@ -61,8 +51,8 @@ public MaintenanceWindowsInner withTimeRanges(List t * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (timeRanges() != null) { + timeRanges().forEach(e -> e.validate()); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MaintenanceWindowsProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MaintenanceWindowsProperties.java deleted file mode 100644 index a8ac929932ae5..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MaintenanceWindowsProperties.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.MaintenanceWindowTimeRange; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Maintenance windows resource properties. */ -@Fluent -public final class MaintenanceWindowsProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MaintenanceWindowsProperties.class); - - /* - * The timeRanges property. - */ - @JsonProperty(value = "timeRanges") - private List timeRanges; - - /** - * Get the timeRanges property: The timeRanges property. - * - * @return the timeRanges value. - */ - public List timeRanges() { - return this.timeRanges; - } - - /** - * Set the timeRanges property: The timeRanges property. - * - * @param timeRanges the timeRanges value to set. - * @return the MaintenanceWindowsProperties object itself. - */ - public MaintenanceWindowsProperties withTimeRanges(List timeRanges) { - this.timeRanges = timeRanges; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (timeRanges() != null) { - timeRanges().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ManagedIdentitySqlControlSettingsModelInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ManagedIdentitySqlControlSettingsModelInner.java index 427df6a84ca04..e51d988242b17 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ManagedIdentitySqlControlSettingsModelInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ManagedIdentitySqlControlSettingsModelInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity; @@ -12,26 +13,17 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** Managed Identity Sql Control Settings Sql Control Settings for workspace managed identity. */ +@JsonFlatten @Fluent -public final class ManagedIdentitySqlControlSettingsModelInner extends ProxyResource { +public class ManagedIdentitySqlControlSettingsModelInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedIdentitySqlControlSettingsModelInner.class); /* - * Managed Identity Sql Control Settings Sql Control Settings for workspace - * managed identity + * Grant sql control to managed identity */ - @JsonProperty(value = "properties") - private ManagedIdentitySqlControlSettingsModelProperties innerProperties; - - /** - * Get the innerProperties property: Managed Identity Sql Control Settings Sql Control Settings for workspace - * managed identity. - * - * @return the innerProperties value. - */ - private ManagedIdentitySqlControlSettingsModelProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.grantSqlControlToManagedIdentity") + private ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity + grantSqlControlToManagedIdentity; /** * Get the grantSqlControlToManagedIdentity property: Grant sql control to managed identity. @@ -40,7 +32,7 @@ private ManagedIdentitySqlControlSettingsModelProperties innerProperties() { */ public ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity grantSqlControlToManagedIdentity() { - return this.innerProperties() == null ? null : this.innerProperties().grantSqlControlToManagedIdentity(); + return this.grantSqlControlToManagedIdentity; } /** @@ -52,10 +44,7 @@ private ManagedIdentitySqlControlSettingsModelProperties innerProperties() { public ManagedIdentitySqlControlSettingsModelInner withGrantSqlControlToManagedIdentity( ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity grantSqlControlToManagedIdentity) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedIdentitySqlControlSettingsModelProperties(); - } - this.innerProperties().withGrantSqlControlToManagedIdentity(grantSqlControlToManagedIdentity); + this.grantSqlControlToManagedIdentity = grantSqlControlToManagedIdentity; return this; } @@ -65,8 +54,8 @@ public ManagedIdentitySqlControlSettingsModelInner withGrantSqlControlToManagedI * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (grantSqlControlToManagedIdentity() != null) { + grantSqlControlToManagedIdentity().validate(); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ManagedIdentitySqlControlSettingsModelProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ManagedIdentitySqlControlSettingsModelProperties.java deleted file mode 100644 index 4a25eff4652cb..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ManagedIdentitySqlControlSettingsModelProperties.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Managed Identity Sql Control Settings Sql Control Settings for workspace managed identity. */ -@Fluent -public final class ManagedIdentitySqlControlSettingsModelProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ManagedIdentitySqlControlSettingsModelProperties.class); - - /* - * Grant sql control to managed identity - */ - @JsonProperty(value = "grantSqlControlToManagedIdentity") - private ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity - grantSqlControlToManagedIdentity; - - /** - * Get the grantSqlControlToManagedIdentity property: Grant sql control to managed identity. - * - * @return the grantSqlControlToManagedIdentity value. - */ - public ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity - grantSqlControlToManagedIdentity() { - return this.grantSqlControlToManagedIdentity; - } - - /** - * Set the grantSqlControlToManagedIdentity property: Grant sql control to managed identity. - * - * @param grantSqlControlToManagedIdentity the grantSqlControlToManagedIdentity value to set. - * @return the ManagedIdentitySqlControlSettingsModelProperties object itself. - */ - public ManagedIdentitySqlControlSettingsModelProperties withGrantSqlControlToManagedIdentity( - ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity - grantSqlControlToManagedIdentity) { - this.grantSqlControlToManagedIdentity = grantSqlControlToManagedIdentity; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (grantSqlControlToManagedIdentity() != null) { - grantSqlControlToManagedIdentity().validate(); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ManagedIntegrationRuntimeStatusTypeProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ManagedIntegrationRuntimeStatusTypeProperties.java deleted file mode 100644 index 4175841551bac..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ManagedIntegrationRuntimeStatusTypeProperties.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.ManagedIntegrationRuntimeError; -import com.azure.resourcemanager.synapse.models.ManagedIntegrationRuntimeNode; -import com.azure.resourcemanager.synapse.models.ManagedIntegrationRuntimeOperationResult; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Managed integration runtime status type properties. */ -@Immutable -public final class ManagedIntegrationRuntimeStatusTypeProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ManagedIntegrationRuntimeStatusTypeProperties.class); - - /* - * The time at which the integration runtime was created, in ISO8601 - * format. - */ - @JsonProperty(value = "createTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createTime; - - /* - * The list of nodes for managed integration runtime. - */ - @JsonProperty(value = "nodes", access = JsonProperty.Access.WRITE_ONLY) - private List nodes; - - /* - * The errors that occurred on this integration runtime. - */ - @JsonProperty(value = "otherErrors", access = JsonProperty.Access.WRITE_ONLY) - private List otherErrors; - - /* - * The last operation result that occurred on this integration runtime. - */ - @JsonProperty(value = "lastOperation", access = JsonProperty.Access.WRITE_ONLY) - private ManagedIntegrationRuntimeOperationResult lastOperation; - - /** - * Get the createTime property: The time at which the integration runtime was created, in ISO8601 format. - * - * @return the createTime value. - */ - public OffsetDateTime createTime() { - return this.createTime; - } - - /** - * Get the nodes property: The list of nodes for managed integration runtime. - * - * @return the nodes value. - */ - public List nodes() { - return this.nodes; - } - - /** - * Get the otherErrors property: The errors that occurred on this integration runtime. - * - * @return the otherErrors value. - */ - public List otherErrors() { - return this.otherErrors; - } - - /** - * Get the lastOperation property: The last operation result that occurred on this integration runtime. - * - * @return the lastOperation value. - */ - public ManagedIntegrationRuntimeOperationResult lastOperation() { - return this.lastOperation; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (nodes() != null) { - nodes().forEach(e -> e.validate()); - } - if (otherErrors() != null) { - otherErrors().forEach(e -> e.validate()); - } - if (lastOperation() != null) { - lastOperation().validate(); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ManagedIntegrationRuntimeTypeProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ManagedIntegrationRuntimeTypeProperties.java deleted file mode 100644 index bf13c3de69df0..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ManagedIntegrationRuntimeTypeProperties.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeComputeProperties; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeSsisProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Managed integration runtime type properties. */ -@Fluent -public final class ManagedIntegrationRuntimeTypeProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedIntegrationRuntimeTypeProperties.class); - - /* - * The compute resource for managed integration runtime. - */ - @JsonProperty(value = "computeProperties") - private IntegrationRuntimeComputeProperties computeProperties; - - /* - * SSIS properties for managed integration runtime. - */ - @JsonProperty(value = "ssisProperties") - private IntegrationRuntimeSsisProperties ssisProperties; - - /** - * Get the computeProperties property: The compute resource for managed integration runtime. - * - * @return the computeProperties value. - */ - public IntegrationRuntimeComputeProperties computeProperties() { - return this.computeProperties; - } - - /** - * Set the computeProperties property: The compute resource for managed integration runtime. - * - * @param computeProperties the computeProperties value to set. - * @return the ManagedIntegrationRuntimeTypeProperties object itself. - */ - public ManagedIntegrationRuntimeTypeProperties withComputeProperties( - IntegrationRuntimeComputeProperties computeProperties) { - this.computeProperties = computeProperties; - return this; - } - - /** - * Get the ssisProperties property: SSIS properties for managed integration runtime. - * - * @return the ssisProperties value. - */ - public IntegrationRuntimeSsisProperties ssisProperties() { - return this.ssisProperties; - } - - /** - * Set the ssisProperties property: SSIS properties for managed integration runtime. - * - * @param ssisProperties the ssisProperties value to set. - * @return the ManagedIntegrationRuntimeTypeProperties object itself. - */ - public ManagedIntegrationRuntimeTypeProperties withSsisProperties(IntegrationRuntimeSsisProperties ssisProperties) { - this.ssisProperties = ssisProperties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (computeProperties() != null) { - computeProperties().validate(); - } - if (ssisProperties() != null) { - ssisProperties().validate(); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MetadataSyncConfigInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MetadataSyncConfigInner.java index 35c6218e933c9..1cec5323d1c55 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MetadataSyncConfigInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MetadataSyncConfigInner.java @@ -5,30 +5,29 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Metadata sync configuration Configuration for metadata sync. */ +@JsonFlatten @Fluent -public final class MetadataSyncConfigInner extends ProxyResource { +public class MetadataSyncConfigInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(MetadataSyncConfigInner.class); /* - * Metadata Sync Config properties + * Indicates whether the metadata sync is enabled or disabled */ - @JsonProperty(value = "properties") - private MetadataSyncConfigProperties innerProperties; + @JsonProperty(value = "properties.enabled") + private Boolean enabled; - /** - * Get the innerProperties property: Metadata Sync Config properties. - * - * @return the innerProperties value. + /* + * The Sync Interval in minutes. */ - private MetadataSyncConfigProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.syncIntervalInMinutes") + private Integer syncIntervalInMinutes; /** * Get the enabled property: Indicates whether the metadata sync is enabled or disabled. @@ -36,7 +35,7 @@ private MetadataSyncConfigProperties innerProperties() { * @return the enabled value. */ public Boolean enabled() { - return this.innerProperties() == null ? null : this.innerProperties().enabled(); + return this.enabled; } /** @@ -46,10 +45,7 @@ public Boolean enabled() { * @return the MetadataSyncConfigInner object itself. */ public MetadataSyncConfigInner withEnabled(Boolean enabled) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataSyncConfigProperties(); - } - this.innerProperties().withEnabled(enabled); + this.enabled = enabled; return this; } @@ -59,7 +55,7 @@ public MetadataSyncConfigInner withEnabled(Boolean enabled) { * @return the syncIntervalInMinutes value. */ public Integer syncIntervalInMinutes() { - return this.innerProperties() == null ? null : this.innerProperties().syncIntervalInMinutes(); + return this.syncIntervalInMinutes; } /** @@ -69,10 +65,7 @@ public Integer syncIntervalInMinutes() { * @return the MetadataSyncConfigInner object itself. */ public MetadataSyncConfigInner withSyncIntervalInMinutes(Integer syncIntervalInMinutes) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataSyncConfigProperties(); - } - this.innerProperties().withSyncIntervalInMinutes(syncIntervalInMinutes); + this.syncIntervalInMinutes = syncIntervalInMinutes; return this; } @@ -82,8 +75,5 @@ public MetadataSyncConfigInner withSyncIntervalInMinutes(Integer syncIntervalInM * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MetadataSyncConfigProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MetadataSyncConfigProperties.java deleted file mode 100644 index 7d4b9a88842f6..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MetadataSyncConfigProperties.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Metadata Sync Config properties. */ -@Fluent -public final class MetadataSyncConfigProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MetadataSyncConfigProperties.class); - - /* - * Indicates whether the metadata sync is enabled or disabled - */ - @JsonProperty(value = "enabled") - private Boolean enabled; - - /* - * The Sync Interval in minutes. - */ - @JsonProperty(value = "syncIntervalInMinutes") - private Integer syncIntervalInMinutes; - - /** - * Get the enabled property: Indicates whether the metadata sync is enabled or disabled. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Indicates whether the metadata sync is enabled or disabled. - * - * @param enabled the enabled value to set. - * @return the MetadataSyncConfigProperties object itself. - */ - public MetadataSyncConfigProperties withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the syncIntervalInMinutes property: The Sync Interval in minutes. - * - * @return the syncIntervalInMinutes value. - */ - public Integer syncIntervalInMinutes() { - return this.syncIntervalInMinutes; - } - - /** - * Set the syncIntervalInMinutes property: The Sync Interval in minutes. - * - * @param syncIntervalInMinutes the syncIntervalInMinutes value to set. - * @return the MetadataSyncConfigProperties object itself. - */ - public MetadataSyncConfigProperties withSyncIntervalInMinutes(Integer syncIntervalInMinutes) { - this.syncIntervalInMinutes = syncIntervalInMinutes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/OperationInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/OperationInner.java new file mode 100644 index 0000000000000..6f47a74d89b8c --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/OperationInner.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.models.OperationDisplay; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A REST API operation. */ +@Fluent +public final class OperationInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class); + + /* + * The operation name. This is of the format + * {provider}/{resource}/{operation}. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The object that describes the operation. + */ + @JsonProperty(value = "display") + private OperationDisplay display; + + /* + * The intended executor of the operation. + */ + @JsonProperty(value = "origin") + private String origin; + + /* + * Any object + */ + @JsonProperty(value = "properties") + private Object properties; + + /** + * Get the name property: The operation name. This is of the format {provider}/{resource}/{operation}. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The operation name. This is of the format {provider}/{resource}/{operation}. + * + * @param name the name value to set. + * @return the OperationInner object itself. + */ + public OperationInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the display property: The object that describes the operation. + * + * @return the display value. + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Set the display property: The object that describes the operation. + * + * @param display the display value to set. + * @return the OperationInner object itself. + */ + public OperationInner withDisplay(OperationDisplay display) { + this.display = display; + return this; + } + + /** + * Get the origin property: The intended executor of the operation. + * + * @return the origin value. + */ + public String origin() { + return this.origin; + } + + /** + * Set the origin property: The intended executor of the operation. + * + * @param origin the origin value to set. + * @return the OperationInner object itself. + */ + public OperationInner withOrigin(String origin) { + this.origin = origin; + return this; + } + + /** + * Get the properties property: Any object. + * + * @return the properties value. + */ + public Object properties() { + return this.properties; + } + + /** + * Set the properties property: Any object. + * + * @param properties the properties value to set. + * @return the OperationInner object itself. + */ + public OperationInner withProperties(Object properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (display() != null) { + display().validate(); + } + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/OperationMetaPropertyInfo.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/OperationMetaPropertyInfo.java deleted file mode 100644 index ecd7500a9ecbc..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/OperationMetaPropertyInfo.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.OperationMetaServiceSpecification; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** What is this?. */ -@Fluent -public final class OperationMetaPropertyInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationMetaPropertyInfo.class); - - /* - * Operation service specification - */ - @JsonProperty(value = "serviceSpecification") - private OperationMetaServiceSpecification serviceSpecification; - - /** - * Get the serviceSpecification property: Operation service specification. - * - * @return the serviceSpecification value. - */ - public OperationMetaServiceSpecification serviceSpecification() { - return this.serviceSpecification; - } - - /** - * Set the serviceSpecification property: Operation service specification. - * - * @param serviceSpecification the serviceSpecification value to set. - * @return the OperationMetaPropertyInfo object itself. - */ - public OperationMetaPropertyInfo withServiceSpecification(OperationMetaServiceSpecification serviceSpecification) { - this.serviceSpecification = serviceSpecification; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (serviceSpecification() != null) { - serviceSpecification().validate(); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateEndpointConnectionForPrivateLinkHubInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateEndpointConnectionForPrivateLinkHubInner.java index df242a2ef6184..75555a3a1bc3f 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateEndpointConnectionForPrivateLinkHubInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateEndpointConnectionForPrivateLinkHubInner.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.PrivateEndpointConnectionForPrivateLinkHubBasicAutoGenerated; +import com.azure.resourcemanager.synapse.models.PrivateEndpointConnectionProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateEndpointConnectionInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateEndpointConnectionInner.java index 8f012cb4745c0..b7cc5a3c5ca18 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateEndpointConnectionInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateEndpointConnectionInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.PrivateEndpoint; @@ -13,24 +14,28 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** A private endpoint connection. */ +@JsonFlatten @Fluent -public final class PrivateEndpointConnectionInner extends ProxyResource { +public class PrivateEndpointConnectionInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionInner.class); /* - * Private endpoint connection properties. + * The private endpoint which the connection belongs to. */ - @JsonProperty(value = "properties") - private PrivateEndpointConnectionProperties innerProperties; + @JsonProperty(value = "properties.privateEndpoint") + private PrivateEndpoint privateEndpoint; - /** - * Get the innerProperties property: Private endpoint connection properties. - * - * @return the innerProperties value. + /* + * Connection state of the private endpoint connection. */ - private PrivateEndpointConnectionProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.privateLinkServiceConnectionState") + private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + + /* + * Provisioning state of the private endpoint connection. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; /** * Get the privateEndpoint property: The private endpoint which the connection belongs to. @@ -38,7 +43,7 @@ private PrivateEndpointConnectionProperties innerProperties() { * @return the privateEndpoint value. */ public PrivateEndpoint privateEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint(); + return this.privateEndpoint; } /** @@ -48,10 +53,7 @@ public PrivateEndpoint privateEndpoint() { * @return the PrivateEndpointConnectionInner object itself. */ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateEndpointConnectionProperties(); - } - this.innerProperties().withPrivateEndpoint(privateEndpoint); + this.privateEndpoint = privateEndpoint; return this; } @@ -61,7 +63,7 @@ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privat * @return the privateLinkServiceConnectionState value. */ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { - return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState(); + return this.privateLinkServiceConnectionState; } /** @@ -72,10 +74,7 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { */ public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState( PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateEndpointConnectionProperties(); - } - this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; return this; } @@ -85,7 +84,7 @@ public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState( * @return the provisioningState value. */ public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + return this.provisioningState; } /** @@ -94,8 +93,11 @@ public String provisioningState() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (privateEndpoint() != null) { + privateEndpoint().validate(); + } + if (privateLinkServiceConnectionState() != null) { + privateLinkServiceConnectionState().validate(); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateLinkHubInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateLinkHubInner.java index 9c142b2c65af1..0bd2cf01a58f8 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateLinkHubInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateLinkHubInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.PrivateEndpointConnectionForPrivateLinkHubBasic; @@ -14,38 +15,22 @@ import java.util.Map; /** A privateLinkHub. */ +@JsonFlatten @Fluent -public final class PrivateLinkHubInner extends Resource { +public class PrivateLinkHubInner extends Resource { @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkHubInner.class); /* - * PrivateLinkHub resource properties + * PrivateLinkHub provisioning state */ - @JsonProperty(value = "properties") - private PrivateLinkHubProperties innerProperties; + @JsonProperty(value = "properties.provisioningState") + private String provisioningState; - /** - * Get the innerProperties property: PrivateLinkHub resource properties. - * - * @return the innerProperties value. + /* + * List of private endpoint connections */ - private PrivateLinkHubProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public PrivateLinkHubInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public PrivateLinkHubInner withTags(Map tags) { - super.withTags(tags); - return this; - } + @JsonProperty(value = "properties.privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) + private List privateEndpointConnections; /** * Get the provisioningState property: PrivateLinkHub provisioning state. @@ -53,7 +38,7 @@ public PrivateLinkHubInner withTags(Map tags) { * @return the provisioningState value. */ public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + return this.provisioningState; } /** @@ -63,10 +48,7 @@ public String provisioningState() { * @return the PrivateLinkHubInner object itself. */ public PrivateLinkHubInner withProvisioningState(String provisioningState) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateLinkHubProperties(); - } - this.innerProperties().withProvisioningState(provisioningState); + this.provisioningState = provisioningState; return this; } @@ -76,7 +58,21 @@ public PrivateLinkHubInner withProvisioningState(String provisioningState) { * @return the privateEndpointConnections value. */ public List privateEndpointConnections() { - return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections(); + return this.privateEndpointConnections; + } + + /** {@inheritDoc} */ + @Override + public PrivateLinkHubInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public PrivateLinkHubInner withTags(Map tags) { + super.withTags(tags); + return this; } /** @@ -85,8 +81,8 @@ public List privateEndpointConn * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (privateEndpointConnections() != null) { + privateEndpointConnections().forEach(e -> e.validate()); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateLinkHubProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateLinkHubProperties.java deleted file mode 100644 index d1f55640a31ed..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateLinkHubProperties.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.PrivateEndpointConnectionForPrivateLinkHubBasic; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** PrivateLinkHub properties. */ -@Fluent -public final class PrivateLinkHubProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkHubProperties.class); - - /* - * PrivateLinkHub provisioning state - */ - @JsonProperty(value = "provisioningState") - private String provisioningState; - - /* - * List of private endpoint connections - */ - @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) - private List privateEndpointConnections; - - /** - * Get the provisioningState property: PrivateLinkHub provisioning state. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState property: PrivateLinkHub provisioning state. - * - * @param provisioningState the provisioningState value to set. - * @return the PrivateLinkHubProperties object itself. - */ - public PrivateLinkHubProperties withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the privateEndpointConnections property: List of private endpoint connections. - * - * @return the privateEndpointConnections value. - */ - public List privateEndpointConnections() { - return this.privateEndpointConnections; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (privateEndpointConnections() != null) { - privateEndpointConnections().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RecommendedSensitivityLabelUpdateProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RecommendedSensitivityLabelUpdateProperties.java deleted file mode 100644 index 7bd60cb7df518..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RecommendedSensitivityLabelUpdateProperties.java +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.RecommendedSensitivityLabelUpdateKind; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties of an operation executed on a recommended sensitivity label. */ -@Fluent -public final class RecommendedSensitivityLabelUpdateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RecommendedSensitivityLabelUpdateProperties.class); - - /* - * The op property. - */ - @JsonProperty(value = "op", required = true) - private RecommendedSensitivityLabelUpdateKind op; - - /* - * Schema name of the column to update. - */ - @JsonProperty(value = "schema", required = true) - private String schema; - - /* - * Table name of the column to update. - */ - @JsonProperty(value = "table", required = true) - private String table; - - /* - * Column name to update. - */ - @JsonProperty(value = "column", required = true) - private String column; - - /** - * Get the op property: The op property. - * - * @return the op value. - */ - public RecommendedSensitivityLabelUpdateKind op() { - return this.op; - } - - /** - * Set the op property: The op property. - * - * @param op the op value to set. - * @return the RecommendedSensitivityLabelUpdateProperties object itself. - */ - public RecommendedSensitivityLabelUpdateProperties withOp(RecommendedSensitivityLabelUpdateKind op) { - this.op = op; - return this; - } - - /** - * Get the schema property: Schema name of the column to update. - * - * @return the schema value. - */ - public String schema() { - return this.schema; - } - - /** - * Set the schema property: Schema name of the column to update. - * - * @param schema the schema value to set. - * @return the RecommendedSensitivityLabelUpdateProperties object itself. - */ - public RecommendedSensitivityLabelUpdateProperties withSchema(String schema) { - this.schema = schema; - return this; - } - - /** - * Get the table property: Table name of the column to update. - * - * @return the table value. - */ - public String table() { - return this.table; - } - - /** - * Set the table property: Table name of the column to update. - * - * @param table the table value to set. - * @return the RecommendedSensitivityLabelUpdateProperties object itself. - */ - public RecommendedSensitivityLabelUpdateProperties withTable(String table) { - this.table = table; - return this; - } - - /** - * Get the column property: Column name to update. - * - * @return the column value. - */ - public String column() { - return this.column; - } - - /** - * Set the column property: Column name to update. - * - * @param column the column value to set. - * @return the RecommendedSensitivityLabelUpdateProperties object itself. - */ - public RecommendedSensitivityLabelUpdateProperties withColumn(String column) { - this.column = column; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (op() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property op in model RecommendedSensitivityLabelUpdateProperties")); - } - if (schema() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property schema in model RecommendedSensitivityLabelUpdateProperties")); - } - if (table() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property table in model RecommendedSensitivityLabelUpdateProperties")); - } - if (column() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property column in model RecommendedSensitivityLabelUpdateProperties")); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RecoverableSqlPoolInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RecoverableSqlPoolInner.java index 48a5ead9b743b..ef65ee8229a14 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RecoverableSqlPoolInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RecoverableSqlPoolInner.java @@ -4,7 +4,8 @@ package com.azure.resourcemanager.synapse.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -12,24 +13,34 @@ import java.time.OffsetDateTime; /** A recoverable sql pool. */ -@Fluent -public final class RecoverableSqlPoolInner extends ProxyResource { +@JsonFlatten +@Immutable +public class RecoverableSqlPoolInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(RecoverableSqlPoolInner.class); /* - * The properties of a recoverable sql pool + * The edition of the database */ - @JsonProperty(value = "properties") - private RecoverableSqlPoolProperties innerProperties; + @JsonProperty(value = "properties.edition", access = JsonProperty.Access.WRITE_ONLY) + private String edition; - /** - * Get the innerProperties property: The properties of a recoverable sql pool. - * - * @return the innerProperties value. + /* + * The service level objective name of the database */ - private RecoverableSqlPoolProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.serviceLevelObjective", access = JsonProperty.Access.WRITE_ONLY) + private String serviceLevelObjective; + + /* + * The elastic pool name of the database + */ + @JsonProperty(value = "properties.elasticPoolName", access = JsonProperty.Access.WRITE_ONLY) + private String elasticPoolName; + + /* + * The last available backup date of the database (ISO8601 format) + */ + @JsonProperty(value = "properties.lastAvailableBackupDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastAvailableBackupDate; /** * Get the edition property: The edition of the database. @@ -37,7 +48,7 @@ private RecoverableSqlPoolProperties innerProperties() { * @return the edition value. */ public String edition() { - return this.innerProperties() == null ? null : this.innerProperties().edition(); + return this.edition; } /** @@ -46,7 +57,7 @@ public String edition() { * @return the serviceLevelObjective value. */ public String serviceLevelObjective() { - return this.innerProperties() == null ? null : this.innerProperties().serviceLevelObjective(); + return this.serviceLevelObjective; } /** @@ -55,7 +66,7 @@ public String serviceLevelObjective() { * @return the elasticPoolName value. */ public String elasticPoolName() { - return this.innerProperties() == null ? null : this.innerProperties().elasticPoolName(); + return this.elasticPoolName; } /** @@ -64,7 +75,7 @@ public String elasticPoolName() { * @return the lastAvailableBackupDate value. */ public OffsetDateTime lastAvailableBackupDate() { - return this.innerProperties() == null ? null : this.innerProperties().lastAvailableBackupDate(); + return this.lastAvailableBackupDate; } /** @@ -73,8 +84,5 @@ public OffsetDateTime lastAvailableBackupDate() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RecoverableSqlPoolProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RecoverableSqlPoolProperties.java deleted file mode 100644 index 1e29c74e38462..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RecoverableSqlPoolProperties.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** The properties of a recoverable sql pool. */ -@Immutable -public final class RecoverableSqlPoolProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RecoverableSqlPoolProperties.class); - - /* - * The edition of the database - */ - @JsonProperty(value = "edition", access = JsonProperty.Access.WRITE_ONLY) - private String edition; - - /* - * The service level objective name of the database - */ - @JsonProperty(value = "serviceLevelObjective", access = JsonProperty.Access.WRITE_ONLY) - private String serviceLevelObjective; - - /* - * The elastic pool name of the database - */ - @JsonProperty(value = "elasticPoolName", access = JsonProperty.Access.WRITE_ONLY) - private String elasticPoolName; - - /* - * The last available backup date of the database (ISO8601 format) - */ - @JsonProperty(value = "lastAvailableBackupDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastAvailableBackupDate; - - /** - * Get the edition property: The edition of the database. - * - * @return the edition value. - */ - public String edition() { - return this.edition; - } - - /** - * Get the serviceLevelObjective property: The service level objective name of the database. - * - * @return the serviceLevelObjective value. - */ - public String serviceLevelObjective() { - return this.serviceLevelObjective; - } - - /** - * Get the elasticPoolName property: The elastic pool name of the database. - * - * @return the elasticPoolName value. - */ - public String elasticPoolName() { - return this.elasticPoolName; - } - - /** - * Get the lastAvailableBackupDate property: The last available backup date of the database (ISO8601 format). - * - * @return the lastAvailableBackupDate value. - */ - public OffsetDateTime lastAvailableBackupDate() { - return this.lastAvailableBackupDate; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ReplicationLinkInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ReplicationLinkInner.java index 883b1d43fac8d..a2cbcfb0af5bf 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ReplicationLinkInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ReplicationLinkInner.java @@ -4,7 +4,8 @@ package com.azure.resourcemanager.synapse.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.ReplicationRole; @@ -14,8 +15,9 @@ import java.time.OffsetDateTime; /** Represents a Sql pool replication link. */ -@Fluent -public final class ReplicationLinkInner extends ProxyResource { +@JsonFlatten +@Immutable +public class ReplicationLinkInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(ReplicationLinkInner.class); /* @@ -25,10 +27,65 @@ public final class ReplicationLinkInner extends ProxyResource { private String location; /* - * The properties representing the resource. + * Legacy value indicating whether termination is allowed. Currently + * always returns true. */ - @JsonProperty(value = "properties") - private ReplicationLinkProperties innerProperties; + @JsonProperty(value = "properties.isTerminationAllowed", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isTerminationAllowed; + + /* + * Replication mode of this replication link. + */ + @JsonProperty(value = "properties.replicationMode", access = JsonProperty.Access.WRITE_ONLY) + private String replicationMode; + + /* + * The name of the workspace hosting the partner Sql pool. + */ + @JsonProperty(value = "properties.partnerServer", access = JsonProperty.Access.WRITE_ONLY) + private String partnerServer; + + /* + * The name of the partner Sql pool. + */ + @JsonProperty(value = "properties.partnerDatabase", access = JsonProperty.Access.WRITE_ONLY) + private String partnerDatabase; + + /* + * The Azure Region of the partner Sql pool. + */ + @JsonProperty(value = "properties.partnerLocation", access = JsonProperty.Access.WRITE_ONLY) + private String partnerLocation; + + /* + * The role of the Sql pool in the replication link. + */ + @JsonProperty(value = "properties.role", access = JsonProperty.Access.WRITE_ONLY) + private ReplicationRole role; + + /* + * The role of the partner Sql pool in the replication link. + */ + @JsonProperty(value = "properties.partnerRole", access = JsonProperty.Access.WRITE_ONLY) + private ReplicationRole partnerRole; + + /* + * The start time for the replication link. + */ + @JsonProperty(value = "properties.startTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime startTime; + + /* + * The percentage of seeding complete for the replication link. + */ + @JsonProperty(value = "properties.percentComplete", access = JsonProperty.Access.WRITE_ONLY) + private Integer percentComplete; + + /* + * The replication state for the replication link. + */ + @JsonProperty(value = "properties.replicationState", access = JsonProperty.Access.WRITE_ONLY) + private ReplicationState replicationState; /** * Get the location property: Location of the workspace that contains this firewall rule. @@ -39,15 +96,6 @@ public String location() { return this.location; } - /** - * Get the innerProperties property: The properties representing the resource. - * - * @return the innerProperties value. - */ - private ReplicationLinkProperties innerProperties() { - return this.innerProperties; - } - /** * Get the isTerminationAllowed property: Legacy value indicating whether termination is allowed. Currently always * returns true. @@ -55,7 +103,7 @@ private ReplicationLinkProperties innerProperties() { * @return the isTerminationAllowed value. */ public Boolean isTerminationAllowed() { - return this.innerProperties() == null ? null : this.innerProperties().isTerminationAllowed(); + return this.isTerminationAllowed; } /** @@ -64,7 +112,7 @@ public Boolean isTerminationAllowed() { * @return the replicationMode value. */ public String replicationMode() { - return this.innerProperties() == null ? null : this.innerProperties().replicationMode(); + return this.replicationMode; } /** @@ -73,7 +121,7 @@ public String replicationMode() { * @return the partnerServer value. */ public String partnerServer() { - return this.innerProperties() == null ? null : this.innerProperties().partnerServer(); + return this.partnerServer; } /** @@ -82,7 +130,7 @@ public String partnerServer() { * @return the partnerDatabase value. */ public String partnerDatabase() { - return this.innerProperties() == null ? null : this.innerProperties().partnerDatabase(); + return this.partnerDatabase; } /** @@ -91,7 +139,7 @@ public String partnerDatabase() { * @return the partnerLocation value. */ public String partnerLocation() { - return this.innerProperties() == null ? null : this.innerProperties().partnerLocation(); + return this.partnerLocation; } /** @@ -100,7 +148,7 @@ public String partnerLocation() { * @return the role value. */ public ReplicationRole role() { - return this.innerProperties() == null ? null : this.innerProperties().role(); + return this.role; } /** @@ -109,7 +157,7 @@ public ReplicationRole role() { * @return the partnerRole value. */ public ReplicationRole partnerRole() { - return this.innerProperties() == null ? null : this.innerProperties().partnerRole(); + return this.partnerRole; } /** @@ -118,7 +166,7 @@ public ReplicationRole partnerRole() { * @return the startTime value. */ public OffsetDateTime startTime() { - return this.innerProperties() == null ? null : this.innerProperties().startTime(); + return this.startTime; } /** @@ -127,7 +175,7 @@ public OffsetDateTime startTime() { * @return the percentComplete value. */ public Integer percentComplete() { - return this.innerProperties() == null ? null : this.innerProperties().percentComplete(); + return this.percentComplete; } /** @@ -136,7 +184,7 @@ public Integer percentComplete() { * @return the replicationState value. */ public ReplicationState replicationState() { - return this.innerProperties() == null ? null : this.innerProperties().replicationState(); + return this.replicationState; } /** @@ -145,8 +193,5 @@ public ReplicationState replicationState() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ReplicationLinkProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ReplicationLinkProperties.java deleted file mode 100644 index fed7d92549765..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ReplicationLinkProperties.java +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.ReplicationRole; -import com.azure.resourcemanager.synapse.models.ReplicationState; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Represents the properties of a Sql pool replication link. */ -@Immutable -public final class ReplicationLinkProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ReplicationLinkProperties.class); - - /* - * Legacy value indicating whether termination is allowed. Currently - * always returns true. - */ - @JsonProperty(value = "isTerminationAllowed", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isTerminationAllowed; - - /* - * Replication mode of this replication link. - */ - @JsonProperty(value = "replicationMode", access = JsonProperty.Access.WRITE_ONLY) - private String replicationMode; - - /* - * The name of the workspace hosting the partner Sql pool. - */ - @JsonProperty(value = "partnerServer", access = JsonProperty.Access.WRITE_ONLY) - private String partnerServer; - - /* - * The name of the partner Sql pool. - */ - @JsonProperty(value = "partnerDatabase", access = JsonProperty.Access.WRITE_ONLY) - private String partnerDatabase; - - /* - * The Azure Region of the partner Sql pool. - */ - @JsonProperty(value = "partnerLocation", access = JsonProperty.Access.WRITE_ONLY) - private String partnerLocation; - - /* - * The role of the Sql pool in the replication link. - */ - @JsonProperty(value = "role", access = JsonProperty.Access.WRITE_ONLY) - private ReplicationRole role; - - /* - * The role of the partner Sql pool in the replication link. - */ - @JsonProperty(value = "partnerRole", access = JsonProperty.Access.WRITE_ONLY) - private ReplicationRole partnerRole; - - /* - * The start time for the replication link. - */ - @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime startTime; - - /* - * The percentage of seeding complete for the replication link. - */ - @JsonProperty(value = "percentComplete", access = JsonProperty.Access.WRITE_ONLY) - private Integer percentComplete; - - /* - * The replication state for the replication link. - */ - @JsonProperty(value = "replicationState", access = JsonProperty.Access.WRITE_ONLY) - private ReplicationState replicationState; - - /** - * Get the isTerminationAllowed property: Legacy value indicating whether termination is allowed. Currently always - * returns true. - * - * @return the isTerminationAllowed value. - */ - public Boolean isTerminationAllowed() { - return this.isTerminationAllowed; - } - - /** - * Get the replicationMode property: Replication mode of this replication link. - * - * @return the replicationMode value. - */ - public String replicationMode() { - return this.replicationMode; - } - - /** - * Get the partnerServer property: The name of the workspace hosting the partner Sql pool. - * - * @return the partnerServer value. - */ - public String partnerServer() { - return this.partnerServer; - } - - /** - * Get the partnerDatabase property: The name of the partner Sql pool. - * - * @return the partnerDatabase value. - */ - public String partnerDatabase() { - return this.partnerDatabase; - } - - /** - * Get the partnerLocation property: The Azure Region of the partner Sql pool. - * - * @return the partnerLocation value. - */ - public String partnerLocation() { - return this.partnerLocation; - } - - /** - * Get the role property: The role of the Sql pool in the replication link. - * - * @return the role value. - */ - public ReplicationRole role() { - return this.role; - } - - /** - * Get the partnerRole property: The role of the partner Sql pool in the replication link. - * - * @return the partnerRole value. - */ - public ReplicationRole partnerRole() { - return this.partnerRole; - } - - /** - * Get the startTime property: The start time for the replication link. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Get the percentComplete property: The percentage of seeding complete for the replication link. - * - * @return the percentComplete value. - */ - public Integer percentComplete() { - return this.percentComplete; - } - - /** - * Get the replicationState property: The replication state for the replication link. - * - * @return the replicationState value. - */ - public ReplicationState replicationState() { - return this.replicationState; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RestorableDroppedSqlPoolInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RestorableDroppedSqlPoolInner.java index c4b814d0a4baa..87219d0a307d2 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RestorableDroppedSqlPoolInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RestorableDroppedSqlPoolInner.java @@ -4,7 +4,8 @@ package com.azure.resourcemanager.synapse.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -12,8 +13,9 @@ import java.time.OffsetDateTime; /** A restorable dropped Sql pool. */ -@Fluent -public final class RestorableDroppedSqlPoolInner extends ProxyResource { +@JsonFlatten +@Immutable +public class RestorableDroppedSqlPoolInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(RestorableDroppedSqlPoolInner.class); /* @@ -23,10 +25,52 @@ public final class RestorableDroppedSqlPoolInner extends ProxyResource { private String location; /* - * The properties of a restorable dropped Sql pool + * The name of the database */ - @JsonProperty(value = "properties") - private RestorableDroppedSqlPoolProperties innerProperties; + @JsonProperty(value = "properties.databaseName", access = JsonProperty.Access.WRITE_ONLY) + private String databaseName; + + /* + * The edition of the database + */ + @JsonProperty(value = "properties.edition", access = JsonProperty.Access.WRITE_ONLY) + private String edition; + + /* + * The max size in bytes of the database + */ + @JsonProperty(value = "properties.maxSizeBytes", access = JsonProperty.Access.WRITE_ONLY) + private String maxSizeBytes; + + /* + * The service level objective name of the database + */ + @JsonProperty(value = "properties.serviceLevelObjective", access = JsonProperty.Access.WRITE_ONLY) + private String serviceLevelObjective; + + /* + * The elastic pool name of the database + */ + @JsonProperty(value = "properties.elasticPoolName", access = JsonProperty.Access.WRITE_ONLY) + private String elasticPoolName; + + /* + * The creation date of the database (ISO8601 format) + */ + @JsonProperty(value = "properties.creationDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime creationDate; + + /* + * The deletion date of the database (ISO8601 format) + */ + @JsonProperty(value = "properties.deletionDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime deletionDate; + + /* + * The earliest restore date of the database (ISO8601 format) + */ + @JsonProperty(value = "properties.earliestRestoreDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime earliestRestoreDate; /** * Get the location property: The geo-location where the resource lives. @@ -37,22 +81,13 @@ public String location() { return this.location; } - /** - * Get the innerProperties property: The properties of a restorable dropped Sql pool. - * - * @return the innerProperties value. - */ - private RestorableDroppedSqlPoolProperties innerProperties() { - return this.innerProperties; - } - /** * Get the databaseName property: The name of the database. * * @return the databaseName value. */ public String databaseName() { - return this.innerProperties() == null ? null : this.innerProperties().databaseName(); + return this.databaseName; } /** @@ -61,7 +96,7 @@ public String databaseName() { * @return the edition value. */ public String edition() { - return this.innerProperties() == null ? null : this.innerProperties().edition(); + return this.edition; } /** @@ -70,7 +105,7 @@ public String edition() { * @return the maxSizeBytes value. */ public String maxSizeBytes() { - return this.innerProperties() == null ? null : this.innerProperties().maxSizeBytes(); + return this.maxSizeBytes; } /** @@ -79,7 +114,7 @@ public String maxSizeBytes() { * @return the serviceLevelObjective value. */ public String serviceLevelObjective() { - return this.innerProperties() == null ? null : this.innerProperties().serviceLevelObjective(); + return this.serviceLevelObjective; } /** @@ -88,7 +123,7 @@ public String serviceLevelObjective() { * @return the elasticPoolName value. */ public String elasticPoolName() { - return this.innerProperties() == null ? null : this.innerProperties().elasticPoolName(); + return this.elasticPoolName; } /** @@ -97,7 +132,7 @@ public String elasticPoolName() { * @return the creationDate value. */ public OffsetDateTime creationDate() { - return this.innerProperties() == null ? null : this.innerProperties().creationDate(); + return this.creationDate; } /** @@ -106,7 +141,7 @@ public OffsetDateTime creationDate() { * @return the deletionDate value. */ public OffsetDateTime deletionDate() { - return this.innerProperties() == null ? null : this.innerProperties().deletionDate(); + return this.deletionDate; } /** @@ -115,7 +150,7 @@ public OffsetDateTime deletionDate() { * @return the earliestRestoreDate value. */ public OffsetDateTime earliestRestoreDate() { - return this.innerProperties() == null ? null : this.innerProperties().earliestRestoreDate(); + return this.earliestRestoreDate; } /** @@ -124,8 +159,5 @@ public OffsetDateTime earliestRestoreDate() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RestorableDroppedSqlPoolProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RestorableDroppedSqlPoolProperties.java deleted file mode 100644 index e390f65a6b94c..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RestorableDroppedSqlPoolProperties.java +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** The properties of a restorable dropped Sql pool. */ -@Immutable -public final class RestorableDroppedSqlPoolProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RestorableDroppedSqlPoolProperties.class); - - /* - * The name of the database - */ - @JsonProperty(value = "databaseName", access = JsonProperty.Access.WRITE_ONLY) - private String databaseName; - - /* - * The edition of the database - */ - @JsonProperty(value = "edition", access = JsonProperty.Access.WRITE_ONLY) - private String edition; - - /* - * The max size in bytes of the database - */ - @JsonProperty(value = "maxSizeBytes", access = JsonProperty.Access.WRITE_ONLY) - private String maxSizeBytes; - - /* - * The service level objective name of the database - */ - @JsonProperty(value = "serviceLevelObjective", access = JsonProperty.Access.WRITE_ONLY) - private String serviceLevelObjective; - - /* - * The elastic pool name of the database - */ - @JsonProperty(value = "elasticPoolName", access = JsonProperty.Access.WRITE_ONLY) - private String elasticPoolName; - - /* - * The creation date of the database (ISO8601 format) - */ - @JsonProperty(value = "creationDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime creationDate; - - /* - * The deletion date of the database (ISO8601 format) - */ - @JsonProperty(value = "deletionDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime deletionDate; - - /* - * The earliest restore date of the database (ISO8601 format) - */ - @JsonProperty(value = "earliestRestoreDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime earliestRestoreDate; - - /** - * Get the databaseName property: The name of the database. - * - * @return the databaseName value. - */ - public String databaseName() { - return this.databaseName; - } - - /** - * Get the edition property: The edition of the database. - * - * @return the edition value. - */ - public String edition() { - return this.edition; - } - - /** - * Get the maxSizeBytes property: The max size in bytes of the database. - * - * @return the maxSizeBytes value. - */ - public String maxSizeBytes() { - return this.maxSizeBytes; - } - - /** - * Get the serviceLevelObjective property: The service level objective name of the database. - * - * @return the serviceLevelObjective value. - */ - public String serviceLevelObjective() { - return this.serviceLevelObjective; - } - - /** - * Get the elasticPoolName property: The elastic pool name of the database. - * - * @return the elasticPoolName value. - */ - public String elasticPoolName() { - return this.elasticPoolName; - } - - /** - * Get the creationDate property: The creation date of the database (ISO8601 format). - * - * @return the creationDate value. - */ - public OffsetDateTime creationDate() { - return this.creationDate; - } - - /** - * Get the deletionDate property: The deletion date of the database (ISO8601 format). - * - * @return the deletionDate value. - */ - public OffsetDateTime deletionDate() { - return this.deletionDate; - } - - /** - * Get the earliestRestoreDate property: The earliest restore date of the database (ISO8601 format). - * - * @return the earliestRestoreDate value. - */ - public OffsetDateTime earliestRestoreDate() { - return this.earliestRestoreDate; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RestorePointInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RestorePointInner.java index ab28707212c1e..c06bc32985edf 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RestorePointInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RestorePointInner.java @@ -4,7 +4,8 @@ package com.azure.resourcemanager.synapse.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.RestorePointType; @@ -13,8 +14,9 @@ import java.time.OffsetDateTime; /** Database restore points. */ -@Fluent -public final class RestorePointInner extends ProxyResource { +@JsonFlatten +@Immutable +public class RestorePointInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(RestorePointInner.class); /* @@ -24,10 +26,28 @@ public final class RestorePointInner extends ProxyResource { private String location; /* - * Resource properties. + * The type of restore point */ - @JsonProperty(value = "properties") - private RestorePointProperties innerProperties; + @JsonProperty(value = "properties.restorePointType", access = JsonProperty.Access.WRITE_ONLY) + private RestorePointType restorePointType; + + /* + * The earliest time to which this database can be restored + */ + @JsonProperty(value = "properties.earliestRestoreDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime earliestRestoreDate; + + /* + * The time the backup was taken + */ + @JsonProperty(value = "properties.restorePointCreationDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime restorePointCreationDate; + + /* + * The label of restore point for backup request by user + */ + @JsonProperty(value = "properties.restorePointLabel", access = JsonProperty.Access.WRITE_ONLY) + private String restorePointLabel; /** * Get the location property: Resource location. @@ -38,22 +58,13 @@ public String location() { return this.location; } - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private RestorePointProperties innerProperties() { - return this.innerProperties; - } - /** * Get the restorePointType property: The type of restore point. * * @return the restorePointType value. */ public RestorePointType restorePointType() { - return this.innerProperties() == null ? null : this.innerProperties().restorePointType(); + return this.restorePointType; } /** @@ -62,7 +73,7 @@ public RestorePointType restorePointType() { * @return the earliestRestoreDate value. */ public OffsetDateTime earliestRestoreDate() { - return this.innerProperties() == null ? null : this.innerProperties().earliestRestoreDate(); + return this.earliestRestoreDate; } /** @@ -71,7 +82,7 @@ public OffsetDateTime earliestRestoreDate() { * @return the restorePointCreationDate value. */ public OffsetDateTime restorePointCreationDate() { - return this.innerProperties() == null ? null : this.innerProperties().restorePointCreationDate(); + return this.restorePointCreationDate; } /** @@ -80,7 +91,7 @@ public OffsetDateTime restorePointCreationDate() { * @return the restorePointLabel value. */ public String restorePointLabel() { - return this.innerProperties() == null ? null : this.innerProperties().restorePointLabel(); + return this.restorePointLabel; } /** @@ -89,8 +100,5 @@ public String restorePointLabel() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RestorePointProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RestorePointProperties.java deleted file mode 100644 index 46ee9caad8a31..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RestorePointProperties.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.RestorePointType; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Properties of a database restore point. */ -@Immutable -public final class RestorePointProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RestorePointProperties.class); - - /* - * The type of restore point - */ - @JsonProperty(value = "restorePointType", access = JsonProperty.Access.WRITE_ONLY) - private RestorePointType restorePointType; - - /* - * The earliest time to which this database can be restored - */ - @JsonProperty(value = "earliestRestoreDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime earliestRestoreDate; - - /* - * The time the backup was taken - */ - @JsonProperty(value = "restorePointCreationDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime restorePointCreationDate; - - /* - * The label of restore point for backup request by user - */ - @JsonProperty(value = "restorePointLabel", access = JsonProperty.Access.WRITE_ONLY) - private String restorePointLabel; - - /** - * Get the restorePointType property: The type of restore point. - * - * @return the restorePointType value. - */ - public RestorePointType restorePointType() { - return this.restorePointType; - } - - /** - * Get the earliestRestoreDate property: The earliest time to which this database can be restored. - * - * @return the earliestRestoreDate value. - */ - public OffsetDateTime earliestRestoreDate() { - return this.earliestRestoreDate; - } - - /** - * Get the restorePointCreationDate property: The time the backup was taken. - * - * @return the restorePointCreationDate value. - */ - public OffsetDateTime restorePointCreationDate() { - return this.restorePointCreationDate; - } - - /** - * Get the restorePointLabel property: The label of restore point for backup request by user. - * - * @return the restorePointLabel value. - */ - public String restorePointLabel() { - return this.restorePointLabel; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SecurityAlertPolicyProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SecurityAlertPolicyProperties.java deleted file mode 100644 index 070082ec921cb..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SecurityAlertPolicyProperties.java +++ /dev/null @@ -1,244 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.SecurityAlertPolicyState; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Properties of a security alert policy. */ -@Fluent -public final class SecurityAlertPolicyProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SecurityAlertPolicyProperties.class); - - /* - * Specifies the state of the policy, whether it is enabled or disabled or - * a policy has not been applied yet on the specific Sql pool. - */ - @JsonProperty(value = "state", required = true) - private SecurityAlertPolicyState state; - - /* - * Specifies an array of alerts that are disabled. Allowed values are: - * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, - * Data_Exfiltration, Unsafe_Action - */ - @JsonProperty(value = "disabledAlerts") - private List disabledAlerts; - - /* - * Specifies an array of e-mail addresses to which the alert is sent. - */ - @JsonProperty(value = "emailAddresses") - private List emailAddresses; - - /* - * Specifies that the alert is sent to the account administrators. - */ - @JsonProperty(value = "emailAccountAdmins") - private Boolean emailAccountAdmins; - - /* - * Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). This blob storage will hold - * all Threat Detection audit logs. - */ - @JsonProperty(value = "storageEndpoint") - private String storageEndpoint; - - /* - * Specifies the identifier key of the Threat Detection audit storage - * account. - */ - @JsonProperty(value = "storageAccountAccessKey") - private String storageAccountAccessKey; - - /* - * Specifies the number of days to keep in the Threat Detection audit logs. - */ - @JsonProperty(value = "retentionDays") - private Integer retentionDays; - - /* - * Specifies the UTC creation time of the policy. - */ - @JsonProperty(value = "creationTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime creationTime; - - /** - * Get the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not - * been applied yet on the specific Sql pool. - * - * @return the state value. - */ - public SecurityAlertPolicyState state() { - return this.state; - } - - /** - * Set the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not - * been applied yet on the specific Sql pool. - * - * @param state the state value to set. - * @return the SecurityAlertPolicyProperties object itself. - */ - public SecurityAlertPolicyProperties withState(SecurityAlertPolicyState state) { - this.state = state; - return this; - } - - /** - * Get the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are: - * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action. - * - * @return the disabledAlerts value. - */ - public List disabledAlerts() { - return this.disabledAlerts; - } - - /** - * Set the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are: - * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action. - * - * @param disabledAlerts the disabledAlerts value to set. - * @return the SecurityAlertPolicyProperties object itself. - */ - public SecurityAlertPolicyProperties withDisabledAlerts(List disabledAlerts) { - this.disabledAlerts = disabledAlerts; - return this; - } - - /** - * Get the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent. - * - * @return the emailAddresses value. - */ - public List emailAddresses() { - return this.emailAddresses; - } - - /** - * Set the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent. - * - * @param emailAddresses the emailAddresses value to set. - * @return the SecurityAlertPolicyProperties object itself. - */ - public SecurityAlertPolicyProperties withEmailAddresses(List emailAddresses) { - this.emailAddresses = emailAddresses; - return this; - } - - /** - * Get the emailAccountAdmins property: Specifies that the alert is sent to the account administrators. - * - * @return the emailAccountAdmins value. - */ - public Boolean emailAccountAdmins() { - return this.emailAccountAdmins; - } - - /** - * Set the emailAccountAdmins property: Specifies that the alert is sent to the account administrators. - * - * @param emailAccountAdmins the emailAccountAdmins value to set. - * @return the SecurityAlertPolicyProperties object itself. - */ - public SecurityAlertPolicyProperties withEmailAccountAdmins(Boolean emailAccountAdmins) { - this.emailAccountAdmins = emailAccountAdmins; - return this; - } - - /** - * Get the storageEndpoint property: Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - * - * @return the storageEndpoint value. - */ - public String storageEndpoint() { - return this.storageEndpoint; - } - - /** - * Set the storageEndpoint property: Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - * - * @param storageEndpoint the storageEndpoint value to set. - * @return the SecurityAlertPolicyProperties object itself. - */ - public SecurityAlertPolicyProperties withStorageEndpoint(String storageEndpoint) { - this.storageEndpoint = storageEndpoint; - return this; - } - - /** - * Get the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage - * account. - * - * @return the storageAccountAccessKey value. - */ - public String storageAccountAccessKey() { - return this.storageAccountAccessKey; - } - - /** - * Set the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage - * account. - * - * @param storageAccountAccessKey the storageAccountAccessKey value to set. - * @return the SecurityAlertPolicyProperties object itself. - */ - public SecurityAlertPolicyProperties withStorageAccountAccessKey(String storageAccountAccessKey) { - this.storageAccountAccessKey = storageAccountAccessKey; - return this; - } - - /** - * Get the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs. - * - * @return the retentionDays value. - */ - public Integer retentionDays() { - return this.retentionDays; - } - - /** - * Set the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs. - * - * @param retentionDays the retentionDays value to set. - * @return the SecurityAlertPolicyProperties object itself. - */ - public SecurityAlertPolicyProperties withRetentionDays(Integer retentionDays) { - this.retentionDays = retentionDays; - return this; - } - - /** - * Get the creationTime property: Specifies the UTC creation time of the policy. - * - * @return the creationTime value. - */ - public OffsetDateTime creationTime() { - return this.creationTime; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (state() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property state in model SecurityAlertPolicyProperties")); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SelfHostedIntegrationRuntimeStatusTypeProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SelfHostedIntegrationRuntimeStatusTypeProperties.java deleted file mode 100644 index b9704d500fe32..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SelfHostedIntegrationRuntimeStatusTypeProperties.java +++ /dev/null @@ -1,329 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeAutoUpdate; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeInternalChannelEncryptionMode; -import com.azure.resourcemanager.synapse.models.LinkedIntegrationRuntime; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** Self-hosted integration runtime status type properties. */ -@Fluent -public final class SelfHostedIntegrationRuntimeStatusTypeProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(SelfHostedIntegrationRuntimeStatusTypeProperties.class); - - /* - * The time at which the integration runtime was created, in ISO8601 - * format. - */ - @JsonProperty(value = "createTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createTime; - - /* - * The task queue id of the integration runtime. - */ - @JsonProperty(value = "taskQueueId", access = JsonProperty.Access.WRITE_ONLY) - private String taskQueueId; - - /* - * The node communication Channel encryption mode - */ - @JsonProperty(value = "nodeCommunicationChannelEncryptionMode", access = JsonProperty.Access.WRITE_ONLY) - private String nodeCommunicationChannelEncryptionMode; - - /* - * It is used to set the encryption mode for node-node communication - * channel (when more than 2 self-hosted integration runtime nodes exist). - */ - @JsonProperty(value = "internalChannelEncryption", access = JsonProperty.Access.WRITE_ONLY) - private IntegrationRuntimeInternalChannelEncryptionMode internalChannelEncryption; - - /* - * Version of the integration runtime. - */ - @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) - private String version; - - /* - * The list of nodes for this integration runtime. - */ - @JsonProperty(value = "nodes") - private List nodes; - - /* - * The date at which the integration runtime will be scheduled to update, - * in ISO8601 format. - */ - @JsonProperty(value = "scheduledUpdateDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime scheduledUpdateDate; - - /* - * The time in the date scheduled by service to update the integration - * runtime, e.g., PT03H is 3 hours - */ - @JsonProperty(value = "updateDelayOffset", access = JsonProperty.Access.WRITE_ONLY) - private String updateDelayOffset; - - /* - * The local time zone offset in hours. - */ - @JsonProperty(value = "localTimeZoneOffset", access = JsonProperty.Access.WRITE_ONLY) - private String localTimeZoneOffset; - - /* - * Object with additional information about integration runtime - * capabilities. - */ - @JsonProperty(value = "capabilities", access = JsonProperty.Access.WRITE_ONLY) - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map capabilities; - - /* - * The URLs for the services used in integration runtime backend service. - */ - @JsonProperty(value = "serviceUrls", access = JsonProperty.Access.WRITE_ONLY) - private List serviceUrls; - - /* - * Whether Self-hosted integration runtime auto update has been turned on. - */ - @JsonProperty(value = "autoUpdate", access = JsonProperty.Access.WRITE_ONLY) - private IntegrationRuntimeAutoUpdate autoUpdate; - - /* - * Status of the integration runtime version. - */ - @JsonProperty(value = "versionStatus", access = JsonProperty.Access.WRITE_ONLY) - private String versionStatus; - - /* - * The list of linked integration runtimes that are created to share with - * this integration runtime. - */ - @JsonProperty(value = "links") - private List links; - - /* - * The version that the integration runtime is going to update to. - */ - @JsonProperty(value = "pushedVersion", access = JsonProperty.Access.WRITE_ONLY) - private String pushedVersion; - - /* - * The latest version on download center. - */ - @JsonProperty(value = "latestVersion", access = JsonProperty.Access.WRITE_ONLY) - private String latestVersion; - - /* - * The estimated time when the self-hosted integration runtime will be - * updated. - */ - @JsonProperty(value = "autoUpdateETA", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime autoUpdateEta; - - /** - * Get the createTime property: The time at which the integration runtime was created, in ISO8601 format. - * - * @return the createTime value. - */ - public OffsetDateTime createTime() { - return this.createTime; - } - - /** - * Get the taskQueueId property: The task queue id of the integration runtime. - * - * @return the taskQueueId value. - */ - public String taskQueueId() { - return this.taskQueueId; - } - - /** - * Get the nodeCommunicationChannelEncryptionMode property: The node communication Channel encryption mode. - * - * @return the nodeCommunicationChannelEncryptionMode value. - */ - public String nodeCommunicationChannelEncryptionMode() { - return this.nodeCommunicationChannelEncryptionMode; - } - - /** - * Get the internalChannelEncryption property: It is used to set the encryption mode for node-node communication - * channel (when more than 2 self-hosted integration runtime nodes exist). - * - * @return the internalChannelEncryption value. - */ - public IntegrationRuntimeInternalChannelEncryptionMode internalChannelEncryption() { - return this.internalChannelEncryption; - } - - /** - * Get the version property: Version of the integration runtime. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Get the nodes property: The list of nodes for this integration runtime. - * - * @return the nodes value. - */ - public List nodes() { - return this.nodes; - } - - /** - * Set the nodes property: The list of nodes for this integration runtime. - * - * @param nodes the nodes value to set. - * @return the SelfHostedIntegrationRuntimeStatusTypeProperties object itself. - */ - public SelfHostedIntegrationRuntimeStatusTypeProperties withNodes( - List nodes) { - this.nodes = nodes; - return this; - } - - /** - * Get the scheduledUpdateDate property: The date at which the integration runtime will be scheduled to update, in - * ISO8601 format. - * - * @return the scheduledUpdateDate value. - */ - public OffsetDateTime scheduledUpdateDate() { - return this.scheduledUpdateDate; - } - - /** - * Get the updateDelayOffset property: The time in the date scheduled by service to update the integration runtime, - * e.g., PT03H is 3 hours. - * - * @return the updateDelayOffset value. - */ - public String updateDelayOffset() { - return this.updateDelayOffset; - } - - /** - * Get the localTimeZoneOffset property: The local time zone offset in hours. - * - * @return the localTimeZoneOffset value. - */ - public String localTimeZoneOffset() { - return this.localTimeZoneOffset; - } - - /** - * Get the capabilities property: Object with additional information about integration runtime capabilities. - * - * @return the capabilities value. - */ - public Map capabilities() { - return this.capabilities; - } - - /** - * Get the serviceUrls property: The URLs for the services used in integration runtime backend service. - * - * @return the serviceUrls value. - */ - public List serviceUrls() { - return this.serviceUrls; - } - - /** - * Get the autoUpdate property: Whether Self-hosted integration runtime auto update has been turned on. - * - * @return the autoUpdate value. - */ - public IntegrationRuntimeAutoUpdate autoUpdate() { - return this.autoUpdate; - } - - /** - * Get the versionStatus property: Status of the integration runtime version. - * - * @return the versionStatus value. - */ - public String versionStatus() { - return this.versionStatus; - } - - /** - * Get the links property: The list of linked integration runtimes that are created to share with this integration - * runtime. - * - * @return the links value. - */ - public List links() { - return this.links; - } - - /** - * Set the links property: The list of linked integration runtimes that are created to share with this integration - * runtime. - * - * @param links the links value to set. - * @return the SelfHostedIntegrationRuntimeStatusTypeProperties object itself. - */ - public SelfHostedIntegrationRuntimeStatusTypeProperties withLinks(List links) { - this.links = links; - return this; - } - - /** - * Get the pushedVersion property: The version that the integration runtime is going to update to. - * - * @return the pushedVersion value. - */ - public String pushedVersion() { - return this.pushedVersion; - } - - /** - * Get the latestVersion property: The latest version on download center. - * - * @return the latestVersion value. - */ - public String latestVersion() { - return this.latestVersion; - } - - /** - * Get the autoUpdateEta property: The estimated time when the self-hosted integration runtime will be updated. - * - * @return the autoUpdateEta value. - */ - public OffsetDateTime autoUpdateEta() { - return this.autoUpdateEta; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (nodes() != null) { - nodes().forEach(e -> e.validate()); - } - if (links() != null) { - links().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SelfHostedIntegrationRuntimeTypeProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SelfHostedIntegrationRuntimeTypeProperties.java deleted file mode 100644 index 98f9548727d4a..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SelfHostedIntegrationRuntimeTypeProperties.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.LinkedIntegrationRuntimeType; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The self-hosted integration runtime properties. */ -@Fluent -public final class SelfHostedIntegrationRuntimeTypeProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SelfHostedIntegrationRuntimeTypeProperties.class); - - /* - * Linked integration runtime type from data factory - */ - @JsonProperty(value = "linkedInfo") - private LinkedIntegrationRuntimeType linkedInfo; - - /** - * Get the linkedInfo property: Linked integration runtime type from data factory. - * - * @return the linkedInfo value. - */ - public LinkedIntegrationRuntimeType linkedInfo() { - return this.linkedInfo; - } - - /** - * Set the linkedInfo property: Linked integration runtime type from data factory. - * - * @param linkedInfo the linkedInfo value to set. - * @return the SelfHostedIntegrationRuntimeTypeProperties object itself. - */ - public SelfHostedIntegrationRuntimeTypeProperties withLinkedInfo(LinkedIntegrationRuntimeType linkedInfo) { - this.linkedInfo = linkedInfo; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (linkedInfo() != null) { - linkedInfo().validate(); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SensitivityLabelInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SensitivityLabelInner.java index 0e9245735f7f7..2f4e7dc9aaf24 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SensitivityLabelInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SensitivityLabelInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.SensitivityLabelRank; @@ -12,30 +13,72 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** A sensitivity label. */ +@JsonFlatten @Fluent -public final class SensitivityLabelInner extends ProxyResource { +public class SensitivityLabelInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(SensitivityLabelInner.class); - /* - * Resource properties. - */ - @JsonProperty(value = "properties") - private SensitivityLabelProperties innerProperties; - /* * managed by */ @JsonProperty(value = "managedBy", access = JsonProperty.Access.WRITE_ONLY) private String managedBy; - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. + /* + * The schema name. */ - private SensitivityLabelProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.schemaName", access = JsonProperty.Access.WRITE_ONLY) + private String schemaName; + + /* + * The table name. + */ + @JsonProperty(value = "properties.tableName", access = JsonProperty.Access.WRITE_ONLY) + private String tableName; + + /* + * The column name. + */ + @JsonProperty(value = "properties.columnName", access = JsonProperty.Access.WRITE_ONLY) + private String columnName; + + /* + * The label name. + */ + @JsonProperty(value = "properties.labelName") + private String labelName; + + /* + * The label ID. + */ + @JsonProperty(value = "properties.labelId") + private String labelId; + + /* + * The information type. + */ + @JsonProperty(value = "properties.informationType") + private String informationType; + + /* + * The information type ID. + */ + @JsonProperty(value = "properties.informationTypeId") + private String informationTypeId; + + /* + * Is sensitivity recommendation disabled. Applicable for recommended + * sensitivity label only. Specifies whether the sensitivity recommendation + * on this column is disabled (dismissed) or not. + */ + @JsonProperty(value = "properties.isDisabled", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDisabled; + + /* + * The rank property. + */ + @JsonProperty(value = "properties.rank") + private SensitivityLabelRank rank; /** * Get the managedBy property: managed by. @@ -52,7 +95,7 @@ public String managedBy() { * @return the schemaName value. */ public String schemaName() { - return this.innerProperties() == null ? null : this.innerProperties().schemaName(); + return this.schemaName; } /** @@ -61,7 +104,7 @@ public String schemaName() { * @return the tableName value. */ public String tableName() { - return this.innerProperties() == null ? null : this.innerProperties().tableName(); + return this.tableName; } /** @@ -70,7 +113,7 @@ public String tableName() { * @return the columnName value. */ public String columnName() { - return this.innerProperties() == null ? null : this.innerProperties().columnName(); + return this.columnName; } /** @@ -79,7 +122,7 @@ public String columnName() { * @return the labelName value. */ public String labelName() { - return this.innerProperties() == null ? null : this.innerProperties().labelName(); + return this.labelName; } /** @@ -89,10 +132,7 @@ public String labelName() { * @return the SensitivityLabelInner object itself. */ public SensitivityLabelInner withLabelName(String labelName) { - if (this.innerProperties() == null) { - this.innerProperties = new SensitivityLabelProperties(); - } - this.innerProperties().withLabelName(labelName); + this.labelName = labelName; return this; } @@ -102,7 +142,7 @@ public SensitivityLabelInner withLabelName(String labelName) { * @return the labelId value. */ public String labelId() { - return this.innerProperties() == null ? null : this.innerProperties().labelId(); + return this.labelId; } /** @@ -112,10 +152,7 @@ public String labelId() { * @return the SensitivityLabelInner object itself. */ public SensitivityLabelInner withLabelId(String labelId) { - if (this.innerProperties() == null) { - this.innerProperties = new SensitivityLabelProperties(); - } - this.innerProperties().withLabelId(labelId); + this.labelId = labelId; return this; } @@ -125,7 +162,7 @@ public SensitivityLabelInner withLabelId(String labelId) { * @return the informationType value. */ public String informationType() { - return this.innerProperties() == null ? null : this.innerProperties().informationType(); + return this.informationType; } /** @@ -135,10 +172,7 @@ public String informationType() { * @return the SensitivityLabelInner object itself. */ public SensitivityLabelInner withInformationType(String informationType) { - if (this.innerProperties() == null) { - this.innerProperties = new SensitivityLabelProperties(); - } - this.innerProperties().withInformationType(informationType); + this.informationType = informationType; return this; } @@ -148,7 +182,7 @@ public SensitivityLabelInner withInformationType(String informationType) { * @return the informationTypeId value. */ public String informationTypeId() { - return this.innerProperties() == null ? null : this.innerProperties().informationTypeId(); + return this.informationTypeId; } /** @@ -158,10 +192,7 @@ public String informationTypeId() { * @return the SensitivityLabelInner object itself. */ public SensitivityLabelInner withInformationTypeId(String informationTypeId) { - if (this.innerProperties() == null) { - this.innerProperties = new SensitivityLabelProperties(); - } - this.innerProperties().withInformationTypeId(informationTypeId); + this.informationTypeId = informationTypeId; return this; } @@ -172,7 +203,7 @@ public SensitivityLabelInner withInformationTypeId(String informationTypeId) { * @return the isDisabled value. */ public Boolean isDisabled() { - return this.innerProperties() == null ? null : this.innerProperties().isDisabled(); + return this.isDisabled; } /** @@ -181,7 +212,7 @@ public Boolean isDisabled() { * @return the rank value. */ public SensitivityLabelRank rank() { - return this.innerProperties() == null ? null : this.innerProperties().rank(); + return this.rank; } /** @@ -191,10 +222,7 @@ public SensitivityLabelRank rank() { * @return the SensitivityLabelInner object itself. */ public SensitivityLabelInner withRank(SensitivityLabelRank rank) { - if (this.innerProperties() == null) { - this.innerProperties = new SensitivityLabelProperties(); - } - this.innerProperties().withRank(rank); + this.rank = rank; return this; } @@ -204,8 +232,5 @@ public SensitivityLabelInner withRank(SensitivityLabelRank rank) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SensitivityLabelProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SensitivityLabelProperties.java deleted file mode 100644 index 99b16ee48487e..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SensitivityLabelProperties.java +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.SensitivityLabelRank; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties of a sensitivity label. */ -@Fluent -public final class SensitivityLabelProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SensitivityLabelProperties.class); - - /* - * The schema name. - */ - @JsonProperty(value = "schemaName", access = JsonProperty.Access.WRITE_ONLY) - private String schemaName; - - /* - * The table name. - */ - @JsonProperty(value = "tableName", access = JsonProperty.Access.WRITE_ONLY) - private String tableName; - - /* - * The column name. - */ - @JsonProperty(value = "columnName", access = JsonProperty.Access.WRITE_ONLY) - private String columnName; - - /* - * The label name. - */ - @JsonProperty(value = "labelName") - private String labelName; - - /* - * The label ID. - */ - @JsonProperty(value = "labelId") - private String labelId; - - /* - * The information type. - */ - @JsonProperty(value = "informationType") - private String informationType; - - /* - * The information type ID. - */ - @JsonProperty(value = "informationTypeId") - private String informationTypeId; - - /* - * Is sensitivity recommendation disabled. Applicable for recommended - * sensitivity label only. Specifies whether the sensitivity recommendation - * on this column is disabled (dismissed) or not. - */ - @JsonProperty(value = "isDisabled", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isDisabled; - - /* - * The rank property. - */ - @JsonProperty(value = "rank") - private SensitivityLabelRank rank; - - /** - * Get the schemaName property: The schema name. - * - * @return the schemaName value. - */ - public String schemaName() { - return this.schemaName; - } - - /** - * Get the tableName property: The table name. - * - * @return the tableName value. - */ - public String tableName() { - return this.tableName; - } - - /** - * Get the columnName property: The column name. - * - * @return the columnName value. - */ - public String columnName() { - return this.columnName; - } - - /** - * Get the labelName property: The label name. - * - * @return the labelName value. - */ - public String labelName() { - return this.labelName; - } - - /** - * Set the labelName property: The label name. - * - * @param labelName the labelName value to set. - * @return the SensitivityLabelProperties object itself. - */ - public SensitivityLabelProperties withLabelName(String labelName) { - this.labelName = labelName; - return this; - } - - /** - * Get the labelId property: The label ID. - * - * @return the labelId value. - */ - public String labelId() { - return this.labelId; - } - - /** - * Set the labelId property: The label ID. - * - * @param labelId the labelId value to set. - * @return the SensitivityLabelProperties object itself. - */ - public SensitivityLabelProperties withLabelId(String labelId) { - this.labelId = labelId; - return this; - } - - /** - * Get the informationType property: The information type. - * - * @return the informationType value. - */ - public String informationType() { - return this.informationType; - } - - /** - * Set the informationType property: The information type. - * - * @param informationType the informationType value to set. - * @return the SensitivityLabelProperties object itself. - */ - public SensitivityLabelProperties withInformationType(String informationType) { - this.informationType = informationType; - return this; - } - - /** - * Get the informationTypeId property: The information type ID. - * - * @return the informationTypeId value. - */ - public String informationTypeId() { - return this.informationTypeId; - } - - /** - * Set the informationTypeId property: The information type ID. - * - * @param informationTypeId the informationTypeId value to set. - * @return the SensitivityLabelProperties object itself. - */ - public SensitivityLabelProperties withInformationTypeId(String informationTypeId) { - this.informationTypeId = informationTypeId; - return this; - } - - /** - * Get the isDisabled property: Is sensitivity recommendation disabled. Applicable for recommended sensitivity label - * only. Specifies whether the sensitivity recommendation on this column is disabled (dismissed) or not. - * - * @return the isDisabled value. - */ - public Boolean isDisabled() { - return this.isDisabled; - } - - /** - * Get the rank property: The rank property. - * - * @return the rank value. - */ - public SensitivityLabelRank rank() { - return this.rank; - } - - /** - * Set the rank property: The rank property. - * - * @param rank the rank value to set. - * @return the SensitivityLabelProperties object itself. - */ - public SensitivityLabelProperties withRank(SensitivityLabelRank rank) { - this.rank = rank; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SensitivityLabelUpdateInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SensitivityLabelUpdateInner.java index 9a62cde101a91..37c56cfbff96d 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SensitivityLabelUpdateInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SensitivityLabelUpdateInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.SensitivityLabelUpdateKind; @@ -12,24 +13,40 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** A sensitivity label update operation. */ +@JsonFlatten @Fluent -public final class SensitivityLabelUpdateInner extends ProxyResource { +public class SensitivityLabelUpdateInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(SensitivityLabelUpdateInner.class); /* - * Resource properties. + * The op property. */ - @JsonProperty(value = "properties") - private SensitivityLabelUpdatePropertiesInner innerProperties; + @JsonProperty(value = "properties.op") + private SensitivityLabelUpdateKind op; - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. + /* + * Schema name of the column to update. */ - private SensitivityLabelUpdatePropertiesInner innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.schema") + private String schema; + + /* + * Table name of the column to update. + */ + @JsonProperty(value = "properties.table") + private String table; + + /* + * Column name to update. + */ + @JsonProperty(value = "properties.column") + private String column; + + /* + * The sensitivity label information to apply on a column. + */ + @JsonProperty(value = "properties.sensitivityLabel") + private SensitivityLabelInner sensitivityLabel; /** * Get the op property: The op property. @@ -37,7 +54,7 @@ private SensitivityLabelUpdatePropertiesInner innerProperties() { * @return the op value. */ public SensitivityLabelUpdateKind op() { - return this.innerProperties() == null ? null : this.innerProperties().op(); + return this.op; } /** @@ -47,10 +64,7 @@ public SensitivityLabelUpdateKind op() { * @return the SensitivityLabelUpdateInner object itself. */ public SensitivityLabelUpdateInner withOp(SensitivityLabelUpdateKind op) { - if (this.innerProperties() == null) { - this.innerProperties = new SensitivityLabelUpdatePropertiesInner(); - } - this.innerProperties().withOp(op); + this.op = op; return this; } @@ -60,7 +74,7 @@ public SensitivityLabelUpdateInner withOp(SensitivityLabelUpdateKind op) { * @return the schema value. */ public String schema() { - return this.innerProperties() == null ? null : this.innerProperties().schema(); + return this.schema; } /** @@ -70,10 +84,7 @@ public String schema() { * @return the SensitivityLabelUpdateInner object itself. */ public SensitivityLabelUpdateInner withSchema(String schema) { - if (this.innerProperties() == null) { - this.innerProperties = new SensitivityLabelUpdatePropertiesInner(); - } - this.innerProperties().withSchema(schema); + this.schema = schema; return this; } @@ -83,7 +94,7 @@ public SensitivityLabelUpdateInner withSchema(String schema) { * @return the table value. */ public String table() { - return this.innerProperties() == null ? null : this.innerProperties().table(); + return this.table; } /** @@ -93,10 +104,7 @@ public String table() { * @return the SensitivityLabelUpdateInner object itself. */ public SensitivityLabelUpdateInner withTable(String table) { - if (this.innerProperties() == null) { - this.innerProperties = new SensitivityLabelUpdatePropertiesInner(); - } - this.innerProperties().withTable(table); + this.table = table; return this; } @@ -106,7 +114,7 @@ public SensitivityLabelUpdateInner withTable(String table) { * @return the column value. */ public String column() { - return this.innerProperties() == null ? null : this.innerProperties().column(); + return this.column; } /** @@ -116,10 +124,7 @@ public String column() { * @return the SensitivityLabelUpdateInner object itself. */ public SensitivityLabelUpdateInner withColumn(String column) { - if (this.innerProperties() == null) { - this.innerProperties = new SensitivityLabelUpdatePropertiesInner(); - } - this.innerProperties().withColumn(column); + this.column = column; return this; } @@ -129,7 +134,7 @@ public SensitivityLabelUpdateInner withColumn(String column) { * @return the sensitivityLabel value. */ public SensitivityLabelInner sensitivityLabel() { - return this.innerProperties() == null ? null : this.innerProperties().sensitivityLabel(); + return this.sensitivityLabel; } /** @@ -139,10 +144,7 @@ public SensitivityLabelInner sensitivityLabel() { * @return the SensitivityLabelUpdateInner object itself. */ public SensitivityLabelUpdateInner withSensitivityLabel(SensitivityLabelInner sensitivityLabel) { - if (this.innerProperties() == null) { - this.innerProperties = new SensitivityLabelUpdatePropertiesInner(); - } - this.innerProperties().withSensitivityLabel(sensitivityLabel); + this.sensitivityLabel = sensitivityLabel; return this; } @@ -152,8 +154,8 @@ public SensitivityLabelUpdateInner withSensitivityLabel(SensitivityLabelInner se * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (sensitivityLabel() != null) { + sensitivityLabel().validate(); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SensitivityLabelUpdatePropertiesInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SensitivityLabelUpdatePropertiesInner.java deleted file mode 100644 index f5e8226c45a8b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SensitivityLabelUpdatePropertiesInner.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.SensitivityLabelUpdateKind; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties of an operation executed on a sensitivity label. */ -@Fluent -public final class SensitivityLabelUpdatePropertiesInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SensitivityLabelUpdatePropertiesInner.class); - - /* - * The op property. - */ - @JsonProperty(value = "op", required = true) - private SensitivityLabelUpdateKind op; - - /* - * Schema name of the column to update. - */ - @JsonProperty(value = "schema", required = true) - private String schema; - - /* - * Table name of the column to update. - */ - @JsonProperty(value = "table", required = true) - private String table; - - /* - * Column name to update. - */ - @JsonProperty(value = "column", required = true) - private String column; - - /* - * The sensitivity label information to apply on a column. - */ - @JsonProperty(value = "sensitivityLabel") - private SensitivityLabelInner sensitivityLabel; - - /** - * Get the op property: The op property. - * - * @return the op value. - */ - public SensitivityLabelUpdateKind op() { - return this.op; - } - - /** - * Set the op property: The op property. - * - * @param op the op value to set. - * @return the SensitivityLabelUpdatePropertiesInner object itself. - */ - public SensitivityLabelUpdatePropertiesInner withOp(SensitivityLabelUpdateKind op) { - this.op = op; - return this; - } - - /** - * Get the schema property: Schema name of the column to update. - * - * @return the schema value. - */ - public String schema() { - return this.schema; - } - - /** - * Set the schema property: Schema name of the column to update. - * - * @param schema the schema value to set. - * @return the SensitivityLabelUpdatePropertiesInner object itself. - */ - public SensitivityLabelUpdatePropertiesInner withSchema(String schema) { - this.schema = schema; - return this; - } - - /** - * Get the table property: Table name of the column to update. - * - * @return the table value. - */ - public String table() { - return this.table; - } - - /** - * Set the table property: Table name of the column to update. - * - * @param table the table value to set. - * @return the SensitivityLabelUpdatePropertiesInner object itself. - */ - public SensitivityLabelUpdatePropertiesInner withTable(String table) { - this.table = table; - return this; - } - - /** - * Get the column property: Column name to update. - * - * @return the column value. - */ - public String column() { - return this.column; - } - - /** - * Set the column property: Column name to update. - * - * @param column the column value to set. - * @return the SensitivityLabelUpdatePropertiesInner object itself. - */ - public SensitivityLabelUpdatePropertiesInner withColumn(String column) { - this.column = column; - return this; - } - - /** - * Get the sensitivityLabel property: The sensitivity label information to apply on a column. - * - * @return the sensitivityLabel value. - */ - public SensitivityLabelInner sensitivityLabel() { - return this.sensitivityLabel; - } - - /** - * Set the sensitivityLabel property: The sensitivity label information to apply on a column. - * - * @param sensitivityLabel the sensitivityLabel value to set. - * @return the SensitivityLabelUpdatePropertiesInner object itself. - */ - public SensitivityLabelUpdatePropertiesInner withSensitivityLabel(SensitivityLabelInner sensitivityLabel) { - this.sensitivityLabel = sensitivityLabel; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (op() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property op in model SensitivityLabelUpdatePropertiesInner")); - } - if (schema() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property schema in model SensitivityLabelUpdatePropertiesInner")); - } - if (table() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property table in model SensitivityLabelUpdatePropertiesInner")); - } - if (column() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property column in model SensitivityLabelUpdatePropertiesInner")); - } - if (sensitivityLabel() != null) { - sensitivityLabel().validate(); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerBlobAuditingPolicyInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerBlobAuditingPolicyInner.java index 1ed1fd4488893..63d413b6b572b 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerBlobAuditingPolicyInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerBlobAuditingPolicyInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.BlobAuditingPolicyState; @@ -14,24 +15,170 @@ import java.util.UUID; /** A server blob auditing policy. */ +@JsonFlatten @Fluent -public final class ServerBlobAuditingPolicyInner extends ProxyResource { +public class ServerBlobAuditingPolicyInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerBlobAuditingPolicyInner.class); /* - * Resource properties. + * Specifies the state of the policy. If state is Enabled, storageEndpoint + * or isAzureMonitorTargetEnabled are required. */ - @JsonProperty(value = "properties") - private ServerBlobAuditingPolicyProperties innerProperties; + @JsonProperty(value = "properties.state") + private BlobAuditingPolicyState state; - /** - * Get the innerProperties property: Resource properties. + /* + * Specifies the blob storage endpoint (e.g. + * https://MyAccount.blob.core.windows.net). If state is Enabled, + * storageEndpoint or isAzureMonitorTargetEnabled is required. + */ + @JsonProperty(value = "properties.storageEndpoint") + private String storageEndpoint; + + /* + * Specifies the identifier key of the auditing storage account. + * If state is Enabled and storageEndpoint is specified, not specifying the + * storageAccountAccessKey will use SQL server system-assigned managed + * identity to access the storage. + * Prerequisites for using managed identity authentication: + * 1. Assign SQL Server a system-assigned managed identity in Azure Active + * Directory (AAD). + * 2. Grant SQL Server identity access to the storage account by adding + * 'Storage Blob Data Contributor' RBAC role to the server identity. + * For more information, see [Auditing to storage using Managed Identity + * authentication](https://go.microsoft.com/fwlink/?linkid=2114355) + */ + @JsonProperty(value = "properties.storageAccountAccessKey") + private String storageAccountAccessKey; + + /* + * Specifies the number of days to keep in the audit logs in the storage + * account. + */ + @JsonProperty(value = "properties.retentionDays") + private Integer retentionDays; + + /* + * Specifies the Actions-Groups and Actions to audit. + * + * The recommended set of action groups to use is the following combination + * - this will audit all the queries and stored procedures executed against + * the database, as well as successful and failed logins: + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default + * when enabling auditing from the Azure portal. + * + * The supported action groups to audit are (note: choose only specific + * groups that cover your auditing needs. Using unnecessary groups could + * lead to very large quantities of audit records): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * + * These are groups that cover all sql statements and stored procedures + * executed against the database, and should not be used in combination + * with other groups as this will result in duplicate audit logs. + * + * For more information, see [Database-Level Audit Action + * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + * + * For Database auditing policy, specific Actions can also be specified + * (note that Actions cannot be specified for Server auditing policy). The + * supported actions to audit are: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE + * REFERENCES + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note that in the above format can refer to an object like a + * table, view, or stored procedure, or an entire database or schema. For + * the latter cases, the forms DATABASE::{db_name} and + * SCHEMA::{schema_name} are used, respectively. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public * - * @return the innerProperties value. + * For more information, see [Database-Level Audit + * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) */ - private ServerBlobAuditingPolicyProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.auditActionsAndGroups") + private List auditActionsAndGroups; + + /* + * Specifies the blob storage subscription Id. + */ + @JsonProperty(value = "properties.storageAccountSubscriptionId") + private UUID storageAccountSubscriptionId; + + /* + * Specifies whether storageAccountAccessKey value is the storage's + * secondary key. + */ + @JsonProperty(value = "properties.isStorageSecondaryKeyInUse") + private Boolean isStorageSecondaryKeyInUse; + + /* + * Specifies whether audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'state' as + * 'Enabled' and 'isAzureMonitorTargetEnabled' as true. + * + * When using REST API to configure auditing, Diagnostic Settings with + * 'SQLSecurityAuditEvents' diagnostic logs category on the database should + * be also created. + * Note that for server level audit you should use the 'master' database as + * {databaseName}. + * + * Diagnostic Settings URI format: + * PUT + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + * + * For more information, see [Diagnostic Settings REST + * API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings + * PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + * + */ + @JsonProperty(value = "properties.isAzureMonitorTargetEnabled") + private Boolean isAzureMonitorTargetEnabled; + + /* + * Specifies the amount of time in milliseconds that can elapse before + * audit actions are forced to be processed. + * The default minimum value is 1000 (1 second). The maximum is + * 2,147,483,647. + */ + @JsonProperty(value = "properties.queueDelayMs") + private Integer queueDelayMs; /** * Get the state property: Specifies the state of the policy. If state is Enabled, storageEndpoint or @@ -40,7 +187,7 @@ private ServerBlobAuditingPolicyProperties innerProperties() { * @return the state value. */ public BlobAuditingPolicyState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); + return this.state; } /** @@ -51,10 +198,7 @@ public BlobAuditingPolicyState state() { * @return the ServerBlobAuditingPolicyInner object itself. */ public ServerBlobAuditingPolicyInner withState(BlobAuditingPolicyState state) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerBlobAuditingPolicyProperties(); - } - this.innerProperties().withState(state); + this.state = state; return this; } @@ -66,7 +210,7 @@ public ServerBlobAuditingPolicyInner withState(BlobAuditingPolicyState state) { * @return the storageEndpoint value. */ public String storageEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().storageEndpoint(); + return this.storageEndpoint; } /** @@ -78,10 +222,7 @@ public String storageEndpoint() { * @return the ServerBlobAuditingPolicyInner object itself. */ public ServerBlobAuditingPolicyInner withStorageEndpoint(String storageEndpoint) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerBlobAuditingPolicyProperties(); - } - this.innerProperties().withStorageEndpoint(storageEndpoint); + this.storageEndpoint = storageEndpoint; return this; } @@ -97,7 +238,7 @@ public ServerBlobAuditingPolicyInner withStorageEndpoint(String storageEndpoint) * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { - return this.innerProperties() == null ? null : this.innerProperties().storageAccountAccessKey(); + return this.storageAccountAccessKey; } /** @@ -113,10 +254,7 @@ public String storageAccountAccessKey() { * @return the ServerBlobAuditingPolicyInner object itself. */ public ServerBlobAuditingPolicyInner withStorageAccountAccessKey(String storageAccountAccessKey) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerBlobAuditingPolicyProperties(); - } - this.innerProperties().withStorageAccountAccessKey(storageAccountAccessKey); + this.storageAccountAccessKey = storageAccountAccessKey; return this; } @@ -126,7 +264,7 @@ public ServerBlobAuditingPolicyInner withStorageAccountAccessKey(String storageA * @return the retentionDays value. */ public Integer retentionDays() { - return this.innerProperties() == null ? null : this.innerProperties().retentionDays(); + return this.retentionDays; } /** @@ -136,10 +274,7 @@ public Integer retentionDays() { * @return the ServerBlobAuditingPolicyInner object itself. */ public ServerBlobAuditingPolicyInner withRetentionDays(Integer retentionDays) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerBlobAuditingPolicyProperties(); - } - this.innerProperties().withRetentionDays(retentionDays); + this.retentionDays = retentionDays; return this; } @@ -189,7 +324,7 @@ public ServerBlobAuditingPolicyInner withRetentionDays(Integer retentionDays) { * @return the auditActionsAndGroups value. */ public List auditActionsAndGroups() { - return this.innerProperties() == null ? null : this.innerProperties().auditActionsAndGroups(); + return this.auditActionsAndGroups; } /** @@ -239,10 +374,7 @@ public List auditActionsAndGroups() { * @return the ServerBlobAuditingPolicyInner object itself. */ public ServerBlobAuditingPolicyInner withAuditActionsAndGroups(List auditActionsAndGroups) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerBlobAuditingPolicyProperties(); - } - this.innerProperties().withAuditActionsAndGroups(auditActionsAndGroups); + this.auditActionsAndGroups = auditActionsAndGroups; return this; } @@ -252,7 +384,7 @@ public ServerBlobAuditingPolicyInner withAuditActionsAndGroups(List audi * @return the storageAccountSubscriptionId value. */ public UUID storageAccountSubscriptionId() { - return this.innerProperties() == null ? null : this.innerProperties().storageAccountSubscriptionId(); + return this.storageAccountSubscriptionId; } /** @@ -262,10 +394,7 @@ public UUID storageAccountSubscriptionId() { * @return the ServerBlobAuditingPolicyInner object itself. */ public ServerBlobAuditingPolicyInner withStorageAccountSubscriptionId(UUID storageAccountSubscriptionId) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerBlobAuditingPolicyProperties(); - } - this.innerProperties().withStorageAccountSubscriptionId(storageAccountSubscriptionId); + this.storageAccountSubscriptionId = storageAccountSubscriptionId; return this; } @@ -276,7 +405,7 @@ public ServerBlobAuditingPolicyInner withStorageAccountSubscriptionId(UUID stora * @return the isStorageSecondaryKeyInUse value. */ public Boolean isStorageSecondaryKeyInUse() { - return this.innerProperties() == null ? null : this.innerProperties().isStorageSecondaryKeyInUse(); + return this.isStorageSecondaryKeyInUse; } /** @@ -287,10 +416,7 @@ public Boolean isStorageSecondaryKeyInUse() { * @return the ServerBlobAuditingPolicyInner object itself. */ public ServerBlobAuditingPolicyInner withIsStorageSecondaryKeyInUse(Boolean isStorageSecondaryKeyInUse) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerBlobAuditingPolicyProperties(); - } - this.innerProperties().withIsStorageSecondaryKeyInUse(isStorageSecondaryKeyInUse); + this.isStorageSecondaryKeyInUse = isStorageSecondaryKeyInUse; return this; } @@ -311,7 +437,7 @@ public ServerBlobAuditingPolicyInner withIsStorageSecondaryKeyInUse(Boolean isSt * @return the isAzureMonitorTargetEnabled value. */ public Boolean isAzureMonitorTargetEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().isAzureMonitorTargetEnabled(); + return this.isAzureMonitorTargetEnabled; } /** @@ -332,10 +458,7 @@ public Boolean isAzureMonitorTargetEnabled() { * @return the ServerBlobAuditingPolicyInner object itself. */ public ServerBlobAuditingPolicyInner withIsAzureMonitorTargetEnabled(Boolean isAzureMonitorTargetEnabled) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerBlobAuditingPolicyProperties(); - } - this.innerProperties().withIsAzureMonitorTargetEnabled(isAzureMonitorTargetEnabled); + this.isAzureMonitorTargetEnabled = isAzureMonitorTargetEnabled; return this; } @@ -346,7 +469,7 @@ public ServerBlobAuditingPolicyInner withIsAzureMonitorTargetEnabled(Boolean isA * @return the queueDelayMs value. */ public Integer queueDelayMs() { - return this.innerProperties() == null ? null : this.innerProperties().queueDelayMs(); + return this.queueDelayMs; } /** @@ -357,10 +480,7 @@ public Integer queueDelayMs() { * @return the ServerBlobAuditingPolicyInner object itself. */ public ServerBlobAuditingPolicyInner withQueueDelayMs(Integer queueDelayMs) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerBlobAuditingPolicyProperties(); - } - this.innerProperties().withQueueDelayMs(queueDelayMs); + this.queueDelayMs = queueDelayMs; return this; } @@ -370,8 +490,5 @@ public ServerBlobAuditingPolicyInner withQueueDelayMs(Integer queueDelayMs) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerBlobAuditingPolicyProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerBlobAuditingPolicyProperties.java deleted file mode 100644 index 80eb1e6f10c6b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerBlobAuditingPolicyProperties.java +++ /dev/null @@ -1,497 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.BlobAuditingPolicyState; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.UUID; - -/** Properties of a server blob auditing policy. */ -@Fluent -public final class ServerBlobAuditingPolicyProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerBlobAuditingPolicyProperties.class); - - /* - * Specifies the state of the policy. If state is Enabled, storageEndpoint - * or isAzureMonitorTargetEnabled are required. - */ - @JsonProperty(value = "state", required = true) - private BlobAuditingPolicyState state; - - /* - * Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). If state is Enabled, - * storageEndpoint or isAzureMonitorTargetEnabled is required. - */ - @JsonProperty(value = "storageEndpoint") - private String storageEndpoint; - - /* - * Specifies the identifier key of the auditing storage account. - * If state is Enabled and storageEndpoint is specified, not specifying the - * storageAccountAccessKey will use SQL server system-assigned managed - * identity to access the storage. - * Prerequisites for using managed identity authentication: - * 1. Assign SQL Server a system-assigned managed identity in Azure Active - * Directory (AAD). - * 2. Grant SQL Server identity access to the storage account by adding - * 'Storage Blob Data Contributor' RBAC role to the server identity. - * For more information, see [Auditing to storage using Managed Identity - * authentication](https://go.microsoft.com/fwlink/?linkid=2114355) - */ - @JsonProperty(value = "storageAccountAccessKey") - private String storageAccountAccessKey; - - /* - * Specifies the number of days to keep in the audit logs in the storage - * account. - */ - @JsonProperty(value = "retentionDays") - private Integer retentionDays; - - /* - * Specifies the Actions-Groups and Actions to audit. - * - * The recommended set of action groups to use is the following combination - * - this will audit all the queries and stored procedures executed against - * the database, as well as successful and failed logins: - * - * BATCH_COMPLETED_GROUP, - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - * FAILED_DATABASE_AUTHENTICATION_GROUP. - * - * This above combination is also the set that is configured by default - * when enabling auditing from the Azure portal. - * - * The supported action groups to audit are (note: choose only specific - * groups that cover your auditing needs. Using unnecessary groups could - * lead to very large quantities of audit records): - * - * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - * BACKUP_RESTORE_GROUP - * DATABASE_LOGOUT_GROUP - * DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - * DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP - * DATABASE_PRINCIPAL_CHANGE_GROUP - * DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP - * FAILED_DATABASE_AUTHENTICATION_GROUP - * SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP - * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - * USER_CHANGE_PASSWORD_GROUP - * BATCH_STARTED_GROUP - * BATCH_COMPLETED_GROUP - * - * These are groups that cover all sql statements and stored procedures - * executed against the database, and should not be used in combination - * with other groups as this will result in duplicate audit logs. - * - * For more information, see [Database-Level Audit Action - * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * - * For Database auditing policy, specific Actions can also be specified - * (note that Actions cannot be specified for Server auditing policy). The - * supported actions to audit are: - * SELECT - * UPDATE - * INSERT - * DELETE - * EXECUTE - * RECEIVE - * REFERENCES - * - * The general form for defining an action to be audited is: - * {action} ON {object} BY {principal} - * - * Note that in the above format can refer to an object like a - * table, view, or stored procedure, or an entire database or schema. For - * the latter cases, the forms DATABASE::{db_name} and - * SCHEMA::{schema_name} are used, respectively. - * - * For example: - * SELECT on dbo.myTable by public - * SELECT on DATABASE::myDatabase by public - * SELECT on SCHEMA::mySchema by public - * - * For more information, see [Database-Level Audit - * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - */ - @JsonProperty(value = "auditActionsAndGroups") - private List auditActionsAndGroups; - - /* - * Specifies the blob storage subscription Id. - */ - @JsonProperty(value = "storageAccountSubscriptionId") - private UUID storageAccountSubscriptionId; - - /* - * Specifies whether storageAccountAccessKey value is the storage's - * secondary key. - */ - @JsonProperty(value = "isStorageSecondaryKeyInUse") - private Boolean isStorageSecondaryKeyInUse; - - /* - * Specifies whether audit events are sent to Azure Monitor. - * In order to send the events to Azure Monitor, specify 'state' as - * 'Enabled' and 'isAzureMonitorTargetEnabled' as true. - * - * When using REST API to configure auditing, Diagnostic Settings with - * 'SQLSecurityAuditEvents' diagnostic logs category on the database should - * be also created. - * Note that for server level audit you should use the 'master' database as - * {databaseName}. - * - * Diagnostic Settings URI format: - * PUT - * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - * For more information, see [Diagnostic Settings REST - * API](https://go.microsoft.com/fwlink/?linkid=2033207) - * or [Diagnostic Settings - * PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - * - */ - @JsonProperty(value = "isAzureMonitorTargetEnabled") - private Boolean isAzureMonitorTargetEnabled; - - /* - * Specifies the amount of time in milliseconds that can elapse before - * audit actions are forced to be processed. - * The default minimum value is 1000 (1 second). The maximum is - * 2,147,483,647. - */ - @JsonProperty(value = "queueDelayMs") - private Integer queueDelayMs; - - /** - * Get the state property: Specifies the state of the policy. If state is Enabled, storageEndpoint or - * isAzureMonitorTargetEnabled are required. - * - * @return the state value. - */ - public BlobAuditingPolicyState state() { - return this.state; - } - - /** - * Set the state property: Specifies the state of the policy. If state is Enabled, storageEndpoint or - * isAzureMonitorTargetEnabled are required. - * - * @param state the state value to set. - * @return the ServerBlobAuditingPolicyProperties object itself. - */ - public ServerBlobAuditingPolicyProperties withState(BlobAuditingPolicyState state) { - this.state = state; - return this; - } - - /** - * Get the storageEndpoint property: Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is - * required. - * - * @return the storageEndpoint value. - */ - public String storageEndpoint() { - return this.storageEndpoint; - } - - /** - * Set the storageEndpoint property: Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is - * required. - * - * @param storageEndpoint the storageEndpoint value to set. - * @return the ServerBlobAuditingPolicyProperties object itself. - */ - public ServerBlobAuditingPolicyProperties withStorageEndpoint(String storageEndpoint) { - this.storageEndpoint = storageEndpoint; - return this; - } - - /** - * Get the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server - * system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication: - * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 2. Grant SQL Server - * identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server - * identity. For more information, see [Auditing to storage using Managed Identity - * authentication](https://go.microsoft.com/fwlink/?linkid=2114355). - * - * @return the storageAccountAccessKey value. - */ - public String storageAccountAccessKey() { - return this.storageAccountAccessKey; - } - - /** - * Set the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server - * system-assigned managed identity to access the storage. Prerequisites for using managed identity authentication: - * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 2. Grant SQL Server - * identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server - * identity. For more information, see [Auditing to storage using Managed Identity - * authentication](https://go.microsoft.com/fwlink/?linkid=2114355). - * - * @param storageAccountAccessKey the storageAccountAccessKey value to set. - * @return the ServerBlobAuditingPolicyProperties object itself. - */ - public ServerBlobAuditingPolicyProperties withStorageAccountAccessKey(String storageAccountAccessKey) { - this.storageAccountAccessKey = storageAccountAccessKey; - return this; - } - - /** - * Get the retentionDays property: Specifies the number of days to keep in the audit logs in the storage account. - * - * @return the retentionDays value. - */ - public Integer retentionDays() { - return this.retentionDays; - } - - /** - * Set the retentionDays property: Specifies the number of days to keep in the audit logs in the storage account. - * - * @param retentionDays the retentionDays value to set. - * @return the ServerBlobAuditingPolicyProperties object itself. - */ - public ServerBlobAuditingPolicyProperties withRetentionDays(Integer retentionDays) { - this.retentionDays = retentionDays; - return this; - } - - /** - * Get the auditActionsAndGroups property: Specifies the Actions-Groups and Actions to audit. - * - *

The recommended set of action groups to use is the following combination - this will audit all the queries and - * stored procedures executed against the database, as well as successful and failed logins: - * - *

BATCH_COMPLETED_GROUP, SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP. - * - *

This above combination is also the set that is configured by default when enabling auditing from the Azure - * portal. - * - *

The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. - * Using unnecessary groups could lead to very large quantities of audit records): - * - *

APPLICATION_ROLE_CHANGE_PASSWORD_GROUP BACKUP_RESTORE_GROUP DATABASE_LOGOUT_GROUP DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP USER_CHANGE_PASSWORD_GROUP BATCH_STARTED_GROUP BATCH_COMPLETED_GROUP - * - *

These are groups that cover all sql statements and stored procedures executed against the database, and should - * not be used in combination with other groups as this will result in duplicate audit logs. - * - *

For more information, see [Database-Level Audit Action - * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * - *

For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified - * for Server auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE EXECUTE RECEIVE - * REFERENCES - * - *

The general form for defining an action to be audited is: {action} ON {object} BY {principal} - * - *

Note that <object> in the above format can refer to an object like a table, view, or stored procedure, - * or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} - * are used, respectively. - * - *

For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on - * SCHEMA::mySchema by public - * - *

For more information, see [Database-Level Audit - * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions). - * - * @return the auditActionsAndGroups value. - */ - public List auditActionsAndGroups() { - return this.auditActionsAndGroups; - } - - /** - * Set the auditActionsAndGroups property: Specifies the Actions-Groups and Actions to audit. - * - *

The recommended set of action groups to use is the following combination - this will audit all the queries and - * stored procedures executed against the database, as well as successful and failed logins: - * - *

BATCH_COMPLETED_GROUP, SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP. - * - *

This above combination is also the set that is configured by default when enabling auditing from the Azure - * portal. - * - *

The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. - * Using unnecessary groups could lead to very large quantities of audit records): - * - *

APPLICATION_ROLE_CHANGE_PASSWORD_GROUP BACKUP_RESTORE_GROUP DATABASE_LOGOUT_GROUP DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP USER_CHANGE_PASSWORD_GROUP BATCH_STARTED_GROUP BATCH_COMPLETED_GROUP - * - *

These are groups that cover all sql statements and stored procedures executed against the database, and should - * not be used in combination with other groups as this will result in duplicate audit logs. - * - *

For more information, see [Database-Level Audit Action - * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * - *

For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified - * for Server auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE EXECUTE RECEIVE - * REFERENCES - * - *

The general form for defining an action to be audited is: {action} ON {object} BY {principal} - * - *

Note that <object> in the above format can refer to an object like a table, view, or stored procedure, - * or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} - * are used, respectively. - * - *

For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on - * SCHEMA::mySchema by public - * - *

For more information, see [Database-Level Audit - * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions). - * - * @param auditActionsAndGroups the auditActionsAndGroups value to set. - * @return the ServerBlobAuditingPolicyProperties object itself. - */ - public ServerBlobAuditingPolicyProperties withAuditActionsAndGroups(List auditActionsAndGroups) { - this.auditActionsAndGroups = auditActionsAndGroups; - return this; - } - - /** - * Get the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * - * @return the storageAccountSubscriptionId value. - */ - public UUID storageAccountSubscriptionId() { - return this.storageAccountSubscriptionId; - } - - /** - * Set the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * - * @param storageAccountSubscriptionId the storageAccountSubscriptionId value to set. - * @return the ServerBlobAuditingPolicyProperties object itself. - */ - public ServerBlobAuditingPolicyProperties withStorageAccountSubscriptionId(UUID storageAccountSubscriptionId) { - this.storageAccountSubscriptionId = storageAccountSubscriptionId; - return this; - } - - /** - * Get the isStorageSecondaryKeyInUse property: Specifies whether storageAccountAccessKey value is the storage's - * secondary key. - * - * @return the isStorageSecondaryKeyInUse value. - */ - public Boolean isStorageSecondaryKeyInUse() { - return this.isStorageSecondaryKeyInUse; - } - - /** - * Set the isStorageSecondaryKeyInUse property: Specifies whether storageAccountAccessKey value is the storage's - * secondary key. - * - * @param isStorageSecondaryKeyInUse the isStorageSecondaryKeyInUse value to set. - * @return the ServerBlobAuditingPolicyProperties object itself. - */ - public ServerBlobAuditingPolicyProperties withIsStorageSecondaryKeyInUse(Boolean isStorageSecondaryKeyInUse) { - this.isStorageSecondaryKeyInUse = isStorageSecondaryKeyInUse; - return this; - } - - /** - * Get the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. In order - * to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true. - * - *

When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs - * category on the database should be also created. Note that for server level audit you should use the 'master' - * database as {databaseName}. - * - *

Diagnostic Settings URI format: PUT - * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * - * @return the isAzureMonitorTargetEnabled value. - */ - public Boolean isAzureMonitorTargetEnabled() { - return this.isAzureMonitorTargetEnabled; - } - - /** - * Set the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. In order - * to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true. - * - *

When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs - * category on the database should be also created. Note that for server level audit you should use the 'master' - * database as {databaseName}. - * - *

Diagnostic Settings URI format: PUT - * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * - * @param isAzureMonitorTargetEnabled the isAzureMonitorTargetEnabled value to set. - * @return the ServerBlobAuditingPolicyProperties object itself. - */ - public ServerBlobAuditingPolicyProperties withIsAzureMonitorTargetEnabled(Boolean isAzureMonitorTargetEnabled) { - this.isAzureMonitorTargetEnabled = isAzureMonitorTargetEnabled; - return this; - } - - /** - * Get the queueDelayMs property: Specifies the amount of time in milliseconds that can elapse before audit actions - * are forced to be processed. The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. - * - * @return the queueDelayMs value. - */ - public Integer queueDelayMs() { - return this.queueDelayMs; - } - - /** - * Set the queueDelayMs property: Specifies the amount of time in milliseconds that can elapse before audit actions - * are forced to be processed. The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. - * - * @param queueDelayMs the queueDelayMs value to set. - * @return the ServerBlobAuditingPolicyProperties object itself. - */ - public ServerBlobAuditingPolicyProperties withQueueDelayMs(Integer queueDelayMs) { - this.queueDelayMs = queueDelayMs; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (state() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property state in model ServerBlobAuditingPolicyProperties")); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerSecurityAlertPolicyInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerSecurityAlertPolicyInner.java index 96e33852e7edb..55a27f5fa02df 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerSecurityAlertPolicyInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerSecurityAlertPolicyInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.SecurityAlertPolicyState; @@ -14,24 +15,64 @@ import java.util.List; /** Workspace managed Sql server security alert policy. */ +@JsonFlatten @Fluent -public final class ServerSecurityAlertPolicyInner extends ProxyResource { +public class ServerSecurityAlertPolicyInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerSecurityAlertPolicyInner.class); /* - * Resource properties. + * Specifies the state of the policy, whether it is enabled or disabled or + * a policy has not been applied yet on the specific server */ - @JsonProperty(value = "properties") - private ServerSecurityAlertPolicyProperties innerProperties; + @JsonProperty(value = "properties.state") + private SecurityAlertPolicyState state; - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. + /* + * Specifies an array of alerts that are disabled. Allowed values are: + * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, + * Data_Exfiltration, Unsafe_Action */ - private ServerSecurityAlertPolicyProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.disabledAlerts") + private List disabledAlerts; + + /* + * Specifies an array of e-mail addresses to which the alert is sent. + */ + @JsonProperty(value = "properties.emailAddresses") + private List emailAddresses; + + /* + * Specifies that the alert is sent to the account administrators. + */ + @JsonProperty(value = "properties.emailAccountAdmins") + private Boolean emailAccountAdmins; + + /* + * Specifies the blob storage endpoint (e.g. + * https://MyAccount.blob.core.windows.net). This blob storage will hold + * all Threat Detection audit logs. + */ + @JsonProperty(value = "properties.storageEndpoint") + private String storageEndpoint; + + /* + * Specifies the identifier key of the Threat Detection audit storage + * account. + */ + @JsonProperty(value = "properties.storageAccountAccessKey") + private String storageAccountAccessKey; + + /* + * Specifies the number of days to keep in the Threat Detection audit logs. + */ + @JsonProperty(value = "properties.retentionDays") + private Integer retentionDays; + + /* + * Specifies the UTC creation time of the policy. + */ + @JsonProperty(value = "properties.creationTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime creationTime; /** * Get the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not @@ -40,7 +81,7 @@ private ServerSecurityAlertPolicyProperties innerProperties() { * @return the state value. */ public SecurityAlertPolicyState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); + return this.state; } /** @@ -51,10 +92,7 @@ public SecurityAlertPolicyState state() { * @return the ServerSecurityAlertPolicyInner object itself. */ public ServerSecurityAlertPolicyInner withState(SecurityAlertPolicyState state) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerSecurityAlertPolicyProperties(); - } - this.innerProperties().withState(state); + this.state = state; return this; } @@ -65,7 +103,7 @@ public ServerSecurityAlertPolicyInner withState(SecurityAlertPolicyState state) * @return the disabledAlerts value. */ public List disabledAlerts() { - return this.innerProperties() == null ? null : this.innerProperties().disabledAlerts(); + return this.disabledAlerts; } /** @@ -76,10 +114,7 @@ public List disabledAlerts() { * @return the ServerSecurityAlertPolicyInner object itself. */ public ServerSecurityAlertPolicyInner withDisabledAlerts(List disabledAlerts) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerSecurityAlertPolicyProperties(); - } - this.innerProperties().withDisabledAlerts(disabledAlerts); + this.disabledAlerts = disabledAlerts; return this; } @@ -89,7 +124,7 @@ public ServerSecurityAlertPolicyInner withDisabledAlerts(List disabledAl * @return the emailAddresses value. */ public List emailAddresses() { - return this.innerProperties() == null ? null : this.innerProperties().emailAddresses(); + return this.emailAddresses; } /** @@ -99,10 +134,7 @@ public List emailAddresses() { * @return the ServerSecurityAlertPolicyInner object itself. */ public ServerSecurityAlertPolicyInner withEmailAddresses(List emailAddresses) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerSecurityAlertPolicyProperties(); - } - this.innerProperties().withEmailAddresses(emailAddresses); + this.emailAddresses = emailAddresses; return this; } @@ -112,7 +144,7 @@ public ServerSecurityAlertPolicyInner withEmailAddresses(List emailAddre * @return the emailAccountAdmins value. */ public Boolean emailAccountAdmins() { - return this.innerProperties() == null ? null : this.innerProperties().emailAccountAdmins(); + return this.emailAccountAdmins; } /** @@ -122,10 +154,7 @@ public Boolean emailAccountAdmins() { * @return the ServerSecurityAlertPolicyInner object itself. */ public ServerSecurityAlertPolicyInner withEmailAccountAdmins(Boolean emailAccountAdmins) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerSecurityAlertPolicyProperties(); - } - this.innerProperties().withEmailAccountAdmins(emailAccountAdmins); + this.emailAccountAdmins = emailAccountAdmins; return this; } @@ -136,7 +165,7 @@ public ServerSecurityAlertPolicyInner withEmailAccountAdmins(Boolean emailAccoun * @return the storageEndpoint value. */ public String storageEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().storageEndpoint(); + return this.storageEndpoint; } /** @@ -147,10 +176,7 @@ public String storageEndpoint() { * @return the ServerSecurityAlertPolicyInner object itself. */ public ServerSecurityAlertPolicyInner withStorageEndpoint(String storageEndpoint) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerSecurityAlertPolicyProperties(); - } - this.innerProperties().withStorageEndpoint(storageEndpoint); + this.storageEndpoint = storageEndpoint; return this; } @@ -161,7 +187,7 @@ public ServerSecurityAlertPolicyInner withStorageEndpoint(String storageEndpoint * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { - return this.innerProperties() == null ? null : this.innerProperties().storageAccountAccessKey(); + return this.storageAccountAccessKey; } /** @@ -172,10 +198,7 @@ public String storageAccountAccessKey() { * @return the ServerSecurityAlertPolicyInner object itself. */ public ServerSecurityAlertPolicyInner withStorageAccountAccessKey(String storageAccountAccessKey) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerSecurityAlertPolicyProperties(); - } - this.innerProperties().withStorageAccountAccessKey(storageAccountAccessKey); + this.storageAccountAccessKey = storageAccountAccessKey; return this; } @@ -185,7 +208,7 @@ public ServerSecurityAlertPolicyInner withStorageAccountAccessKey(String storage * @return the retentionDays value. */ public Integer retentionDays() { - return this.innerProperties() == null ? null : this.innerProperties().retentionDays(); + return this.retentionDays; } /** @@ -195,10 +218,7 @@ public Integer retentionDays() { * @return the ServerSecurityAlertPolicyInner object itself. */ public ServerSecurityAlertPolicyInner withRetentionDays(Integer retentionDays) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerSecurityAlertPolicyProperties(); - } - this.innerProperties().withRetentionDays(retentionDays); + this.retentionDays = retentionDays; return this; } @@ -208,7 +228,7 @@ public ServerSecurityAlertPolicyInner withRetentionDays(Integer retentionDays) { * @return the creationTime value. */ public OffsetDateTime creationTime() { - return this.innerProperties() == null ? null : this.innerProperties().creationTime(); + return this.creationTime; } /** @@ -217,8 +237,5 @@ public OffsetDateTime creationTime() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerSecurityAlertPolicyProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerSecurityAlertPolicyProperties.java deleted file mode 100644 index 4c8b142bd087d..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerSecurityAlertPolicyProperties.java +++ /dev/null @@ -1,244 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.SecurityAlertPolicyState; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Properties of a security alert policy. */ -@Fluent -public final class ServerSecurityAlertPolicyProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerSecurityAlertPolicyProperties.class); - - /* - * Specifies the state of the policy, whether it is enabled or disabled or - * a policy has not been applied yet on the specific server - */ - @JsonProperty(value = "state", required = true) - private SecurityAlertPolicyState state; - - /* - * Specifies an array of alerts that are disabled. Allowed values are: - * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, - * Data_Exfiltration, Unsafe_Action - */ - @JsonProperty(value = "disabledAlerts") - private List disabledAlerts; - - /* - * Specifies an array of e-mail addresses to which the alert is sent. - */ - @JsonProperty(value = "emailAddresses") - private List emailAddresses; - - /* - * Specifies that the alert is sent to the account administrators. - */ - @JsonProperty(value = "emailAccountAdmins") - private Boolean emailAccountAdmins; - - /* - * Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). This blob storage will hold - * all Threat Detection audit logs. - */ - @JsonProperty(value = "storageEndpoint") - private String storageEndpoint; - - /* - * Specifies the identifier key of the Threat Detection audit storage - * account. - */ - @JsonProperty(value = "storageAccountAccessKey") - private String storageAccountAccessKey; - - /* - * Specifies the number of days to keep in the Threat Detection audit logs. - */ - @JsonProperty(value = "retentionDays") - private Integer retentionDays; - - /* - * Specifies the UTC creation time of the policy. - */ - @JsonProperty(value = "creationTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime creationTime; - - /** - * Get the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not - * been applied yet on the specific server. - * - * @return the state value. - */ - public SecurityAlertPolicyState state() { - return this.state; - } - - /** - * Set the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not - * been applied yet on the specific server. - * - * @param state the state value to set. - * @return the ServerSecurityAlertPolicyProperties object itself. - */ - public ServerSecurityAlertPolicyProperties withState(SecurityAlertPolicyState state) { - this.state = state; - return this; - } - - /** - * Get the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are: - * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action. - * - * @return the disabledAlerts value. - */ - public List disabledAlerts() { - return this.disabledAlerts; - } - - /** - * Set the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are: - * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action. - * - * @param disabledAlerts the disabledAlerts value to set. - * @return the ServerSecurityAlertPolicyProperties object itself. - */ - public ServerSecurityAlertPolicyProperties withDisabledAlerts(List disabledAlerts) { - this.disabledAlerts = disabledAlerts; - return this; - } - - /** - * Get the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent. - * - * @return the emailAddresses value. - */ - public List emailAddresses() { - return this.emailAddresses; - } - - /** - * Set the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent. - * - * @param emailAddresses the emailAddresses value to set. - * @return the ServerSecurityAlertPolicyProperties object itself. - */ - public ServerSecurityAlertPolicyProperties withEmailAddresses(List emailAddresses) { - this.emailAddresses = emailAddresses; - return this; - } - - /** - * Get the emailAccountAdmins property: Specifies that the alert is sent to the account administrators. - * - * @return the emailAccountAdmins value. - */ - public Boolean emailAccountAdmins() { - return this.emailAccountAdmins; - } - - /** - * Set the emailAccountAdmins property: Specifies that the alert is sent to the account administrators. - * - * @param emailAccountAdmins the emailAccountAdmins value to set. - * @return the ServerSecurityAlertPolicyProperties object itself. - */ - public ServerSecurityAlertPolicyProperties withEmailAccountAdmins(Boolean emailAccountAdmins) { - this.emailAccountAdmins = emailAccountAdmins; - return this; - } - - /** - * Get the storageEndpoint property: Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - * - * @return the storageEndpoint value. - */ - public String storageEndpoint() { - return this.storageEndpoint; - } - - /** - * Set the storageEndpoint property: Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - * - * @param storageEndpoint the storageEndpoint value to set. - * @return the ServerSecurityAlertPolicyProperties object itself. - */ - public ServerSecurityAlertPolicyProperties withStorageEndpoint(String storageEndpoint) { - this.storageEndpoint = storageEndpoint; - return this; - } - - /** - * Get the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage - * account. - * - * @return the storageAccountAccessKey value. - */ - public String storageAccountAccessKey() { - return this.storageAccountAccessKey; - } - - /** - * Set the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage - * account. - * - * @param storageAccountAccessKey the storageAccountAccessKey value to set. - * @return the ServerSecurityAlertPolicyProperties object itself. - */ - public ServerSecurityAlertPolicyProperties withStorageAccountAccessKey(String storageAccountAccessKey) { - this.storageAccountAccessKey = storageAccountAccessKey; - return this; - } - - /** - * Get the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs. - * - * @return the retentionDays value. - */ - public Integer retentionDays() { - return this.retentionDays; - } - - /** - * Set the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs. - * - * @param retentionDays the retentionDays value to set. - * @return the ServerSecurityAlertPolicyProperties object itself. - */ - public ServerSecurityAlertPolicyProperties withRetentionDays(Integer retentionDays) { - this.retentionDays = retentionDays; - return this; - } - - /** - * Get the creationTime property: Specifies the UTC creation time of the policy. - * - * @return the creationTime value. - */ - public OffsetDateTime creationTime() { - return this.creationTime; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (state() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property state in model ServerSecurityAlertPolicyProperties")); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerVulnerabilityAssessmentInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerVulnerabilityAssessmentInner.java index ae58a47bd82be..ef87b21a30960 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerVulnerabilityAssessmentInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerVulnerabilityAssessmentInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentRecurringScansProperties; @@ -12,24 +13,40 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** A server vulnerability assessment. */ +@JsonFlatten @Fluent -public final class ServerVulnerabilityAssessmentInner extends ProxyResource { +public class ServerVulnerabilityAssessmentInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerVulnerabilityAssessmentInner.class); /* - * Resource properties. + * A blob storage container path to hold the scan results (e.g. + * https://myStorage.blob.core.windows.net/VaScans/). */ - @JsonProperty(value = "properties") - private ServerVulnerabilityAssessmentProperties innerProperties; + @JsonProperty(value = "properties.storageContainerPath") + private String storageContainerPath; - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. + /* + * A shared access signature (SAS Key) that has read and write access to + * the blob container specified in 'storageContainerPath' parameter. If + * 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is + * required. */ - private ServerVulnerabilityAssessmentProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.storageContainerSasKey") + private String storageContainerSasKey; + + /* + * Specifies the identifier key of the storage account for vulnerability + * assessment scan results. If 'StorageContainerSasKey' isn't specified, + * storageAccountAccessKey is required. + */ + @JsonProperty(value = "properties.storageAccountAccessKey") + private String storageAccountAccessKey; + + /* + * The recurring scans settings + */ + @JsonProperty(value = "properties.recurringScans") + private VulnerabilityAssessmentRecurringScansProperties recurringScans; /** * Get the storageContainerPath property: A blob storage container path to hold the scan results (e.g. @@ -38,7 +55,7 @@ private ServerVulnerabilityAssessmentProperties innerProperties() { * @return the storageContainerPath value. */ public String storageContainerPath() { - return this.innerProperties() == null ? null : this.innerProperties().storageContainerPath(); + return this.storageContainerPath; } /** @@ -49,10 +66,7 @@ public String storageContainerPath() { * @return the ServerVulnerabilityAssessmentInner object itself. */ public ServerVulnerabilityAssessmentInner withStorageContainerPath(String storageContainerPath) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerVulnerabilityAssessmentProperties(); - } - this.innerProperties().withStorageContainerPath(storageContainerPath); + this.storageContainerPath = storageContainerPath; return this; } @@ -64,7 +78,7 @@ public ServerVulnerabilityAssessmentInner withStorageContainerPath(String storag * @return the storageContainerSasKey value. */ public String storageContainerSasKey() { - return this.innerProperties() == null ? null : this.innerProperties().storageContainerSasKey(); + return this.storageContainerSasKey; } /** @@ -76,10 +90,7 @@ public String storageContainerSasKey() { * @return the ServerVulnerabilityAssessmentInner object itself. */ public ServerVulnerabilityAssessmentInner withStorageContainerSasKey(String storageContainerSasKey) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerVulnerabilityAssessmentProperties(); - } - this.innerProperties().withStorageContainerSasKey(storageContainerSasKey); + this.storageContainerSasKey = storageContainerSasKey; return this; } @@ -90,7 +101,7 @@ public ServerVulnerabilityAssessmentInner withStorageContainerSasKey(String stor * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { - return this.innerProperties() == null ? null : this.innerProperties().storageAccountAccessKey(); + return this.storageAccountAccessKey; } /** @@ -101,10 +112,7 @@ public String storageAccountAccessKey() { * @return the ServerVulnerabilityAssessmentInner object itself. */ public ServerVulnerabilityAssessmentInner withStorageAccountAccessKey(String storageAccountAccessKey) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerVulnerabilityAssessmentProperties(); - } - this.innerProperties().withStorageAccountAccessKey(storageAccountAccessKey); + this.storageAccountAccessKey = storageAccountAccessKey; return this; } @@ -114,7 +122,7 @@ public ServerVulnerabilityAssessmentInner withStorageAccountAccessKey(String sto * @return the recurringScans value. */ public VulnerabilityAssessmentRecurringScansProperties recurringScans() { - return this.innerProperties() == null ? null : this.innerProperties().recurringScans(); + return this.recurringScans; } /** @@ -125,10 +133,7 @@ public VulnerabilityAssessmentRecurringScansProperties recurringScans() { */ public ServerVulnerabilityAssessmentInner withRecurringScans( VulnerabilityAssessmentRecurringScansProperties recurringScans) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerVulnerabilityAssessmentProperties(); - } - this.innerProperties().withRecurringScans(recurringScans); + this.recurringScans = recurringScans; return this; } @@ -138,8 +143,8 @@ public ServerVulnerabilityAssessmentInner withRecurringScans( * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (recurringScans() != null) { + recurringScans().validate(); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerVulnerabilityAssessmentProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerVulnerabilityAssessmentProperties.java deleted file mode 100644 index 755d52ce37f51..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerVulnerabilityAssessmentProperties.java +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentRecurringScansProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties of a server Vulnerability Assessment. */ -@Fluent -public final class ServerVulnerabilityAssessmentProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerVulnerabilityAssessmentProperties.class); - - /* - * A blob storage container path to hold the scan results (e.g. - * https://myStorage.blob.core.windows.net/VaScans/). - */ - @JsonProperty(value = "storageContainerPath", required = true) - private String storageContainerPath; - - /* - * A shared access signature (SAS Key) that has read and write access to - * the blob container specified in 'storageContainerPath' parameter. If - * 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is - * required. - */ - @JsonProperty(value = "storageContainerSasKey") - private String storageContainerSasKey; - - /* - * Specifies the identifier key of the storage account for vulnerability - * assessment scan results. If 'StorageContainerSasKey' isn't specified, - * storageAccountAccessKey is required. - */ - @JsonProperty(value = "storageAccountAccessKey") - private String storageAccountAccessKey; - - /* - * The recurring scans settings - */ - @JsonProperty(value = "recurringScans") - private VulnerabilityAssessmentRecurringScansProperties recurringScans; - - /** - * Get the storageContainerPath property: A blob storage container path to hold the scan results (e.g. - * https://myStorage.blob.core.windows.net/VaScans/). - * - * @return the storageContainerPath value. - */ - public String storageContainerPath() { - return this.storageContainerPath; - } - - /** - * Set the storageContainerPath property: A blob storage container path to hold the scan results (e.g. - * https://myStorage.blob.core.windows.net/VaScans/). - * - * @param storageContainerPath the storageContainerPath value to set. - * @return the ServerVulnerabilityAssessmentProperties object itself. - */ - public ServerVulnerabilityAssessmentProperties withStorageContainerPath(String storageContainerPath) { - this.storageContainerPath = storageContainerPath; - return this; - } - - /** - * Get the storageContainerSasKey property: A shared access signature (SAS Key) that has read and write access to - * the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, - * StorageContainerSasKey is required. - * - * @return the storageContainerSasKey value. - */ - public String storageContainerSasKey() { - return this.storageContainerSasKey; - } - - /** - * Set the storageContainerSasKey property: A shared access signature (SAS Key) that has read and write access to - * the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, - * StorageContainerSasKey is required. - * - * @param storageContainerSasKey the storageContainerSasKey value to set. - * @return the ServerVulnerabilityAssessmentProperties object itself. - */ - public ServerVulnerabilityAssessmentProperties withStorageContainerSasKey(String storageContainerSasKey) { - this.storageContainerSasKey = storageContainerSasKey; - return this; - } - - /** - * Get the storageAccountAccessKey property: Specifies the identifier key of the storage account for vulnerability - * assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. - * - * @return the storageAccountAccessKey value. - */ - public String storageAccountAccessKey() { - return this.storageAccountAccessKey; - } - - /** - * Set the storageAccountAccessKey property: Specifies the identifier key of the storage account for vulnerability - * assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. - * - * @param storageAccountAccessKey the storageAccountAccessKey value to set. - * @return the ServerVulnerabilityAssessmentProperties object itself. - */ - public ServerVulnerabilityAssessmentProperties withStorageAccountAccessKey(String storageAccountAccessKey) { - this.storageAccountAccessKey = storageAccountAccessKey; - return this; - } - - /** - * Get the recurringScans property: The recurring scans settings. - * - * @return the recurringScans value. - */ - public VulnerabilityAssessmentRecurringScansProperties recurringScans() { - return this.recurringScans; - } - - /** - * Set the recurringScans property: The recurring scans settings. - * - * @param recurringScans the recurringScans value to set. - * @return the ServerVulnerabilityAssessmentProperties object itself. - */ - public ServerVulnerabilityAssessmentProperties withRecurringScans( - VulnerabilityAssessmentRecurringScansProperties recurringScans) { - this.recurringScans = recurringScans; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (storageContainerPath() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property storageContainerPath in model" - + " ServerVulnerabilityAssessmentProperties")); - } - if (recurringScans() != null) { - recurringScans().validate(); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SkuDescriptionInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SkuDescriptionInner.java new file mode 100644 index 0000000000000..353578fdee7d3 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SkuDescriptionInner.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.models.SkuLocationInfoItem; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The Kusto SKU description of given resource type. */ +@Immutable +public final class SkuDescriptionInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuDescriptionInner.class); + + /* + * The resource type + */ + @JsonProperty(value = "resourceType", access = JsonProperty.Access.WRITE_ONLY) + private String resourceType; + + /* + * The name of the SKU + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * The size of the SKU + */ + @JsonProperty(value = "size", access = JsonProperty.Access.WRITE_ONLY) + private String size; + + /* + * The set of locations that the SKU is available + */ + @JsonProperty(value = "locations", access = JsonProperty.Access.WRITE_ONLY) + private List locations; + + /* + * Locations and zones + */ + @JsonProperty(value = "locationInfo", access = JsonProperty.Access.WRITE_ONLY) + private List locationInfo; + + /* + * The restrictions because of which SKU cannot be used + */ + @JsonProperty(value = "restrictions", access = JsonProperty.Access.WRITE_ONLY) + private List restrictions; + + /** + * Get the resourceType property: The resource type. + * + * @return the resourceType value. + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Get the name property: The name of the SKU. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the size property: The size of the SKU. + * + * @return the size value. + */ + public String size() { + return this.size; + } + + /** + * Get the locations property: The set of locations that the SKU is available. + * + * @return the locations value. + */ + public List locations() { + return this.locations; + } + + /** + * Get the locationInfo property: Locations and zones. + * + * @return the locationInfo value. + */ + public List locationInfo() { + return this.locationInfo; + } + + /** + * Get the restrictions property: The restrictions because of which SKU cannot be used. + * + * @return the restrictions value. + */ + public List restrictions() { + return this.restrictions; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (locationInfo() != null) { + locationInfo().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SparkConfigurationInfo.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SparkConfigurationInfo.java deleted file mode 100644 index 8de42f4393736..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SparkConfigurationInfo.java +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** Information about a SparkConfiguration created at the workspace level. SparkConfiguration Artifact information. */ -@Fluent -public final class SparkConfigurationInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SparkConfigurationInfo.class); - - /* - * Description about the SparkConfiguration. - */ - @JsonProperty(value = "description") - private String description; - - /* - * SparkConfiguration configs. - */ - @JsonProperty(value = "configs", required = true) - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map configs; - - /* - * Annotations for SparkConfiguration. - */ - @JsonProperty(value = "annotations") - private List annotations; - - /* - * additional Notes. - */ - @JsonProperty(value = "notes") - private String notes; - - /* - * The identity that created the resource. - */ - @JsonProperty(value = "createdBy") - private String createdBy; - - /* - * The timestamp of resource creation. - */ - @JsonProperty(value = "created") - private OffsetDateTime created; - - /** - * Get the description property: Description about the SparkConfiguration. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Description about the SparkConfiguration. - * - * @param description the description value to set. - * @return the SparkConfigurationInfo object itself. - */ - public SparkConfigurationInfo withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the configs property: SparkConfiguration configs. - * - * @return the configs value. - */ - public Map configs() { - return this.configs; - } - - /** - * Set the configs property: SparkConfiguration configs. - * - * @param configs the configs value to set. - * @return the SparkConfigurationInfo object itself. - */ - public SparkConfigurationInfo withConfigs(Map configs) { - this.configs = configs; - return this; - } - - /** - * Get the annotations property: Annotations for SparkConfiguration. - * - * @return the annotations value. - */ - public List annotations() { - return this.annotations; - } - - /** - * Set the annotations property: Annotations for SparkConfiguration. - * - * @param annotations the annotations value to set. - * @return the SparkConfigurationInfo object itself. - */ - public SparkConfigurationInfo withAnnotations(List annotations) { - this.annotations = annotations; - return this; - } - - /** - * Get the notes property: additional Notes. - * - * @return the notes value. - */ - public String notes() { - return this.notes; - } - - /** - * Set the notes property: additional Notes. - * - * @param notes the notes value to set. - * @return the SparkConfigurationInfo object itself. - */ - public SparkConfigurationInfo withNotes(String notes) { - this.notes = notes; - return this; - } - - /** - * Get the createdBy property: The identity that created the resource. - * - * @return the createdBy value. - */ - public String createdBy() { - return this.createdBy; - } - - /** - * Set the createdBy property: The identity that created the resource. - * - * @param createdBy the createdBy value to set. - * @return the SparkConfigurationInfo object itself. - */ - public SparkConfigurationInfo withCreatedBy(String createdBy) { - this.createdBy = createdBy; - return this; - } - - /** - * Get the created property: The timestamp of resource creation. - * - * @return the created value. - */ - public OffsetDateTime created() { - return this.created; - } - - /** - * Set the created property: The timestamp of resource creation. - * - * @param created the created value to set. - * @return the SparkConfigurationInfo object itself. - */ - public SparkConfigurationInfo withCreated(OffsetDateTime created) { - this.created = created; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (configs() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property configs in model SparkConfigurationInfo")); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SparkConfigurationResourceInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SparkConfigurationResourceInner.java index c3f293010c79f..1215fdcea66b0 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SparkConfigurationResourceInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SparkConfigurationResourceInner.java @@ -5,35 +5,58 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.EntityResource; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; import java.util.Map; /** SparkConfiguration response details. */ +@JsonFlatten @Fluent -public final class SparkConfigurationResourceInner extends EntityResource { +public class SparkConfigurationResourceInner extends EntityResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(SparkConfigurationResourceInner.class); /* - * Information about a SparkConfiguration created at the workspace level. - * SparkConfiguration properties. + * Description about the SparkConfiguration. */ - @JsonProperty(value = "properties", required = true) - private SparkConfigurationInfo innerProperties = new SparkConfigurationInfo(); + @JsonProperty(value = "properties.description") + private String description; - /** - * Get the innerProperties property: Information about a SparkConfiguration created at the workspace level. - * SparkConfiguration properties. - * - * @return the innerProperties value. + /* + * SparkConfiguration configs. */ - private SparkConfigurationInfo innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.configs", required = true) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map configs; + + /* + * Annotations for SparkConfiguration. + */ + @JsonProperty(value = "properties.annotations") + private List annotations; + + /* + * additional Notes. + */ + @JsonProperty(value = "properties.notes") + private String notes; + + /* + * The identity that created the resource. + */ + @JsonProperty(value = "properties.createdBy") + private String createdBy; + + /* + * The timestamp of resource creation. + */ + @JsonProperty(value = "properties.created") + private OffsetDateTime created; /** * Get the description property: Description about the SparkConfiguration. @@ -41,7 +64,7 @@ private SparkConfigurationInfo innerProperties() { * @return the description value. */ public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); + return this.description; } /** @@ -51,10 +74,7 @@ public String description() { * @return the SparkConfigurationResourceInner object itself. */ public SparkConfigurationResourceInner withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new SparkConfigurationInfo(); - } - this.innerProperties().withDescription(description); + this.description = description; return this; } @@ -64,7 +84,7 @@ public SparkConfigurationResourceInner withDescription(String description) { * @return the configs value. */ public Map configs() { - return this.innerProperties() == null ? null : this.innerProperties().configs(); + return this.configs; } /** @@ -74,10 +94,7 @@ public Map configs() { * @return the SparkConfigurationResourceInner object itself. */ public SparkConfigurationResourceInner withConfigs(Map configs) { - if (this.innerProperties() == null) { - this.innerProperties = new SparkConfigurationInfo(); - } - this.innerProperties().withConfigs(configs); + this.configs = configs; return this; } @@ -87,7 +104,7 @@ public SparkConfigurationResourceInner withConfigs(Map configs) * @return the annotations value. */ public List annotations() { - return this.innerProperties() == null ? null : this.innerProperties().annotations(); + return this.annotations; } /** @@ -97,10 +114,7 @@ public List annotations() { * @return the SparkConfigurationResourceInner object itself. */ public SparkConfigurationResourceInner withAnnotations(List annotations) { - if (this.innerProperties() == null) { - this.innerProperties = new SparkConfigurationInfo(); - } - this.innerProperties().withAnnotations(annotations); + this.annotations = annotations; return this; } @@ -110,7 +124,7 @@ public SparkConfigurationResourceInner withAnnotations(List annotations) * @return the notes value. */ public String notes() { - return this.innerProperties() == null ? null : this.innerProperties().notes(); + return this.notes; } /** @@ -120,10 +134,7 @@ public String notes() { * @return the SparkConfigurationResourceInner object itself. */ public SparkConfigurationResourceInner withNotes(String notes) { - if (this.innerProperties() == null) { - this.innerProperties = new SparkConfigurationInfo(); - } - this.innerProperties().withNotes(notes); + this.notes = notes; return this; } @@ -133,7 +144,7 @@ public SparkConfigurationResourceInner withNotes(String notes) { * @return the createdBy value. */ public String createdBy() { - return this.innerProperties() == null ? null : this.innerProperties().createdBy(); + return this.createdBy; } /** @@ -143,10 +154,7 @@ public String createdBy() { * @return the SparkConfigurationResourceInner object itself. */ public SparkConfigurationResourceInner withCreatedBy(String createdBy) { - if (this.innerProperties() == null) { - this.innerProperties = new SparkConfigurationInfo(); - } - this.innerProperties().withCreatedBy(createdBy); + this.createdBy = createdBy; return this; } @@ -156,7 +164,7 @@ public SparkConfigurationResourceInner withCreatedBy(String createdBy) { * @return the created value. */ public OffsetDateTime created() { - return this.innerProperties() == null ? null : this.innerProperties().created(); + return this.created; } /** @@ -166,10 +174,7 @@ public OffsetDateTime created() { * @return the SparkConfigurationResourceInner object itself. */ public SparkConfigurationResourceInner withCreated(OffsetDateTime created) { - if (this.innerProperties() == null) { - this.innerProperties = new SparkConfigurationInfo(); - } - this.innerProperties().withCreated(created); + this.created = created; return this; } @@ -181,13 +186,11 @@ public SparkConfigurationResourceInner withCreated(OffsetDateTime created) { @Override public void validate() { super.validate(); - if (innerProperties() == null) { + if (configs() == null) { throw logger .logExceptionAsError( new IllegalArgumentException( - "Missing required property innerProperties in model SparkConfigurationResourceInner")); - } else { - innerProperties().validate(); + "Missing required property configs in model SparkConfigurationResourceInner")); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolBlobAuditingPolicyInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolBlobAuditingPolicyInner.java index bd349f0d62b9d..a0ed034e6f590 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolBlobAuditingPolicyInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolBlobAuditingPolicyInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.BlobAuditingPolicyState; @@ -14,8 +15,9 @@ import java.util.UUID; /** A Sql pool blob auditing policy. */ +@JsonFlatten @Fluent -public final class SqlPoolBlobAuditingPolicyInner extends ProxyResource { +public class SqlPoolBlobAuditingPolicyInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolBlobAuditingPolicyInner.class); /* @@ -25,10 +27,147 @@ public final class SqlPoolBlobAuditingPolicyInner extends ProxyResource { private String kind; /* - * Resource properties. + * Specifies the state of the policy. If state is Enabled, storageEndpoint + * or isAzureMonitorTargetEnabled are required. */ - @JsonProperty(value = "properties") - private SqlPoolBlobAuditingPolicyProperties innerProperties; + @JsonProperty(value = "properties.state") + private BlobAuditingPolicyState state; + + /* + * Specifies the blob storage endpoint (e.g. + * https://MyAccount.blob.core.windows.net). If state is Enabled, + * storageEndpoint is required. + */ + @JsonProperty(value = "properties.storageEndpoint") + private String storageEndpoint; + + /* + * Specifies the identifier key of the auditing storage account. If state + * is Enabled and storageEndpoint is specified, storageAccountAccessKey is + * required. + */ + @JsonProperty(value = "properties.storageAccountAccessKey") + private String storageAccountAccessKey; + + /* + * Specifies the number of days to keep in the audit logs in the storage + * account. + */ + @JsonProperty(value = "properties.retentionDays") + private Integer retentionDays; + + /* + * Specifies the Actions-Groups and Actions to audit. + * + * The recommended set of action groups to use is the following combination + * - this will audit all the queries and stored procedures executed against + * the database, as well as successful and failed logins: + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default + * when enabling auditing from the Azure portal. + * + * The supported action groups to audit are (note: choose only specific + * groups that cover your auditing needs. Using unnecessary groups could + * lead to very large quantities of audit records): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * + * These are groups that cover all sql statements and stored procedures + * executed against the database, and should not be used in combination + * with other groups as this will result in duplicate audit logs. + * + * For more information, see [Database-Level Audit Action + * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + * + * For Database auditing policy, specific Actions can also be specified + * (note that Actions cannot be specified for Server auditing policy). The + * supported actions to audit are: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE + * REFERENCES + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note that in the above format can refer to an object like a + * table, view, or stored procedure, or an entire database or schema. For + * the latter cases, the forms DATABASE::{db_name} and + * SCHEMA::{schema_name} are used, respectively. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For more information, see [Database-Level Audit + * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + */ + @JsonProperty(value = "properties.auditActionsAndGroups") + private List auditActionsAndGroups; + + /* + * Specifies the blob storage subscription Id. + */ + @JsonProperty(value = "properties.storageAccountSubscriptionId") + private UUID storageAccountSubscriptionId; + + /* + * Specifies whether storageAccountAccessKey value is the storage's + * secondary key. + */ + @JsonProperty(value = "properties.isStorageSecondaryKeyInUse") + private Boolean isStorageSecondaryKeyInUse; + + /* + * Specifies whether audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'state' as + * 'Enabled' and 'isAzureMonitorTargetEnabled' as true. + * + * When using REST API to configure auditing, Diagnostic Settings with + * 'SQLSecurityAuditEvents' diagnostic logs category on the database should + * be also created. + * Note that for server level audit you should use the 'master' database as + * {databaseName}. + * + * Diagnostic Settings URI format: + * PUT + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + * + * For more information, see [Diagnostic Settings REST + * API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings + * PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + * + */ + @JsonProperty(value = "properties.isAzureMonitorTargetEnabled") + private Boolean isAzureMonitorTargetEnabled; /** * Get the kind property: Resource kind. @@ -39,15 +178,6 @@ public String kind() { return this.kind; } - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private SqlPoolBlobAuditingPolicyProperties innerProperties() { - return this.innerProperties; - } - /** * Get the state property: Specifies the state of the policy. If state is Enabled, storageEndpoint or * isAzureMonitorTargetEnabled are required. @@ -55,7 +185,7 @@ private SqlPoolBlobAuditingPolicyProperties innerProperties() { * @return the state value. */ public BlobAuditingPolicyState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); + return this.state; } /** @@ -66,10 +196,7 @@ public BlobAuditingPolicyState state() { * @return the SqlPoolBlobAuditingPolicyInner object itself. */ public SqlPoolBlobAuditingPolicyInner withState(BlobAuditingPolicyState state) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolBlobAuditingPolicyProperties(); - } - this.innerProperties().withState(state); + this.state = state; return this; } @@ -80,7 +207,7 @@ public SqlPoolBlobAuditingPolicyInner withState(BlobAuditingPolicyState state) { * @return the storageEndpoint value. */ public String storageEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().storageEndpoint(); + return this.storageEndpoint; } /** @@ -91,10 +218,7 @@ public String storageEndpoint() { * @return the SqlPoolBlobAuditingPolicyInner object itself. */ public SqlPoolBlobAuditingPolicyInner withStorageEndpoint(String storageEndpoint) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolBlobAuditingPolicyProperties(); - } - this.innerProperties().withStorageEndpoint(storageEndpoint); + this.storageEndpoint = storageEndpoint; return this; } @@ -105,7 +229,7 @@ public SqlPoolBlobAuditingPolicyInner withStorageEndpoint(String storageEndpoint * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { - return this.innerProperties() == null ? null : this.innerProperties().storageAccountAccessKey(); + return this.storageAccountAccessKey; } /** @@ -116,10 +240,7 @@ public String storageAccountAccessKey() { * @return the SqlPoolBlobAuditingPolicyInner object itself. */ public SqlPoolBlobAuditingPolicyInner withStorageAccountAccessKey(String storageAccountAccessKey) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolBlobAuditingPolicyProperties(); - } - this.innerProperties().withStorageAccountAccessKey(storageAccountAccessKey); + this.storageAccountAccessKey = storageAccountAccessKey; return this; } @@ -129,7 +250,7 @@ public SqlPoolBlobAuditingPolicyInner withStorageAccountAccessKey(String storage * @return the retentionDays value. */ public Integer retentionDays() { - return this.innerProperties() == null ? null : this.innerProperties().retentionDays(); + return this.retentionDays; } /** @@ -139,10 +260,7 @@ public Integer retentionDays() { * @return the SqlPoolBlobAuditingPolicyInner object itself. */ public SqlPoolBlobAuditingPolicyInner withRetentionDays(Integer retentionDays) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolBlobAuditingPolicyProperties(); - } - this.innerProperties().withRetentionDays(retentionDays); + this.retentionDays = retentionDays; return this; } @@ -192,7 +310,7 @@ public SqlPoolBlobAuditingPolicyInner withRetentionDays(Integer retentionDays) { * @return the auditActionsAndGroups value. */ public List auditActionsAndGroups() { - return this.innerProperties() == null ? null : this.innerProperties().auditActionsAndGroups(); + return this.auditActionsAndGroups; } /** @@ -242,10 +360,7 @@ public List auditActionsAndGroups() { * @return the SqlPoolBlobAuditingPolicyInner object itself. */ public SqlPoolBlobAuditingPolicyInner withAuditActionsAndGroups(List auditActionsAndGroups) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolBlobAuditingPolicyProperties(); - } - this.innerProperties().withAuditActionsAndGroups(auditActionsAndGroups); + this.auditActionsAndGroups = auditActionsAndGroups; return this; } @@ -255,7 +370,7 @@ public SqlPoolBlobAuditingPolicyInner withAuditActionsAndGroups(List aud * @return the storageAccountSubscriptionId value. */ public UUID storageAccountSubscriptionId() { - return this.innerProperties() == null ? null : this.innerProperties().storageAccountSubscriptionId(); + return this.storageAccountSubscriptionId; } /** @@ -265,10 +380,7 @@ public UUID storageAccountSubscriptionId() { * @return the SqlPoolBlobAuditingPolicyInner object itself. */ public SqlPoolBlobAuditingPolicyInner withStorageAccountSubscriptionId(UUID storageAccountSubscriptionId) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolBlobAuditingPolicyProperties(); - } - this.innerProperties().withStorageAccountSubscriptionId(storageAccountSubscriptionId); + this.storageAccountSubscriptionId = storageAccountSubscriptionId; return this; } @@ -279,7 +391,7 @@ public SqlPoolBlobAuditingPolicyInner withStorageAccountSubscriptionId(UUID stor * @return the isStorageSecondaryKeyInUse value. */ public Boolean isStorageSecondaryKeyInUse() { - return this.innerProperties() == null ? null : this.innerProperties().isStorageSecondaryKeyInUse(); + return this.isStorageSecondaryKeyInUse; } /** @@ -290,10 +402,7 @@ public Boolean isStorageSecondaryKeyInUse() { * @return the SqlPoolBlobAuditingPolicyInner object itself. */ public SqlPoolBlobAuditingPolicyInner withIsStorageSecondaryKeyInUse(Boolean isStorageSecondaryKeyInUse) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolBlobAuditingPolicyProperties(); - } - this.innerProperties().withIsStorageSecondaryKeyInUse(isStorageSecondaryKeyInUse); + this.isStorageSecondaryKeyInUse = isStorageSecondaryKeyInUse; return this; } @@ -314,7 +423,7 @@ public SqlPoolBlobAuditingPolicyInner withIsStorageSecondaryKeyInUse(Boolean isS * @return the isAzureMonitorTargetEnabled value. */ public Boolean isAzureMonitorTargetEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().isAzureMonitorTargetEnabled(); + return this.isAzureMonitorTargetEnabled; } /** @@ -335,10 +444,7 @@ public Boolean isAzureMonitorTargetEnabled() { * @return the SqlPoolBlobAuditingPolicyInner object itself. */ public SqlPoolBlobAuditingPolicyInner withIsAzureMonitorTargetEnabled(Boolean isAzureMonitorTargetEnabled) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolBlobAuditingPolicyProperties(); - } - this.innerProperties().withIsAzureMonitorTargetEnabled(isAzureMonitorTargetEnabled); + this.isAzureMonitorTargetEnabled = isAzureMonitorTargetEnabled; return this; } @@ -348,8 +454,5 @@ public SqlPoolBlobAuditingPolicyInner withIsAzureMonitorTargetEnabled(Boolean is * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolBlobAuditingPolicyProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolBlobAuditingPolicyProperties.java deleted file mode 100644 index 5127f240dfab3..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolBlobAuditingPolicyProperties.java +++ /dev/null @@ -1,446 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.BlobAuditingPolicyState; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.UUID; - -/** Properties of a Sql pool blob auditing policy. */ -@Fluent -public final class SqlPoolBlobAuditingPolicyProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolBlobAuditingPolicyProperties.class); - - /* - * Specifies the state of the policy. If state is Enabled, storageEndpoint - * or isAzureMonitorTargetEnabled are required. - */ - @JsonProperty(value = "state", required = true) - private BlobAuditingPolicyState state; - - /* - * Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). If state is Enabled, - * storageEndpoint is required. - */ - @JsonProperty(value = "storageEndpoint") - private String storageEndpoint; - - /* - * Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, storageAccountAccessKey is - * required. - */ - @JsonProperty(value = "storageAccountAccessKey") - private String storageAccountAccessKey; - - /* - * Specifies the number of days to keep in the audit logs in the storage - * account. - */ - @JsonProperty(value = "retentionDays") - private Integer retentionDays; - - /* - * Specifies the Actions-Groups and Actions to audit. - * - * The recommended set of action groups to use is the following combination - * - this will audit all the queries and stored procedures executed against - * the database, as well as successful and failed logins: - * - * BATCH_COMPLETED_GROUP, - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - * FAILED_DATABASE_AUTHENTICATION_GROUP. - * - * This above combination is also the set that is configured by default - * when enabling auditing from the Azure portal. - * - * The supported action groups to audit are (note: choose only specific - * groups that cover your auditing needs. Using unnecessary groups could - * lead to very large quantities of audit records): - * - * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - * BACKUP_RESTORE_GROUP - * DATABASE_LOGOUT_GROUP - * DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - * DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP - * DATABASE_PRINCIPAL_CHANGE_GROUP - * DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP - * FAILED_DATABASE_AUTHENTICATION_GROUP - * SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP - * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - * USER_CHANGE_PASSWORD_GROUP - * BATCH_STARTED_GROUP - * BATCH_COMPLETED_GROUP - * - * These are groups that cover all sql statements and stored procedures - * executed against the database, and should not be used in combination - * with other groups as this will result in duplicate audit logs. - * - * For more information, see [Database-Level Audit Action - * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * - * For Database auditing policy, specific Actions can also be specified - * (note that Actions cannot be specified for Server auditing policy). The - * supported actions to audit are: - * SELECT - * UPDATE - * INSERT - * DELETE - * EXECUTE - * RECEIVE - * REFERENCES - * - * The general form for defining an action to be audited is: - * {action} ON {object} BY {principal} - * - * Note that in the above format can refer to an object like a - * table, view, or stored procedure, or an entire database or schema. For - * the latter cases, the forms DATABASE::{db_name} and - * SCHEMA::{schema_name} are used, respectively. - * - * For example: - * SELECT on dbo.myTable by public - * SELECT on DATABASE::myDatabase by public - * SELECT on SCHEMA::mySchema by public - * - * For more information, see [Database-Level Audit - * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - */ - @JsonProperty(value = "auditActionsAndGroups") - private List auditActionsAndGroups; - - /* - * Specifies the blob storage subscription Id. - */ - @JsonProperty(value = "storageAccountSubscriptionId") - private UUID storageAccountSubscriptionId; - - /* - * Specifies whether storageAccountAccessKey value is the storage's - * secondary key. - */ - @JsonProperty(value = "isStorageSecondaryKeyInUse") - private Boolean isStorageSecondaryKeyInUse; - - /* - * Specifies whether audit events are sent to Azure Monitor. - * In order to send the events to Azure Monitor, specify 'state' as - * 'Enabled' and 'isAzureMonitorTargetEnabled' as true. - * - * When using REST API to configure auditing, Diagnostic Settings with - * 'SQLSecurityAuditEvents' diagnostic logs category on the database should - * be also created. - * Note that for server level audit you should use the 'master' database as - * {databaseName}. - * - * Diagnostic Settings URI format: - * PUT - * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - * For more information, see [Diagnostic Settings REST - * API](https://go.microsoft.com/fwlink/?linkid=2033207) - * or [Diagnostic Settings - * PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) - * - */ - @JsonProperty(value = "isAzureMonitorTargetEnabled") - private Boolean isAzureMonitorTargetEnabled; - - /** - * Get the state property: Specifies the state of the policy. If state is Enabled, storageEndpoint or - * isAzureMonitorTargetEnabled are required. - * - * @return the state value. - */ - public BlobAuditingPolicyState state() { - return this.state; - } - - /** - * Set the state property: Specifies the state of the policy. If state is Enabled, storageEndpoint or - * isAzureMonitorTargetEnabled are required. - * - * @param state the state value to set. - * @return the SqlPoolBlobAuditingPolicyProperties object itself. - */ - public SqlPoolBlobAuditingPolicyProperties withState(BlobAuditingPolicyState state) { - this.state = state; - return this; - } - - /** - * Get the storageEndpoint property: Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint is required. - * - * @return the storageEndpoint value. - */ - public String storageEndpoint() { - return this.storageEndpoint; - } - - /** - * Set the storageEndpoint property: Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint is required. - * - * @param storageEndpoint the storageEndpoint value to set. - * @return the SqlPoolBlobAuditingPolicyProperties object itself. - */ - public SqlPoolBlobAuditingPolicyProperties withStorageEndpoint(String storageEndpoint) { - this.storageEndpoint = storageEndpoint; - return this; - } - - /** - * Get the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, storageAccountAccessKey is required. - * - * @return the storageAccountAccessKey value. - */ - public String storageAccountAccessKey() { - return this.storageAccountAccessKey; - } - - /** - * Set the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, storageAccountAccessKey is required. - * - * @param storageAccountAccessKey the storageAccountAccessKey value to set. - * @return the SqlPoolBlobAuditingPolicyProperties object itself. - */ - public SqlPoolBlobAuditingPolicyProperties withStorageAccountAccessKey(String storageAccountAccessKey) { - this.storageAccountAccessKey = storageAccountAccessKey; - return this; - } - - /** - * Get the retentionDays property: Specifies the number of days to keep in the audit logs in the storage account. - * - * @return the retentionDays value. - */ - public Integer retentionDays() { - return this.retentionDays; - } - - /** - * Set the retentionDays property: Specifies the number of days to keep in the audit logs in the storage account. - * - * @param retentionDays the retentionDays value to set. - * @return the SqlPoolBlobAuditingPolicyProperties object itself. - */ - public SqlPoolBlobAuditingPolicyProperties withRetentionDays(Integer retentionDays) { - this.retentionDays = retentionDays; - return this; - } - - /** - * Get the auditActionsAndGroups property: Specifies the Actions-Groups and Actions to audit. - * - *

The recommended set of action groups to use is the following combination - this will audit all the queries and - * stored procedures executed against the database, as well as successful and failed logins: - * - *

BATCH_COMPLETED_GROUP, SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP. - * - *

This above combination is also the set that is configured by default when enabling auditing from the Azure - * portal. - * - *

The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. - * Using unnecessary groups could lead to very large quantities of audit records): - * - *

APPLICATION_ROLE_CHANGE_PASSWORD_GROUP BACKUP_RESTORE_GROUP DATABASE_LOGOUT_GROUP DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP USER_CHANGE_PASSWORD_GROUP BATCH_STARTED_GROUP BATCH_COMPLETED_GROUP - * - *

These are groups that cover all sql statements and stored procedures executed against the database, and should - * not be used in combination with other groups as this will result in duplicate audit logs. - * - *

For more information, see [Database-Level Audit Action - * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * - *

For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified - * for Server auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE EXECUTE RECEIVE - * REFERENCES - * - *

The general form for defining an action to be audited is: {action} ON {object} BY {principal} - * - *

Note that <object> in the above format can refer to an object like a table, view, or stored procedure, - * or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} - * are used, respectively. - * - *

For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on - * SCHEMA::mySchema by public - * - *

For more information, see [Database-Level Audit - * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions). - * - * @return the auditActionsAndGroups value. - */ - public List auditActionsAndGroups() { - return this.auditActionsAndGroups; - } - - /** - * Set the auditActionsAndGroups property: Specifies the Actions-Groups and Actions to audit. - * - *

The recommended set of action groups to use is the following combination - this will audit all the queries and - * stored procedures executed against the database, as well as successful and failed logins: - * - *

BATCH_COMPLETED_GROUP, SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP. - * - *

This above combination is also the set that is configured by default when enabling auditing from the Azure - * portal. - * - *

The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. - * Using unnecessary groups could lead to very large quantities of audit records): - * - *

APPLICATION_ROLE_CHANGE_PASSWORD_GROUP BACKUP_RESTORE_GROUP DATABASE_LOGOUT_GROUP DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP DATABASE_OBJECT_PERMISSION_CHANGE_GROUP DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP DATABASE_PRINCIPAL_CHANGE_GROUP DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP FAILED_DATABASE_AUTHENTICATION_GROUP SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP USER_CHANGE_PASSWORD_GROUP BATCH_STARTED_GROUP BATCH_COMPLETED_GROUP - * - *

These are groups that cover all sql statements and stored procedures executed against the database, and should - * not be used in combination with other groups as this will result in duplicate audit logs. - * - *

For more information, see [Database-Level Audit Action - * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * - *

For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified - * for Server auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE EXECUTE RECEIVE - * REFERENCES - * - *

The general form for defining an action to be audited is: {action} ON {object} BY {principal} - * - *

Note that <object> in the above format can refer to an object like a table, view, or stored procedure, - * or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} - * are used, respectively. - * - *

For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on - * SCHEMA::mySchema by public - * - *

For more information, see [Database-Level Audit - * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions). - * - * @param auditActionsAndGroups the auditActionsAndGroups value to set. - * @return the SqlPoolBlobAuditingPolicyProperties object itself. - */ - public SqlPoolBlobAuditingPolicyProperties withAuditActionsAndGroups(List auditActionsAndGroups) { - this.auditActionsAndGroups = auditActionsAndGroups; - return this; - } - - /** - * Get the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * - * @return the storageAccountSubscriptionId value. - */ - public UUID storageAccountSubscriptionId() { - return this.storageAccountSubscriptionId; - } - - /** - * Set the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * - * @param storageAccountSubscriptionId the storageAccountSubscriptionId value to set. - * @return the SqlPoolBlobAuditingPolicyProperties object itself. - */ - public SqlPoolBlobAuditingPolicyProperties withStorageAccountSubscriptionId(UUID storageAccountSubscriptionId) { - this.storageAccountSubscriptionId = storageAccountSubscriptionId; - return this; - } - - /** - * Get the isStorageSecondaryKeyInUse property: Specifies whether storageAccountAccessKey value is the storage's - * secondary key. - * - * @return the isStorageSecondaryKeyInUse value. - */ - public Boolean isStorageSecondaryKeyInUse() { - return this.isStorageSecondaryKeyInUse; - } - - /** - * Set the isStorageSecondaryKeyInUse property: Specifies whether storageAccountAccessKey value is the storage's - * secondary key. - * - * @param isStorageSecondaryKeyInUse the isStorageSecondaryKeyInUse value to set. - * @return the SqlPoolBlobAuditingPolicyProperties object itself. - */ - public SqlPoolBlobAuditingPolicyProperties withIsStorageSecondaryKeyInUse(Boolean isStorageSecondaryKeyInUse) { - this.isStorageSecondaryKeyInUse = isStorageSecondaryKeyInUse; - return this; - } - - /** - * Get the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. In order - * to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true. - * - *

When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs - * category on the database should be also created. Note that for server level audit you should use the 'master' - * database as {databaseName}. - * - *

Diagnostic Settings URI format: PUT - * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * - * @return the isAzureMonitorTargetEnabled value. - */ - public Boolean isAzureMonitorTargetEnabled() { - return this.isAzureMonitorTargetEnabled; - } - - /** - * Set the isAzureMonitorTargetEnabled property: Specifies whether audit events are sent to Azure Monitor. In order - * to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true. - * - *

When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs - * category on the database should be also created. Note that for server level audit you should use the 'master' - * database as {databaseName}. - * - *

Diagnostic Settings URI format: PUT - * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - *

For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) or - * [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). - * - * @param isAzureMonitorTargetEnabled the isAzureMonitorTargetEnabled value to set. - * @return the SqlPoolBlobAuditingPolicyProperties object itself. - */ - public SqlPoolBlobAuditingPolicyProperties withIsAzureMonitorTargetEnabled(Boolean isAzureMonitorTargetEnabled) { - this.isAzureMonitorTargetEnabled = isAzureMonitorTargetEnabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (state() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property state in model SqlPoolBlobAuditingPolicyProperties")); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolColumnInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolColumnInner.java index ca2844fadaa4a..d73a10956ecff 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolColumnInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolColumnInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.ColumnDataType; @@ -12,24 +13,22 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** A Sql pool column resource. */ +@JsonFlatten @Fluent -public final class SqlPoolColumnInner extends ProxyResource { +public class SqlPoolColumnInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolColumnInner.class); /* - * Resource properties. + * The column data type. */ - @JsonProperty(value = "properties") - private SqlPoolColumnProperties innerProperties; + @JsonProperty(value = "properties.columnType") + private ColumnDataType columnType; - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. + /* + * Indicates whether column value is computed or not */ - private SqlPoolColumnProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.isComputed", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isComputed; /** * Get the columnType property: The column data type. @@ -37,7 +36,7 @@ private SqlPoolColumnProperties innerProperties() { * @return the columnType value. */ public ColumnDataType columnType() { - return this.innerProperties() == null ? null : this.innerProperties().columnType(); + return this.columnType; } /** @@ -47,10 +46,7 @@ public ColumnDataType columnType() { * @return the SqlPoolColumnInner object itself. */ public SqlPoolColumnInner withColumnType(ColumnDataType columnType) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolColumnProperties(); - } - this.innerProperties().withColumnType(columnType); + this.columnType = columnType; return this; } @@ -60,7 +56,7 @@ public SqlPoolColumnInner withColumnType(ColumnDataType columnType) { * @return the isComputed value. */ public Boolean isComputed() { - return this.innerProperties() == null ? null : this.innerProperties().isComputed(); + return this.isComputed; } /** @@ -69,8 +65,5 @@ public Boolean isComputed() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolColumnProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolColumnProperties.java deleted file mode 100644 index 5076a4301e398..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolColumnProperties.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.ColumnDataType; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Sql pool column properties. */ -@Fluent -public final class SqlPoolColumnProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolColumnProperties.class); - - /* - * The column data type. - */ - @JsonProperty(value = "columnType") - private ColumnDataType columnType; - - /* - * Indicates whether column value is computed or not - */ - @JsonProperty(value = "isComputed", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isComputed; - - /** - * Get the columnType property: The column data type. - * - * @return the columnType value. - */ - public ColumnDataType columnType() { - return this.columnType; - } - - /** - * Set the columnType property: The column data type. - * - * @param columnType the columnType value to set. - * @return the SqlPoolColumnProperties object itself. - */ - public SqlPoolColumnProperties withColumnType(ColumnDataType columnType) { - this.columnType = columnType; - return this; - } - - /** - * Get the isComputed property: Indicates whether column value is computed or not. - * - * @return the isComputed value. - */ - public Boolean isComputed() { - return this.isComputed; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolConnectionPolicyInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolConnectionPolicyInner.java index eed3ab69f365a..f4c02013de79e 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolConnectionPolicyInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolConnectionPolicyInner.java @@ -5,14 +5,16 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A Sql pool connection policy. */ +@JsonFlatten @Fluent -public final class SqlPoolConnectionPolicyInner extends ProxyResource { +public class SqlPoolConnectionPolicyInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolConnectionPolicyInner.class); /* @@ -28,10 +30,46 @@ public final class SqlPoolConnectionPolicyInner extends ProxyResource { private String location; /* - * Resource properties. + * The state of security access. */ - @JsonProperty(value = "properties") - private SqlPoolConnectionPolicyProperties innerProperties; + @JsonProperty(value = "properties.securityEnabledAccess") + private String securityEnabledAccess; + + /* + * The fully qualified host name of the auditing proxy. + */ + @JsonProperty(value = "properties.proxyDnsName") + private String proxyDnsName; + + /* + * The port number of the auditing proxy. + */ + @JsonProperty(value = "properties.proxyPort") + private String proxyPort; + + /* + * The visibility of the auditing proxy. + */ + @JsonProperty(value = "properties.visibility") + private String visibility; + + /* + * Whether server default is enabled or disabled. + */ + @JsonProperty(value = "properties.useServerDefault") + private String useServerDefault; + + /* + * The state of proxy redirection. + */ + @JsonProperty(value = "properties.redirectionState") + private String redirectionState; + + /* + * The connection policy state. + */ + @JsonProperty(value = "properties.state") + private String state; /** * Get the kind property: Resource kind. @@ -51,22 +89,13 @@ public String location() { return this.location; } - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private SqlPoolConnectionPolicyProperties innerProperties() { - return this.innerProperties; - } - /** * Get the securityEnabledAccess property: The state of security access. * * @return the securityEnabledAccess value. */ public String securityEnabledAccess() { - return this.innerProperties() == null ? null : this.innerProperties().securityEnabledAccess(); + return this.securityEnabledAccess; } /** @@ -76,10 +105,7 @@ public String securityEnabledAccess() { * @return the SqlPoolConnectionPolicyInner object itself. */ public SqlPoolConnectionPolicyInner withSecurityEnabledAccess(String securityEnabledAccess) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolConnectionPolicyProperties(); - } - this.innerProperties().withSecurityEnabledAccess(securityEnabledAccess); + this.securityEnabledAccess = securityEnabledAccess; return this; } @@ -89,7 +115,7 @@ public SqlPoolConnectionPolicyInner withSecurityEnabledAccess(String securityEna * @return the proxyDnsName value. */ public String proxyDnsName() { - return this.innerProperties() == null ? null : this.innerProperties().proxyDnsName(); + return this.proxyDnsName; } /** @@ -99,10 +125,7 @@ public String proxyDnsName() { * @return the SqlPoolConnectionPolicyInner object itself. */ public SqlPoolConnectionPolicyInner withProxyDnsName(String proxyDnsName) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolConnectionPolicyProperties(); - } - this.innerProperties().withProxyDnsName(proxyDnsName); + this.proxyDnsName = proxyDnsName; return this; } @@ -112,7 +135,7 @@ public SqlPoolConnectionPolicyInner withProxyDnsName(String proxyDnsName) { * @return the proxyPort value. */ public String proxyPort() { - return this.innerProperties() == null ? null : this.innerProperties().proxyPort(); + return this.proxyPort; } /** @@ -122,10 +145,7 @@ public String proxyPort() { * @return the SqlPoolConnectionPolicyInner object itself. */ public SqlPoolConnectionPolicyInner withProxyPort(String proxyPort) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolConnectionPolicyProperties(); - } - this.innerProperties().withProxyPort(proxyPort); + this.proxyPort = proxyPort; return this; } @@ -135,7 +155,7 @@ public SqlPoolConnectionPolicyInner withProxyPort(String proxyPort) { * @return the visibility value. */ public String visibility() { - return this.innerProperties() == null ? null : this.innerProperties().visibility(); + return this.visibility; } /** @@ -145,10 +165,7 @@ public String visibility() { * @return the SqlPoolConnectionPolicyInner object itself. */ public SqlPoolConnectionPolicyInner withVisibility(String visibility) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolConnectionPolicyProperties(); - } - this.innerProperties().withVisibility(visibility); + this.visibility = visibility; return this; } @@ -158,7 +175,7 @@ public SqlPoolConnectionPolicyInner withVisibility(String visibility) { * @return the useServerDefault value. */ public String useServerDefault() { - return this.innerProperties() == null ? null : this.innerProperties().useServerDefault(); + return this.useServerDefault; } /** @@ -168,10 +185,7 @@ public String useServerDefault() { * @return the SqlPoolConnectionPolicyInner object itself. */ public SqlPoolConnectionPolicyInner withUseServerDefault(String useServerDefault) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolConnectionPolicyProperties(); - } - this.innerProperties().withUseServerDefault(useServerDefault); + this.useServerDefault = useServerDefault; return this; } @@ -181,7 +195,7 @@ public SqlPoolConnectionPolicyInner withUseServerDefault(String useServerDefault * @return the redirectionState value. */ public String redirectionState() { - return this.innerProperties() == null ? null : this.innerProperties().redirectionState(); + return this.redirectionState; } /** @@ -191,10 +205,7 @@ public String redirectionState() { * @return the SqlPoolConnectionPolicyInner object itself. */ public SqlPoolConnectionPolicyInner withRedirectionState(String redirectionState) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolConnectionPolicyProperties(); - } - this.innerProperties().withRedirectionState(redirectionState); + this.redirectionState = redirectionState; return this; } @@ -204,7 +215,7 @@ public SqlPoolConnectionPolicyInner withRedirectionState(String redirectionState * @return the state value. */ public String state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); + return this.state; } /** @@ -214,10 +225,7 @@ public String state() { * @return the SqlPoolConnectionPolicyInner object itself. */ public SqlPoolConnectionPolicyInner withState(String state) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolConnectionPolicyProperties(); - } - this.innerProperties().withState(state); + this.state = state; return this; } @@ -227,8 +235,5 @@ public SqlPoolConnectionPolicyInner withState(String state) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolConnectionPolicyProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolConnectionPolicyProperties.java deleted file mode 100644 index 961ea29033492..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolConnectionPolicyProperties.java +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties of a Sql pool connection policy. */ -@Fluent -public final class SqlPoolConnectionPolicyProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolConnectionPolicyProperties.class); - - /* - * The state of security access. - */ - @JsonProperty(value = "securityEnabledAccess") - private String securityEnabledAccess; - - /* - * The fully qualified host name of the auditing proxy. - */ - @JsonProperty(value = "proxyDnsName") - private String proxyDnsName; - - /* - * The port number of the auditing proxy. - */ - @JsonProperty(value = "proxyPort") - private String proxyPort; - - /* - * The visibility of the auditing proxy. - */ - @JsonProperty(value = "visibility") - private String visibility; - - /* - * Whether server default is enabled or disabled. - */ - @JsonProperty(value = "useServerDefault") - private String useServerDefault; - - /* - * The state of proxy redirection. - */ - @JsonProperty(value = "redirectionState") - private String redirectionState; - - /* - * The connection policy state. - */ - @JsonProperty(value = "state") - private String state; - - /** - * Get the securityEnabledAccess property: The state of security access. - * - * @return the securityEnabledAccess value. - */ - public String securityEnabledAccess() { - return this.securityEnabledAccess; - } - - /** - * Set the securityEnabledAccess property: The state of security access. - * - * @param securityEnabledAccess the securityEnabledAccess value to set. - * @return the SqlPoolConnectionPolicyProperties object itself. - */ - public SqlPoolConnectionPolicyProperties withSecurityEnabledAccess(String securityEnabledAccess) { - this.securityEnabledAccess = securityEnabledAccess; - return this; - } - - /** - * Get the proxyDnsName property: The fully qualified host name of the auditing proxy. - * - * @return the proxyDnsName value. - */ - public String proxyDnsName() { - return this.proxyDnsName; - } - - /** - * Set the proxyDnsName property: The fully qualified host name of the auditing proxy. - * - * @param proxyDnsName the proxyDnsName value to set. - * @return the SqlPoolConnectionPolicyProperties object itself. - */ - public SqlPoolConnectionPolicyProperties withProxyDnsName(String proxyDnsName) { - this.proxyDnsName = proxyDnsName; - return this; - } - - /** - * Get the proxyPort property: The port number of the auditing proxy. - * - * @return the proxyPort value. - */ - public String proxyPort() { - return this.proxyPort; - } - - /** - * Set the proxyPort property: The port number of the auditing proxy. - * - * @param proxyPort the proxyPort value to set. - * @return the SqlPoolConnectionPolicyProperties object itself. - */ - public SqlPoolConnectionPolicyProperties withProxyPort(String proxyPort) { - this.proxyPort = proxyPort; - return this; - } - - /** - * Get the visibility property: The visibility of the auditing proxy. - * - * @return the visibility value. - */ - public String visibility() { - return this.visibility; - } - - /** - * Set the visibility property: The visibility of the auditing proxy. - * - * @param visibility the visibility value to set. - * @return the SqlPoolConnectionPolicyProperties object itself. - */ - public SqlPoolConnectionPolicyProperties withVisibility(String visibility) { - this.visibility = visibility; - return this; - } - - /** - * Get the useServerDefault property: Whether server default is enabled or disabled. - * - * @return the useServerDefault value. - */ - public String useServerDefault() { - return this.useServerDefault; - } - - /** - * Set the useServerDefault property: Whether server default is enabled or disabled. - * - * @param useServerDefault the useServerDefault value to set. - * @return the SqlPoolConnectionPolicyProperties object itself. - */ - public SqlPoolConnectionPolicyProperties withUseServerDefault(String useServerDefault) { - this.useServerDefault = useServerDefault; - return this; - } - - /** - * Get the redirectionState property: The state of proxy redirection. - * - * @return the redirectionState value. - */ - public String redirectionState() { - return this.redirectionState; - } - - /** - * Set the redirectionState property: The state of proxy redirection. - * - * @param redirectionState the redirectionState value to set. - * @return the SqlPoolConnectionPolicyProperties object itself. - */ - public SqlPoolConnectionPolicyProperties withRedirectionState(String redirectionState) { - this.redirectionState = redirectionState; - return this; - } - - /** - * Get the state property: The connection policy state. - * - * @return the state value. - */ - public String state() { - return this.state; - } - - /** - * Set the state property: The connection policy state. - * - * @param state the state value to set. - * @return the SqlPoolConnectionPolicyProperties object itself. - */ - public SqlPoolConnectionPolicyProperties withState(String state) { - this.state = state; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolInner.java index 47d9f5ef548a1..92175856d76c8 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolInner.java @@ -5,8 +5,10 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.models.CreateMode; import com.azure.resourcemanager.synapse.models.Sku; import com.azure.resourcemanager.synapse.models.StorageAccountType; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -15,8 +17,9 @@ import java.util.Map; /** SQL pool A SQL Analytics pool. */ +@JsonFlatten @Fluent -public final class SqlPoolInner extends Resource { +public class SqlPoolInner extends Resource { @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolInner.class); /* @@ -26,10 +29,85 @@ public final class SqlPoolInner extends Resource { private Sku sku; /* - * SQL pool properties + * Maximum size in bytes */ - @JsonProperty(value = "properties") - private SqlPoolResourceProperties innerProperties; + @JsonProperty(value = "properties.maxSizeBytes") + private Long maxSizeBytes; + + /* + * Collation mode + */ + @JsonProperty(value = "properties.collation") + private String collation; + + /* + * Source database to create from + */ + @JsonProperty(value = "properties.sourceDatabaseId") + private String sourceDatabaseId; + + /* + * Backup database to restore from + */ + @JsonProperty(value = "properties.recoverableDatabaseId") + private String recoverableDatabaseId; + + /* + * Resource state + */ + @JsonProperty(value = "properties.provisioningState") + private String provisioningState; + + /* + * Resource status + */ + @JsonProperty(value = "properties.status") + private String status; + + /* + * Snapshot time to restore + */ + @JsonProperty(value = "properties.restorePointInTime") + private OffsetDateTime restorePointInTime; + + /* + * Specifies the mode of sql pool creation. + * + * Default: regular sql pool creation. + * + * PointInTimeRestore: Creates a sql pool by restoring a point in time + * backup of an existing sql pool. sourceDatabaseId must be specified as + * the resource ID of the existing sql pool, and restorePointInTime must be + * specified. + * + * Recovery: Creates a sql pool by a geo-replicated backup. + * sourceDatabaseId must be specified as the recoverableDatabaseId to + * restore. + * + * Restore: Creates a sql pool by restoring a backup of a deleted sql + * pool. SourceDatabaseId should be the sql pool's original resource ID. + * SourceDatabaseId and sourceDatabaseDeletionDate must be specified. + */ + @JsonProperty(value = "properties.createMode") + private CreateMode createMode; + + /* + * Date the SQL pool was created + */ + @JsonProperty(value = "properties.creationDate") + private OffsetDateTime creationDate; + + /* + * The storage account type used to store backups for this sql pool. + */ + @JsonProperty(value = "properties.storageAccountType") + private StorageAccountType storageAccountType; + + /* + * Specifies the time that the sql pool was deleted + */ + @JsonProperty(value = "properties.sourceDatabaseDeletionDate") + private OffsetDateTime sourceDatabaseDeletionDate; /** * Get the sku property: Sku SQL pool SKU. @@ -51,36 +129,13 @@ public SqlPoolInner withSku(Sku sku) { return this; } - /** - * Get the innerProperties property: SQL pool properties. - * - * @return the innerProperties value. - */ - private SqlPoolResourceProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public SqlPoolInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public SqlPoolInner withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * Get the maxSizeBytes property: Maximum size in bytes. * * @return the maxSizeBytes value. */ public Long maxSizeBytes() { - return this.innerProperties() == null ? null : this.innerProperties().maxSizeBytes(); + return this.maxSizeBytes; } /** @@ -90,10 +145,7 @@ public Long maxSizeBytes() { * @return the SqlPoolInner object itself. */ public SqlPoolInner withMaxSizeBytes(Long maxSizeBytes) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withMaxSizeBytes(maxSizeBytes); + this.maxSizeBytes = maxSizeBytes; return this; } @@ -103,7 +155,7 @@ public SqlPoolInner withMaxSizeBytes(Long maxSizeBytes) { * @return the collation value. */ public String collation() { - return this.innerProperties() == null ? null : this.innerProperties().collation(); + return this.collation; } /** @@ -113,10 +165,7 @@ public String collation() { * @return the SqlPoolInner object itself. */ public SqlPoolInner withCollation(String collation) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withCollation(collation); + this.collation = collation; return this; } @@ -126,7 +175,7 @@ public SqlPoolInner withCollation(String collation) { * @return the sourceDatabaseId value. */ public String sourceDatabaseId() { - return this.innerProperties() == null ? null : this.innerProperties().sourceDatabaseId(); + return this.sourceDatabaseId; } /** @@ -136,10 +185,7 @@ public String sourceDatabaseId() { * @return the SqlPoolInner object itself. */ public SqlPoolInner withSourceDatabaseId(String sourceDatabaseId) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withSourceDatabaseId(sourceDatabaseId); + this.sourceDatabaseId = sourceDatabaseId; return this; } @@ -149,7 +195,7 @@ public SqlPoolInner withSourceDatabaseId(String sourceDatabaseId) { * @return the recoverableDatabaseId value. */ public String recoverableDatabaseId() { - return this.innerProperties() == null ? null : this.innerProperties().recoverableDatabaseId(); + return this.recoverableDatabaseId; } /** @@ -159,10 +205,7 @@ public String recoverableDatabaseId() { * @return the SqlPoolInner object itself. */ public SqlPoolInner withRecoverableDatabaseId(String recoverableDatabaseId) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withRecoverableDatabaseId(recoverableDatabaseId); + this.recoverableDatabaseId = recoverableDatabaseId; return this; } @@ -172,7 +215,7 @@ public SqlPoolInner withRecoverableDatabaseId(String recoverableDatabaseId) { * @return the provisioningState value. */ public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + return this.provisioningState; } /** @@ -182,10 +225,7 @@ public String provisioningState() { * @return the SqlPoolInner object itself. */ public SqlPoolInner withProvisioningState(String provisioningState) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withProvisioningState(provisioningState); + this.provisioningState = provisioningState; return this; } @@ -195,7 +235,7 @@ public SqlPoolInner withProvisioningState(String provisioningState) { * @return the status value. */ public String status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); + return this.status; } /** @@ -205,10 +245,7 @@ public String status() { * @return the SqlPoolInner object itself. */ public SqlPoolInner withStatus(String status) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withStatus(status); + this.status = status; return this; } @@ -218,7 +255,7 @@ public SqlPoolInner withStatus(String status) { * @return the restorePointInTime value. */ public OffsetDateTime restorePointInTime() { - return this.innerProperties() == null ? null : this.innerProperties().restorePointInTime(); + return this.restorePointInTime; } /** @@ -228,33 +265,51 @@ public OffsetDateTime restorePointInTime() { * @return the SqlPoolInner object itself. */ public SqlPoolInner withRestorePointInTime(OffsetDateTime restorePointInTime) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withRestorePointInTime(restorePointInTime); + this.restorePointInTime = restorePointInTime; return this; } /** - * Get the createMode property: What is this?. + * Get the createMode property: Specifies the mode of sql pool creation. + * + *

Default: regular sql pool creation. + * + *

PointInTimeRestore: Creates a sql pool by restoring a point in time backup of an existing sql pool. + * sourceDatabaseId must be specified as the resource ID of the existing sql pool, and restorePointInTime must be + * specified. + * + *

Recovery: Creates a sql pool by a geo-replicated backup. sourceDatabaseId must be specified as the + * recoverableDatabaseId to restore. + * + *

Restore: Creates a sql pool by restoring a backup of a deleted sql pool. SourceDatabaseId should be the sql + * pool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be specified. * * @return the createMode value. */ - public String createMode() { - return this.innerProperties() == null ? null : this.innerProperties().createMode(); + public CreateMode createMode() { + return this.createMode; } /** - * Set the createMode property: What is this?. + * Set the createMode property: Specifies the mode of sql pool creation. + * + *

Default: regular sql pool creation. + * + *

PointInTimeRestore: Creates a sql pool by restoring a point in time backup of an existing sql pool. + * sourceDatabaseId must be specified as the resource ID of the existing sql pool, and restorePointInTime must be + * specified. + * + *

Recovery: Creates a sql pool by a geo-replicated backup. sourceDatabaseId must be specified as the + * recoverableDatabaseId to restore. + * + *

Restore: Creates a sql pool by restoring a backup of a deleted sql pool. SourceDatabaseId should be the sql + * pool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be specified. * * @param createMode the createMode value to set. * @return the SqlPoolInner object itself. */ - public SqlPoolInner withCreateMode(String createMode) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withCreateMode(createMode); + public SqlPoolInner withCreateMode(CreateMode createMode) { + this.createMode = createMode; return this; } @@ -264,7 +319,7 @@ public SqlPoolInner withCreateMode(String createMode) { * @return the creationDate value. */ public OffsetDateTime creationDate() { - return this.innerProperties() == null ? null : this.innerProperties().creationDate(); + return this.creationDate; } /** @@ -274,10 +329,7 @@ public OffsetDateTime creationDate() { * @return the SqlPoolInner object itself. */ public SqlPoolInner withCreationDate(OffsetDateTime creationDate) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withCreationDate(creationDate); + this.creationDate = creationDate; return this; } @@ -287,7 +339,7 @@ public SqlPoolInner withCreationDate(OffsetDateTime creationDate) { * @return the storageAccountType value. */ public StorageAccountType storageAccountType() { - return this.innerProperties() == null ? null : this.innerProperties().storageAccountType(); + return this.storageAccountType; } /** @@ -297,10 +349,7 @@ public StorageAccountType storageAccountType() { * @return the SqlPoolInner object itself. */ public SqlPoolInner withStorageAccountType(StorageAccountType storageAccountType) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withStorageAccountType(storageAccountType); + this.storageAccountType = storageAccountType; return this; } @@ -310,7 +359,7 @@ public SqlPoolInner withStorageAccountType(StorageAccountType storageAccountType * @return the sourceDatabaseDeletionDate value. */ public OffsetDateTime sourceDatabaseDeletionDate() { - return this.innerProperties() == null ? null : this.innerProperties().sourceDatabaseDeletionDate(); + return this.sourceDatabaseDeletionDate; } /** @@ -320,10 +369,21 @@ public OffsetDateTime sourceDatabaseDeletionDate() { * @return the SqlPoolInner object itself. */ public SqlPoolInner withSourceDatabaseDeletionDate(OffsetDateTime sourceDatabaseDeletionDate) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withSourceDatabaseDeletionDate(sourceDatabaseDeletionDate); + this.sourceDatabaseDeletionDate = sourceDatabaseDeletionDate; + return this; + } + + /** {@inheritDoc} */ + @Override + public SqlPoolInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public SqlPoolInner withTags(Map tags) { + super.withTags(tags); return this; } @@ -336,8 +396,5 @@ public void validate() { if (sku() != null) { sku().validate(); } - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolOperationInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolOperationInner.java index 5272b22a0aafb..e585596b33806 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolOperationInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolOperationInner.java @@ -4,7 +4,8 @@ package com.azure.resourcemanager.synapse.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.ManagementOperationState; @@ -13,24 +14,94 @@ import java.time.OffsetDateTime; /** A Sql pool operation. */ -@Fluent -public final class SqlPoolOperationInner extends ProxyResource { +@JsonFlatten +@Immutable +public class SqlPoolOperationInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolOperationInner.class); /* - * Resource properties. + * The name of the Sql pool the operation is being performed on. */ - @JsonProperty(value = "properties") - private SqlPoolOperationProperties innerProperties; + @JsonProperty(value = "properties.databaseName", access = JsonProperty.Access.WRITE_ONLY) + private String databaseName; - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. + /* + * The name of operation. */ - private SqlPoolOperationProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.operation", access = JsonProperty.Access.WRITE_ONLY) + private String operation; + + /* + * The friendly name of operation. + */ + @JsonProperty(value = "properties.operationFriendlyName", access = JsonProperty.Access.WRITE_ONLY) + private String operationFriendlyName; + + /* + * The percentage of the operation completed. + */ + @JsonProperty(value = "properties.percentComplete", access = JsonProperty.Access.WRITE_ONLY) + private Integer percentComplete; + + /* + * The name of the server. + */ + @JsonProperty(value = "properties.serverName", access = JsonProperty.Access.WRITE_ONLY) + private String serverName; + + /* + * The operation start time. + */ + @JsonProperty(value = "properties.startTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime startTime; + + /* + * The operation state. + */ + @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) + private ManagementOperationState state; + + /* + * The operation error code. + */ + @JsonProperty(value = "properties.errorCode", access = JsonProperty.Access.WRITE_ONLY) + private Integer errorCode; + + /* + * The operation error description. + */ + @JsonProperty(value = "properties.errorDescription", access = JsonProperty.Access.WRITE_ONLY) + private String errorDescription; + + /* + * The operation error severity. + */ + @JsonProperty(value = "properties.errorSeverity", access = JsonProperty.Access.WRITE_ONLY) + private Integer errorSeverity; + + /* + * Whether or not the error is a user error. + */ + @JsonProperty(value = "properties.isUserError", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isUserError; + + /* + * The estimated completion time of the operation. + */ + @JsonProperty(value = "properties.estimatedCompletionTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime estimatedCompletionTime; + + /* + * The operation description. + */ + @JsonProperty(value = "properties.description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /* + * Whether the operation can be cancelled. + */ + @JsonProperty(value = "properties.isCancellable", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isCancellable; /** * Get the databaseName property: The name of the Sql pool the operation is being performed on. @@ -38,7 +109,7 @@ private SqlPoolOperationProperties innerProperties() { * @return the databaseName value. */ public String databaseName() { - return this.innerProperties() == null ? null : this.innerProperties().databaseName(); + return this.databaseName; } /** @@ -47,7 +118,7 @@ public String databaseName() { * @return the operation value. */ public String operation() { - return this.innerProperties() == null ? null : this.innerProperties().operation(); + return this.operation; } /** @@ -56,7 +127,7 @@ public String operation() { * @return the operationFriendlyName value. */ public String operationFriendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().operationFriendlyName(); + return this.operationFriendlyName; } /** @@ -65,7 +136,7 @@ public String operationFriendlyName() { * @return the percentComplete value. */ public Integer percentComplete() { - return this.innerProperties() == null ? null : this.innerProperties().percentComplete(); + return this.percentComplete; } /** @@ -74,7 +145,7 @@ public Integer percentComplete() { * @return the serverName value. */ public String serverName() { - return this.innerProperties() == null ? null : this.innerProperties().serverName(); + return this.serverName; } /** @@ -83,7 +154,7 @@ public String serverName() { * @return the startTime value. */ public OffsetDateTime startTime() { - return this.innerProperties() == null ? null : this.innerProperties().startTime(); + return this.startTime; } /** @@ -92,7 +163,7 @@ public OffsetDateTime startTime() { * @return the state value. */ public ManagementOperationState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); + return this.state; } /** @@ -101,7 +172,7 @@ public ManagementOperationState state() { * @return the errorCode value. */ public Integer errorCode() { - return this.innerProperties() == null ? null : this.innerProperties().errorCode(); + return this.errorCode; } /** @@ -110,7 +181,7 @@ public Integer errorCode() { * @return the errorDescription value. */ public String errorDescription() { - return this.innerProperties() == null ? null : this.innerProperties().errorDescription(); + return this.errorDescription; } /** @@ -119,7 +190,7 @@ public String errorDescription() { * @return the errorSeverity value. */ public Integer errorSeverity() { - return this.innerProperties() == null ? null : this.innerProperties().errorSeverity(); + return this.errorSeverity; } /** @@ -128,7 +199,7 @@ public Integer errorSeverity() { * @return the isUserError value. */ public Boolean isUserError() { - return this.innerProperties() == null ? null : this.innerProperties().isUserError(); + return this.isUserError; } /** @@ -137,7 +208,7 @@ public Boolean isUserError() { * @return the estimatedCompletionTime value. */ public OffsetDateTime estimatedCompletionTime() { - return this.innerProperties() == null ? null : this.innerProperties().estimatedCompletionTime(); + return this.estimatedCompletionTime; } /** @@ -146,7 +217,7 @@ public OffsetDateTime estimatedCompletionTime() { * @return the description value. */ public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); + return this.description; } /** @@ -155,7 +226,7 @@ public String description() { * @return the isCancellable value. */ public Boolean isCancellable() { - return this.innerProperties() == null ? null : this.innerProperties().isCancellable(); + return this.isCancellable; } /** @@ -164,8 +235,5 @@ public Boolean isCancellable() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolOperationProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolOperationProperties.java deleted file mode 100644 index c0d874e0b45dd..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolOperationProperties.java +++ /dev/null @@ -1,236 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.ManagementOperationState; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** The properties of a Sql pool operation. */ -@Immutable -public final class SqlPoolOperationProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolOperationProperties.class); - - /* - * The name of the Sql pool the operation is being performed on. - */ - @JsonProperty(value = "databaseName", access = JsonProperty.Access.WRITE_ONLY) - private String databaseName; - - /* - * The name of operation. - */ - @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) - private String operation; - - /* - * The friendly name of operation. - */ - @JsonProperty(value = "operationFriendlyName", access = JsonProperty.Access.WRITE_ONLY) - private String operationFriendlyName; - - /* - * The percentage of the operation completed. - */ - @JsonProperty(value = "percentComplete", access = JsonProperty.Access.WRITE_ONLY) - private Integer percentComplete; - - /* - * The name of the server. - */ - @JsonProperty(value = "serverName", access = JsonProperty.Access.WRITE_ONLY) - private String serverName; - - /* - * The operation start time. - */ - @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime startTime; - - /* - * The operation state. - */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) - private ManagementOperationState state; - - /* - * The operation error code. - */ - @JsonProperty(value = "errorCode", access = JsonProperty.Access.WRITE_ONLY) - private Integer errorCode; - - /* - * The operation error description. - */ - @JsonProperty(value = "errorDescription", access = JsonProperty.Access.WRITE_ONLY) - private String errorDescription; - - /* - * The operation error severity. - */ - @JsonProperty(value = "errorSeverity", access = JsonProperty.Access.WRITE_ONLY) - private Integer errorSeverity; - - /* - * Whether or not the error is a user error. - */ - @JsonProperty(value = "isUserError", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isUserError; - - /* - * The estimated completion time of the operation. - */ - @JsonProperty(value = "estimatedCompletionTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime estimatedCompletionTime; - - /* - * The operation description. - */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) - private String description; - - /* - * Whether the operation can be cancelled. - */ - @JsonProperty(value = "isCancellable", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isCancellable; - - /** - * Get the databaseName property: The name of the Sql pool the operation is being performed on. - * - * @return the databaseName value. - */ - public String databaseName() { - return this.databaseName; - } - - /** - * Get the operation property: The name of operation. - * - * @return the operation value. - */ - public String operation() { - return this.operation; - } - - /** - * Get the operationFriendlyName property: The friendly name of operation. - * - * @return the operationFriendlyName value. - */ - public String operationFriendlyName() { - return this.operationFriendlyName; - } - - /** - * Get the percentComplete property: The percentage of the operation completed. - * - * @return the percentComplete value. - */ - public Integer percentComplete() { - return this.percentComplete; - } - - /** - * Get the serverName property: The name of the server. - * - * @return the serverName value. - */ - public String serverName() { - return this.serverName; - } - - /** - * Get the startTime property: The operation start time. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Get the state property: The operation state. - * - * @return the state value. - */ - public ManagementOperationState state() { - return this.state; - } - - /** - * Get the errorCode property: The operation error code. - * - * @return the errorCode value. - */ - public Integer errorCode() { - return this.errorCode; - } - - /** - * Get the errorDescription property: The operation error description. - * - * @return the errorDescription value. - */ - public String errorDescription() { - return this.errorDescription; - } - - /** - * Get the errorSeverity property: The operation error severity. - * - * @return the errorSeverity value. - */ - public Integer errorSeverity() { - return this.errorSeverity; - } - - /** - * Get the isUserError property: Whether or not the error is a user error. - * - * @return the isUserError value. - */ - public Boolean isUserError() { - return this.isUserError; - } - - /** - * Get the estimatedCompletionTime property: The estimated completion time of the operation. - * - * @return the estimatedCompletionTime value. - */ - public OffsetDateTime estimatedCompletionTime() { - return this.estimatedCompletionTime; - } - - /** - * Get the description property: The operation description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Get the isCancellable property: Whether the operation can be cancelled. - * - * @return the isCancellable value. - */ - public Boolean isCancellable() { - return this.isCancellable; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolResourceProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolResourceProperties.java deleted file mode 100644 index c04bc2ed548ac..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolResourceProperties.java +++ /dev/null @@ -1,312 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.StorageAccountType; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** SQL pool properties Properties of a SQL Analytics pool. */ -@Fluent -public final class SqlPoolResourceProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolResourceProperties.class); - - /* - * Maximum size in bytes - */ - @JsonProperty(value = "maxSizeBytes") - private Long maxSizeBytes; - - /* - * Collation mode - */ - @JsonProperty(value = "collation") - private String collation; - - /* - * Source database to create from - */ - @JsonProperty(value = "sourceDatabaseId") - private String sourceDatabaseId; - - /* - * Backup database to restore from - */ - @JsonProperty(value = "recoverableDatabaseId") - private String recoverableDatabaseId; - - /* - * Resource state - */ - @JsonProperty(value = "provisioningState") - private String provisioningState; - - /* - * Resource status - */ - @JsonProperty(value = "status") - private String status; - - /* - * Snapshot time to restore - */ - @JsonProperty(value = "restorePointInTime") - private OffsetDateTime restorePointInTime; - - /* - * What is this? - */ - @JsonProperty(value = "createMode") - private String createMode; - - /* - * Date the SQL pool was created - */ - @JsonProperty(value = "creationDate") - private OffsetDateTime creationDate; - - /* - * The storage account type used to store backups for this sql pool. - */ - @JsonProperty(value = "storageAccountType") - private StorageAccountType storageAccountType; - - /* - * Specifies the time that the sql pool was deleted - */ - @JsonProperty(value = "sourceDatabaseDeletionDate") - private OffsetDateTime sourceDatabaseDeletionDate; - - /** - * Get the maxSizeBytes property: Maximum size in bytes. - * - * @return the maxSizeBytes value. - */ - public Long maxSizeBytes() { - return this.maxSizeBytes; - } - - /** - * Set the maxSizeBytes property: Maximum size in bytes. - * - * @param maxSizeBytes the maxSizeBytes value to set. - * @return the SqlPoolResourceProperties object itself. - */ - public SqlPoolResourceProperties withMaxSizeBytes(Long maxSizeBytes) { - this.maxSizeBytes = maxSizeBytes; - return this; - } - - /** - * Get the collation property: Collation mode. - * - * @return the collation value. - */ - public String collation() { - return this.collation; - } - - /** - * Set the collation property: Collation mode. - * - * @param collation the collation value to set. - * @return the SqlPoolResourceProperties object itself. - */ - public SqlPoolResourceProperties withCollation(String collation) { - this.collation = collation; - return this; - } - - /** - * Get the sourceDatabaseId property: Source database to create from. - * - * @return the sourceDatabaseId value. - */ - public String sourceDatabaseId() { - return this.sourceDatabaseId; - } - - /** - * Set the sourceDatabaseId property: Source database to create from. - * - * @param sourceDatabaseId the sourceDatabaseId value to set. - * @return the SqlPoolResourceProperties object itself. - */ - public SqlPoolResourceProperties withSourceDatabaseId(String sourceDatabaseId) { - this.sourceDatabaseId = sourceDatabaseId; - return this; - } - - /** - * Get the recoverableDatabaseId property: Backup database to restore from. - * - * @return the recoverableDatabaseId value. - */ - public String recoverableDatabaseId() { - return this.recoverableDatabaseId; - } - - /** - * Set the recoverableDatabaseId property: Backup database to restore from. - * - * @param recoverableDatabaseId the recoverableDatabaseId value to set. - * @return the SqlPoolResourceProperties object itself. - */ - public SqlPoolResourceProperties withRecoverableDatabaseId(String recoverableDatabaseId) { - this.recoverableDatabaseId = recoverableDatabaseId; - return this; - } - - /** - * Get the provisioningState property: Resource state. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState property: Resource state. - * - * @param provisioningState the provisioningState value to set. - * @return the SqlPoolResourceProperties object itself. - */ - public SqlPoolResourceProperties withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the status property: Resource status. - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * Set the status property: Resource status. - * - * @param status the status value to set. - * @return the SqlPoolResourceProperties object itself. - */ - public SqlPoolResourceProperties withStatus(String status) { - this.status = status; - return this; - } - - /** - * Get the restorePointInTime property: Snapshot time to restore. - * - * @return the restorePointInTime value. - */ - public OffsetDateTime restorePointInTime() { - return this.restorePointInTime; - } - - /** - * Set the restorePointInTime property: Snapshot time to restore. - * - * @param restorePointInTime the restorePointInTime value to set. - * @return the SqlPoolResourceProperties object itself. - */ - public SqlPoolResourceProperties withRestorePointInTime(OffsetDateTime restorePointInTime) { - this.restorePointInTime = restorePointInTime; - return this; - } - - /** - * Get the createMode property: What is this?. - * - * @return the createMode value. - */ - public String createMode() { - return this.createMode; - } - - /** - * Set the createMode property: What is this?. - * - * @param createMode the createMode value to set. - * @return the SqlPoolResourceProperties object itself. - */ - public SqlPoolResourceProperties withCreateMode(String createMode) { - this.createMode = createMode; - return this; - } - - /** - * Get the creationDate property: Date the SQL pool was created. - * - * @return the creationDate value. - */ - public OffsetDateTime creationDate() { - return this.creationDate; - } - - /** - * Set the creationDate property: Date the SQL pool was created. - * - * @param creationDate the creationDate value to set. - * @return the SqlPoolResourceProperties object itself. - */ - public SqlPoolResourceProperties withCreationDate(OffsetDateTime creationDate) { - this.creationDate = creationDate; - return this; - } - - /** - * Get the storageAccountType property: The storage account type used to store backups for this sql pool. - * - * @return the storageAccountType value. - */ - public StorageAccountType storageAccountType() { - return this.storageAccountType; - } - - /** - * Set the storageAccountType property: The storage account type used to store backups for this sql pool. - * - * @param storageAccountType the storageAccountType value to set. - * @return the SqlPoolResourceProperties object itself. - */ - public SqlPoolResourceProperties withStorageAccountType(StorageAccountType storageAccountType) { - this.storageAccountType = storageAccountType; - return this; - } - - /** - * Get the sourceDatabaseDeletionDate property: Specifies the time that the sql pool was deleted. - * - * @return the sourceDatabaseDeletionDate value. - */ - public OffsetDateTime sourceDatabaseDeletionDate() { - return this.sourceDatabaseDeletionDate; - } - - /** - * Set the sourceDatabaseDeletionDate property: Specifies the time that the sql pool was deleted. - * - * @param sourceDatabaseDeletionDate the sourceDatabaseDeletionDate value to set. - * @return the SqlPoolResourceProperties object itself. - */ - public SqlPoolResourceProperties withSourceDatabaseDeletionDate(OffsetDateTime sourceDatabaseDeletionDate) { - this.sourceDatabaseDeletionDate = sourceDatabaseDeletionDate; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolSecurityAlertPolicyInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolSecurityAlertPolicyInner.java index 8d65a714d10cf..26d8f63e1b38b 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolSecurityAlertPolicyInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolSecurityAlertPolicyInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.SecurityAlertPolicyState; @@ -14,24 +15,64 @@ import java.util.List; /** A Sql pool security alert policy. */ +@JsonFlatten @Fluent -public final class SqlPoolSecurityAlertPolicyInner extends ProxyResource { +public class SqlPoolSecurityAlertPolicyInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolSecurityAlertPolicyInner.class); /* - * Resource properties. + * Specifies the state of the policy, whether it is enabled or disabled or + * a policy has not been applied yet on the specific Sql pool. */ - @JsonProperty(value = "properties") - private SecurityAlertPolicyProperties innerProperties; + @JsonProperty(value = "properties.state") + private SecurityAlertPolicyState state; - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. + /* + * Specifies an array of alerts that are disabled. Allowed values are: + * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, + * Data_Exfiltration, Unsafe_Action */ - private SecurityAlertPolicyProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.disabledAlerts") + private List disabledAlerts; + + /* + * Specifies an array of e-mail addresses to which the alert is sent. + */ + @JsonProperty(value = "properties.emailAddresses") + private List emailAddresses; + + /* + * Specifies that the alert is sent to the account administrators. + */ + @JsonProperty(value = "properties.emailAccountAdmins") + private Boolean emailAccountAdmins; + + /* + * Specifies the blob storage endpoint (e.g. + * https://MyAccount.blob.core.windows.net). This blob storage will hold + * all Threat Detection audit logs. + */ + @JsonProperty(value = "properties.storageEndpoint") + private String storageEndpoint; + + /* + * Specifies the identifier key of the Threat Detection audit storage + * account. + */ + @JsonProperty(value = "properties.storageAccountAccessKey") + private String storageAccountAccessKey; + + /* + * Specifies the number of days to keep in the Threat Detection audit logs. + */ + @JsonProperty(value = "properties.retentionDays") + private Integer retentionDays; + + /* + * Specifies the UTC creation time of the policy. + */ + @JsonProperty(value = "properties.creationTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime creationTime; /** * Get the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not @@ -40,7 +81,7 @@ private SecurityAlertPolicyProperties innerProperties() { * @return the state value. */ public SecurityAlertPolicyState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); + return this.state; } /** @@ -51,10 +92,7 @@ public SecurityAlertPolicyState state() { * @return the SqlPoolSecurityAlertPolicyInner object itself. */ public SqlPoolSecurityAlertPolicyInner withState(SecurityAlertPolicyState state) { - if (this.innerProperties() == null) { - this.innerProperties = new SecurityAlertPolicyProperties(); - } - this.innerProperties().withState(state); + this.state = state; return this; } @@ -65,7 +103,7 @@ public SqlPoolSecurityAlertPolicyInner withState(SecurityAlertPolicyState state) * @return the disabledAlerts value. */ public List disabledAlerts() { - return this.innerProperties() == null ? null : this.innerProperties().disabledAlerts(); + return this.disabledAlerts; } /** @@ -76,10 +114,7 @@ public List disabledAlerts() { * @return the SqlPoolSecurityAlertPolicyInner object itself. */ public SqlPoolSecurityAlertPolicyInner withDisabledAlerts(List disabledAlerts) { - if (this.innerProperties() == null) { - this.innerProperties = new SecurityAlertPolicyProperties(); - } - this.innerProperties().withDisabledAlerts(disabledAlerts); + this.disabledAlerts = disabledAlerts; return this; } @@ -89,7 +124,7 @@ public SqlPoolSecurityAlertPolicyInner withDisabledAlerts(List disabledA * @return the emailAddresses value. */ public List emailAddresses() { - return this.innerProperties() == null ? null : this.innerProperties().emailAddresses(); + return this.emailAddresses; } /** @@ -99,10 +134,7 @@ public List emailAddresses() { * @return the SqlPoolSecurityAlertPolicyInner object itself. */ public SqlPoolSecurityAlertPolicyInner withEmailAddresses(List emailAddresses) { - if (this.innerProperties() == null) { - this.innerProperties = new SecurityAlertPolicyProperties(); - } - this.innerProperties().withEmailAddresses(emailAddresses); + this.emailAddresses = emailAddresses; return this; } @@ -112,7 +144,7 @@ public SqlPoolSecurityAlertPolicyInner withEmailAddresses(List emailAddr * @return the emailAccountAdmins value. */ public Boolean emailAccountAdmins() { - return this.innerProperties() == null ? null : this.innerProperties().emailAccountAdmins(); + return this.emailAccountAdmins; } /** @@ -122,10 +154,7 @@ public Boolean emailAccountAdmins() { * @return the SqlPoolSecurityAlertPolicyInner object itself. */ public SqlPoolSecurityAlertPolicyInner withEmailAccountAdmins(Boolean emailAccountAdmins) { - if (this.innerProperties() == null) { - this.innerProperties = new SecurityAlertPolicyProperties(); - } - this.innerProperties().withEmailAccountAdmins(emailAccountAdmins); + this.emailAccountAdmins = emailAccountAdmins; return this; } @@ -136,7 +165,7 @@ public SqlPoolSecurityAlertPolicyInner withEmailAccountAdmins(Boolean emailAccou * @return the storageEndpoint value. */ public String storageEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().storageEndpoint(); + return this.storageEndpoint; } /** @@ -147,10 +176,7 @@ public String storageEndpoint() { * @return the SqlPoolSecurityAlertPolicyInner object itself. */ public SqlPoolSecurityAlertPolicyInner withStorageEndpoint(String storageEndpoint) { - if (this.innerProperties() == null) { - this.innerProperties = new SecurityAlertPolicyProperties(); - } - this.innerProperties().withStorageEndpoint(storageEndpoint); + this.storageEndpoint = storageEndpoint; return this; } @@ -161,7 +187,7 @@ public SqlPoolSecurityAlertPolicyInner withStorageEndpoint(String storageEndpoin * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { - return this.innerProperties() == null ? null : this.innerProperties().storageAccountAccessKey(); + return this.storageAccountAccessKey; } /** @@ -172,10 +198,7 @@ public String storageAccountAccessKey() { * @return the SqlPoolSecurityAlertPolicyInner object itself. */ public SqlPoolSecurityAlertPolicyInner withStorageAccountAccessKey(String storageAccountAccessKey) { - if (this.innerProperties() == null) { - this.innerProperties = new SecurityAlertPolicyProperties(); - } - this.innerProperties().withStorageAccountAccessKey(storageAccountAccessKey); + this.storageAccountAccessKey = storageAccountAccessKey; return this; } @@ -185,7 +208,7 @@ public SqlPoolSecurityAlertPolicyInner withStorageAccountAccessKey(String storag * @return the retentionDays value. */ public Integer retentionDays() { - return this.innerProperties() == null ? null : this.innerProperties().retentionDays(); + return this.retentionDays; } /** @@ -195,10 +218,7 @@ public Integer retentionDays() { * @return the SqlPoolSecurityAlertPolicyInner object itself. */ public SqlPoolSecurityAlertPolicyInner withRetentionDays(Integer retentionDays) { - if (this.innerProperties() == null) { - this.innerProperties = new SecurityAlertPolicyProperties(); - } - this.innerProperties().withRetentionDays(retentionDays); + this.retentionDays = retentionDays; return this; } @@ -208,7 +228,7 @@ public SqlPoolSecurityAlertPolicyInner withRetentionDays(Integer retentionDays) * @return the creationTime value. */ public OffsetDateTime creationTime() { - return this.innerProperties() == null ? null : this.innerProperties().creationTime(); + return this.creationTime; } /** @@ -217,8 +237,5 @@ public OffsetDateTime creationTime() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentInner.java index a8f7182c754b1..f2d62658833a1 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentRecurringScansProperties; @@ -12,24 +13,41 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** A Sql pool vulnerability assessment. */ +@JsonFlatten @Fluent -public final class SqlPoolVulnerabilityAssessmentInner extends ProxyResource { +public class SqlPoolVulnerabilityAssessmentInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolVulnerabilityAssessmentInner.class); /* - * Resource properties. + * A blob storage container path to hold the scan results (e.g. + * https://myStorage.blob.core.windows.net/VaScans/). It is required if + * server level vulnerability assessment policy doesn't set */ - @JsonProperty(value = "properties") - private SqlPoolVulnerabilityAssessmentProperties innerProperties; + @JsonProperty(value = "properties.storageContainerPath") + private String storageContainerPath; - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. + /* + * A shared access signature (SAS Key) that has write access to the blob + * container specified in 'storageContainerPath' parameter. If + * 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is + * required. */ - private SqlPoolVulnerabilityAssessmentProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.storageContainerSasKey") + private String storageContainerSasKey; + + /* + * Specifies the identifier key of the storage account for vulnerability + * assessment scan results. If 'StorageContainerSasKey' isn't specified, + * storageAccountAccessKey is required. + */ + @JsonProperty(value = "properties.storageAccountAccessKey") + private String storageAccountAccessKey; + + /* + * The recurring scans settings + */ + @JsonProperty(value = "properties.recurringScans") + private VulnerabilityAssessmentRecurringScansProperties recurringScans; /** * Get the storageContainerPath property: A blob storage container path to hold the scan results (e.g. @@ -39,7 +57,7 @@ private SqlPoolVulnerabilityAssessmentProperties innerProperties() { * @return the storageContainerPath value. */ public String storageContainerPath() { - return this.innerProperties() == null ? null : this.innerProperties().storageContainerPath(); + return this.storageContainerPath; } /** @@ -51,10 +69,7 @@ public String storageContainerPath() { * @return the SqlPoolVulnerabilityAssessmentInner object itself. */ public SqlPoolVulnerabilityAssessmentInner withStorageContainerPath(String storageContainerPath) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolVulnerabilityAssessmentProperties(); - } - this.innerProperties().withStorageContainerPath(storageContainerPath); + this.storageContainerPath = storageContainerPath; return this; } @@ -66,7 +81,7 @@ public SqlPoolVulnerabilityAssessmentInner withStorageContainerPath(String stora * @return the storageContainerSasKey value. */ public String storageContainerSasKey() { - return this.innerProperties() == null ? null : this.innerProperties().storageContainerSasKey(); + return this.storageContainerSasKey; } /** @@ -78,10 +93,7 @@ public String storageContainerSasKey() { * @return the SqlPoolVulnerabilityAssessmentInner object itself. */ public SqlPoolVulnerabilityAssessmentInner withStorageContainerSasKey(String storageContainerSasKey) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolVulnerabilityAssessmentProperties(); - } - this.innerProperties().withStorageContainerSasKey(storageContainerSasKey); + this.storageContainerSasKey = storageContainerSasKey; return this; } @@ -92,7 +104,7 @@ public SqlPoolVulnerabilityAssessmentInner withStorageContainerSasKey(String sto * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { - return this.innerProperties() == null ? null : this.innerProperties().storageAccountAccessKey(); + return this.storageAccountAccessKey; } /** @@ -103,10 +115,7 @@ public String storageAccountAccessKey() { * @return the SqlPoolVulnerabilityAssessmentInner object itself. */ public SqlPoolVulnerabilityAssessmentInner withStorageAccountAccessKey(String storageAccountAccessKey) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolVulnerabilityAssessmentProperties(); - } - this.innerProperties().withStorageAccountAccessKey(storageAccountAccessKey); + this.storageAccountAccessKey = storageAccountAccessKey; return this; } @@ -116,7 +125,7 @@ public SqlPoolVulnerabilityAssessmentInner withStorageAccountAccessKey(String st * @return the recurringScans value. */ public VulnerabilityAssessmentRecurringScansProperties recurringScans() { - return this.innerProperties() == null ? null : this.innerProperties().recurringScans(); + return this.recurringScans; } /** @@ -127,10 +136,7 @@ public VulnerabilityAssessmentRecurringScansProperties recurringScans() { */ public SqlPoolVulnerabilityAssessmentInner withRecurringScans( VulnerabilityAssessmentRecurringScansProperties recurringScans) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolVulnerabilityAssessmentProperties(); - } - this.innerProperties().withRecurringScans(recurringScans); + this.recurringScans = recurringScans; return this; } @@ -140,8 +146,8 @@ public SqlPoolVulnerabilityAssessmentInner withRecurringScans( * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (recurringScans() != null) { + recurringScans().validate(); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentProperties.java deleted file mode 100644 index cdc9645d9a6b8..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentProperties.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentRecurringScansProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties of a Sql pool Vulnerability Assessment. */ -@Fluent -public final class SqlPoolVulnerabilityAssessmentProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolVulnerabilityAssessmentProperties.class); - - /* - * A blob storage container path to hold the scan results (e.g. - * https://myStorage.blob.core.windows.net/VaScans/). It is required if - * server level vulnerability assessment policy doesn't set - */ - @JsonProperty(value = "storageContainerPath") - private String storageContainerPath; - - /* - * A shared access signature (SAS Key) that has write access to the blob - * container specified in 'storageContainerPath' parameter. If - * 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is - * required. - */ - @JsonProperty(value = "storageContainerSasKey") - private String storageContainerSasKey; - - /* - * Specifies the identifier key of the storage account for vulnerability - * assessment scan results. If 'StorageContainerSasKey' isn't specified, - * storageAccountAccessKey is required. - */ - @JsonProperty(value = "storageAccountAccessKey") - private String storageAccountAccessKey; - - /* - * The recurring scans settings - */ - @JsonProperty(value = "recurringScans") - private VulnerabilityAssessmentRecurringScansProperties recurringScans; - - /** - * Get the storageContainerPath property: A blob storage container path to hold the scan results (e.g. - * https://myStorage.blob.core.windows.net/VaScans/). It is required if server level vulnerability assessment policy - * doesn't set. - * - * @return the storageContainerPath value. - */ - public String storageContainerPath() { - return this.storageContainerPath; - } - - /** - * Set the storageContainerPath property: A blob storage container path to hold the scan results (e.g. - * https://myStorage.blob.core.windows.net/VaScans/). It is required if server level vulnerability assessment policy - * doesn't set. - * - * @param storageContainerPath the storageContainerPath value to set. - * @return the SqlPoolVulnerabilityAssessmentProperties object itself. - */ - public SqlPoolVulnerabilityAssessmentProperties withStorageContainerPath(String storageContainerPath) { - this.storageContainerPath = storageContainerPath; - return this; - } - - /** - * Get the storageContainerSasKey property: A shared access signature (SAS Key) that has write access to the blob - * container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, - * StorageContainerSasKey is required. - * - * @return the storageContainerSasKey value. - */ - public String storageContainerSasKey() { - return this.storageContainerSasKey; - } - - /** - * Set the storageContainerSasKey property: A shared access signature (SAS Key) that has write access to the blob - * container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, - * StorageContainerSasKey is required. - * - * @param storageContainerSasKey the storageContainerSasKey value to set. - * @return the SqlPoolVulnerabilityAssessmentProperties object itself. - */ - public SqlPoolVulnerabilityAssessmentProperties withStorageContainerSasKey(String storageContainerSasKey) { - this.storageContainerSasKey = storageContainerSasKey; - return this; - } - - /** - * Get the storageAccountAccessKey property: Specifies the identifier key of the storage account for vulnerability - * assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. - * - * @return the storageAccountAccessKey value. - */ - public String storageAccountAccessKey() { - return this.storageAccountAccessKey; - } - - /** - * Set the storageAccountAccessKey property: Specifies the identifier key of the storage account for vulnerability - * assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. - * - * @param storageAccountAccessKey the storageAccountAccessKey value to set. - * @return the SqlPoolVulnerabilityAssessmentProperties object itself. - */ - public SqlPoolVulnerabilityAssessmentProperties withStorageAccountAccessKey(String storageAccountAccessKey) { - this.storageAccountAccessKey = storageAccountAccessKey; - return this; - } - - /** - * Get the recurringScans property: The recurring scans settings. - * - * @return the recurringScans value. - */ - public VulnerabilityAssessmentRecurringScansProperties recurringScans() { - return this.recurringScans; - } - - /** - * Set the recurringScans property: The recurring scans settings. - * - * @param recurringScans the recurringScans value to set. - * @return the SqlPoolVulnerabilityAssessmentProperties object itself. - */ - public SqlPoolVulnerabilityAssessmentProperties withRecurringScans( - VulnerabilityAssessmentRecurringScansProperties recurringScans) { - this.recurringScans = recurringScans; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (recurringScans() != null) { - recurringScans().validate(); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentRuleBaselineInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentRuleBaselineInner.java index f718b3e0deeb6..25201498e11a2 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentRuleBaselineInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentRuleBaselineInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.SqlPoolVulnerabilityAssessmentRuleBaselineItem; @@ -13,25 +14,17 @@ import java.util.List; /** A Sql pool vulnerability assessment rule baseline. */ +@JsonFlatten @Fluent -public final class SqlPoolVulnerabilityAssessmentRuleBaselineInner extends ProxyResource { +public class SqlPoolVulnerabilityAssessmentRuleBaselineInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolVulnerabilityAssessmentRuleBaselineInner.class); /* - * Resource properties. + * The rule baseline result */ - @JsonProperty(value = "properties") - private SqlPoolVulnerabilityAssessmentRuleBaselineProperties innerProperties; - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private SqlPoolVulnerabilityAssessmentRuleBaselineProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.baselineResults") + private List baselineResults; /** * Get the baselineResults property: The rule baseline result. @@ -39,7 +32,7 @@ private SqlPoolVulnerabilityAssessmentRuleBaselineProperties innerProperties() { * @return the baselineResults value. */ public List baselineResults() { - return this.innerProperties() == null ? null : this.innerProperties().baselineResults(); + return this.baselineResults; } /** @@ -50,10 +43,7 @@ public List baselineResults() { */ public SqlPoolVulnerabilityAssessmentRuleBaselineInner withBaselineResults( List baselineResults) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolVulnerabilityAssessmentRuleBaselineProperties(); - } - this.innerProperties().withBaselineResults(baselineResults); + this.baselineResults = baselineResults; return this; } @@ -63,8 +53,8 @@ public SqlPoolVulnerabilityAssessmentRuleBaselineInner withBaselineResults( * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (baselineResults() != null) { + baselineResults().forEach(e -> e.validate()); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentRuleBaselineProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentRuleBaselineProperties.java deleted file mode 100644 index 7f95a402c3322..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentRuleBaselineProperties.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.SqlPoolVulnerabilityAssessmentRuleBaselineItem; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Properties of a Sql pool vulnerability assessment rule baseline. */ -@Fluent -public final class SqlPoolVulnerabilityAssessmentRuleBaselineProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(SqlPoolVulnerabilityAssessmentRuleBaselineProperties.class); - - /* - * The rule baseline result - */ - @JsonProperty(value = "baselineResults", required = true) - private List baselineResults; - - /** - * Get the baselineResults property: The rule baseline result. - * - * @return the baselineResults value. - */ - public List baselineResults() { - return this.baselineResults; - } - - /** - * Set the baselineResults property: The rule baseline result. - * - * @param baselineResults the baselineResults value to set. - * @return the SqlPoolVulnerabilityAssessmentRuleBaselineProperties object itself. - */ - public SqlPoolVulnerabilityAssessmentRuleBaselineProperties withBaselineResults( - List baselineResults) { - this.baselineResults = baselineResults; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (baselineResults() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property baselineResults in model" - + " SqlPoolVulnerabilityAssessmentRuleBaselineProperties")); - } else { - baselineResults().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentScanExportProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentScanExportProperties.java deleted file mode 100644 index 9d93bc33bbc6b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentScanExportProperties.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties of the export operation's result. */ -@Immutable -public final class SqlPoolVulnerabilityAssessmentScanExportProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(SqlPoolVulnerabilityAssessmentScanExportProperties.class); - - /* - * Location of the exported report (e.g. - * https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). - */ - @JsonProperty(value = "exportedReportLocation", access = JsonProperty.Access.WRITE_ONLY) - private String exportedReportLocation; - - /** - * Get the exportedReportLocation property: Location of the exported report (e.g. - * https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). - * - * @return the exportedReportLocation value. - */ - public String exportedReportLocation() { - return this.exportedReportLocation; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentScansExportInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentScansExportInner.java index d6cf958ae3052..31b5b84d7fc32 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentScansExportInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentScansExportInner.java @@ -4,32 +4,26 @@ package com.azure.resourcemanager.synapse.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A Sql pool Vulnerability Assessment scan export resource. */ -@Fluent -public final class SqlPoolVulnerabilityAssessmentScansExportInner extends ProxyResource { +@JsonFlatten +@Immutable +public class SqlPoolVulnerabilityAssessmentScansExportInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolVulnerabilityAssessmentScansExportInner.class); /* - * Resource properties. - */ - @JsonProperty(value = "properties") - private SqlPoolVulnerabilityAssessmentScanExportProperties innerProperties; - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. + * Location of the exported report (e.g. + * https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). */ - private SqlPoolVulnerabilityAssessmentScanExportProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.exportedReportLocation", access = JsonProperty.Access.WRITE_ONLY) + private String exportedReportLocation; /** * Get the exportedReportLocation property: Location of the exported report (e.g. @@ -38,7 +32,7 @@ private SqlPoolVulnerabilityAssessmentScanExportProperties innerProperties() { * @return the exportedReportLocation value. */ public String exportedReportLocation() { - return this.innerProperties() == null ? null : this.innerProperties().exportedReportLocation(); + return this.exportedReportLocation; } /** @@ -47,8 +41,5 @@ public String exportedReportLocation() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/TransparentDataEncryptionInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/TransparentDataEncryptionInner.java index 7c42ac2fb9a76..a69a5b5536166 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/TransparentDataEncryptionInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/TransparentDataEncryptionInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.TransparentDataEncryptionStatus; @@ -12,8 +13,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** Represents a Sql pool transparent data encryption configuration. */ +@JsonFlatten @Fluent -public final class TransparentDataEncryptionInner extends ProxyResource { +public class TransparentDataEncryptionInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(TransparentDataEncryptionInner.class); /* @@ -23,10 +25,10 @@ public final class TransparentDataEncryptionInner extends ProxyResource { private String location; /* - * Represents the properties of the resource. + * The status of the database transparent data encryption. */ - @JsonProperty(value = "properties") - private TransparentDataEncryptionProperties innerProperties; + @JsonProperty(value = "properties.status") + private TransparentDataEncryptionStatus status; /** * Get the location property: Resource location. @@ -37,22 +39,13 @@ public String location() { return this.location; } - /** - * Get the innerProperties property: Represents the properties of the resource. - * - * @return the innerProperties value. - */ - private TransparentDataEncryptionProperties innerProperties() { - return this.innerProperties; - } - /** * Get the status property: The status of the database transparent data encryption. * * @return the status value. */ public TransparentDataEncryptionStatus status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); + return this.status; } /** @@ -62,10 +55,7 @@ public TransparentDataEncryptionStatus status() { * @return the TransparentDataEncryptionInner object itself. */ public TransparentDataEncryptionInner withStatus(TransparentDataEncryptionStatus status) { - if (this.innerProperties() == null) { - this.innerProperties = new TransparentDataEncryptionProperties(); - } - this.innerProperties().withStatus(status); + this.status = status; return this; } @@ -75,8 +65,5 @@ public TransparentDataEncryptionInner withStatus(TransparentDataEncryptionStatus * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/TransparentDataEncryptionProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/TransparentDataEncryptionProperties.java deleted file mode 100644 index ab4b500c3808f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/TransparentDataEncryptionProperties.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.TransparentDataEncryptionStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Represents the properties of a database transparent data encryption. */ -@Fluent -public final class TransparentDataEncryptionProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TransparentDataEncryptionProperties.class); - - /* - * The status of the database transparent data encryption. - */ - @JsonProperty(value = "status") - private TransparentDataEncryptionStatus status; - - /** - * Get the status property: The status of the database transparent data encryption. - * - * @return the status value. - */ - public TransparentDataEncryptionStatus status() { - return this.status; - } - - /** - * Set the status property: The status of the database transparent data encryption. - * - * @param status the status value to set. - * @return the TransparentDataEncryptionProperties object itself. - */ - public TransparentDataEncryptionProperties withStatus(TransparentDataEncryptionStatus status) { - this.status = status; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/VulnerabilityAssessmentScanRecordInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/VulnerabilityAssessmentScanRecordInner.java index dc369bb4c5883..0a395ea3d9ec8 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/VulnerabilityAssessmentScanRecordInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/VulnerabilityAssessmentScanRecordInner.java @@ -4,7 +4,8 @@ package com.azure.resourcemanager.synapse.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentScanError; @@ -16,24 +17,58 @@ import java.util.List; /** A vulnerability assessment scan record. */ -@Fluent -public final class VulnerabilityAssessmentScanRecordInner extends ProxyResource { +@JsonFlatten +@Immutable +public class VulnerabilityAssessmentScanRecordInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(VulnerabilityAssessmentScanRecordInner.class); /* - * Resource properties. + * The scan ID. */ - @JsonProperty(value = "properties") - private VulnerabilityAssessmentScanRecordProperties innerProperties; + @JsonProperty(value = "properties.scanId", access = JsonProperty.Access.WRITE_ONLY) + private String scanId; - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. + /* + * The scan trigger type. */ - private VulnerabilityAssessmentScanRecordProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.triggerType", access = JsonProperty.Access.WRITE_ONLY) + private VulnerabilityAssessmentScanTriggerType triggerType; + + /* + * The scan status. + */ + @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) + private VulnerabilityAssessmentScanState state; + + /* + * The scan start time (UTC). + */ + @JsonProperty(value = "properties.startTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime startTime; + + /* + * The scan end time (UTC). + */ + @JsonProperty(value = "properties.endTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime endTime; + + /* + * The scan errors. + */ + @JsonProperty(value = "properties.errors", access = JsonProperty.Access.WRITE_ONLY) + private List errors; + + /* + * The scan results storage container path. + */ + @JsonProperty(value = "properties.storageContainerPath", access = JsonProperty.Access.WRITE_ONLY) + private String storageContainerPath; + + /* + * The number of failed security checks. + */ + @JsonProperty(value = "properties.numberOfFailedSecurityChecks", access = JsonProperty.Access.WRITE_ONLY) + private Integer numberOfFailedSecurityChecks; /** * Get the scanId property: The scan ID. @@ -41,7 +76,7 @@ private VulnerabilityAssessmentScanRecordProperties innerProperties() { * @return the scanId value. */ public String scanId() { - return this.innerProperties() == null ? null : this.innerProperties().scanId(); + return this.scanId; } /** @@ -50,7 +85,7 @@ public String scanId() { * @return the triggerType value. */ public VulnerabilityAssessmentScanTriggerType triggerType() { - return this.innerProperties() == null ? null : this.innerProperties().triggerType(); + return this.triggerType; } /** @@ -59,7 +94,7 @@ public VulnerabilityAssessmentScanTriggerType triggerType() { * @return the state value. */ public VulnerabilityAssessmentScanState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); + return this.state; } /** @@ -68,7 +103,7 @@ public VulnerabilityAssessmentScanState state() { * @return the startTime value. */ public OffsetDateTime startTime() { - return this.innerProperties() == null ? null : this.innerProperties().startTime(); + return this.startTime; } /** @@ -77,7 +112,7 @@ public OffsetDateTime startTime() { * @return the endTime value. */ public OffsetDateTime endTime() { - return this.innerProperties() == null ? null : this.innerProperties().endTime(); + return this.endTime; } /** @@ -86,7 +121,7 @@ public OffsetDateTime endTime() { * @return the errors value. */ public List errors() { - return this.innerProperties() == null ? null : this.innerProperties().errors(); + return this.errors; } /** @@ -95,7 +130,7 @@ public List errors() { * @return the storageContainerPath value. */ public String storageContainerPath() { - return this.innerProperties() == null ? null : this.innerProperties().storageContainerPath(); + return this.storageContainerPath; } /** @@ -104,7 +139,7 @@ public String storageContainerPath() { * @return the numberOfFailedSecurityChecks value. */ public Integer numberOfFailedSecurityChecks() { - return this.innerProperties() == null ? null : this.innerProperties().numberOfFailedSecurityChecks(); + return this.numberOfFailedSecurityChecks; } /** @@ -113,8 +148,8 @@ public Integer numberOfFailedSecurityChecks() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (errors() != null) { + errors().forEach(e -> e.validate()); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/VulnerabilityAssessmentScanRecordProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/VulnerabilityAssessmentScanRecordProperties.java deleted file mode 100644 index 4b50b2e55a500..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/VulnerabilityAssessmentScanRecordProperties.java +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentScanError; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentScanState; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentScanTriggerType; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Properties of a vulnerability assessment scan record. */ -@Immutable -public final class VulnerabilityAssessmentScanRecordProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VulnerabilityAssessmentScanRecordProperties.class); - - /* - * The scan ID. - */ - @JsonProperty(value = "scanId", access = JsonProperty.Access.WRITE_ONLY) - private String scanId; - - /* - * The scan trigger type. - */ - @JsonProperty(value = "triggerType", access = JsonProperty.Access.WRITE_ONLY) - private VulnerabilityAssessmentScanTriggerType triggerType; - - /* - * The scan status. - */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) - private VulnerabilityAssessmentScanState state; - - /* - * The scan start time (UTC). - */ - @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime startTime; - - /* - * The scan end time (UTC). - */ - @JsonProperty(value = "endTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime endTime; - - /* - * The scan errors. - */ - @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) - private List errors; - - /* - * The scan results storage container path. - */ - @JsonProperty(value = "storageContainerPath", access = JsonProperty.Access.WRITE_ONLY) - private String storageContainerPath; - - /* - * The number of failed security checks. - */ - @JsonProperty(value = "numberOfFailedSecurityChecks", access = JsonProperty.Access.WRITE_ONLY) - private Integer numberOfFailedSecurityChecks; - - /** - * Get the scanId property: The scan ID. - * - * @return the scanId value. - */ - public String scanId() { - return this.scanId; - } - - /** - * Get the triggerType property: The scan trigger type. - * - * @return the triggerType value. - */ - public VulnerabilityAssessmentScanTriggerType triggerType() { - return this.triggerType; - } - - /** - * Get the state property: The scan status. - * - * @return the state value. - */ - public VulnerabilityAssessmentScanState state() { - return this.state; - } - - /** - * Get the startTime property: The scan start time (UTC). - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Get the endTime property: The scan end time (UTC). - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.endTime; - } - - /** - * Get the errors property: The scan errors. - * - * @return the errors value. - */ - public List errors() { - return this.errors; - } - - /** - * Get the storageContainerPath property: The scan results storage container path. - * - * @return the storageContainerPath value. - */ - public String storageContainerPath() { - return this.storageContainerPath; - } - - /** - * Get the numberOfFailedSecurityChecks property: The number of failed security checks. - * - * @return the numberOfFailedSecurityChecks value. - */ - public Integer numberOfFailedSecurityChecks() { - return this.numberOfFailedSecurityChecks; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (errors() != null) { - errors().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkloadClassifierInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkloadClassifierInner.java index cee72274c8700..8aca81dcf0b3b 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkloadClassifierInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkloadClassifierInner.java @@ -5,30 +5,53 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Workload classifier operations for a data warehouse. */ +@JsonFlatten @Fluent -public final class WorkloadClassifierInner extends ProxyResource { +public class WorkloadClassifierInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadClassifierInner.class); /* - * Resource properties. + * The workload classifier member name. */ - @JsonProperty(value = "properties") - private WorkloadClassifierProperties innerProperties; + @JsonProperty(value = "properties.memberName") + private String memberName; - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. + /* + * The workload classifier label. */ - private WorkloadClassifierProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.label") + private String label; + + /* + * The workload classifier context. + */ + @JsonProperty(value = "properties.context") + private String context; + + /* + * The workload classifier start time for classification. + */ + @JsonProperty(value = "properties.startTime") + private String startTime; + + /* + * The workload classifier end time for classification. + */ + @JsonProperty(value = "properties.endTime") + private String endTime; + + /* + * The workload classifier importance. + */ + @JsonProperty(value = "properties.importance") + private String importance; /** * Get the memberName property: The workload classifier member name. @@ -36,7 +59,7 @@ private WorkloadClassifierProperties innerProperties() { * @return the memberName value. */ public String memberName() { - return this.innerProperties() == null ? null : this.innerProperties().memberName(); + return this.memberName; } /** @@ -46,10 +69,7 @@ public String memberName() { * @return the WorkloadClassifierInner object itself. */ public WorkloadClassifierInner withMemberName(String memberName) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkloadClassifierProperties(); - } - this.innerProperties().withMemberName(memberName); + this.memberName = memberName; return this; } @@ -59,7 +79,7 @@ public WorkloadClassifierInner withMemberName(String memberName) { * @return the label value. */ public String label() { - return this.innerProperties() == null ? null : this.innerProperties().label(); + return this.label; } /** @@ -69,10 +89,7 @@ public String label() { * @return the WorkloadClassifierInner object itself. */ public WorkloadClassifierInner withLabel(String label) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkloadClassifierProperties(); - } - this.innerProperties().withLabel(label); + this.label = label; return this; } @@ -82,7 +99,7 @@ public WorkloadClassifierInner withLabel(String label) { * @return the context value. */ public String context() { - return this.innerProperties() == null ? null : this.innerProperties().context(); + return this.context; } /** @@ -92,10 +109,7 @@ public String context() { * @return the WorkloadClassifierInner object itself. */ public WorkloadClassifierInner withContext(String context) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkloadClassifierProperties(); - } - this.innerProperties().withContext(context); + this.context = context; return this; } @@ -105,7 +119,7 @@ public WorkloadClassifierInner withContext(String context) { * @return the startTime value. */ public String startTime() { - return this.innerProperties() == null ? null : this.innerProperties().startTime(); + return this.startTime; } /** @@ -115,10 +129,7 @@ public String startTime() { * @return the WorkloadClassifierInner object itself. */ public WorkloadClassifierInner withStartTime(String startTime) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkloadClassifierProperties(); - } - this.innerProperties().withStartTime(startTime); + this.startTime = startTime; return this; } @@ -128,7 +139,7 @@ public WorkloadClassifierInner withStartTime(String startTime) { * @return the endTime value. */ public String endTime() { - return this.innerProperties() == null ? null : this.innerProperties().endTime(); + return this.endTime; } /** @@ -138,10 +149,7 @@ public String endTime() { * @return the WorkloadClassifierInner object itself. */ public WorkloadClassifierInner withEndTime(String endTime) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkloadClassifierProperties(); - } - this.innerProperties().withEndTime(endTime); + this.endTime = endTime; return this; } @@ -151,7 +159,7 @@ public WorkloadClassifierInner withEndTime(String endTime) { * @return the importance value. */ public String importance() { - return this.innerProperties() == null ? null : this.innerProperties().importance(); + return this.importance; } /** @@ -161,10 +169,7 @@ public String importance() { * @return the WorkloadClassifierInner object itself. */ public WorkloadClassifierInner withImportance(String importance) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkloadClassifierProperties(); - } - this.innerProperties().withImportance(importance); + this.importance = importance; return this; } @@ -174,8 +179,5 @@ public WorkloadClassifierInner withImportance(String importance) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkloadClassifierProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkloadClassifierProperties.java deleted file mode 100644 index b35d61e90bb88..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkloadClassifierProperties.java +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Workload classifier definition. For more information look at sys.workload_management_workload_classifiers (DMV). */ -@Fluent -public final class WorkloadClassifierProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadClassifierProperties.class); - - /* - * The workload classifier member name. - */ - @JsonProperty(value = "memberName", required = true) - private String memberName; - - /* - * The workload classifier label. - */ - @JsonProperty(value = "label") - private String label; - - /* - * The workload classifier context. - */ - @JsonProperty(value = "context") - private String context; - - /* - * The workload classifier start time for classification. - */ - @JsonProperty(value = "startTime") - private String startTime; - - /* - * The workload classifier end time for classification. - */ - @JsonProperty(value = "endTime") - private String endTime; - - /* - * The workload classifier importance. - */ - @JsonProperty(value = "importance") - private String importance; - - /** - * Get the memberName property: The workload classifier member name. - * - * @return the memberName value. - */ - public String memberName() { - return this.memberName; - } - - /** - * Set the memberName property: The workload classifier member name. - * - * @param memberName the memberName value to set. - * @return the WorkloadClassifierProperties object itself. - */ - public WorkloadClassifierProperties withMemberName(String memberName) { - this.memberName = memberName; - return this; - } - - /** - * Get the label property: The workload classifier label. - * - * @return the label value. - */ - public String label() { - return this.label; - } - - /** - * Set the label property: The workload classifier label. - * - * @param label the label value to set. - * @return the WorkloadClassifierProperties object itself. - */ - public WorkloadClassifierProperties withLabel(String label) { - this.label = label; - return this; - } - - /** - * Get the context property: The workload classifier context. - * - * @return the context value. - */ - public String context() { - return this.context; - } - - /** - * Set the context property: The workload classifier context. - * - * @param context the context value to set. - * @return the WorkloadClassifierProperties object itself. - */ - public WorkloadClassifierProperties withContext(String context) { - this.context = context; - return this; - } - - /** - * Get the startTime property: The workload classifier start time for classification. - * - * @return the startTime value. - */ - public String startTime() { - return this.startTime; - } - - /** - * Set the startTime property: The workload classifier start time for classification. - * - * @param startTime the startTime value to set. - * @return the WorkloadClassifierProperties object itself. - */ - public WorkloadClassifierProperties withStartTime(String startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the endTime property: The workload classifier end time for classification. - * - * @return the endTime value. - */ - public String endTime() { - return this.endTime; - } - - /** - * Set the endTime property: The workload classifier end time for classification. - * - * @param endTime the endTime value to set. - * @return the WorkloadClassifierProperties object itself. - */ - public WorkloadClassifierProperties withEndTime(String endTime) { - this.endTime = endTime; - return this; - } - - /** - * Get the importance property: The workload classifier importance. - * - * @return the importance value. - */ - public String importance() { - return this.importance; - } - - /** - * Set the importance property: The workload classifier importance. - * - * @param importance the importance value to set. - * @return the WorkloadClassifierProperties object itself. - */ - public WorkloadClassifierProperties withImportance(String importance) { - this.importance = importance; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (memberName() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property memberName in model WorkloadClassifierProperties")); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkloadGroupInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkloadGroupInner.java index 172b3da9a698c..899ef45caadbe 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkloadGroupInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkloadGroupInner.java @@ -5,30 +5,53 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Workload group operations for a sql pool. */ +@JsonFlatten @Fluent -public final class WorkloadGroupInner extends ProxyResource { +public class WorkloadGroupInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadGroupInner.class); /* - * Resource properties. + * The workload group minimum percentage resource. */ - @JsonProperty(value = "properties") - private WorkloadGroupProperties innerProperties; + @JsonProperty(value = "properties.minResourcePercent") + private Integer minResourcePercent; - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. + /* + * The workload group cap percentage resource. */ - private WorkloadGroupProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.maxResourcePercent") + private Integer maxResourcePercent; + + /* + * The workload group request minimum grant percentage. + */ + @JsonProperty(value = "properties.minResourcePercentPerRequest") + private Double minResourcePercentPerRequest; + + /* + * The workload group request maximum grant percentage. + */ + @JsonProperty(value = "properties.maxResourcePercentPerRequest") + private Double maxResourcePercentPerRequest; + + /* + * The workload group importance level. + */ + @JsonProperty(value = "properties.importance") + private String importance; + + /* + * The workload group query execution timeout. + */ + @JsonProperty(value = "properties.queryExecutionTimeout") + private Integer queryExecutionTimeout; /** * Get the minResourcePercent property: The workload group minimum percentage resource. @@ -36,7 +59,7 @@ private WorkloadGroupProperties innerProperties() { * @return the minResourcePercent value. */ public Integer minResourcePercent() { - return this.innerProperties() == null ? null : this.innerProperties().minResourcePercent(); + return this.minResourcePercent; } /** @@ -46,10 +69,7 @@ public Integer minResourcePercent() { * @return the WorkloadGroupInner object itself. */ public WorkloadGroupInner withMinResourcePercent(Integer minResourcePercent) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkloadGroupProperties(); - } - this.innerProperties().withMinResourcePercent(minResourcePercent); + this.minResourcePercent = minResourcePercent; return this; } @@ -59,7 +79,7 @@ public WorkloadGroupInner withMinResourcePercent(Integer minResourcePercent) { * @return the maxResourcePercent value. */ public Integer maxResourcePercent() { - return this.innerProperties() == null ? null : this.innerProperties().maxResourcePercent(); + return this.maxResourcePercent; } /** @@ -69,10 +89,7 @@ public Integer maxResourcePercent() { * @return the WorkloadGroupInner object itself. */ public WorkloadGroupInner withMaxResourcePercent(Integer maxResourcePercent) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkloadGroupProperties(); - } - this.innerProperties().withMaxResourcePercent(maxResourcePercent); + this.maxResourcePercent = maxResourcePercent; return this; } @@ -82,7 +99,7 @@ public WorkloadGroupInner withMaxResourcePercent(Integer maxResourcePercent) { * @return the minResourcePercentPerRequest value. */ public Double minResourcePercentPerRequest() { - return this.innerProperties() == null ? null : this.innerProperties().minResourcePercentPerRequest(); + return this.minResourcePercentPerRequest; } /** @@ -92,10 +109,7 @@ public Double minResourcePercentPerRequest() { * @return the WorkloadGroupInner object itself. */ public WorkloadGroupInner withMinResourcePercentPerRequest(Double minResourcePercentPerRequest) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkloadGroupProperties(); - } - this.innerProperties().withMinResourcePercentPerRequest(minResourcePercentPerRequest); + this.minResourcePercentPerRequest = minResourcePercentPerRequest; return this; } @@ -105,7 +119,7 @@ public WorkloadGroupInner withMinResourcePercentPerRequest(Double minResourcePer * @return the maxResourcePercentPerRequest value. */ public Double maxResourcePercentPerRequest() { - return this.innerProperties() == null ? null : this.innerProperties().maxResourcePercentPerRequest(); + return this.maxResourcePercentPerRequest; } /** @@ -115,10 +129,7 @@ public Double maxResourcePercentPerRequest() { * @return the WorkloadGroupInner object itself. */ public WorkloadGroupInner withMaxResourcePercentPerRequest(Double maxResourcePercentPerRequest) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkloadGroupProperties(); - } - this.innerProperties().withMaxResourcePercentPerRequest(maxResourcePercentPerRequest); + this.maxResourcePercentPerRequest = maxResourcePercentPerRequest; return this; } @@ -128,7 +139,7 @@ public WorkloadGroupInner withMaxResourcePercentPerRequest(Double maxResourcePer * @return the importance value. */ public String importance() { - return this.innerProperties() == null ? null : this.innerProperties().importance(); + return this.importance; } /** @@ -138,10 +149,7 @@ public String importance() { * @return the WorkloadGroupInner object itself. */ public WorkloadGroupInner withImportance(String importance) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkloadGroupProperties(); - } - this.innerProperties().withImportance(importance); + this.importance = importance; return this; } @@ -151,7 +159,7 @@ public WorkloadGroupInner withImportance(String importance) { * @return the queryExecutionTimeout value. */ public Integer queryExecutionTimeout() { - return this.innerProperties() == null ? null : this.innerProperties().queryExecutionTimeout(); + return this.queryExecutionTimeout; } /** @@ -161,10 +169,7 @@ public Integer queryExecutionTimeout() { * @return the WorkloadGroupInner object itself. */ public WorkloadGroupInner withQueryExecutionTimeout(Integer queryExecutionTimeout) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkloadGroupProperties(); - } - this.innerProperties().withQueryExecutionTimeout(queryExecutionTimeout); + this.queryExecutionTimeout = queryExecutionTimeout; return this; } @@ -174,8 +179,5 @@ public WorkloadGroupInner withQueryExecutionTimeout(Integer queryExecutionTimeou * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkloadGroupProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkloadGroupProperties.java deleted file mode 100644 index b33007c64b077..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkloadGroupProperties.java +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Workload group definition. For more information look at sys.workload_management_workload_groups (DMV). */ -@Fluent -public final class WorkloadGroupProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadGroupProperties.class); - - /* - * The workload group minimum percentage resource. - */ - @JsonProperty(value = "minResourcePercent", required = true) - private int minResourcePercent; - - /* - * The workload group cap percentage resource. - */ - @JsonProperty(value = "maxResourcePercent", required = true) - private int maxResourcePercent; - - /* - * The workload group request minimum grant percentage. - */ - @JsonProperty(value = "minResourcePercentPerRequest", required = true) - private double minResourcePercentPerRequest; - - /* - * The workload group request maximum grant percentage. - */ - @JsonProperty(value = "maxResourcePercentPerRequest") - private Double maxResourcePercentPerRequest; - - /* - * The workload group importance level. - */ - @JsonProperty(value = "importance") - private String importance; - - /* - * The workload group query execution timeout. - */ - @JsonProperty(value = "queryExecutionTimeout") - private Integer queryExecutionTimeout; - - /** - * Get the minResourcePercent property: The workload group minimum percentage resource. - * - * @return the minResourcePercent value. - */ - public int minResourcePercent() { - return this.minResourcePercent; - } - - /** - * Set the minResourcePercent property: The workload group minimum percentage resource. - * - * @param minResourcePercent the minResourcePercent value to set. - * @return the WorkloadGroupProperties object itself. - */ - public WorkloadGroupProperties withMinResourcePercent(int minResourcePercent) { - this.minResourcePercent = minResourcePercent; - return this; - } - - /** - * Get the maxResourcePercent property: The workload group cap percentage resource. - * - * @return the maxResourcePercent value. - */ - public int maxResourcePercent() { - return this.maxResourcePercent; - } - - /** - * Set the maxResourcePercent property: The workload group cap percentage resource. - * - * @param maxResourcePercent the maxResourcePercent value to set. - * @return the WorkloadGroupProperties object itself. - */ - public WorkloadGroupProperties withMaxResourcePercent(int maxResourcePercent) { - this.maxResourcePercent = maxResourcePercent; - return this; - } - - /** - * Get the minResourcePercentPerRequest property: The workload group request minimum grant percentage. - * - * @return the minResourcePercentPerRequest value. - */ - public double minResourcePercentPerRequest() { - return this.minResourcePercentPerRequest; - } - - /** - * Set the minResourcePercentPerRequest property: The workload group request minimum grant percentage. - * - * @param minResourcePercentPerRequest the minResourcePercentPerRequest value to set. - * @return the WorkloadGroupProperties object itself. - */ - public WorkloadGroupProperties withMinResourcePercentPerRequest(double minResourcePercentPerRequest) { - this.minResourcePercentPerRequest = minResourcePercentPerRequest; - return this; - } - - /** - * Get the maxResourcePercentPerRequest property: The workload group request maximum grant percentage. - * - * @return the maxResourcePercentPerRequest value. - */ - public Double maxResourcePercentPerRequest() { - return this.maxResourcePercentPerRequest; - } - - /** - * Set the maxResourcePercentPerRequest property: The workload group request maximum grant percentage. - * - * @param maxResourcePercentPerRequest the maxResourcePercentPerRequest value to set. - * @return the WorkloadGroupProperties object itself. - */ - public WorkloadGroupProperties withMaxResourcePercentPerRequest(Double maxResourcePercentPerRequest) { - this.maxResourcePercentPerRequest = maxResourcePercentPerRequest; - return this; - } - - /** - * Get the importance property: The workload group importance level. - * - * @return the importance value. - */ - public String importance() { - return this.importance; - } - - /** - * Set the importance property: The workload group importance level. - * - * @param importance the importance value to set. - * @return the WorkloadGroupProperties object itself. - */ - public WorkloadGroupProperties withImportance(String importance) { - this.importance = importance; - return this; - } - - /** - * Get the queryExecutionTimeout property: The workload group query execution timeout. - * - * @return the queryExecutionTimeout value. - */ - public Integer queryExecutionTimeout() { - return this.queryExecutionTimeout; - } - - /** - * Set the queryExecutionTimeout property: The workload group query execution timeout. - * - * @param queryExecutionTimeout the queryExecutionTimeout value to set. - * @return the WorkloadGroupProperties object itself. - */ - public WorkloadGroupProperties withQueryExecutionTimeout(Integer queryExecutionTimeout) { - this.queryExecutionTimeout = queryExecutionTimeout; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspaceAadAdminInfoInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspaceAadAdminInfoInner.java index 286e33c0e6b9e..ed2aeb0afebe3 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspaceAadAdminInfoInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspaceAadAdminInfoInner.java @@ -5,30 +5,41 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Workspace active directory administrator. */ +@JsonFlatten @Fluent -public final class WorkspaceAadAdminInfoInner extends ProxyResource { +public class WorkspaceAadAdminInfoInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkspaceAadAdminInfoInner.class); /* - * Workspace active directory administrator properties + * Tenant ID of the workspace active directory administrator */ - @JsonProperty(value = "properties") - private AadAdminProperties innerProperties; + @JsonProperty(value = "properties.tenantId") + private String tenantId; - /** - * Get the innerProperties property: Workspace active directory administrator properties. - * - * @return the innerProperties value. + /* + * Login of the workspace active directory administrator */ - private AadAdminProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.login") + private String login; + + /* + * Workspace active directory administrator type + */ + @JsonProperty(value = "properties.administratorType") + private String administratorType; + + /* + * Object ID of the workspace active directory administrator + */ + @JsonProperty(value = "properties.sid") + private String sid; /** * Get the tenantId property: Tenant ID of the workspace active directory administrator. @@ -36,7 +47,7 @@ private AadAdminProperties innerProperties() { * @return the tenantId value. */ public String tenantId() { - return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + return this.tenantId; } /** @@ -46,10 +57,7 @@ public String tenantId() { * @return the WorkspaceAadAdminInfoInner object itself. */ public WorkspaceAadAdminInfoInner withTenantId(String tenantId) { - if (this.innerProperties() == null) { - this.innerProperties = new AadAdminProperties(); - } - this.innerProperties().withTenantId(tenantId); + this.tenantId = tenantId; return this; } @@ -59,7 +67,7 @@ public WorkspaceAadAdminInfoInner withTenantId(String tenantId) { * @return the login value. */ public String login() { - return this.innerProperties() == null ? null : this.innerProperties().login(); + return this.login; } /** @@ -69,10 +77,7 @@ public String login() { * @return the WorkspaceAadAdminInfoInner object itself. */ public WorkspaceAadAdminInfoInner withLogin(String login) { - if (this.innerProperties() == null) { - this.innerProperties = new AadAdminProperties(); - } - this.innerProperties().withLogin(login); + this.login = login; return this; } @@ -82,7 +87,7 @@ public WorkspaceAadAdminInfoInner withLogin(String login) { * @return the administratorType value. */ public String administratorType() { - return this.innerProperties() == null ? null : this.innerProperties().administratorType(); + return this.administratorType; } /** @@ -92,10 +97,7 @@ public String administratorType() { * @return the WorkspaceAadAdminInfoInner object itself. */ public WorkspaceAadAdminInfoInner withAdministratorType(String administratorType) { - if (this.innerProperties() == null) { - this.innerProperties = new AadAdminProperties(); - } - this.innerProperties().withAdministratorType(administratorType); + this.administratorType = administratorType; return this; } @@ -105,7 +107,7 @@ public WorkspaceAadAdminInfoInner withAdministratorType(String administratorType * @return the sid value. */ public String sid() { - return this.innerProperties() == null ? null : this.innerProperties().sid(); + return this.sid; } /** @@ -115,10 +117,7 @@ public String sid() { * @return the WorkspaceAadAdminInfoInner object itself. */ public WorkspaceAadAdminInfoInner withSid(String sid) { - if (this.innerProperties() == null) { - this.innerProperties = new AadAdminProperties(); - } - this.innerProperties().withSid(sid); + this.sid = sid; return this; } @@ -128,8 +127,5 @@ public WorkspaceAadAdminInfoInner withSid(String sid) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspaceInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspaceInner.java index 6289827dc95bd..2d1a3d857d8f0 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspaceInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspaceInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.CspWorkspaceAdminProperties; @@ -17,36 +18,151 @@ import com.azure.resourcemanager.synapse.models.WorkspacePublicNetworkAccess; import com.azure.resourcemanager.synapse.models.WorkspaceRepositoryConfiguration; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; import java.util.UUID; /** A workspace. */ +@JsonFlatten @Fluent -public final class WorkspaceInner extends Resource { +public class WorkspaceInner extends Resource { @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkspaceInner.class); - /* - * Workspace resource properties - */ - @JsonProperty(value = "properties") - private WorkspaceProperties innerProperties; - /* * Identity of the workspace */ @JsonProperty(value = "identity") private ManagedIdentity identity; - /** - * Get the innerProperties property: Workspace resource properties. - * - * @return the innerProperties value. + /* + * Workspace default data lake storage account details */ - private WorkspaceProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.defaultDataLakeStorage") + private DataLakeStorageAccountDetails defaultDataLakeStorage; + + /* + * SQL administrator login password + */ + @JsonProperty(value = "properties.sqlAdministratorLoginPassword") + private String sqlAdministratorLoginPassword; + + /* + * Workspace managed resource group. The resource group name uniquely + * identifies the resource group within the user subscriptionId. The + * resource group name must be no longer than 90 characters long, and must + * be alphanumeric characters (Char.IsLetterOrDigit()) and '-', '_', '(', + * ')' and'.'. Note that the name cannot end with '.' + */ + @JsonProperty(value = "properties.managedResourceGroupName") + private String managedResourceGroupName; + + /* + * Resource provisioning state + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * Login for workspace SQL active directory administrator + */ + @JsonProperty(value = "properties.sqlAdministratorLogin") + private String sqlAdministratorLogin; + + /* + * Virtual Network profile + */ + @JsonProperty(value = "properties.virtualNetworkProfile") + private VirtualNetworkProfile virtualNetworkProfile; + + /* + * Connectivity endpoints + */ + @JsonProperty(value = "properties.connectivityEndpoints") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map connectivityEndpoints; + + /* + * Setting this to 'default' will ensure that all compute for this + * workspace is in a virtual network managed on behalf of the user. + */ + @JsonProperty(value = "properties.managedVirtualNetwork") + private String managedVirtualNetwork; + + /* + * Private endpoint connections to the workspace + */ + @JsonProperty(value = "properties.privateEndpointConnections") + private List privateEndpointConnections; + + /* + * The encryption details of the workspace + */ + @JsonProperty(value = "properties.encryption") + private EncryptionDetails encryption; + + /* + * The workspace unique identifier + */ + @JsonProperty(value = "properties.workspaceUID", access = JsonProperty.Access.WRITE_ONLY) + private UUID workspaceUid; + + /* + * Workspace level configs and feature flags + */ + @JsonProperty(value = "properties.extraProperties", access = JsonProperty.Access.WRITE_ONLY) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map extraProperties; + + /* + * Managed Virtual Network Settings + */ + @JsonProperty(value = "properties.managedVirtualNetworkSettings") + private ManagedVirtualNetworkSettings managedVirtualNetworkSettings; + + /* + * Git integration settings + */ + @JsonProperty(value = "properties.workspaceRepositoryConfiguration") + private WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration; + + /* + * Purview Configuration + */ + @JsonProperty(value = "properties.purviewConfiguration") + private PurviewConfiguration purviewConfiguration; + + /* + * The ADLA resource ID. + */ + @JsonProperty(value = "properties.adlaResourceId", access = JsonProperty.Access.WRITE_ONLY) + private String adlaResourceId; + + /* + * Enable or Disable public network access to workspace + */ + @JsonProperty(value = "properties.publicNetworkAccess") + private WorkspacePublicNetworkAccess publicNetworkAccess; + + /* + * Initial workspace AAD admin properties for a CSP subscription + */ + @JsonProperty(value = "properties.cspWorkspaceAdminProperties") + private CspWorkspaceAdminProperties cspWorkspaceAdminProperties; + + /* + * Workspace settings + */ + @JsonProperty(value = "properties.settings", access = JsonProperty.Access.WRITE_ONLY) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map settings; + + /* + * Enable or Disable AzureADOnlyAuthentication on All Workspace subresource + */ + @JsonProperty(value = "properties.azureADOnlyAuthentication") + private Boolean azureADOnlyAuthentication; /** * Get the identity property: Identity of the workspace. @@ -68,27 +184,13 @@ public WorkspaceInner withIdentity(ManagedIdentity identity) { return this; } - /** {@inheritDoc} */ - @Override - public WorkspaceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public WorkspaceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * Get the defaultDataLakeStorage property: Workspace default data lake storage account details. * * @return the defaultDataLakeStorage value. */ public DataLakeStorageAccountDetails defaultDataLakeStorage() { - return this.innerProperties() == null ? null : this.innerProperties().defaultDataLakeStorage(); + return this.defaultDataLakeStorage; } /** @@ -98,10 +200,7 @@ public DataLakeStorageAccountDetails defaultDataLakeStorage() { * @return the WorkspaceInner object itself. */ public WorkspaceInner withDefaultDataLakeStorage(DataLakeStorageAccountDetails defaultDataLakeStorage) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceProperties(); - } - this.innerProperties().withDefaultDataLakeStorage(defaultDataLakeStorage); + this.defaultDataLakeStorage = defaultDataLakeStorage; return this; } @@ -111,7 +210,7 @@ public WorkspaceInner withDefaultDataLakeStorage(DataLakeStorageAccountDetails d * @return the sqlAdministratorLoginPassword value. */ public String sqlAdministratorLoginPassword() { - return this.innerProperties() == null ? null : this.innerProperties().sqlAdministratorLoginPassword(); + return this.sqlAdministratorLoginPassword; } /** @@ -121,10 +220,7 @@ public String sqlAdministratorLoginPassword() { * @return the WorkspaceInner object itself. */ public WorkspaceInner withSqlAdministratorLoginPassword(String sqlAdministratorLoginPassword) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceProperties(); - } - this.innerProperties().withSqlAdministratorLoginPassword(sqlAdministratorLoginPassword); + this.sqlAdministratorLoginPassword = sqlAdministratorLoginPassword; return this; } @@ -137,7 +233,7 @@ public WorkspaceInner withSqlAdministratorLoginPassword(String sqlAdministratorL * @return the managedResourceGroupName value. */ public String managedResourceGroupName() { - return this.innerProperties() == null ? null : this.innerProperties().managedResourceGroupName(); + return this.managedResourceGroupName; } /** @@ -150,10 +246,7 @@ public String managedResourceGroupName() { * @return the WorkspaceInner object itself. */ public WorkspaceInner withManagedResourceGroupName(String managedResourceGroupName) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceProperties(); - } - this.innerProperties().withManagedResourceGroupName(managedResourceGroupName); + this.managedResourceGroupName = managedResourceGroupName; return this; } @@ -163,7 +256,7 @@ public WorkspaceInner withManagedResourceGroupName(String managedResourceGroupNa * @return the provisioningState value. */ public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + return this.provisioningState; } /** @@ -172,7 +265,7 @@ public String provisioningState() { * @return the sqlAdministratorLogin value. */ public String sqlAdministratorLogin() { - return this.innerProperties() == null ? null : this.innerProperties().sqlAdministratorLogin(); + return this.sqlAdministratorLogin; } /** @@ -182,10 +275,7 @@ public String sqlAdministratorLogin() { * @return the WorkspaceInner object itself. */ public WorkspaceInner withSqlAdministratorLogin(String sqlAdministratorLogin) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceProperties(); - } - this.innerProperties().withSqlAdministratorLogin(sqlAdministratorLogin); + this.sqlAdministratorLogin = sqlAdministratorLogin; return this; } @@ -195,7 +285,7 @@ public WorkspaceInner withSqlAdministratorLogin(String sqlAdministratorLogin) { * @return the virtualNetworkProfile value. */ public VirtualNetworkProfile virtualNetworkProfile() { - return this.innerProperties() == null ? null : this.innerProperties().virtualNetworkProfile(); + return this.virtualNetworkProfile; } /** @@ -205,10 +295,7 @@ public VirtualNetworkProfile virtualNetworkProfile() { * @return the WorkspaceInner object itself. */ public WorkspaceInner withVirtualNetworkProfile(VirtualNetworkProfile virtualNetworkProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceProperties(); - } - this.innerProperties().withVirtualNetworkProfile(virtualNetworkProfile); + this.virtualNetworkProfile = virtualNetworkProfile; return this; } @@ -218,7 +305,7 @@ public WorkspaceInner withVirtualNetworkProfile(VirtualNetworkProfile virtualNet * @return the connectivityEndpoints value. */ public Map connectivityEndpoints() { - return this.innerProperties() == null ? null : this.innerProperties().connectivityEndpoints(); + return this.connectivityEndpoints; } /** @@ -228,10 +315,7 @@ public Map connectivityEndpoints() { * @return the WorkspaceInner object itself. */ public WorkspaceInner withConnectivityEndpoints(Map connectivityEndpoints) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceProperties(); - } - this.innerProperties().withConnectivityEndpoints(connectivityEndpoints); + this.connectivityEndpoints = connectivityEndpoints; return this; } @@ -242,7 +326,7 @@ public WorkspaceInner withConnectivityEndpoints(Map connectivity * @return the managedVirtualNetwork value. */ public String managedVirtualNetwork() { - return this.innerProperties() == null ? null : this.innerProperties().managedVirtualNetwork(); + return this.managedVirtualNetwork; } /** @@ -253,10 +337,7 @@ public String managedVirtualNetwork() { * @return the WorkspaceInner object itself. */ public WorkspaceInner withManagedVirtualNetwork(String managedVirtualNetwork) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceProperties(); - } - this.innerProperties().withManagedVirtualNetwork(managedVirtualNetwork); + this.managedVirtualNetwork = managedVirtualNetwork; return this; } @@ -266,7 +347,7 @@ public WorkspaceInner withManagedVirtualNetwork(String managedVirtualNetwork) { * @return the privateEndpointConnections value. */ public List privateEndpointConnections() { - return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections(); + return this.privateEndpointConnections; } /** @@ -277,10 +358,7 @@ public List privateEndpointConnections() { */ public WorkspaceInner withPrivateEndpointConnections( List privateEndpointConnections) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceProperties(); - } - this.innerProperties().withPrivateEndpointConnections(privateEndpointConnections); + this.privateEndpointConnections = privateEndpointConnections; return this; } @@ -290,7 +368,7 @@ public WorkspaceInner withPrivateEndpointConnections( * @return the encryption value. */ public EncryptionDetails encryption() { - return this.innerProperties() == null ? null : this.innerProperties().encryption(); + return this.encryption; } /** @@ -300,10 +378,7 @@ public EncryptionDetails encryption() { * @return the WorkspaceInner object itself. */ public WorkspaceInner withEncryption(EncryptionDetails encryption) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceProperties(); - } - this.innerProperties().withEncryption(encryption); + this.encryption = encryption; return this; } @@ -313,7 +388,7 @@ public WorkspaceInner withEncryption(EncryptionDetails encryption) { * @return the workspaceUid value. */ public UUID workspaceUid() { - return this.innerProperties() == null ? null : this.innerProperties().workspaceUid(); + return this.workspaceUid; } /** @@ -322,7 +397,7 @@ public UUID workspaceUid() { * @return the extraProperties value. */ public Map extraProperties() { - return this.innerProperties() == null ? null : this.innerProperties().extraProperties(); + return this.extraProperties; } /** @@ -331,7 +406,7 @@ public Map extraProperties() { * @return the managedVirtualNetworkSettings value. */ public ManagedVirtualNetworkSettings managedVirtualNetworkSettings() { - return this.innerProperties() == null ? null : this.innerProperties().managedVirtualNetworkSettings(); + return this.managedVirtualNetworkSettings; } /** @@ -342,10 +417,7 @@ public ManagedVirtualNetworkSettings managedVirtualNetworkSettings() { */ public WorkspaceInner withManagedVirtualNetworkSettings( ManagedVirtualNetworkSettings managedVirtualNetworkSettings) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceProperties(); - } - this.innerProperties().withManagedVirtualNetworkSettings(managedVirtualNetworkSettings); + this.managedVirtualNetworkSettings = managedVirtualNetworkSettings; return this; } @@ -355,7 +427,7 @@ public WorkspaceInner withManagedVirtualNetworkSettings( * @return the workspaceRepositoryConfiguration value. */ public WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().workspaceRepositoryConfiguration(); + return this.workspaceRepositoryConfiguration; } /** @@ -366,10 +438,7 @@ public WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration() { */ public WorkspaceInner withWorkspaceRepositoryConfiguration( WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceProperties(); - } - this.innerProperties().withWorkspaceRepositoryConfiguration(workspaceRepositoryConfiguration); + this.workspaceRepositoryConfiguration = workspaceRepositoryConfiguration; return this; } @@ -379,7 +448,7 @@ public WorkspaceInner withWorkspaceRepositoryConfiguration( * @return the purviewConfiguration value. */ public PurviewConfiguration purviewConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().purviewConfiguration(); + return this.purviewConfiguration; } /** @@ -389,10 +458,7 @@ public PurviewConfiguration purviewConfiguration() { * @return the WorkspaceInner object itself. */ public WorkspaceInner withPurviewConfiguration(PurviewConfiguration purviewConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceProperties(); - } - this.innerProperties().withPurviewConfiguration(purviewConfiguration); + this.purviewConfiguration = purviewConfiguration; return this; } @@ -402,7 +468,7 @@ public WorkspaceInner withPurviewConfiguration(PurviewConfiguration purviewConfi * @return the adlaResourceId value. */ public String adlaResourceId() { - return this.innerProperties() == null ? null : this.innerProperties().adlaResourceId(); + return this.adlaResourceId; } /** @@ -411,7 +477,7 @@ public String adlaResourceId() { * @return the publicNetworkAccess value. */ public WorkspacePublicNetworkAccess publicNetworkAccess() { - return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); + return this.publicNetworkAccess; } /** @@ -421,10 +487,7 @@ public WorkspacePublicNetworkAccess publicNetworkAccess() { * @return the WorkspaceInner object itself. */ public WorkspaceInner withPublicNetworkAccess(WorkspacePublicNetworkAccess publicNetworkAccess) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceProperties(); - } - this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); + this.publicNetworkAccess = publicNetworkAccess; return this; } @@ -434,7 +497,7 @@ public WorkspaceInner withPublicNetworkAccess(WorkspacePublicNetworkAccess publi * @return the cspWorkspaceAdminProperties value. */ public CspWorkspaceAdminProperties cspWorkspaceAdminProperties() { - return this.innerProperties() == null ? null : this.innerProperties().cspWorkspaceAdminProperties(); + return this.cspWorkspaceAdminProperties; } /** @@ -444,10 +507,7 @@ public CspWorkspaceAdminProperties cspWorkspaceAdminProperties() { * @return the WorkspaceInner object itself. */ public WorkspaceInner withCspWorkspaceAdminProperties(CspWorkspaceAdminProperties cspWorkspaceAdminProperties) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceProperties(); - } - this.innerProperties().withCspWorkspaceAdminProperties(cspWorkspaceAdminProperties); + this.cspWorkspaceAdminProperties = cspWorkspaceAdminProperties; return this; } @@ -457,7 +517,7 @@ public WorkspaceInner withCspWorkspaceAdminProperties(CspWorkspaceAdminPropertie * @return the settings value. */ public Map settings() { - return this.innerProperties() == null ? null : this.innerProperties().settings(); + return this.settings; } /** @@ -467,7 +527,7 @@ public Map settings() { * @return the azureADOnlyAuthentication value. */ public Boolean azureADOnlyAuthentication() { - return this.innerProperties() == null ? null : this.innerProperties().azureADOnlyAuthentication(); + return this.azureADOnlyAuthentication; } /** @@ -478,10 +538,21 @@ public Boolean azureADOnlyAuthentication() { * @return the WorkspaceInner object itself. */ public WorkspaceInner withAzureADOnlyAuthentication(Boolean azureADOnlyAuthentication) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceProperties(); - } - this.innerProperties().withAzureADOnlyAuthentication(azureADOnlyAuthentication); + this.azureADOnlyAuthentication = azureADOnlyAuthentication; + return this; + } + + /** {@inheritDoc} */ + @Override + public WorkspaceInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public WorkspaceInner withTags(Map tags) { + super.withTags(tags); return this; } @@ -491,11 +562,32 @@ public WorkspaceInner withAzureADOnlyAuthentication(Boolean azureADOnlyAuthentic * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } if (identity() != null) { identity().validate(); } + if (defaultDataLakeStorage() != null) { + defaultDataLakeStorage().validate(); + } + if (virtualNetworkProfile() != null) { + virtualNetworkProfile().validate(); + } + if (privateEndpointConnections() != null) { + privateEndpointConnections().forEach(e -> e.validate()); + } + if (encryption() != null) { + encryption().validate(); + } + if (managedVirtualNetworkSettings() != null) { + managedVirtualNetworkSettings().validate(); + } + if (workspaceRepositoryConfiguration() != null) { + workspaceRepositoryConfiguration().validate(); + } + if (purviewConfiguration() != null) { + purviewConfiguration().validate(); + } + if (cspWorkspaceAdminProperties() != null) { + cspWorkspaceAdminProperties().validate(); + } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspacePatchProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspacePatchProperties.java deleted file mode 100644 index 382b407743eff..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspacePatchProperties.java +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.EncryptionDetails; -import com.azure.resourcemanager.synapse.models.ManagedVirtualNetworkSettings; -import com.azure.resourcemanager.synapse.models.PurviewConfiguration; -import com.azure.resourcemanager.synapse.models.WorkspacePublicNetworkAccess; -import com.azure.resourcemanager.synapse.models.WorkspaceRepositoryConfiguration; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Workspace patch properties. */ -@Fluent -public final class WorkspacePatchProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkspacePatchProperties.class); - - /* - * SQL administrator login password - */ - @JsonProperty(value = "sqlAdministratorLoginPassword") - private String sqlAdministratorLoginPassword; - - /* - * Managed Virtual Network Settings - */ - @JsonProperty(value = "managedVirtualNetworkSettings") - private ManagedVirtualNetworkSettings managedVirtualNetworkSettings; - - /* - * Git integration settings - */ - @JsonProperty(value = "workspaceRepositoryConfiguration") - private WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration; - - /* - * Purview Configuration - */ - @JsonProperty(value = "purviewConfiguration") - private PurviewConfiguration purviewConfiguration; - - /* - * Resource provisioning state - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /* - * The encryption details of the workspace - */ - @JsonProperty(value = "encryption") - private EncryptionDetails encryption; - - /* - * Enable or Disable public network access to workspace - */ - @JsonProperty(value = "publicNetworkAccess") - private WorkspacePublicNetworkAccess publicNetworkAccess; - - /** - * Get the sqlAdministratorLoginPassword property: SQL administrator login password. - * - * @return the sqlAdministratorLoginPassword value. - */ - public String sqlAdministratorLoginPassword() { - return this.sqlAdministratorLoginPassword; - } - - /** - * Set the sqlAdministratorLoginPassword property: SQL administrator login password. - * - * @param sqlAdministratorLoginPassword the sqlAdministratorLoginPassword value to set. - * @return the WorkspacePatchProperties object itself. - */ - public WorkspacePatchProperties withSqlAdministratorLoginPassword(String sqlAdministratorLoginPassword) { - this.sqlAdministratorLoginPassword = sqlAdministratorLoginPassword; - return this; - } - - /** - * Get the managedVirtualNetworkSettings property: Managed Virtual Network Settings. - * - * @return the managedVirtualNetworkSettings value. - */ - public ManagedVirtualNetworkSettings managedVirtualNetworkSettings() { - return this.managedVirtualNetworkSettings; - } - - /** - * Set the managedVirtualNetworkSettings property: Managed Virtual Network Settings. - * - * @param managedVirtualNetworkSettings the managedVirtualNetworkSettings value to set. - * @return the WorkspacePatchProperties object itself. - */ - public WorkspacePatchProperties withManagedVirtualNetworkSettings( - ManagedVirtualNetworkSettings managedVirtualNetworkSettings) { - this.managedVirtualNetworkSettings = managedVirtualNetworkSettings; - return this; - } - - /** - * Get the workspaceRepositoryConfiguration property: Git integration settings. - * - * @return the workspaceRepositoryConfiguration value. - */ - public WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration() { - return this.workspaceRepositoryConfiguration; - } - - /** - * Set the workspaceRepositoryConfiguration property: Git integration settings. - * - * @param workspaceRepositoryConfiguration the workspaceRepositoryConfiguration value to set. - * @return the WorkspacePatchProperties object itself. - */ - public WorkspacePatchProperties withWorkspaceRepositoryConfiguration( - WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration) { - this.workspaceRepositoryConfiguration = workspaceRepositoryConfiguration; - return this; - } - - /** - * Get the purviewConfiguration property: Purview Configuration. - * - * @return the purviewConfiguration value. - */ - public PurviewConfiguration purviewConfiguration() { - return this.purviewConfiguration; - } - - /** - * Set the purviewConfiguration property: Purview Configuration. - * - * @param purviewConfiguration the purviewConfiguration value to set. - * @return the WorkspacePatchProperties object itself. - */ - public WorkspacePatchProperties withPurviewConfiguration(PurviewConfiguration purviewConfiguration) { - this.purviewConfiguration = purviewConfiguration; - return this; - } - - /** - * Get the provisioningState property: Resource provisioning state. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the encryption property: The encryption details of the workspace. - * - * @return the encryption value. - */ - public EncryptionDetails encryption() { - return this.encryption; - } - - /** - * Set the encryption property: The encryption details of the workspace. - * - * @param encryption the encryption value to set. - * @return the WorkspacePatchProperties object itself. - */ - public WorkspacePatchProperties withEncryption(EncryptionDetails encryption) { - this.encryption = encryption; - return this; - } - - /** - * Get the publicNetworkAccess property: Enable or Disable public network access to workspace. - * - * @return the publicNetworkAccess value. - */ - public WorkspacePublicNetworkAccess publicNetworkAccess() { - return this.publicNetworkAccess; - } - - /** - * Set the publicNetworkAccess property: Enable or Disable public network access to workspace. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the WorkspacePatchProperties object itself. - */ - public WorkspacePatchProperties withPublicNetworkAccess(WorkspacePublicNetworkAccess publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (managedVirtualNetworkSettings() != null) { - managedVirtualNetworkSettings().validate(); - } - if (workspaceRepositoryConfiguration() != null) { - workspaceRepositoryConfiguration().validate(); - } - if (purviewConfiguration() != null) { - purviewConfiguration().validate(); - } - if (encryption() != null) { - encryption().validate(); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspaceProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspaceProperties.java deleted file mode 100644 index fa4db79f686b8..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspaceProperties.java +++ /dev/null @@ -1,547 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.CspWorkspaceAdminProperties; -import com.azure.resourcemanager.synapse.models.DataLakeStorageAccountDetails; -import com.azure.resourcemanager.synapse.models.EncryptionDetails; -import com.azure.resourcemanager.synapse.models.ManagedVirtualNetworkSettings; -import com.azure.resourcemanager.synapse.models.PurviewConfiguration; -import com.azure.resourcemanager.synapse.models.VirtualNetworkProfile; -import com.azure.resourcemanager.synapse.models.WorkspacePublicNetworkAccess; -import com.azure.resourcemanager.synapse.models.WorkspaceRepositoryConfiguration; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; -import java.util.UUID; - -/** Workspace properties. */ -@Fluent -public final class WorkspaceProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkspaceProperties.class); - - /* - * Workspace default data lake storage account details - */ - @JsonProperty(value = "defaultDataLakeStorage") - private DataLakeStorageAccountDetails defaultDataLakeStorage; - - /* - * SQL administrator login password - */ - @JsonProperty(value = "sqlAdministratorLoginPassword") - private String sqlAdministratorLoginPassword; - - /* - * Workspace managed resource group. The resource group name uniquely - * identifies the resource group within the user subscriptionId. The - * resource group name must be no longer than 90 characters long, and must - * be alphanumeric characters (Char.IsLetterOrDigit()) and '-', '_', '(', - * ')' and'.'. Note that the name cannot end with '.' - */ - @JsonProperty(value = "managedResourceGroupName") - private String managedResourceGroupName; - - /* - * Resource provisioning state - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /* - * Login for workspace SQL active directory administrator - */ - @JsonProperty(value = "sqlAdministratorLogin") - private String sqlAdministratorLogin; - - /* - * Virtual Network profile - */ - @JsonProperty(value = "virtualNetworkProfile") - private VirtualNetworkProfile virtualNetworkProfile; - - /* - * Connectivity endpoints - */ - @JsonProperty(value = "connectivityEndpoints") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map connectivityEndpoints; - - /* - * Setting this to 'default' will ensure that all compute for this - * workspace is in a virtual network managed on behalf of the user. - */ - @JsonProperty(value = "managedVirtualNetwork") - private String managedVirtualNetwork; - - /* - * Private endpoint connections to the workspace - */ - @JsonProperty(value = "privateEndpointConnections") - private List privateEndpointConnections; - - /* - * The encryption details of the workspace - */ - @JsonProperty(value = "encryption") - private EncryptionDetails encryption; - - /* - * The workspace unique identifier - */ - @JsonProperty(value = "workspaceUID", access = JsonProperty.Access.WRITE_ONLY) - private UUID workspaceUid; - - /* - * Workspace level configs and feature flags - */ - @JsonProperty(value = "extraProperties", access = JsonProperty.Access.WRITE_ONLY) - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map extraProperties; - - /* - * Managed Virtual Network Settings - */ - @JsonProperty(value = "managedVirtualNetworkSettings") - private ManagedVirtualNetworkSettings managedVirtualNetworkSettings; - - /* - * Git integration settings - */ - @JsonProperty(value = "workspaceRepositoryConfiguration") - private WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration; - - /* - * Purview Configuration - */ - @JsonProperty(value = "purviewConfiguration") - private PurviewConfiguration purviewConfiguration; - - /* - * The ADLA resource ID. - */ - @JsonProperty(value = "adlaResourceId", access = JsonProperty.Access.WRITE_ONLY) - private String adlaResourceId; - - /* - * Enable or Disable public network access to workspace - */ - @JsonProperty(value = "publicNetworkAccess") - private WorkspacePublicNetworkAccess publicNetworkAccess; - - /* - * Initial workspace AAD admin properties for a CSP subscription - */ - @JsonProperty(value = "cspWorkspaceAdminProperties") - private CspWorkspaceAdminProperties cspWorkspaceAdminProperties; - - /* - * Workspace settings - */ - @JsonProperty(value = "settings", access = JsonProperty.Access.WRITE_ONLY) - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map settings; - - /* - * Enable or Disable AzureADOnlyAuthentication on All Workspace subresource - */ - @JsonProperty(value = "azureADOnlyAuthentication") - private Boolean azureADOnlyAuthentication; - - /** - * Get the defaultDataLakeStorage property: Workspace default data lake storage account details. - * - * @return the defaultDataLakeStorage value. - */ - public DataLakeStorageAccountDetails defaultDataLakeStorage() { - return this.defaultDataLakeStorage; - } - - /** - * Set the defaultDataLakeStorage property: Workspace default data lake storage account details. - * - * @param defaultDataLakeStorage the defaultDataLakeStorage value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withDefaultDataLakeStorage(DataLakeStorageAccountDetails defaultDataLakeStorage) { - this.defaultDataLakeStorage = defaultDataLakeStorage; - return this; - } - - /** - * Get the sqlAdministratorLoginPassword property: SQL administrator login password. - * - * @return the sqlAdministratorLoginPassword value. - */ - public String sqlAdministratorLoginPassword() { - return this.sqlAdministratorLoginPassword; - } - - /** - * Set the sqlAdministratorLoginPassword property: SQL administrator login password. - * - * @param sqlAdministratorLoginPassword the sqlAdministratorLoginPassword value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withSqlAdministratorLoginPassword(String sqlAdministratorLoginPassword) { - this.sqlAdministratorLoginPassword = sqlAdministratorLoginPassword; - return this; - } - - /** - * Get the managedResourceGroupName property: Workspace managed resource group. The resource group name uniquely - * identifies the resource group within the user subscriptionId. The resource group name must be no longer than 90 - * characters long, and must be alphanumeric characters (Char.IsLetterOrDigit()) and '-', '_', '(', ')' and'.'. Note - * that the name cannot end with '.'. - * - * @return the managedResourceGroupName value. - */ - public String managedResourceGroupName() { - return this.managedResourceGroupName; - } - - /** - * Set the managedResourceGroupName property: Workspace managed resource group. The resource group name uniquely - * identifies the resource group within the user subscriptionId. The resource group name must be no longer than 90 - * characters long, and must be alphanumeric characters (Char.IsLetterOrDigit()) and '-', '_', '(', ')' and'.'. Note - * that the name cannot end with '.'. - * - * @param managedResourceGroupName the managedResourceGroupName value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withManagedResourceGroupName(String managedResourceGroupName) { - this.managedResourceGroupName = managedResourceGroupName; - return this; - } - - /** - * Get the provisioningState property: Resource provisioning state. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the sqlAdministratorLogin property: Login for workspace SQL active directory administrator. - * - * @return the sqlAdministratorLogin value. - */ - public String sqlAdministratorLogin() { - return this.sqlAdministratorLogin; - } - - /** - * Set the sqlAdministratorLogin property: Login for workspace SQL active directory administrator. - * - * @param sqlAdministratorLogin the sqlAdministratorLogin value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withSqlAdministratorLogin(String sqlAdministratorLogin) { - this.sqlAdministratorLogin = sqlAdministratorLogin; - return this; - } - - /** - * Get the virtualNetworkProfile property: Virtual Network profile. - * - * @return the virtualNetworkProfile value. - */ - public VirtualNetworkProfile virtualNetworkProfile() { - return this.virtualNetworkProfile; - } - - /** - * Set the virtualNetworkProfile property: Virtual Network profile. - * - * @param virtualNetworkProfile the virtualNetworkProfile value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withVirtualNetworkProfile(VirtualNetworkProfile virtualNetworkProfile) { - this.virtualNetworkProfile = virtualNetworkProfile; - return this; - } - - /** - * Get the connectivityEndpoints property: Connectivity endpoints. - * - * @return the connectivityEndpoints value. - */ - public Map connectivityEndpoints() { - return this.connectivityEndpoints; - } - - /** - * Set the connectivityEndpoints property: Connectivity endpoints. - * - * @param connectivityEndpoints the connectivityEndpoints value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withConnectivityEndpoints(Map connectivityEndpoints) { - this.connectivityEndpoints = connectivityEndpoints; - return this; - } - - /** - * Get the managedVirtualNetwork property: Setting this to 'default' will ensure that all compute for this workspace - * is in a virtual network managed on behalf of the user. - * - * @return the managedVirtualNetwork value. - */ - public String managedVirtualNetwork() { - return this.managedVirtualNetwork; - } - - /** - * Set the managedVirtualNetwork property: Setting this to 'default' will ensure that all compute for this workspace - * is in a virtual network managed on behalf of the user. - * - * @param managedVirtualNetwork the managedVirtualNetwork value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withManagedVirtualNetwork(String managedVirtualNetwork) { - this.managedVirtualNetwork = managedVirtualNetwork; - return this; - } - - /** - * Get the privateEndpointConnections property: Private endpoint connections to the workspace. - * - * @return the privateEndpointConnections value. - */ - public List privateEndpointConnections() { - return this.privateEndpointConnections; - } - - /** - * Set the privateEndpointConnections property: Private endpoint connections to the workspace. - * - * @param privateEndpointConnections the privateEndpointConnections value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withPrivateEndpointConnections( - List privateEndpointConnections) { - this.privateEndpointConnections = privateEndpointConnections; - return this; - } - - /** - * Get the encryption property: The encryption details of the workspace. - * - * @return the encryption value. - */ - public EncryptionDetails encryption() { - return this.encryption; - } - - /** - * Set the encryption property: The encryption details of the workspace. - * - * @param encryption the encryption value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withEncryption(EncryptionDetails encryption) { - this.encryption = encryption; - return this; - } - - /** - * Get the workspaceUid property: The workspace unique identifier. - * - * @return the workspaceUid value. - */ - public UUID workspaceUid() { - return this.workspaceUid; - } - - /** - * Get the extraProperties property: Workspace level configs and feature flags. - * - * @return the extraProperties value. - */ - public Map extraProperties() { - return this.extraProperties; - } - - /** - * Get the managedVirtualNetworkSettings property: Managed Virtual Network Settings. - * - * @return the managedVirtualNetworkSettings value. - */ - public ManagedVirtualNetworkSettings managedVirtualNetworkSettings() { - return this.managedVirtualNetworkSettings; - } - - /** - * Set the managedVirtualNetworkSettings property: Managed Virtual Network Settings. - * - * @param managedVirtualNetworkSettings the managedVirtualNetworkSettings value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withManagedVirtualNetworkSettings( - ManagedVirtualNetworkSettings managedVirtualNetworkSettings) { - this.managedVirtualNetworkSettings = managedVirtualNetworkSettings; - return this; - } - - /** - * Get the workspaceRepositoryConfiguration property: Git integration settings. - * - * @return the workspaceRepositoryConfiguration value. - */ - public WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration() { - return this.workspaceRepositoryConfiguration; - } - - /** - * Set the workspaceRepositoryConfiguration property: Git integration settings. - * - * @param workspaceRepositoryConfiguration the workspaceRepositoryConfiguration value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withWorkspaceRepositoryConfiguration( - WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration) { - this.workspaceRepositoryConfiguration = workspaceRepositoryConfiguration; - return this; - } - - /** - * Get the purviewConfiguration property: Purview Configuration. - * - * @return the purviewConfiguration value. - */ - public PurviewConfiguration purviewConfiguration() { - return this.purviewConfiguration; - } - - /** - * Set the purviewConfiguration property: Purview Configuration. - * - * @param purviewConfiguration the purviewConfiguration value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withPurviewConfiguration(PurviewConfiguration purviewConfiguration) { - this.purviewConfiguration = purviewConfiguration; - return this; - } - - /** - * Get the adlaResourceId property: The ADLA resource ID. - * - * @return the adlaResourceId value. - */ - public String adlaResourceId() { - return this.adlaResourceId; - } - - /** - * Get the publicNetworkAccess property: Enable or Disable public network access to workspace. - * - * @return the publicNetworkAccess value. - */ - public WorkspacePublicNetworkAccess publicNetworkAccess() { - return this.publicNetworkAccess; - } - - /** - * Set the publicNetworkAccess property: Enable or Disable public network access to workspace. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withPublicNetworkAccess(WorkspacePublicNetworkAccess publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; - return this; - } - - /** - * Get the cspWorkspaceAdminProperties property: Initial workspace AAD admin properties for a CSP subscription. - * - * @return the cspWorkspaceAdminProperties value. - */ - public CspWorkspaceAdminProperties cspWorkspaceAdminProperties() { - return this.cspWorkspaceAdminProperties; - } - - /** - * Set the cspWorkspaceAdminProperties property: Initial workspace AAD admin properties for a CSP subscription. - * - * @param cspWorkspaceAdminProperties the cspWorkspaceAdminProperties value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withCspWorkspaceAdminProperties( - CspWorkspaceAdminProperties cspWorkspaceAdminProperties) { - this.cspWorkspaceAdminProperties = cspWorkspaceAdminProperties; - return this; - } - - /** - * Get the settings property: Workspace settings. - * - * @return the settings value. - */ - public Map settings() { - return this.settings; - } - - /** - * Get the azureADOnlyAuthentication property: Enable or Disable AzureADOnlyAuthentication on All Workspace - * subresource. - * - * @return the azureADOnlyAuthentication value. - */ - public Boolean azureADOnlyAuthentication() { - return this.azureADOnlyAuthentication; - } - - /** - * Set the azureADOnlyAuthentication property: Enable or Disable AzureADOnlyAuthentication on All Workspace - * subresource. - * - * @param azureADOnlyAuthentication the azureADOnlyAuthentication value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withAzureADOnlyAuthentication(Boolean azureADOnlyAuthentication) { - this.azureADOnlyAuthentication = azureADOnlyAuthentication; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (defaultDataLakeStorage() != null) { - defaultDataLakeStorage().validate(); - } - if (virtualNetworkProfile() != null) { - virtualNetworkProfile().validate(); - } - if (privateEndpointConnections() != null) { - privateEndpointConnections().forEach(e -> e.validate()); - } - if (encryption() != null) { - encryption().validate(); - } - if (managedVirtualNetworkSettings() != null) { - managedVirtualNetworkSettings().validate(); - } - if (workspaceRepositoryConfiguration() != null) { - workspaceRepositoryConfiguration().validate(); - } - if (purviewConfiguration() != null) { - purviewConfiguration().validate(); - } - if (cspWorkspaceAdminProperties() != null) { - cspWorkspaceAdminProperties().validate(); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/AttachedDatabaseConfigurationImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/AttachedDatabaseConfigurationImpl.java new file mode 100644 index 0000000000000..d537159b43396 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/AttachedDatabaseConfigurationImpl.java @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.synapse.fluent.models.AttachedDatabaseConfigurationInner; +import com.azure.resourcemanager.synapse.models.AttachedDatabaseConfiguration; +import com.azure.resourcemanager.synapse.models.DefaultPrincipalsModificationKind; +import com.azure.resourcemanager.synapse.models.ResourceProvisioningState; +import com.azure.resourcemanager.synapse.models.TableLevelSharingProperties; +import java.util.Collections; +import java.util.List; + +public final class AttachedDatabaseConfigurationImpl + implements AttachedDatabaseConfiguration, + AttachedDatabaseConfiguration.Definition, + AttachedDatabaseConfiguration.Update { + private AttachedDatabaseConfigurationInner innerObject; + + private final com.azure.resourcemanager.synapse.SynapseManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ResourceProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String databaseName() { + return this.innerModel().databaseName(); + } + + public String kustoPoolResourceId() { + return this.innerModel().kustoPoolResourceId(); + } + + public List attachedDatabaseNames() { + List inner = this.innerModel().attachedDatabaseNames(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public DefaultPrincipalsModificationKind defaultPrincipalsModificationKind() { + return this.innerModel().defaultPrincipalsModificationKind(); + } + + public TableLevelSharingProperties tableLevelSharingProperties() { + return this.innerModel().tableLevelSharingProperties(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public AttachedDatabaseConfigurationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.synapse.SynapseManager manager() { + return this.serviceManager; + } + + private String workspaceName; + + private String kustoPoolName; + + private String attachedDatabaseConfigurationName; + + private String resourceGroupName; + + public AttachedDatabaseConfigurationImpl withExistingKustoPool( + String workspaceName, String kustoPoolName, String resourceGroupName) { + this.workspaceName = workspaceName; + this.kustoPoolName = kustoPoolName; + this.resourceGroupName = resourceGroupName; + return this; + } + + public AttachedDatabaseConfiguration create() { + this.innerObject = + serviceManager + .serviceClient() + .getKustoPoolAttachedDatabaseConfigurations() + .createOrUpdate( + workspaceName, + kustoPoolName, + attachedDatabaseConfigurationName, + resourceGroupName, + this.innerModel(), + Context.NONE); + return this; + } + + public AttachedDatabaseConfiguration create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getKustoPoolAttachedDatabaseConfigurations() + .createOrUpdate( + workspaceName, + kustoPoolName, + attachedDatabaseConfigurationName, + resourceGroupName, + this.innerModel(), + context); + return this; + } + + AttachedDatabaseConfigurationImpl(String name, com.azure.resourcemanager.synapse.SynapseManager serviceManager) { + this.innerObject = new AttachedDatabaseConfigurationInner(); + this.serviceManager = serviceManager; + this.attachedDatabaseConfigurationName = name; + } + + public AttachedDatabaseConfigurationImpl update() { + return this; + } + + public AttachedDatabaseConfiguration apply() { + this.innerObject = + serviceManager + .serviceClient() + .getKustoPoolAttachedDatabaseConfigurations() + .createOrUpdate( + workspaceName, + kustoPoolName, + attachedDatabaseConfigurationName, + resourceGroupName, + this.innerModel(), + Context.NONE); + return this; + } + + public AttachedDatabaseConfiguration apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getKustoPoolAttachedDatabaseConfigurations() + .createOrUpdate( + workspaceName, + kustoPoolName, + attachedDatabaseConfigurationName, + resourceGroupName, + this.innerModel(), + context); + return this; + } + + AttachedDatabaseConfigurationImpl( + AttachedDatabaseConfigurationInner innerObject, + com.azure.resourcemanager.synapse.SynapseManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.kustoPoolName = Utils.getValueFromIdByName(innerObject.id(), "kustoPools"); + this.attachedDatabaseConfigurationName = + Utils.getValueFromIdByName(innerObject.id(), "attachedDatabaseConfigurations"); + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + } + + public AttachedDatabaseConfiguration refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getKustoPoolAttachedDatabaseConfigurations() + .getWithResponse( + workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName, Context.NONE) + .getValue(); + return this; + } + + public AttachedDatabaseConfiguration refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getKustoPoolAttachedDatabaseConfigurations() + .getWithResponse( + workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName, context) + .getValue(); + return this; + } + + public AttachedDatabaseConfigurationImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public AttachedDatabaseConfigurationImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public AttachedDatabaseConfigurationImpl withDatabaseName(String databaseName) { + this.innerModel().withDatabaseName(databaseName); + return this; + } + + public AttachedDatabaseConfigurationImpl withKustoPoolResourceId(String kustoPoolResourceId) { + this.innerModel().withKustoPoolResourceId(kustoPoolResourceId); + return this; + } + + public AttachedDatabaseConfigurationImpl withDefaultPrincipalsModificationKind( + DefaultPrincipalsModificationKind defaultPrincipalsModificationKind) { + this.innerModel().withDefaultPrincipalsModificationKind(defaultPrincipalsModificationKind); + return this; + } + + public AttachedDatabaseConfigurationImpl withTableLevelSharingProperties( + TableLevelSharingProperties tableLevelSharingProperties) { + this.innerModel().withTableLevelSharingProperties(tableLevelSharingProperties); + return this; + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/AzureADOnlyAuthenticationImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/AzureADOnlyAuthenticationImpl.java index 808daa8c55481..8200b424d4f80 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/AzureADOnlyAuthenticationImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/AzureADOnlyAuthenticationImpl.java @@ -35,7 +35,7 @@ public String type() { return this.innerModel().type(); } - public boolean azureADOnlyAuthentication() { + public Boolean azureADOnlyAuthentication() { return this.innerModel().azureADOnlyAuthentication(); } @@ -113,7 +113,7 @@ public AzureADOnlyAuthentication refresh(Context context) { return this; } - public AzureADOnlyAuthenticationImpl withAzureADOnlyAuthentication(boolean azureADOnlyAuthentication) { + public AzureADOnlyAuthenticationImpl withAzureADOnlyAuthentication(Boolean azureADOnlyAuthentication) { this.innerModel().withAzureADOnlyAuthentication(azureADOnlyAuthentication); return this; } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/AzureResourceSkuImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/AzureResourceSkuImpl.java new file mode 100644 index 0000000000000..56696e2a775e7 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/AzureResourceSkuImpl.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.implementation; + +import com.azure.resourcemanager.synapse.fluent.models.AzureResourceSkuInner; +import com.azure.resourcemanager.synapse.models.AzureCapacity; +import com.azure.resourcemanager.synapse.models.AzureResourceSku; +import com.azure.resourcemanager.synapse.models.AzureSku; + +public final class AzureResourceSkuImpl implements AzureResourceSku { + private AzureResourceSkuInner innerObject; + + private final com.azure.resourcemanager.synapse.SynapseManager serviceManager; + + AzureResourceSkuImpl( + AzureResourceSkuInner innerObject, com.azure.resourcemanager.synapse.SynapseManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String resourceType() { + return this.innerModel().resourceType(); + } + + public AzureSku sku() { + return this.innerModel().sku(); + } + + public AzureCapacity capacity() { + return this.innerModel().capacity(); + } + + public AzureResourceSkuInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.synapse.SynapseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/BigDataPoolResourceInfoImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/BigDataPoolResourceInfoImpl.java index 222b9f543dda1..cdd81da429f39 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/BigDataPoolResourceInfoImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/BigDataPoolResourceInfoImpl.java @@ -7,12 +7,12 @@ import com.azure.core.management.Region; import com.azure.core.util.Context; import com.azure.resourcemanager.synapse.fluent.models.BigDataPoolResourceInfoInner; -import com.azure.resourcemanager.synapse.fluent.models.LibraryInfo; import com.azure.resourcemanager.synapse.models.AutoPauseProperties; import com.azure.resourcemanager.synapse.models.AutoScaleProperties; import com.azure.resourcemanager.synapse.models.BigDataPoolPatchInfo; import com.azure.resourcemanager.synapse.models.BigDataPoolResourceInfo; import com.azure.resourcemanager.synapse.models.DynamicExecutorAllocation; +import com.azure.resourcemanager.synapse.models.LibraryInfo; import com.azure.resourcemanager.synapse.models.LibraryRequirements; import com.azure.resourcemanager.synapse.models.NodeSize; import com.azure.resourcemanager.synapse.models.NodeSizeFamily; diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/CheckNameResultImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/CheckNameResultImpl.java new file mode 100644 index 0000000000000..a9164620a626b --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/CheckNameResultImpl.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.implementation; + +import com.azure.resourcemanager.synapse.fluent.models.CheckNameResultInner; +import com.azure.resourcemanager.synapse.models.CheckNameResult; +import com.azure.resourcemanager.synapse.models.Reason; + +public final class CheckNameResultImpl implements CheckNameResult { + private CheckNameResultInner innerObject; + + private final com.azure.resourcemanager.synapse.SynapseManager serviceManager; + + CheckNameResultImpl( + CheckNameResultInner innerObject, com.azure.resourcemanager.synapse.SynapseManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public Boolean nameAvailable() { + return this.innerModel().nameAvailable(); + } + + public String name() { + return this.innerModel().name(); + } + + public String message() { + return this.innerModel().message(); + } + + public Reason reason() { + return this.innerModel().reason(); + } + + public CheckNameResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.synapse.SynapseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/ClusterPrincipalAssignmentImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/ClusterPrincipalAssignmentImpl.java new file mode 100644 index 0000000000000..44a9544ee59ae --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/ClusterPrincipalAssignmentImpl.java @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.synapse.fluent.models.ClusterPrincipalAssignmentInner; +import com.azure.resourcemanager.synapse.models.ClusterPrincipalAssignment; +import com.azure.resourcemanager.synapse.models.ClusterPrincipalRole; +import com.azure.resourcemanager.synapse.models.PrincipalType; +import com.azure.resourcemanager.synapse.models.ResourceProvisioningState; + +public final class ClusterPrincipalAssignmentImpl + implements ClusterPrincipalAssignment, ClusterPrincipalAssignment.Definition, ClusterPrincipalAssignment.Update { + private ClusterPrincipalAssignmentInner innerObject; + + private final com.azure.resourcemanager.synapse.SynapseManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String principalId() { + return this.innerModel().principalId(); + } + + public ClusterPrincipalRole role() { + return this.innerModel().role(); + } + + public String tenantId() { + return this.innerModel().tenantId(); + } + + public PrincipalType principalType() { + return this.innerModel().principalType(); + } + + public String tenantName() { + return this.innerModel().tenantName(); + } + + public String principalName() { + return this.innerModel().principalName(); + } + + public ResourceProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public ClusterPrincipalAssignmentInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.synapse.SynapseManager manager() { + return this.serviceManager; + } + + private String workspaceName; + + private String kustoPoolName; + + private String principalAssignmentName; + + private String resourceGroupName; + + public ClusterPrincipalAssignmentImpl withExistingKustoPool( + String workspaceName, String kustoPoolName, String resourceGroupName) { + this.workspaceName = workspaceName; + this.kustoPoolName = kustoPoolName; + this.resourceGroupName = resourceGroupName; + return this; + } + + public ClusterPrincipalAssignment create() { + this.innerObject = + serviceManager + .serviceClient() + .getKustoPoolPrincipalAssignments() + .createOrUpdate( + workspaceName, + kustoPoolName, + principalAssignmentName, + resourceGroupName, + this.innerModel(), + Context.NONE); + return this; + } + + public ClusterPrincipalAssignment create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getKustoPoolPrincipalAssignments() + .createOrUpdate( + workspaceName, + kustoPoolName, + principalAssignmentName, + resourceGroupName, + this.innerModel(), + context); + return this; + } + + ClusterPrincipalAssignmentImpl(String name, com.azure.resourcemanager.synapse.SynapseManager serviceManager) { + this.innerObject = new ClusterPrincipalAssignmentInner(); + this.serviceManager = serviceManager; + this.principalAssignmentName = name; + } + + public ClusterPrincipalAssignmentImpl update() { + return this; + } + + public ClusterPrincipalAssignment apply() { + this.innerObject = + serviceManager + .serviceClient() + .getKustoPoolPrincipalAssignments() + .createOrUpdate( + workspaceName, + kustoPoolName, + principalAssignmentName, + resourceGroupName, + this.innerModel(), + Context.NONE); + return this; + } + + public ClusterPrincipalAssignment apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getKustoPoolPrincipalAssignments() + .createOrUpdate( + workspaceName, + kustoPoolName, + principalAssignmentName, + resourceGroupName, + this.innerModel(), + context); + return this; + } + + ClusterPrincipalAssignmentImpl( + ClusterPrincipalAssignmentInner innerObject, com.azure.resourcemanager.synapse.SynapseManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.kustoPoolName = Utils.getValueFromIdByName(innerObject.id(), "kustoPools"); + this.principalAssignmentName = Utils.getValueFromIdByName(innerObject.id(), "principalAssignments"); + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + } + + public ClusterPrincipalAssignment refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getKustoPoolPrincipalAssignments() + .getWithResponse(workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName, Context.NONE) + .getValue(); + return this; + } + + public ClusterPrincipalAssignment refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getKustoPoolPrincipalAssignments() + .getWithResponse(workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName, context) + .getValue(); + return this; + } + + public ClusterPrincipalAssignmentImpl withPrincipalId(String principalId) { + this.innerModel().withPrincipalId(principalId); + return this; + } + + public ClusterPrincipalAssignmentImpl withRole(ClusterPrincipalRole role) { + this.innerModel().withRole(role); + return this; + } + + public ClusterPrincipalAssignmentImpl withTenantId(String tenantId) { + this.innerModel().withTenantId(tenantId); + return this; + } + + public ClusterPrincipalAssignmentImpl withPrincipalType(PrincipalType principalType) { + this.innerModel().withPrincipalType(principalType); + return this; + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/DataConnectionImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/DataConnectionImpl.java new file mode 100644 index 0000000000000..ed86f2f9a6c3d --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/DataConnectionImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.synapse.fluent.models.DataConnectionInner; +import com.azure.resourcemanager.synapse.models.DataConnection; + +public final class DataConnectionImpl implements DataConnection { + private DataConnectionInner innerObject; + + private final com.azure.resourcemanager.synapse.SynapseManager serviceManager; + + DataConnectionImpl( + DataConnectionInner innerObject, com.azure.resourcemanager.synapse.SynapseManager 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 String location() { + return this.innerModel().location(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public DataConnectionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.synapse.SynapseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/DataConnectionValidationImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/DataConnectionValidationImpl.java new file mode 100644 index 0000000000000..3d797eb90db7b --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/DataConnectionValidationImpl.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.implementation; + +import com.azure.resourcemanager.synapse.fluent.models.DataConnectionInner; +import com.azure.resourcemanager.synapse.fluent.models.DataConnectionValidationInner; +import com.azure.resourcemanager.synapse.models.DataConnection; +import com.azure.resourcemanager.synapse.models.DataConnectionValidation; + +public final class DataConnectionValidationImpl implements DataConnectionValidation { + private DataConnectionValidationInner innerObject; + + private final com.azure.resourcemanager.synapse.SynapseManager serviceManager; + + DataConnectionValidationImpl( + DataConnectionValidationInner innerObject, com.azure.resourcemanager.synapse.SynapseManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String dataConnectionName() { + return this.innerModel().dataConnectionName(); + } + + public DataConnection properties() { + DataConnectionInner inner = this.innerModel().properties(); + if (inner != null) { + return new DataConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public DataConnectionValidationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.synapse.SynapseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/DataConnectionValidationListResultImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/DataConnectionValidationListResultImpl.java new file mode 100644 index 0000000000000..deea9e0b5322c --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/DataConnectionValidationListResultImpl.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.implementation; + +import com.azure.resourcemanager.synapse.fluent.models.DataConnectionValidationListResultInner; +import com.azure.resourcemanager.synapse.models.DataConnectionValidationListResult; +import com.azure.resourcemanager.synapse.models.DataConnectionValidationResult; +import java.util.Collections; +import java.util.List; + +public final class DataConnectionValidationListResultImpl implements DataConnectionValidationListResult { + private DataConnectionValidationListResultInner innerObject; + + private final com.azure.resourcemanager.synapse.SynapseManager serviceManager; + + DataConnectionValidationListResultImpl( + DataConnectionValidationListResultInner innerObject, + com.azure.resourcemanager.synapse.SynapseManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public DataConnectionValidationListResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.synapse.SynapseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/DatabaseImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/DatabaseImpl.java new file mode 100644 index 0000000000000..9241d4564dcbb --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/DatabaseImpl.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.synapse.fluent.models.DatabaseInner; +import com.azure.resourcemanager.synapse.models.Database; + +public final class DatabaseImpl implements Database { + private DatabaseInner innerObject; + + private final com.azure.resourcemanager.synapse.SynapseManager serviceManager; + + DatabaseImpl(DatabaseInner innerObject, com.azure.resourcemanager.synapse.SynapseManager 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 String location() { + return this.innerModel().location(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public DatabaseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.synapse.SynapseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/DatabasePrincipalAssignmentImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/DatabasePrincipalAssignmentImpl.java new file mode 100644 index 0000000000000..e58ee9cae9b82 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/DatabasePrincipalAssignmentImpl.java @@ -0,0 +1,223 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.synapse.fluent.models.DatabasePrincipalAssignmentInner; +import com.azure.resourcemanager.synapse.models.DatabasePrincipalAssignment; +import com.azure.resourcemanager.synapse.models.DatabasePrincipalRole; +import com.azure.resourcemanager.synapse.models.PrincipalType; +import com.azure.resourcemanager.synapse.models.ResourceProvisioningState; + +public final class DatabasePrincipalAssignmentImpl + implements DatabasePrincipalAssignment, DatabasePrincipalAssignment.Definition, DatabasePrincipalAssignment.Update { + private DatabasePrincipalAssignmentInner innerObject; + + private final com.azure.resourcemanager.synapse.SynapseManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String principalId() { + return this.innerModel().principalId(); + } + + public DatabasePrincipalRole role() { + return this.innerModel().role(); + } + + public String tenantId() { + return this.innerModel().tenantId(); + } + + public PrincipalType principalType() { + return this.innerModel().principalType(); + } + + public String tenantName() { + return this.innerModel().tenantName(); + } + + public String principalName() { + return this.innerModel().principalName(); + } + + public ResourceProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public DatabasePrincipalAssignmentInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.synapse.SynapseManager manager() { + return this.serviceManager; + } + + private String workspaceName; + + private String kustoPoolName; + + private String databaseName; + + private String principalAssignmentName; + + private String resourceGroupName; + + public DatabasePrincipalAssignmentImpl withExistingDatabase( + String workspaceName, String kustoPoolName, String databaseName, String resourceGroupName) { + this.workspaceName = workspaceName; + this.kustoPoolName = kustoPoolName; + this.databaseName = databaseName; + this.resourceGroupName = resourceGroupName; + return this; + } + + public DatabasePrincipalAssignment create() { + this.innerObject = + serviceManager + .serviceClient() + .getKustoPoolDatabasePrincipalAssignments() + .createOrUpdate( + workspaceName, + kustoPoolName, + databaseName, + principalAssignmentName, + resourceGroupName, + this.innerModel(), + Context.NONE); + return this; + } + + public DatabasePrincipalAssignment create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getKustoPoolDatabasePrincipalAssignments() + .createOrUpdate( + workspaceName, + kustoPoolName, + databaseName, + principalAssignmentName, + resourceGroupName, + this.innerModel(), + context); + return this; + } + + DatabasePrincipalAssignmentImpl(String name, com.azure.resourcemanager.synapse.SynapseManager serviceManager) { + this.innerObject = new DatabasePrincipalAssignmentInner(); + this.serviceManager = serviceManager; + this.principalAssignmentName = name; + } + + public DatabasePrincipalAssignmentImpl update() { + return this; + } + + public DatabasePrincipalAssignment apply() { + this.innerObject = + serviceManager + .serviceClient() + .getKustoPoolDatabasePrincipalAssignments() + .createOrUpdate( + workspaceName, + kustoPoolName, + databaseName, + principalAssignmentName, + resourceGroupName, + this.innerModel(), + Context.NONE); + return this; + } + + public DatabasePrincipalAssignment apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getKustoPoolDatabasePrincipalAssignments() + .createOrUpdate( + workspaceName, + kustoPoolName, + databaseName, + principalAssignmentName, + resourceGroupName, + this.innerModel(), + context); + return this; + } + + DatabasePrincipalAssignmentImpl( + DatabasePrincipalAssignmentInner innerObject, com.azure.resourcemanager.synapse.SynapseManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.kustoPoolName = Utils.getValueFromIdByName(innerObject.id(), "kustoPools"); + this.databaseName = Utils.getValueFromIdByName(innerObject.id(), "databases"); + this.principalAssignmentName = Utils.getValueFromIdByName(innerObject.id(), "principalAssignments"); + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + } + + public DatabasePrincipalAssignment refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getKustoPoolDatabasePrincipalAssignments() + .getWithResponse( + workspaceName, + kustoPoolName, + databaseName, + principalAssignmentName, + resourceGroupName, + Context.NONE) + .getValue(); + return this; + } + + public DatabasePrincipalAssignment refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getKustoPoolDatabasePrincipalAssignments() + .getWithResponse( + workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName, context) + .getValue(); + return this; + } + + public DatabasePrincipalAssignmentImpl withPrincipalId(String principalId) { + this.innerModel().withPrincipalId(principalId); + return this; + } + + public DatabasePrincipalAssignmentImpl withRole(DatabasePrincipalRole role) { + this.innerModel().withRole(role); + return this; + } + + public DatabasePrincipalAssignmentImpl withTenantId(String tenantId) { + this.innerModel().withTenantId(tenantId); + return this; + } + + public DatabasePrincipalAssignmentImpl withPrincipalType(PrincipalType principalType) { + this.innerModel().withPrincipalType(principalType); + return this; + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/FollowerDatabaseDefinitionImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/FollowerDatabaseDefinitionImpl.java new file mode 100644 index 0000000000000..95d5f62a6bde9 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/FollowerDatabaseDefinitionImpl.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.implementation; + +import com.azure.resourcemanager.synapse.fluent.models.FollowerDatabaseDefinitionInner; +import com.azure.resourcemanager.synapse.models.FollowerDatabaseDefinition; + +public final class FollowerDatabaseDefinitionImpl implements FollowerDatabaseDefinition { + private FollowerDatabaseDefinitionInner innerObject; + + private final com.azure.resourcemanager.synapse.SynapseManager serviceManager; + + FollowerDatabaseDefinitionImpl( + FollowerDatabaseDefinitionInner innerObject, com.azure.resourcemanager.synapse.SynapseManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String kustoPoolResourceId() { + return this.innerModel().kustoPoolResourceId(); + } + + public String attachedDatabaseConfigurationName() { + return this.innerModel().attachedDatabaseConfigurationName(); + } + + public String databaseName() { + return this.innerModel().databaseName(); + } + + public FollowerDatabaseDefinitionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.synapse.SynapseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoOperationsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoOperationsClientImpl.java new file mode 100644 index 0000000000000..d934281a33bd5 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoOperationsClientImpl.java @@ -0,0 +1,270 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.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.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.fluent.KustoOperationsClient; +import com.azure.resourcemanager.synapse.fluent.models.OperationInner; +import com.azure.resourcemanager.synapse.models.OperationListResult; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in KustoOperationsClient. */ +public final class KustoOperationsClientImpl implements KustoOperationsClient { + private final ClientLogger logger = new ClientLogger(KustoOperationsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final KustoOperationsService service; + + /** The service client containing this operation class. */ + private final SynapseManagementClientImpl client; + + /** + * Initializes an instance of KustoOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + KustoOperationsClientImpl(SynapseManagementClientImpl client) { + this.service = + RestProxy.create(KustoOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SynapseManagementClientKustoOperations to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SynapseManagementCli") + private interface KustoOperationsService { + @Headers({"Content-Type: application/json"}) + @Get("/providers/Microsoft.Synapse/kustooperations") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Lists available operations for the Kusto sub-resources inside Microsoft.Synapse provider. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to list REST API operations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, 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 available operations for the Kusto sub-resources inside Microsoft.Synapse provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to list REST API operations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), apiVersion, accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Lists available operations for the Kusto sub-resources inside Microsoft.Synapse provider. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to list REST API operations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists available operations for the Kusto sub-resources inside Microsoft.Synapse provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to list REST API operations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists available operations for the Kusto sub-resources inside Microsoft.Synapse provider. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to list REST API operations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Lists available operations for the Kusto sub-resources inside Microsoft.Synapse provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to list REST API operations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to list REST API operations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to list REST API operations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoOperationsImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoOperationsImpl.java new file mode 100644 index 0000000000000..d9934090e46e8 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoOperationsImpl.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.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.synapse.fluent.KustoOperationsClient; +import com.azure.resourcemanager.synapse.fluent.models.OperationInner; +import com.azure.resourcemanager.synapse.models.KustoOperations; +import com.azure.resourcemanager.synapse.models.Operation; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class KustoOperationsImpl implements KustoOperations { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KustoOperationsImpl.class); + + private final KustoOperationsClient innerClient; + + private final com.azure.resourcemanager.synapse.SynapseManager serviceManager; + + public KustoOperationsImpl( + KustoOperationsClient innerClient, com.azure.resourcemanager.synapse.SynapseManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + } + + private KustoOperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.synapse.SynapseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolAttachedDatabaseConfigurationsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolAttachedDatabaseConfigurationsClientImpl.java new file mode 100644 index 0000000000000..ab0b780576252 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolAttachedDatabaseConfigurationsClientImpl.java @@ -0,0 +1,1241 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.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.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.synapse.fluent.KustoPoolAttachedDatabaseConfigurationsClient; +import com.azure.resourcemanager.synapse.fluent.models.AttachedDatabaseConfigurationInner; +import com.azure.resourcemanager.synapse.models.AttachedDatabaseConfigurationListResult; +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 + * KustoPoolAttachedDatabaseConfigurationsClient. + */ +public final class KustoPoolAttachedDatabaseConfigurationsClientImpl + implements KustoPoolAttachedDatabaseConfigurationsClient { + private final ClientLogger logger = new ClientLogger(KustoPoolAttachedDatabaseConfigurationsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final KustoPoolAttachedDatabaseConfigurationsService service; + + /** The service client containing this operation class. */ + private final SynapseManagementClientImpl client; + + /** + * Initializes an instance of KustoPoolAttachedDatabaseConfigurationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + KustoPoolAttachedDatabaseConfigurationsClientImpl(SynapseManagementClientImpl client) { + this.service = + RestProxy + .create( + KustoPoolAttachedDatabaseConfigurationsService.class, + client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SynapseManagementClientKustoPoolAttachedDatabaseConfigurations to be + * used by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SynapseManagementCli") + private interface KustoPoolAttachedDatabaseConfigurationsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/attachedDatabaseConfigurations") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByKustoPool( + @HostParam("$host") String endpoint, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/attachedDatabaseConfigurations" + + "/{attachedDatabaseConfigurationName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("attachedDatabaseConfigurationName") String attachedDatabaseConfigurationName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/attachedDatabaseConfigurations" + + "/{attachedDatabaseConfigurationName}") + @ExpectedResponses({200, 201, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("attachedDatabaseConfigurationName") String attachedDatabaseConfigurationName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AttachedDatabaseConfigurationInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/attachedDatabaseConfigurations" + + "/{attachedDatabaseConfigurationName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("attachedDatabaseConfigurationName") String attachedDatabaseConfigurationName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Returns the list of attached database configurations of the given Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list attached database configurations operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByKustoPoolSinglePageAsync( + String workspaceName, String kustoPoolName, String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByKustoPool( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns the list of attached database configurations of the given Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list attached database configurations operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByKustoPoolSinglePageAsync( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByKustoPool( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + } + + /** + * Returns the list of attached database configurations of the given Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list attached database configurations operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByKustoPoolAsync( + String workspaceName, String kustoPoolName, String resourceGroupName) { + return new PagedFlux<>(() -> listByKustoPoolSinglePageAsync(workspaceName, kustoPoolName, resourceGroupName)); + } + + /** + * Returns the list of attached database configurations of the given Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list attached database configurations operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByKustoPoolAsync( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listByKustoPoolSinglePageAsync(workspaceName, kustoPoolName, resourceGroupName, context)); + } + + /** + * Returns the list of attached database configurations of the given Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list attached database configurations operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByKustoPool( + String workspaceName, String kustoPoolName, String resourceGroupName) { + return new PagedIterable<>(listByKustoPoolAsync(workspaceName, kustoPoolName, resourceGroupName)); + } + + /** + * Returns the list of attached database configurations of the given Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list attached database configurations operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByKustoPool( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + return new PagedIterable<>(listByKustoPoolAsync(workspaceName, kustoPoolName, resourceGroupName, context)); + } + + /** + * Returns an attached database configuration. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing an attached database configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (attachedDatabaseConfigurationName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter attachedDatabaseConfigurationName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + attachedDatabaseConfigurationName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns an attached database configuration. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing an attached database configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (attachedDatabaseConfigurationName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter attachedDatabaseConfigurationName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + attachedDatabaseConfigurationName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + accept, + context); + } + + /** + * Returns an attached database configuration. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing an attached database configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName) { + return getWithResponseAsync(workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Returns an attached database configuration. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing an attached database configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AttachedDatabaseConfigurationInner get( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName) { + return getAsync(workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName).block(); + } + + /** + * Returns an attached database configuration. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing an attached database configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName, + Context context) { + return getWithResponseAsync( + workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName, context) + .block(); + } + + /** + * Creates or updates an attached database configuration. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing an attached database configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName, + AttachedDatabaseConfigurationInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (attachedDatabaseConfigurationName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter attachedDatabaseConfigurationName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + attachedDatabaseConfigurationName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates an attached database configuration. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The database parameters supplied to the CreateOrUpdate 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 class representing an attached database configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName, + AttachedDatabaseConfigurationInner parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (attachedDatabaseConfigurationName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter attachedDatabaseConfigurationName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + attachedDatabaseConfigurationName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + parameters, + accept, + context); + } + + /** + * Creates or updates an attached database configuration. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing an attached database configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, AttachedDatabaseConfigurationInner> + beginCreateOrUpdateAsync( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName, + AttachedDatabaseConfigurationInner parameters) { + Mono>> mono = + createOrUpdateWithResponseAsync( + workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName, parameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AttachedDatabaseConfigurationInner.class, + AttachedDatabaseConfigurationInner.class, + Context.NONE); + } + + /** + * Creates or updates an attached database configuration. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The database parameters supplied to the CreateOrUpdate 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 class representing an attached database configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, AttachedDatabaseConfigurationInner> + beginCreateOrUpdateAsync( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName, + AttachedDatabaseConfigurationInner parameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync( + workspaceName, + kustoPoolName, + attachedDatabaseConfigurationName, + resourceGroupName, + parameters, + context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AttachedDatabaseConfigurationInner.class, + AttachedDatabaseConfigurationInner.class, + context); + } + + /** + * Creates or updates an attached database configuration. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing an attached database configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, AttachedDatabaseConfigurationInner> + beginCreateOrUpdate( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName, + AttachedDatabaseConfigurationInner parameters) { + return beginCreateOrUpdateAsync( + workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName, parameters) + .getSyncPoller(); + } + + /** + * Creates or updates an attached database configuration. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The database parameters supplied to the CreateOrUpdate 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 class representing an attached database configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, AttachedDatabaseConfigurationInner> + beginCreateOrUpdate( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName, + AttachedDatabaseConfigurationInner parameters, + Context context) { + return beginCreateOrUpdateAsync( + workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName, parameters, context) + .getSyncPoller(); + } + + /** + * Creates or updates an attached database configuration. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing an attached database configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName, + AttachedDatabaseConfigurationInner parameters) { + return beginCreateOrUpdateAsync( + workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates an attached database configuration. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The database parameters supplied to the CreateOrUpdate 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 class representing an attached database configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName, + AttachedDatabaseConfigurationInner parameters, + Context context) { + return beginCreateOrUpdateAsync( + workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates an attached database configuration. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing an attached database configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AttachedDatabaseConfigurationInner createOrUpdate( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName, + AttachedDatabaseConfigurationInner parameters) { + return createOrUpdateAsync( + workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName, parameters) + .block(); + } + + /** + * Creates or updates an attached database configuration. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The database parameters supplied to the CreateOrUpdate 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 class representing an attached database configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AttachedDatabaseConfigurationInner createOrUpdate( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName, + AttachedDatabaseConfigurationInner parameters, + Context context) { + return createOrUpdateAsync( + workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName, parameters, context) + .block(); + } + + /** + * Deletes the attached database configuration with the given name. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (attachedDatabaseConfigurationName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter attachedDatabaseConfigurationName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + attachedDatabaseConfigurationName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the attached database configuration with the given name. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (attachedDatabaseConfigurationName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter attachedDatabaseConfigurationName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + attachedDatabaseConfigurationName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + accept, + context); + } + + /** + * Deletes the attached database configuration with the given name. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginDeleteAsync( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName) { + Mono>> mono = + deleteWithResponseAsync(workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + } + + /** + * Deletes the attached database configuration with the given name. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginDeleteAsync( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync( + workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Deletes the attached database configuration with the given name. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName) { + return beginDeleteAsync(workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName) + .getSyncPoller(); + } + + /** + * Deletes the attached database configuration with the given name. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName, + Context context) { + return beginDeleteAsync( + workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName, context) + .getSyncPoller(); + } + + /** + * Deletes the attached database configuration with the given name. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName) { + return beginDeleteAsync(workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the attached database configuration with the given name. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName, + Context context) { + return beginDeleteAsync( + workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the attached database configuration with the given name. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName) { + deleteAsync(workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName).block(); + } + + /** + * Deletes the attached database configuration with the given name. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName, + Context context) { + deleteAsync(workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName, context) + .block(); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolAttachedDatabaseConfigurationsImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolAttachedDatabaseConfigurationsImpl.java new file mode 100644 index 0000000000000..ce5438217d743 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolAttachedDatabaseConfigurationsImpl.java @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.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.synapse.fluent.KustoPoolAttachedDatabaseConfigurationsClient; +import com.azure.resourcemanager.synapse.fluent.models.AttachedDatabaseConfigurationInner; +import com.azure.resourcemanager.synapse.models.AttachedDatabaseConfiguration; +import com.azure.resourcemanager.synapse.models.KustoPoolAttachedDatabaseConfigurations; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class KustoPoolAttachedDatabaseConfigurationsImpl implements KustoPoolAttachedDatabaseConfigurations { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KustoPoolAttachedDatabaseConfigurationsImpl.class); + + private final KustoPoolAttachedDatabaseConfigurationsClient innerClient; + + private final com.azure.resourcemanager.synapse.SynapseManager serviceManager; + + public KustoPoolAttachedDatabaseConfigurationsImpl( + KustoPoolAttachedDatabaseConfigurationsClient innerClient, + com.azure.resourcemanager.synapse.SynapseManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByKustoPool( + String workspaceName, String kustoPoolName, String resourceGroupName) { + PagedIterable inner = + this.serviceClient().listByKustoPool(workspaceName, kustoPoolName, resourceGroupName); + return Utils.mapPage(inner, inner1 -> new AttachedDatabaseConfigurationImpl(inner1, this.manager())); + } + + public PagedIterable listByKustoPool( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + PagedIterable inner = + this.serviceClient().listByKustoPool(workspaceName, kustoPoolName, resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new AttachedDatabaseConfigurationImpl(inner1, this.manager())); + } + + public AttachedDatabaseConfiguration get( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName) { + AttachedDatabaseConfigurationInner inner = + this + .serviceClient() + .get(workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName); + if (inner != null) { + return new AttachedDatabaseConfigurationImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName, + Context context) { + Response inner = + this + .serviceClient() + .getWithResponse( + workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new AttachedDatabaseConfigurationImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void delete( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName) { + this.serviceClient().delete(workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName); + } + + public void delete( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName, + Context context) { + this + .serviceClient() + .delete(workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName, context); + } + + public AttachedDatabaseConfiguration getById(String id) { + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String kustoPoolName = Utils.getValueFromIdByName(id, "kustoPools"); + if (kustoPoolName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'kustoPools'.", id))); + } + String attachedDatabaseConfigurationName = Utils.getValueFromIdByName(id, "attachedDatabaseConfigurations"); + if (attachedDatabaseConfigurationName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment" + + " 'attachedDatabaseConfigurations'.", + id))); + } + String resourceGroupName = Utils.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))); + } + return this + .getWithResponse( + workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String kustoPoolName = Utils.getValueFromIdByName(id, "kustoPools"); + if (kustoPoolName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'kustoPools'.", id))); + } + String attachedDatabaseConfigurationName = Utils.getValueFromIdByName(id, "attachedDatabaseConfigurations"); + if (attachedDatabaseConfigurationName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment" + + " 'attachedDatabaseConfigurations'.", + id))); + } + String resourceGroupName = Utils.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))); + } + return this + .getWithResponse( + workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName, context); + } + + public void deleteById(String id) { + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String kustoPoolName = Utils.getValueFromIdByName(id, "kustoPools"); + if (kustoPoolName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'kustoPools'.", id))); + } + String attachedDatabaseConfigurationName = Utils.getValueFromIdByName(id, "attachedDatabaseConfigurations"); + if (attachedDatabaseConfigurationName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment" + + " 'attachedDatabaseConfigurations'.", + id))); + } + String resourceGroupName = Utils.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))); + } + this.delete(workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String kustoPoolName = Utils.getValueFromIdByName(id, "kustoPools"); + if (kustoPoolName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'kustoPools'.", id))); + } + String attachedDatabaseConfigurationName = Utils.getValueFromIdByName(id, "attachedDatabaseConfigurations"); + if (attachedDatabaseConfigurationName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment" + + " 'attachedDatabaseConfigurations'.", + id))); + } + String resourceGroupName = Utils.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))); + } + this.delete(workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName, context); + } + + private KustoPoolAttachedDatabaseConfigurationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.synapse.SynapseManager manager() { + return this.serviceManager; + } + + public AttachedDatabaseConfigurationImpl define(String name) { + return new AttachedDatabaseConfigurationImpl(name, this.manager()); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolChildResourcesClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolChildResourcesClientImpl.java new file mode 100644 index 0000000000000..cb8e81c90ac7a --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolChildResourcesClientImpl.java @@ -0,0 +1,270 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.fluent.KustoPoolChildResourcesClient; +import com.azure.resourcemanager.synapse.fluent.models.CheckNameResultInner; +import com.azure.resourcemanager.synapse.models.DatabaseCheckNameRequest; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in KustoPoolChildResourcesClient. */ +public final class KustoPoolChildResourcesClientImpl implements KustoPoolChildResourcesClient { + private final ClientLogger logger = new ClientLogger(KustoPoolChildResourcesClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final KustoPoolChildResourcesService service; + + /** The service client containing this operation class. */ + private final SynapseManagementClientImpl client; + + /** + * Initializes an instance of KustoPoolChildResourcesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + KustoPoolChildResourcesClientImpl(SynapseManagementClientImpl client) { + this.service = + RestProxy + .create(KustoPoolChildResourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SynapseManagementClientKustoPoolChildResources to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SynapseManagementCli") + private interface KustoPoolChildResourcesService { + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/checkNameAvailability") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> checkNameAvailability( + @HostParam("$host") String endpoint, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DatabaseCheckNameRequest resourceName, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Checks that the Kusto Pool child resource name is valid and is not already in use. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Kusto Pool child 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 result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> checkNameAvailabilityWithResponseAsync( + String workspaceName, String kustoPoolName, String resourceGroupName, DatabaseCheckNameRequest resourceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } else { + resourceName.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .checkNameAvailability( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + resourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Checks that the Kusto Pool child resource name is valid and is not already in use. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Kusto Pool child resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> checkNameAvailabilityWithResponseAsync( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + DatabaseCheckNameRequest resourceName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } else { + resourceName.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .checkNameAvailability( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + resourceName, + accept, + context); + } + + /** + * Checks that the Kusto Pool child resource name is valid and is not already in use. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Kusto Pool child 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 result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono checkNameAvailabilityAsync( + String workspaceName, String kustoPoolName, String resourceGroupName, DatabaseCheckNameRequest resourceName) { + return checkNameAvailabilityWithResponseAsync(workspaceName, kustoPoolName, resourceGroupName, resourceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Checks that the Kusto Pool child resource name is valid and is not already in use. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Kusto Pool child 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 result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CheckNameResultInner checkNameAvailability( + String workspaceName, String kustoPoolName, String resourceGroupName, DatabaseCheckNameRequest resourceName) { + return checkNameAvailabilityAsync(workspaceName, kustoPoolName, resourceGroupName, resourceName).block(); + } + + /** + * Checks that the Kusto Pool child resource name is valid and is not already in use. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Kusto Pool child resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkNameAvailabilityWithResponse( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + DatabaseCheckNameRequest resourceName, + Context context) { + return checkNameAvailabilityWithResponseAsync( + workspaceName, kustoPoolName, resourceGroupName, resourceName, context) + .block(); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolChildResourcesImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolChildResourcesImpl.java new file mode 100644 index 0000000000000..cdb919ccd80d3 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolChildResourcesImpl.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.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.synapse.fluent.KustoPoolChildResourcesClient; +import com.azure.resourcemanager.synapse.fluent.models.CheckNameResultInner; +import com.azure.resourcemanager.synapse.models.CheckNameResult; +import com.azure.resourcemanager.synapse.models.DatabaseCheckNameRequest; +import com.azure.resourcemanager.synapse.models.KustoPoolChildResources; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class KustoPoolChildResourcesImpl implements KustoPoolChildResources { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KustoPoolChildResourcesImpl.class); + + private final KustoPoolChildResourcesClient innerClient; + + private final com.azure.resourcemanager.synapse.SynapseManager serviceManager; + + public KustoPoolChildResourcesImpl( + KustoPoolChildResourcesClient innerClient, com.azure.resourcemanager.synapse.SynapseManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public CheckNameResult checkNameAvailability( + String workspaceName, String kustoPoolName, String resourceGroupName, DatabaseCheckNameRequest resourceName) { + CheckNameResultInner inner = + this.serviceClient().checkNameAvailability(workspaceName, kustoPoolName, resourceGroupName, resourceName); + if (inner != null) { + return new CheckNameResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response checkNameAvailabilityWithResponse( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + DatabaseCheckNameRequest resourceName, + Context context) { + Response inner = + this + .serviceClient() + .checkNameAvailabilityWithResponse( + workspaceName, kustoPoolName, resourceGroupName, resourceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CheckNameResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + private KustoPoolChildResourcesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.synapse.SynapseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDataConnectionsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDataConnectionsClientImpl.java new file mode 100644 index 0000000000000..3eddffedc04a7 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDataConnectionsClientImpl.java @@ -0,0 +1,2351 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.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.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.synapse.fluent.KustoPoolDataConnectionsClient; +import com.azure.resourcemanager.synapse.fluent.models.CheckNameResultInner; +import com.azure.resourcemanager.synapse.fluent.models.DataConnectionInner; +import com.azure.resourcemanager.synapse.fluent.models.DataConnectionValidationInner; +import com.azure.resourcemanager.synapse.fluent.models.DataConnectionValidationListResultInner; +import com.azure.resourcemanager.synapse.models.DataConnectionCheckNameRequest; +import com.azure.resourcemanager.synapse.models.DataConnectionListResult; +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 KustoPoolDataConnectionsClient. */ +public final class KustoPoolDataConnectionsClientImpl implements KustoPoolDataConnectionsClient { + private final ClientLogger logger = new ClientLogger(KustoPoolDataConnectionsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final KustoPoolDataConnectionsService service; + + /** The service client containing this operation class. */ + private final SynapseManagementClientImpl client; + + /** + * Initializes an instance of KustoPoolDataConnectionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + KustoPoolDataConnectionsClientImpl(SynapseManagementClientImpl client) { + this.service = + RestProxy + .create(KustoPoolDataConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SynapseManagementClientKustoPoolDataConnections to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SynapseManagementCli") + private interface KustoPoolDataConnectionsService { + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/checkNameAvailability") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> checkNameAvailability( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("databaseName") String databaseName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DataConnectionCheckNameRequest dataConnectionName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnectionValidation") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> dataConnectionValidation( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("databaseName") String databaseName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DataConnectionValidationInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByDatabase( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("databaseName") String databaseName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections" + + "/{dataConnectionName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("databaseName") String databaseName, + @PathParam("dataConnectionName") String dataConnectionName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections" + + "/{dataConnectionName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("databaseName") String databaseName, + @PathParam("dataConnectionName") String dataConnectionName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DataConnectionInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections" + + "/{dataConnectionName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("databaseName") String databaseName, + @PathParam("dataConnectionName") String dataConnectionName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DataConnectionInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections" + + "/{dataConnectionName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("databaseName") String databaseName, + @PathParam("dataConnectionName") String dataConnectionName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Checks that the data connection name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> checkNameAvailabilityWithResponseAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DataConnectionCheckNameRequest dataConnectionName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (dataConnectionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataConnectionName is required and cannot be null.")); + } else { + dataConnectionName.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .checkNameAvailability( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + kustoPoolName, + databaseName, + apiVersion, + dataConnectionName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Checks that the data connection name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> checkNameAvailabilityWithResponseAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DataConnectionCheckNameRequest dataConnectionName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (dataConnectionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataConnectionName is required and cannot be null.")); + } else { + dataConnectionName.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .checkNameAvailability( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + kustoPoolName, + databaseName, + apiVersion, + dataConnectionName, + accept, + context); + } + + /** + * Checks that the data connection name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono checkNameAvailabilityAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DataConnectionCheckNameRequest dataConnectionName) { + return checkNameAvailabilityWithResponseAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Checks that the data connection name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CheckNameResultInner checkNameAvailability( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DataConnectionCheckNameRequest dataConnectionName) { + return checkNameAvailabilityAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName) + .block(); + } + + /** + * Checks that the data connection name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkNameAvailabilityWithResponse( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DataConnectionCheckNameRequest dataConnectionName, + Context context) { + return checkNameAvailabilityWithResponseAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, context) + .block(); + } + + /** + * Checks that the data connection parameters are valid. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto data connection validation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> dataConnectionValidationWithResponseAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DataConnectionValidationInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .dataConnectionValidation( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + kustoPoolName, + databaseName, + apiVersion, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Checks that the data connection parameters are valid. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The data connection parameters supplied to the CreateOrUpdate 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 list Kusto data connection validation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> dataConnectionValidationWithResponseAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DataConnectionValidationInner parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .dataConnectionValidation( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + kustoPoolName, + databaseName, + apiVersion, + parameters, + accept, + context); + } + + /** + * Checks that the data connection parameters are valid. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto data connection validation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, DataConnectionValidationListResultInner> + beginDataConnectionValidationAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DataConnectionValidationInner parameters) { + Mono>> mono = + dataConnectionValidationWithResponseAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + DataConnectionValidationListResultInner.class, + DataConnectionValidationListResultInner.class, + Context.NONE); + } + + /** + * Checks that the data connection parameters are valid. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The data connection parameters supplied to the CreateOrUpdate 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 list Kusto data connection validation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, DataConnectionValidationListResultInner> + beginDataConnectionValidationAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DataConnectionValidationInner parameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + dataConnectionValidationWithResponseAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + DataConnectionValidationListResultInner.class, + DataConnectionValidationListResultInner.class, + context); + } + + /** + * Checks that the data connection parameters are valid. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto data connection validation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, DataConnectionValidationListResultInner> + beginDataConnectionValidation( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DataConnectionValidationInner parameters) { + return beginDataConnectionValidationAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters) + .getSyncPoller(); + } + + /** + * Checks that the data connection parameters are valid. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The data connection parameters supplied to the CreateOrUpdate 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 list Kusto data connection validation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, DataConnectionValidationListResultInner> + beginDataConnectionValidation( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DataConnectionValidationInner parameters, + Context context) { + return beginDataConnectionValidationAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters, context) + .getSyncPoller(); + } + + /** + * Checks that the data connection parameters are valid. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto data connection validation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono dataConnectionValidationAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DataConnectionValidationInner parameters) { + return beginDataConnectionValidationAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Checks that the data connection parameters are valid. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The data connection parameters supplied to the CreateOrUpdate 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 list Kusto data connection validation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono dataConnectionValidationAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DataConnectionValidationInner parameters, + Context context) { + return beginDataConnectionValidationAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Checks that the data connection parameters are valid. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto data connection validation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataConnectionValidationListResultInner dataConnectionValidation( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DataConnectionValidationInner parameters) { + return dataConnectionValidationAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters) + .block(); + } + + /** + * Checks that the data connection parameters are valid. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The data connection parameters supplied to the CreateOrUpdate 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 list Kusto data connection validation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataConnectionValidationListResultInner dataConnectionValidation( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DataConnectionValidationInner parameters, + Context context) { + return dataConnectionValidationAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters, context) + .block(); + } + + /** + * Returns the list of data connections of the given Kusto pool database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 list Kusto data connections operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByDatabaseSinglePageAsync( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByDatabase( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + kustoPoolName, + databaseName, + apiVersion, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns the list of data connections of the given Kusto pool database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 list Kusto data connections operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByDatabaseSinglePageAsync( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByDatabase( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + kustoPoolName, + databaseName, + apiVersion, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + } + + /** + * Returns the list of data connections of the given Kusto pool database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 list Kusto data connections operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDatabaseAsync( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName) { + return new PagedFlux<>( + () -> listByDatabaseSinglePageAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName)); + } + + /** + * Returns the list of data connections of the given Kusto pool database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 list Kusto data connections operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByDatabaseAsync( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName, Context context) { + return new PagedFlux<>( + () -> + listByDatabaseSinglePageAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName, context)); + } + + /** + * Returns the list of data connections of the given Kusto pool database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 list Kusto data connections operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName) { + return new PagedIterable<>(listByDatabaseAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName)); + } + + /** + * Returns the list of data connections of the given Kusto pool database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 list Kusto data connections operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByDatabase( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName, Context context) { + return new PagedIterable<>( + listByDatabaseAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName, context)); + } + + /** + * Returns a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (dataConnectionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataConnectionName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + kustoPoolName, + databaseName, + dataConnectionName, + apiVersion, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (dataConnectionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataConnectionName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + kustoPoolName, + databaseName, + dataConnectionName, + apiVersion, + accept, + context); + } + + /** + * Returns a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName) { + return getWithResponseAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Returns a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataConnectionInner get( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName) { + return getAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName).block(); + } + + /** + * Returns a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + Context context) { + return getWithResponseAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, context) + .block(); + } + + /** + * Creates or updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (dataConnectionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataConnectionName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + kustoPoolName, + databaseName, + dataConnectionName, + apiVersion, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the CreateOrUpdate 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 class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (dataConnectionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataConnectionName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + kustoPoolName, + databaseName, + dataConnectionName, + apiVersion, + parameters, + accept, + context); + } + + /** + * Creates or updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, DataConnectionInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters) { + Mono>> mono = + createOrUpdateWithResponseAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, parameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + DataConnectionInner.class, + DataConnectionInner.class, + Context.NONE); + } + + /** + * Creates or updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the CreateOrUpdate 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 class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, DataConnectionInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, parameters, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), DataConnectionInner.class, DataConnectionInner.class, context); + } + + /** + * Creates or updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, DataConnectionInner> beginCreateOrUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters) { + return beginCreateOrUpdateAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, parameters) + .getSyncPoller(); + } + + /** + * Creates or updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the CreateOrUpdate 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 class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, DataConnectionInner> beginCreateOrUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters, + Context context) { + return beginCreateOrUpdateAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, parameters, context) + .getSyncPoller(); + } + + /** + * Creates or updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters) { + return beginCreateOrUpdateAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the CreateOrUpdate 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 class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters, + Context context) { + return beginCreateOrUpdateAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataConnectionInner createOrUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters) { + return createOrUpdateAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, parameters) + .block(); + } + + /** + * Creates or updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the CreateOrUpdate 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 class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataConnectionInner createOrUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters, + Context context) { + return createOrUpdateAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, parameters, context) + .block(); + } + + /** + * Updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (dataConnectionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataConnectionName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + kustoPoolName, + databaseName, + dataConnectionName, + apiVersion, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the Update 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 class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (dataConnectionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataConnectionName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + kustoPoolName, + databaseName, + dataConnectionName, + apiVersion, + parameters, + accept, + context); + } + + /** + * Updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, DataConnectionInner> beginUpdateAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters) { + Mono>> mono = + updateWithResponseAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, parameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + DataConnectionInner.class, + DataConnectionInner.class, + Context.NONE); + } + + /** + * Updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the Update 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 class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, DataConnectionInner> beginUpdateAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateWithResponseAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, parameters, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), DataConnectionInner.class, DataConnectionInner.class, context); + } + + /** + * Updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, DataConnectionInner> beginUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters) { + return beginUpdateAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, parameters) + .getSyncPoller(); + } + + /** + * Updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the Update 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 class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, DataConnectionInner> beginUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters, + Context context) { + return beginUpdateAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, parameters, context) + .getSyncPoller(); + } + + /** + * Updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters) { + return beginUpdateAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the Update 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 class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters, + Context context) { + return beginUpdateAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataConnectionInner update( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters) { + return updateAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, parameters) + .block(); + } + + /** + * Updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the Update 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 class representing a data connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataConnectionInner update( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters, + Context context) { + return updateAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, parameters, context) + .block(); + } + + /** + * Deletes the data connection with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (dataConnectionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataConnectionName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + kustoPoolName, + databaseName, + dataConnectionName, + apiVersion, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the data connection with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (dataConnectionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter dataConnectionName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + kustoPoolName, + databaseName, + dataConnectionName, + apiVersion, + accept, + context); + } + + /** + * Deletes the data connection with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName) { + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + } + + /** + * Deletes the data connection with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Deletes the data connection with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName) { + return beginDeleteAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName) + .getSyncPoller(); + } + + /** + * Deletes the data connection with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + Context context) { + return beginDeleteAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, context) + .getSyncPoller(); + } + + /** + * Deletes the data connection with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName) { + return beginDeleteAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the data connection with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + Context context) { + return beginDeleteAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the data connection with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName) { + deleteAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName).block(); + } + + /** + * Deletes the data connection with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + Context context) { + deleteAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, context).block(); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDataConnectionsImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDataConnectionsImpl.java new file mode 100644 index 0000000000000..d6f01938ea216 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDataConnectionsImpl.java @@ -0,0 +1,283 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.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.synapse.fluent.KustoPoolDataConnectionsClient; +import com.azure.resourcemanager.synapse.fluent.models.CheckNameResultInner; +import com.azure.resourcemanager.synapse.fluent.models.DataConnectionInner; +import com.azure.resourcemanager.synapse.fluent.models.DataConnectionValidationInner; +import com.azure.resourcemanager.synapse.fluent.models.DataConnectionValidationListResultInner; +import com.azure.resourcemanager.synapse.models.CheckNameResult; +import com.azure.resourcemanager.synapse.models.DataConnection; +import com.azure.resourcemanager.synapse.models.DataConnectionCheckNameRequest; +import com.azure.resourcemanager.synapse.models.DataConnectionValidationListResult; +import com.azure.resourcemanager.synapse.models.KustoPoolDataConnections; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class KustoPoolDataConnectionsImpl implements KustoPoolDataConnections { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KustoPoolDataConnectionsImpl.class); + + private final KustoPoolDataConnectionsClient innerClient; + + private final com.azure.resourcemanager.synapse.SynapseManager serviceManager; + + public KustoPoolDataConnectionsImpl( + KustoPoolDataConnectionsClient innerClient, com.azure.resourcemanager.synapse.SynapseManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public CheckNameResult checkNameAvailability( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DataConnectionCheckNameRequest dataConnectionName) { + CheckNameResultInner inner = + this + .serviceClient() + .checkNameAvailability( + resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName); + if (inner != null) { + return new CheckNameResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response checkNameAvailabilityWithResponse( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DataConnectionCheckNameRequest dataConnectionName, + Context context) { + Response inner = + this + .serviceClient() + .checkNameAvailabilityWithResponse( + resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CheckNameResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DataConnectionValidationListResult dataConnectionValidation( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DataConnectionValidationInner parameters) { + DataConnectionValidationListResultInner inner = + this + .serviceClient() + .dataConnectionValidation(resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters); + if (inner != null) { + return new DataConnectionValidationListResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public DataConnectionValidationListResult dataConnectionValidation( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DataConnectionValidationInner parameters, + Context context) { + DataConnectionValidationListResultInner inner = + this + .serviceClient() + .dataConnectionValidation( + resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters, context); + if (inner != null) { + return new DataConnectionValidationListResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listByDatabase( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName) { + PagedIterable inner = + this.serviceClient().listByDatabase(resourceGroupName, workspaceName, kustoPoolName, databaseName); + return Utils.mapPage(inner, inner1 -> new DataConnectionImpl(inner1, this.manager())); + } + + public PagedIterable listByDatabase( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName, Context context) { + PagedIterable inner = + this.serviceClient().listByDatabase(resourceGroupName, workspaceName, kustoPoolName, databaseName, context); + return Utils.mapPage(inner, inner1 -> new DataConnectionImpl(inner1, this.manager())); + } + + public DataConnection get( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName) { + DataConnectionInner inner = + this.serviceClient().get(resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName); + if (inner != null) { + return new DataConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + Context context) { + Response inner = + this + .serviceClient() + .getWithResponse( + resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DataConnectionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DataConnection createOrUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters) { + DataConnectionInner inner = + this + .serviceClient() + .createOrUpdate( + resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, parameters); + if (inner != null) { + return new DataConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public DataConnection createOrUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters, + Context context) { + DataConnectionInner inner = + this + .serviceClient() + .createOrUpdate( + resourceGroupName, + workspaceName, + kustoPoolName, + databaseName, + dataConnectionName, + parameters, + context); + if (inner != null) { + return new DataConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public DataConnection update( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters) { + DataConnectionInner inner = + this + .serviceClient() + .update(resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, parameters); + if (inner != null) { + return new DataConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public DataConnection update( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters, + Context context) { + DataConnectionInner inner = + this + .serviceClient() + .update( + resourceGroupName, + workspaceName, + kustoPoolName, + databaseName, + dataConnectionName, + parameters, + context); + if (inner != null) { + return new DataConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName) { + this.serviceClient().delete(resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName); + } + + public void delete( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + Context context) { + this + .serviceClient() + .delete(resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, context); + } + + private KustoPoolDataConnectionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.synapse.SynapseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDatabasePrincipalAssignmentsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDatabasePrincipalAssignmentsClientImpl.java new file mode 100644 index 0000000000000..b913accea87a5 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDatabasePrincipalAssignmentsClientImpl.java @@ -0,0 +1,1598 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.synapse.fluent.KustoPoolDatabasePrincipalAssignmentsClient; +import com.azure.resourcemanager.synapse.fluent.models.CheckNameResultInner; +import com.azure.resourcemanager.synapse.fluent.models.DatabasePrincipalAssignmentInner; +import com.azure.resourcemanager.synapse.models.DatabasePrincipalAssignmentCheckNameRequest; +import com.azure.resourcemanager.synapse.models.DatabasePrincipalAssignmentListResult; +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 + * KustoPoolDatabasePrincipalAssignmentsClient. + */ +public final class KustoPoolDatabasePrincipalAssignmentsClientImpl + implements KustoPoolDatabasePrincipalAssignmentsClient { + private final ClientLogger logger = new ClientLogger(KustoPoolDatabasePrincipalAssignmentsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final KustoPoolDatabasePrincipalAssignmentsService service; + + /** The service client containing this operation class. */ + private final SynapseManagementClientImpl client; + + /** + * Initializes an instance of KustoPoolDatabasePrincipalAssignmentsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + KustoPoolDatabasePrincipalAssignmentsClientImpl(SynapseManagementClientImpl client) { + this.service = + RestProxy + .create( + KustoPoolDatabasePrincipalAssignmentsService.class, + client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SynapseManagementClientKustoPoolDatabasePrincipalAssignments to be + * used by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SynapseManagementCli") + private interface KustoPoolDatabasePrincipalAssignmentsService { + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}" + + "/checkPrincipalAssignmentNameAvailability") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> checkNameAvailability( + @HostParam("$host") String endpoint, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("databaseName") String databaseName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DatabasePrincipalAssignmentCheckNameRequest principalAssignmentName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/principalAssignments") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("databaseName") String databaseName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/principalAssignments" + + "/{principalAssignmentName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("databaseName") String databaseName, + @PathParam("principalAssignmentName") String principalAssignmentName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/principalAssignments" + + "/{principalAssignmentName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("databaseName") String databaseName, + @PathParam("principalAssignmentName") String principalAssignmentName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DatabasePrincipalAssignmentInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/principalAssignments" + + "/{principalAssignmentName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("databaseName") String databaseName, + @PathParam("principalAssignmentName") String principalAssignmentName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Checks that the database principal assignment is valid and is not already in use. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param principalAssignmentName The name of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> checkNameAvailabilityWithResponseAsync( + String workspaceName, + String kustoPoolName, + String databaseName, + String resourceGroupName, + DatabasePrincipalAssignmentCheckNameRequest principalAssignmentName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (principalAssignmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter principalAssignmentName is required and cannot be null.")); + } else { + principalAssignmentName.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .checkNameAvailability( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + databaseName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + principalAssignmentName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Checks that the database principal assignment is valid and is not already in use. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param principalAssignmentName The name of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> checkNameAvailabilityWithResponseAsync( + String workspaceName, + String kustoPoolName, + String databaseName, + String resourceGroupName, + DatabasePrincipalAssignmentCheckNameRequest principalAssignmentName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (principalAssignmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter principalAssignmentName is required and cannot be null.")); + } else { + principalAssignmentName.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .checkNameAvailability( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + databaseName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + principalAssignmentName, + accept, + context); + } + + /** + * Checks that the database principal assignment is valid and is not already in use. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param principalAssignmentName The name of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono checkNameAvailabilityAsync( + String workspaceName, + String kustoPoolName, + String databaseName, + String resourceGroupName, + DatabasePrincipalAssignmentCheckNameRequest principalAssignmentName) { + return checkNameAvailabilityWithResponseAsync( + workspaceName, kustoPoolName, databaseName, resourceGroupName, principalAssignmentName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Checks that the database principal assignment is valid and is not already in use. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param principalAssignmentName The name of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CheckNameResultInner checkNameAvailability( + String workspaceName, + String kustoPoolName, + String databaseName, + String resourceGroupName, + DatabasePrincipalAssignmentCheckNameRequest principalAssignmentName) { + return checkNameAvailabilityAsync( + workspaceName, kustoPoolName, databaseName, resourceGroupName, principalAssignmentName) + .block(); + } + + /** + * Checks that the database principal assignment is valid and is not already in use. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param principalAssignmentName The name of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkNameAvailabilityWithResponse( + String workspaceName, + String kustoPoolName, + String databaseName, + String resourceGroupName, + DatabasePrincipalAssignmentCheckNameRequest principalAssignmentName, + Context context) { + return checkNameAvailabilityWithResponseAsync( + workspaceName, kustoPoolName, databaseName, resourceGroupName, principalAssignmentName, context) + .block(); + } + + /** + * Lists all Kusto pool database principalAssignments. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto database principal assignments operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String workspaceName, String kustoPoolName, String databaseName, String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + databaseName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all Kusto pool database principalAssignments. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto database principal assignments operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String workspaceName, String kustoPoolName, String databaseName, String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + databaseName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + } + + /** + * Lists all Kusto pool database principalAssignments. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto database principal assignments operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String workspaceName, String kustoPoolName, String databaseName, String resourceGroupName) { + return new PagedFlux<>( + () -> listSinglePageAsync(workspaceName, kustoPoolName, databaseName, resourceGroupName)); + } + + /** + * Lists all Kusto pool database principalAssignments. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto database principal assignments operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String workspaceName, String kustoPoolName, String databaseName, String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(workspaceName, kustoPoolName, databaseName, resourceGroupName, context)); + } + + /** + * Lists all Kusto pool database principalAssignments. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto database principal assignments operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String workspaceName, String kustoPoolName, String databaseName, String resourceGroupName) { + return new PagedIterable<>(listAsync(workspaceName, kustoPoolName, databaseName, resourceGroupName)); + } + + /** + * Lists all Kusto pool database principalAssignments. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto database principal assignments operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String workspaceName, String kustoPoolName, String databaseName, String resourceGroupName, Context context) { + return new PagedIterable<>(listAsync(workspaceName, kustoPoolName, databaseName, resourceGroupName, context)); + } + + /** + * Gets a Kusto pool database principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Kusto pool database principalAssignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (principalAssignmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter principalAssignmentName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + databaseName, + principalAssignmentName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a Kusto pool database principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Kusto pool database principalAssignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (principalAssignmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter principalAssignmentName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + databaseName, + principalAssignmentName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + accept, + context); + } + + /** + * Gets a Kusto pool database principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Kusto pool database principalAssignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName) { + return getWithResponseAsync( + workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets a Kusto pool database principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Kusto pool database principalAssignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DatabasePrincipalAssignmentInner get( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName) { + return getAsync(workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName).block(); + } + + /** + * Gets a Kusto pool database principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Kusto pool database principalAssignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName, + Context context) { + return getWithResponseAsync( + workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName, context) + .block(); + } + + /** + * Creates a Kusto pool database principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The Kusto principalAssignments parameters supplied for the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a database principal assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName, + DatabasePrincipalAssignmentInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (principalAssignmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter principalAssignmentName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + databaseName, + principalAssignmentName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates a Kusto pool database principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The Kusto principalAssignments parameters supplied for the 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 class representing a database principal assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName, + DatabasePrincipalAssignmentInner parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (principalAssignmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter principalAssignmentName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + databaseName, + principalAssignmentName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + parameters, + accept, + context); + } + + /** + * Creates a Kusto pool database principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The Kusto principalAssignments parameters supplied for the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a database principal assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, DatabasePrincipalAssignmentInner> + beginCreateOrUpdateAsync( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName, + DatabasePrincipalAssignmentInner parameters) { + Mono>> mono = + createOrUpdateWithResponseAsync( + workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName, parameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + DatabasePrincipalAssignmentInner.class, + DatabasePrincipalAssignmentInner.class, + Context.NONE); + } + + /** + * Creates a Kusto pool database principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The Kusto principalAssignments parameters supplied for the 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 class representing a database principal assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, DatabasePrincipalAssignmentInner> + beginCreateOrUpdateAsync( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName, + DatabasePrincipalAssignmentInner parameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync( + workspaceName, + kustoPoolName, + databaseName, + principalAssignmentName, + resourceGroupName, + parameters, + context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + DatabasePrincipalAssignmentInner.class, + DatabasePrincipalAssignmentInner.class, + context); + } + + /** + * Creates a Kusto pool database principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The Kusto principalAssignments parameters supplied for the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a database principal assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, DatabasePrincipalAssignmentInner> + beginCreateOrUpdate( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName, + DatabasePrincipalAssignmentInner parameters) { + return beginCreateOrUpdateAsync( + workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName, parameters) + .getSyncPoller(); + } + + /** + * Creates a Kusto pool database principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The Kusto principalAssignments parameters supplied for the 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 class representing a database principal assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, DatabasePrincipalAssignmentInner> + beginCreateOrUpdate( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName, + DatabasePrincipalAssignmentInner parameters, + Context context) { + return beginCreateOrUpdateAsync( + workspaceName, + kustoPoolName, + databaseName, + principalAssignmentName, + resourceGroupName, + parameters, + context) + .getSyncPoller(); + } + + /** + * Creates a Kusto pool database principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The Kusto principalAssignments parameters supplied for the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a database principal assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName, + DatabasePrincipalAssignmentInner parameters) { + return beginCreateOrUpdateAsync( + workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a Kusto pool database principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The Kusto principalAssignments parameters supplied for the 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 class representing a database principal assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName, + DatabasePrincipalAssignmentInner parameters, + Context context) { + return beginCreateOrUpdateAsync( + workspaceName, + kustoPoolName, + databaseName, + principalAssignmentName, + resourceGroupName, + parameters, + context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates a Kusto pool database principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The Kusto principalAssignments parameters supplied for the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a database principal assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DatabasePrincipalAssignmentInner createOrUpdate( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName, + DatabasePrincipalAssignmentInner parameters) { + return createOrUpdateAsync( + workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName, parameters) + .block(); + } + + /** + * Creates a Kusto pool database principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The Kusto principalAssignments parameters supplied for the 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 class representing a database principal assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DatabasePrincipalAssignmentInner createOrUpdate( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName, + DatabasePrincipalAssignmentInner parameters, + Context context) { + return createOrUpdateAsync( + workspaceName, + kustoPoolName, + databaseName, + principalAssignmentName, + resourceGroupName, + parameters, + context) + .block(); + } + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (principalAssignmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter principalAssignmentName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + databaseName, + principalAssignmentName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (principalAssignmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter principalAssignmentName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + databaseName, + principalAssignmentName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + accept, + context); + } + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginDeleteAsync( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName) { + Mono>> mono = + deleteWithResponseAsync( + workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + } + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginDeleteAsync( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync( + workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName) { + return beginDeleteAsync(workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName) + .getSyncPoller(); + } + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName, + Context context) { + return beginDeleteAsync( + workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName, context) + .getSyncPoller(); + } + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName) { + return beginDeleteAsync(workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName, + Context context) { + return beginDeleteAsync( + workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName) { + deleteAsync(workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName).block(); + } + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName, + Context context) { + deleteAsync(workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName, context) + .block(); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDatabasePrincipalAssignmentsImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDatabasePrincipalAssignmentsImpl.java new file mode 100644 index 0000000000000..2a2ca11c11a1d --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDatabasePrincipalAssignmentsImpl.java @@ -0,0 +1,343 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.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.synapse.fluent.KustoPoolDatabasePrincipalAssignmentsClient; +import com.azure.resourcemanager.synapse.fluent.models.CheckNameResultInner; +import com.azure.resourcemanager.synapse.fluent.models.DatabasePrincipalAssignmentInner; +import com.azure.resourcemanager.synapse.models.CheckNameResult; +import com.azure.resourcemanager.synapse.models.DatabasePrincipalAssignment; +import com.azure.resourcemanager.synapse.models.DatabasePrincipalAssignmentCheckNameRequest; +import com.azure.resourcemanager.synapse.models.KustoPoolDatabasePrincipalAssignments; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class KustoPoolDatabasePrincipalAssignmentsImpl implements KustoPoolDatabasePrincipalAssignments { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KustoPoolDatabasePrincipalAssignmentsImpl.class); + + private final KustoPoolDatabasePrincipalAssignmentsClient innerClient; + + private final com.azure.resourcemanager.synapse.SynapseManager serviceManager; + + public KustoPoolDatabasePrincipalAssignmentsImpl( + KustoPoolDatabasePrincipalAssignmentsClient innerClient, + com.azure.resourcemanager.synapse.SynapseManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public CheckNameResult checkNameAvailability( + String workspaceName, + String kustoPoolName, + String databaseName, + String resourceGroupName, + DatabasePrincipalAssignmentCheckNameRequest principalAssignmentName) { + CheckNameResultInner inner = + this + .serviceClient() + .checkNameAvailability( + workspaceName, kustoPoolName, databaseName, resourceGroupName, principalAssignmentName); + if (inner != null) { + return new CheckNameResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response checkNameAvailabilityWithResponse( + String workspaceName, + String kustoPoolName, + String databaseName, + String resourceGroupName, + DatabasePrincipalAssignmentCheckNameRequest principalAssignmentName, + Context context) { + Response inner = + this + .serviceClient() + .checkNameAvailabilityWithResponse( + workspaceName, kustoPoolName, databaseName, resourceGroupName, principalAssignmentName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CheckNameResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable list( + String workspaceName, String kustoPoolName, String databaseName, String resourceGroupName) { + PagedIterable inner = + this.serviceClient().list(workspaceName, kustoPoolName, databaseName, resourceGroupName); + return Utils.mapPage(inner, inner1 -> new DatabasePrincipalAssignmentImpl(inner1, this.manager())); + } + + public PagedIterable list( + String workspaceName, String kustoPoolName, String databaseName, String resourceGroupName, Context context) { + PagedIterable inner = + this.serviceClient().list(workspaceName, kustoPoolName, databaseName, resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new DatabasePrincipalAssignmentImpl(inner1, this.manager())); + } + + public DatabasePrincipalAssignment get( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName) { + DatabasePrincipalAssignmentInner inner = + this + .serviceClient() + .get(workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName); + if (inner != null) { + return new DatabasePrincipalAssignmentImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName, + Context context) { + Response inner = + this + .serviceClient() + .getWithResponse( + workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DatabasePrincipalAssignmentImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void delete( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName) { + this + .serviceClient() + .delete(workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName); + } + + public void delete( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName, + Context context) { + this + .serviceClient() + .delete(workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName, context); + } + + public DatabasePrincipalAssignment getById(String id) { + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String kustoPoolName = Utils.getValueFromIdByName(id, "kustoPools"); + if (kustoPoolName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'kustoPools'.", id))); + } + String databaseName = Utils.getValueFromIdByName(id, "databases"); + if (databaseName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'databases'.", id))); + } + String principalAssignmentName = Utils.getValueFromIdByName(id, "principalAssignments"); + if (principalAssignmentName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'principalAssignments'.", + id))); + } + String resourceGroupName = Utils.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))); + } + return this + .getWithResponse( + workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String kustoPoolName = Utils.getValueFromIdByName(id, "kustoPools"); + if (kustoPoolName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'kustoPools'.", id))); + } + String databaseName = Utils.getValueFromIdByName(id, "databases"); + if (databaseName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'databases'.", id))); + } + String principalAssignmentName = Utils.getValueFromIdByName(id, "principalAssignments"); + if (principalAssignmentName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'principalAssignments'.", + id))); + } + String resourceGroupName = Utils.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))); + } + return this + .getWithResponse( + workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName, context); + } + + public void deleteById(String id) { + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String kustoPoolName = Utils.getValueFromIdByName(id, "kustoPools"); + if (kustoPoolName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'kustoPools'.", id))); + } + String databaseName = Utils.getValueFromIdByName(id, "databases"); + if (databaseName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'databases'.", id))); + } + String principalAssignmentName = Utils.getValueFromIdByName(id, "principalAssignments"); + if (principalAssignmentName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'principalAssignments'.", + id))); + } + String resourceGroupName = Utils.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))); + } + this + .delete( + workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String kustoPoolName = Utils.getValueFromIdByName(id, "kustoPools"); + if (kustoPoolName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'kustoPools'.", id))); + } + String databaseName = Utils.getValueFromIdByName(id, "databases"); + if (databaseName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'databases'.", id))); + } + String principalAssignmentName = Utils.getValueFromIdByName(id, "principalAssignments"); + if (principalAssignmentName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'principalAssignments'.", + id))); + } + String resourceGroupName = Utils.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))); + } + this.delete(workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName, context); + } + + private KustoPoolDatabasePrincipalAssignmentsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.synapse.SynapseManager manager() { + return this.serviceManager; + } + + public DatabasePrincipalAssignmentImpl define(String name) { + return new DatabasePrincipalAssignmentImpl(name, this.manager()); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDatabasesClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDatabasesClientImpl.java new file mode 100644 index 0000000000000..f772f59ab1630 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDatabasesClientImpl.java @@ -0,0 +1,1495 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.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.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.synapse.fluent.KustoPoolDatabasesClient; +import com.azure.resourcemanager.synapse.fluent.models.DatabaseInner; +import com.azure.resourcemanager.synapse.models.DatabaseListResult; +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 KustoPoolDatabasesClient. */ +public final class KustoPoolDatabasesClientImpl implements KustoPoolDatabasesClient { + private final ClientLogger logger = new ClientLogger(KustoPoolDatabasesClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final KustoPoolDatabasesService service; + + /** The service client containing this operation class. */ + private final SynapseManagementClientImpl client; + + /** + * Initializes an instance of KustoPoolDatabasesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + KustoPoolDatabasesClientImpl(SynapseManagementClientImpl client) { + this.service = + RestProxy.create(KustoPoolDatabasesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SynapseManagementClientKustoPoolDatabases to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SynapseManagementCli") + private interface KustoPoolDatabasesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/databases") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByKustoPool( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("databaseName") String databaseName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("databaseName") String databaseName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DatabaseInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("databaseName") String databaseName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DatabaseInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("databaseName") String databaseName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Returns the list of databases of the given Kusto pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto 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 list Kusto databases operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByKustoPoolSinglePageAsync( + String resourceGroupName, String workspaceName, String kustoPoolName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByKustoPool( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + kustoPoolName, + apiVersion, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns the list of databases of the given Kusto pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto 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 list Kusto databases operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByKustoPoolSinglePageAsync( + String resourceGroupName, String workspaceName, String kustoPoolName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByKustoPool( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + kustoPoolName, + apiVersion, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + } + + /** + * Returns the list of databases of the given Kusto pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto 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 list Kusto databases operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByKustoPoolAsync( + String resourceGroupName, String workspaceName, String kustoPoolName) { + return new PagedFlux<>(() -> listByKustoPoolSinglePageAsync(resourceGroupName, workspaceName, kustoPoolName)); + } + + /** + * Returns the list of databases of the given Kusto pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto 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 list Kusto databases operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByKustoPoolAsync( + String resourceGroupName, String workspaceName, String kustoPoolName, Context context) { + return new PagedFlux<>( + () -> listByKustoPoolSinglePageAsync(resourceGroupName, workspaceName, kustoPoolName, context)); + } + + /** + * Returns the list of databases of the given Kusto pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto 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 list Kusto databases operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByKustoPool( + String resourceGroupName, String workspaceName, String kustoPoolName) { + return new PagedIterable<>(listByKustoPoolAsync(resourceGroupName, workspaceName, kustoPoolName)); + } + + /** + * Returns the list of databases of the given Kusto pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto 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 list Kusto databases operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByKustoPool( + String resourceGroupName, String workspaceName, String kustoPoolName, Context context) { + return new PagedIterable<>(listByKustoPoolAsync(resourceGroupName, workspaceName, kustoPoolName, context)); + } + + /** + * Returns a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + kustoPoolName, + databaseName, + apiVersion, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + kustoPoolName, + databaseName, + apiVersion, + accept, + context); + } + + /** + * Returns a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName) { + return getWithResponseAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Returns a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DatabaseInner get( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName) { + return getAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName).block(); + } + + /** + * Returns a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName, context).block(); + } + + /** + * Creates or updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + kustoPoolName, + databaseName, + apiVersion, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the CreateOrUpdate 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 class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + kustoPoolName, + databaseName, + apiVersion, + parameters, + accept, + context); + } + + /** + * Creates or updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, DatabaseInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), DatabaseInner.class, DatabaseInner.class, Context.NONE); + } + + /** + * Creates or updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the CreateOrUpdate 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 class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, DatabaseInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), DatabaseInner.class, DatabaseInner.class, context); + } + + /** + * Creates or updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, DatabaseInner> beginCreateOrUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters) + .getSyncPoller(); + } + + /** + * Creates or updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the CreateOrUpdate 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 class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, DatabaseInner> beginCreateOrUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters, + Context context) { + return beginCreateOrUpdateAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters, context) + .getSyncPoller(); + } + + /** + * Creates or updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the CreateOrUpdate 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 class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters, + Context context) { + return beginCreateOrUpdateAsync( + resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DatabaseInner createOrUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters) { + return createOrUpdateAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters).block(); + } + + /** + * Creates or updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the CreateOrUpdate 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 class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DatabaseInner createOrUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters, + Context context) { + return createOrUpdateAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters, context) + .block(); + } + + /** + * Updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + kustoPoolName, + databaseName, + apiVersion, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the Update 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 class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + kustoPoolName, + databaseName, + apiVersion, + parameters, + accept, + context); + } + + /** + * Updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, DatabaseInner> beginUpdateAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters) { + Mono>> mono = + updateWithResponseAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), DatabaseInner.class, DatabaseInner.class, Context.NONE); + } + + /** + * Updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the Update 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 class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, DatabaseInner> beginUpdateAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateWithResponseAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), DatabaseInner.class, DatabaseInner.class, context); + } + + /** + * Updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, DatabaseInner> beginUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters) { + return beginUpdateAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters) + .getSyncPoller(); + } + + /** + * Updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the Update 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 class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, DatabaseInner> beginUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters, + Context context) { + return beginUpdateAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters, context) + .getSyncPoller(); + } + + /** + * Updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters) { + return beginUpdateAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the Update 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 class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters, + Context context) { + return beginUpdateAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DatabaseInner update( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters) { + return updateAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters).block(); + } + + /** + * Updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the Update 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 class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DatabaseInner update( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters, + Context context) { + return updateAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters, context).block(); + } + + /** + * Deletes the database with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + kustoPoolName, + databaseName, + apiVersion, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the database with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (databaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + kustoPoolName, + databaseName, + apiVersion, + accept, + context); + } + + /** + * Deletes the database with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName) { + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + } + + /** + * Deletes the database with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Deletes the database with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName) { + return beginDeleteAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName).getSyncPoller(); + } + + /** + * Deletes the database with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName, Context context) { + return beginDeleteAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName, context).getSyncPoller(); + } + + /** + * Deletes the database with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName) { + return beginDeleteAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the database with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName, Context context) { + return beginDeleteAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the database with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 workspaceName, String kustoPoolName, String databaseName) { + deleteAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName).block(); + } + + /** + * Deletes the database with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 workspaceName, String kustoPoolName, String databaseName, Context context) { + deleteAsync(resourceGroupName, workspaceName, kustoPoolName, databaseName, context).block(); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDatabasesImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDatabasesImpl.java new file mode 100644 index 0000000000000..25e5c2a88b2c6 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDatabasesImpl.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.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.synapse.fluent.KustoPoolDatabasesClient; +import com.azure.resourcemanager.synapse.fluent.models.DatabaseInner; +import com.azure.resourcemanager.synapse.models.Database; +import com.azure.resourcemanager.synapse.models.KustoPoolDatabases; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class KustoPoolDatabasesImpl implements KustoPoolDatabases { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KustoPoolDatabasesImpl.class); + + private final KustoPoolDatabasesClient innerClient; + + private final com.azure.resourcemanager.synapse.SynapseManager serviceManager; + + public KustoPoolDatabasesImpl( + KustoPoolDatabasesClient innerClient, com.azure.resourcemanager.synapse.SynapseManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByKustoPool( + String resourceGroupName, String workspaceName, String kustoPoolName) { + PagedIterable inner = + this.serviceClient().listByKustoPool(resourceGroupName, workspaceName, kustoPoolName); + return Utils.mapPage(inner, inner1 -> new DatabaseImpl(inner1, this.manager())); + } + + public PagedIterable listByKustoPool( + String resourceGroupName, String workspaceName, String kustoPoolName, Context context) { + PagedIterable inner = + this.serviceClient().listByKustoPool(resourceGroupName, workspaceName, kustoPoolName, context); + return Utils.mapPage(inner, inner1 -> new DatabaseImpl(inner1, this.manager())); + } + + public Database get(String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName) { + DatabaseInner inner = this.serviceClient().get(resourceGroupName, workspaceName, kustoPoolName, databaseName); + if (inner != null) { + return new DatabaseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName, Context context) { + Response inner = + this + .serviceClient() + .getWithResponse(resourceGroupName, workspaceName, kustoPoolName, databaseName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DatabaseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Database createOrUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters) { + DatabaseInner inner = + this + .serviceClient() + .createOrUpdate(resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters); + if (inner != null) { + return new DatabaseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Database createOrUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters, + Context context) { + DatabaseInner inner = + this + .serviceClient() + .createOrUpdate(resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters, context); + if (inner != null) { + return new DatabaseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Database update( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters) { + DatabaseInner inner = + this.serviceClient().update(resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters); + if (inner != null) { + return new DatabaseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Database update( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters, + Context context) { + DatabaseInner inner = + this + .serviceClient() + .update(resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters, context); + if (inner != null) { + return new DatabaseImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName) { + this.serviceClient().delete(resourceGroupName, workspaceName, kustoPoolName, databaseName); + } + + public void delete( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName, Context context) { + this.serviceClient().delete(resourceGroupName, workspaceName, kustoPoolName, databaseName, context); + } + + private KustoPoolDatabasesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.synapse.SynapseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolImpl.java new file mode 100644 index 0000000000000..11cac27a767e9 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolImpl.java @@ -0,0 +1,401 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.synapse.fluent.models.FollowerDatabaseDefinitionInner; +import com.azure.resourcemanager.synapse.fluent.models.KustoPoolInner; +import com.azure.resourcemanager.synapse.models.AzureSku; +import com.azure.resourcemanager.synapse.models.FollowerDatabaseDefinition; +import com.azure.resourcemanager.synapse.models.KustoPool; +import com.azure.resourcemanager.synapse.models.KustoPoolUpdate; +import com.azure.resourcemanager.synapse.models.LanguageExtension; +import com.azure.resourcemanager.synapse.models.LanguageExtensionsList; +import com.azure.resourcemanager.synapse.models.OptimizedAutoscale; +import com.azure.resourcemanager.synapse.models.ResourceProvisioningState; +import com.azure.resourcemanager.synapse.models.State; +import java.util.Collections; +import java.util.Map; + +public final class KustoPoolImpl implements KustoPool, KustoPool.Definition, KustoPool.Update { + private KustoPoolInner innerObject; + + private final com.azure.resourcemanager.synapse.SynapseManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public AzureSku sku() { + return this.innerModel().sku(); + } + + public String etag() { + return this.innerModel().etag(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public State state() { + return this.innerModel().state(); + } + + public ResourceProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String uri() { + return this.innerModel().uri(); + } + + public String dataIngestionUri() { + return this.innerModel().dataIngestionUri(); + } + + public String stateReason() { + return this.innerModel().stateReason(); + } + + public OptimizedAutoscale optimizedAutoscale() { + return this.innerModel().optimizedAutoscale(); + } + + public Boolean enableStreamingIngest() { + return this.innerModel().enableStreamingIngest(); + } + + public Boolean enablePurge() { + return this.innerModel().enablePurge(); + } + + public LanguageExtensionsList languageExtensions() { + return this.innerModel().languageExtensions(); + } + + public String workspaceUid() { + return this.innerModel().workspaceUid(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public KustoPoolInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.synapse.SynapseManager manager() { + return this.serviceManager; + } + + private String workspaceName; + + private String resourceGroupName; + + private String kustoPoolName; + + private String createIfMatch; + + private String createIfNoneMatch; + + private String updateIfMatch; + + private KustoPoolUpdate updateParameters; + + public KustoPoolImpl withExistingWorkspace(String workspaceName, String resourceGroupName) { + this.workspaceName = workspaceName; + this.resourceGroupName = resourceGroupName; + return this; + } + + public KustoPool create() { + this.innerObject = + serviceManager + .serviceClient() + .getKustoPoolsOperations() + .createOrUpdate( + workspaceName, + resourceGroupName, + kustoPoolName, + this.innerModel(), + createIfMatch, + createIfNoneMatch, + Context.NONE); + return this; + } + + public KustoPool create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getKustoPoolsOperations() + .createOrUpdate( + workspaceName, + resourceGroupName, + kustoPoolName, + this.innerModel(), + createIfMatch, + createIfNoneMatch, + context); + return this; + } + + KustoPoolImpl(String name, com.azure.resourcemanager.synapse.SynapseManager serviceManager) { + this.innerObject = new KustoPoolInner(); + this.serviceManager = serviceManager; + this.kustoPoolName = name; + this.createIfMatch = null; + this.createIfNoneMatch = null; + } + + public KustoPoolImpl update() { + this.updateIfMatch = null; + this.updateParameters = new KustoPoolUpdate(); + return this; + } + + public KustoPool apply() { + this.innerObject = + serviceManager + .serviceClient() + .getKustoPoolsOperations() + .update(workspaceName, resourceGroupName, kustoPoolName, updateParameters, updateIfMatch, Context.NONE); + return this; + } + + public KustoPool apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getKustoPoolsOperations() + .update(workspaceName, resourceGroupName, kustoPoolName, updateParameters, updateIfMatch, context); + return this; + } + + KustoPoolImpl(KustoPoolInner innerObject, com.azure.resourcemanager.synapse.SynapseManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.kustoPoolName = Utils.getValueFromIdByName(innerObject.id(), "kustoPools"); + } + + public KustoPool refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getKustoPoolsOperations() + .getWithResponse(workspaceName, kustoPoolName, resourceGroupName, Context.NONE) + .getValue(); + return this; + } + + public KustoPool refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getKustoPoolsOperations() + .getWithResponse(workspaceName, kustoPoolName, resourceGroupName, context) + .getValue(); + return this; + } + + public void stop() { + serviceManager.kustoPoolsOperations().stop(workspaceName, kustoPoolName, resourceGroupName); + } + + public void stop(Context context) { + serviceManager.kustoPoolsOperations().stop(workspaceName, kustoPoolName, resourceGroupName, context); + } + + public void start() { + serviceManager.kustoPoolsOperations().start(workspaceName, kustoPoolName, resourceGroupName); + } + + public void start(Context context) { + serviceManager.kustoPoolsOperations().start(workspaceName, kustoPoolName, resourceGroupName, context); + } + + public PagedIterable listLanguageExtensions() { + return serviceManager + .kustoPoolsOperations() + .listLanguageExtensions(workspaceName, kustoPoolName, resourceGroupName); + } + + public PagedIterable listLanguageExtensions(Context context) { + return serviceManager + .kustoPoolsOperations() + .listLanguageExtensions(workspaceName, kustoPoolName, resourceGroupName, context); + } + + public void addLanguageExtensions(LanguageExtensionsList languageExtensionsToAdd) { + serviceManager + .kustoPoolsOperations() + .addLanguageExtensions(workspaceName, kustoPoolName, resourceGroupName, languageExtensionsToAdd); + } + + public void addLanguageExtensions(LanguageExtensionsList languageExtensionsToAdd, Context context) { + serviceManager + .kustoPoolsOperations() + .addLanguageExtensions(workspaceName, kustoPoolName, resourceGroupName, languageExtensionsToAdd, context); + } + + public void removeLanguageExtensions(LanguageExtensionsList languageExtensionsToRemove) { + serviceManager + .kustoPoolsOperations() + .removeLanguageExtensions(workspaceName, kustoPoolName, resourceGroupName, languageExtensionsToRemove); + } + + public void removeLanguageExtensions(LanguageExtensionsList languageExtensionsToRemove, Context context) { + serviceManager + .kustoPoolsOperations() + .removeLanguageExtensions( + workspaceName, kustoPoolName, resourceGroupName, languageExtensionsToRemove, context); + } + + public PagedIterable listFollowerDatabases() { + return serviceManager + .kustoPoolsOperations() + .listFollowerDatabases(workspaceName, kustoPoolName, resourceGroupName); + } + + public PagedIterable listFollowerDatabases(Context context) { + return serviceManager + .kustoPoolsOperations() + .listFollowerDatabases(workspaceName, kustoPoolName, resourceGroupName, context); + } + + public void detachFollowerDatabases(FollowerDatabaseDefinitionInner followerDatabaseToRemove) { + serviceManager + .kustoPoolsOperations() + .detachFollowerDatabases(workspaceName, kustoPoolName, resourceGroupName, followerDatabaseToRemove); + } + + public void detachFollowerDatabases(FollowerDatabaseDefinitionInner followerDatabaseToRemove, Context context) { + serviceManager + .kustoPoolsOperations() + .detachFollowerDatabases( + workspaceName, kustoPoolName, resourceGroupName, followerDatabaseToRemove, context); + } + + public KustoPoolImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public KustoPoolImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public KustoPoolImpl withSku(AzureSku sku) { + if (isInCreateMode()) { + this.innerModel().withSku(sku); + return this; + } else { + this.updateParameters.withSku(sku); + return this; + } + } + + public KustoPoolImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateParameters.withTags(tags); + return this; + } + } + + public KustoPoolImpl withOptimizedAutoscale(OptimizedAutoscale optimizedAutoscale) { + if (isInCreateMode()) { + this.innerModel().withOptimizedAutoscale(optimizedAutoscale); + return this; + } else { + this.updateParameters.withOptimizedAutoscale(optimizedAutoscale); + return this; + } + } + + public KustoPoolImpl withEnableStreamingIngest(Boolean enableStreamingIngest) { + if (isInCreateMode()) { + this.innerModel().withEnableStreamingIngest(enableStreamingIngest); + return this; + } else { + this.updateParameters.withEnableStreamingIngest(enableStreamingIngest); + return this; + } + } + + public KustoPoolImpl withEnablePurge(Boolean enablePurge) { + if (isInCreateMode()) { + this.innerModel().withEnablePurge(enablePurge); + return this; + } else { + this.updateParameters.withEnablePurge(enablePurge); + return this; + } + } + + public KustoPoolImpl withWorkspaceUid(String workspaceUid) { + if (isInCreateMode()) { + this.innerModel().withWorkspaceUid(workspaceUid); + return this; + } else { + this.updateParameters.withWorkspaceUid(workspaceUid); + return this; + } + } + + public KustoPoolImpl withIfMatch(String ifMatch) { + if (isInCreateMode()) { + this.createIfMatch = ifMatch; + return this; + } else { + this.updateIfMatch = ifMatch; + return this; + } + } + + public KustoPoolImpl withIfNoneMatch(String ifNoneMatch) { + this.createIfNoneMatch = ifNoneMatch; + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolListResultImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolListResultImpl.java new file mode 100644 index 0000000000000..02e1a39a59154 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolListResultImpl.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.implementation; + +import com.azure.resourcemanager.synapse.fluent.models.KustoPoolInner; +import com.azure.resourcemanager.synapse.fluent.models.KustoPoolListResultInner; +import com.azure.resourcemanager.synapse.models.KustoPool; +import com.azure.resourcemanager.synapse.models.KustoPoolListResult; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class KustoPoolListResultImpl implements KustoPoolListResult { + private KustoPoolListResultInner innerObject; + + private final com.azure.resourcemanager.synapse.SynapseManager serviceManager; + + KustoPoolListResultImpl( + KustoPoolListResultInner innerObject, com.azure.resourcemanager.synapse.SynapseManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new KustoPoolImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public KustoPoolListResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.synapse.SynapseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolPrincipalAssignmentsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolPrincipalAssignmentsClientImpl.java new file mode 100644 index 0000000000000..5dd7c7d800a6d --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolPrincipalAssignmentsClientImpl.java @@ -0,0 +1,1418 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.synapse.fluent.KustoPoolPrincipalAssignmentsClient; +import com.azure.resourcemanager.synapse.fluent.models.CheckNameResultInner; +import com.azure.resourcemanager.synapse.fluent.models.ClusterPrincipalAssignmentInner; +import com.azure.resourcemanager.synapse.models.ClusterPrincipalAssignmentCheckNameRequest; +import com.azure.resourcemanager.synapse.models.ClusterPrincipalAssignmentListResult; +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 KustoPoolPrincipalAssignmentsClient. */ +public final class KustoPoolPrincipalAssignmentsClientImpl implements KustoPoolPrincipalAssignmentsClient { + private final ClientLogger logger = new ClientLogger(KustoPoolPrincipalAssignmentsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final KustoPoolPrincipalAssignmentsService service; + + /** The service client containing this operation class. */ + private final SynapseManagementClientImpl client; + + /** + * Initializes an instance of KustoPoolPrincipalAssignmentsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + KustoPoolPrincipalAssignmentsClientImpl(SynapseManagementClientImpl client) { + this.service = + RestProxy + .create( + KustoPoolPrincipalAssignmentsService.class, + client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SynapseManagementClientKustoPoolPrincipalAssignments to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SynapseManagementCli") + private interface KustoPoolPrincipalAssignmentsService { + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/checkPrincipalAssignmentNameAvailability") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> checkNameAvailability( + @HostParam("$host") String endpoint, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ClusterPrincipalAssignmentCheckNameRequest principalAssignmentName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/principalAssignments") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/principalAssignments/{principalAssignmentName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("principalAssignmentName") String principalAssignmentName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/principalAssignments/{principalAssignmentName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("principalAssignmentName") String principalAssignmentName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ClusterPrincipalAssignmentInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/principalAssignments/{principalAssignmentName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("principalAssignmentName") String principalAssignmentName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Checks that the principal assignment name is valid and is not already in use. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param principalAssignmentName The name of the principal 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 result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> checkNameAvailabilityWithResponseAsync( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + ClusterPrincipalAssignmentCheckNameRequest principalAssignmentName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (principalAssignmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter principalAssignmentName is required and cannot be null.")); + } else { + principalAssignmentName.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .checkNameAvailability( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + principalAssignmentName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Checks that the principal assignment name is valid and is not already in use. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param principalAssignmentName The name of the principal 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 result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> checkNameAvailabilityWithResponseAsync( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + ClusterPrincipalAssignmentCheckNameRequest principalAssignmentName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (principalAssignmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter principalAssignmentName is required and cannot be null.")); + } else { + principalAssignmentName.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .checkNameAvailability( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + principalAssignmentName, + accept, + context); + } + + /** + * Checks that the principal assignment name is valid and is not already in use. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param principalAssignmentName The name of the principal 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 result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono checkNameAvailabilityAsync( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + ClusterPrincipalAssignmentCheckNameRequest principalAssignmentName) { + return checkNameAvailabilityWithResponseAsync( + workspaceName, kustoPoolName, resourceGroupName, principalAssignmentName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Checks that the principal assignment name is valid and is not already in use. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param principalAssignmentName The name of the principal 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 result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CheckNameResultInner checkNameAvailability( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + ClusterPrincipalAssignmentCheckNameRequest principalAssignmentName) { + return checkNameAvailabilityAsync(workspaceName, kustoPoolName, resourceGroupName, principalAssignmentName) + .block(); + } + + /** + * Checks that the principal assignment name is valid and is not already in use. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param principalAssignmentName The name of the principal 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 result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkNameAvailabilityWithResponse( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + ClusterPrincipalAssignmentCheckNameRequest principalAssignmentName, + Context context) { + return checkNameAvailabilityWithResponseAsync( + workspaceName, kustoPoolName, resourceGroupName, principalAssignmentName, context) + .block(); + } + + /** + * Lists all Kusto pool principalAssignments. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto cluster principal assignments operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String workspaceName, String kustoPoolName, String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all Kusto pool principalAssignments. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto cluster principal assignments operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + } + + /** + * Lists all Kusto pool principalAssignments. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto cluster principal assignments operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String workspaceName, String kustoPoolName, String resourceGroupName) { + return new PagedFlux<>(() -> listSinglePageAsync(workspaceName, kustoPoolName, resourceGroupName)); + } + + /** + * Lists all Kusto pool principalAssignments. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto cluster principal assignments operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(workspaceName, kustoPoolName, resourceGroupName, context)); + } + + /** + * Lists all Kusto pool principalAssignments. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto cluster principal assignments operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String workspaceName, String kustoPoolName, String resourceGroupName) { + return new PagedIterable<>(listAsync(workspaceName, kustoPoolName, resourceGroupName)); + } + + /** + * Lists all Kusto pool principalAssignments. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto cluster principal assignments operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + return new PagedIterable<>(listAsync(workspaceName, kustoPoolName, resourceGroupName, context)); + } + + /** + * Gets a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Kusto pool principalAssignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String workspaceName, String kustoPoolName, String principalAssignmentName, String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (principalAssignmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter principalAssignmentName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + principalAssignmentName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Kusto pool principalAssignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String workspaceName, + String kustoPoolName, + String principalAssignmentName, + String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (principalAssignmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter principalAssignmentName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + principalAssignmentName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + accept, + context); + } + + /** + * Gets a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Kusto pool principalAssignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String workspaceName, String kustoPoolName, String principalAssignmentName, String resourceGroupName) { + return getWithResponseAsync(workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Kusto pool principalAssignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ClusterPrincipalAssignmentInner get( + String workspaceName, String kustoPoolName, String principalAssignmentName, String resourceGroupName) { + return getAsync(workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName).block(); + } + + /** + * Gets a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Kusto pool principalAssignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String workspaceName, + String kustoPoolName, + String principalAssignmentName, + String resourceGroupName, + Context context) { + return getWithResponseAsync(workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName, context) + .block(); + } + + /** + * Create a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The Kusto pool principalAssignment's parameters supplied for the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a cluster principal assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String workspaceName, + String kustoPoolName, + String principalAssignmentName, + String resourceGroupName, + ClusterPrincipalAssignmentInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (principalAssignmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter principalAssignmentName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + principalAssignmentName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The Kusto pool principalAssignment's parameters supplied for the 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 class representing a cluster principal assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String workspaceName, + String kustoPoolName, + String principalAssignmentName, + String resourceGroupName, + ClusterPrincipalAssignmentInner parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (principalAssignmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter principalAssignmentName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + principalAssignmentName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + parameters, + accept, + context); + } + + /** + * Create a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The Kusto pool principalAssignment's parameters supplied for the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a cluster principal assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, ClusterPrincipalAssignmentInner> + beginCreateOrUpdateAsync( + String workspaceName, + String kustoPoolName, + String principalAssignmentName, + String resourceGroupName, + ClusterPrincipalAssignmentInner parameters) { + Mono>> mono = + createOrUpdateWithResponseAsync( + workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName, parameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ClusterPrincipalAssignmentInner.class, + ClusterPrincipalAssignmentInner.class, + Context.NONE); + } + + /** + * Create a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The Kusto pool principalAssignment's parameters supplied for the 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 class representing a cluster principal assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, ClusterPrincipalAssignmentInner> + beginCreateOrUpdateAsync( + String workspaceName, + String kustoPoolName, + String principalAssignmentName, + String resourceGroupName, + ClusterPrincipalAssignmentInner parameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync( + workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName, parameters, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ClusterPrincipalAssignmentInner.class, + ClusterPrincipalAssignmentInner.class, + context); + } + + /** + * Create a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The Kusto pool principalAssignment's parameters supplied for the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a cluster principal assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, ClusterPrincipalAssignmentInner> beginCreateOrUpdate( + String workspaceName, + String kustoPoolName, + String principalAssignmentName, + String resourceGroupName, + ClusterPrincipalAssignmentInner parameters) { + return beginCreateOrUpdateAsync( + workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName, parameters) + .getSyncPoller(); + } + + /** + * Create a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The Kusto pool principalAssignment's parameters supplied for the 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 class representing a cluster principal assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, ClusterPrincipalAssignmentInner> beginCreateOrUpdate( + String workspaceName, + String kustoPoolName, + String principalAssignmentName, + String resourceGroupName, + ClusterPrincipalAssignmentInner parameters, + Context context) { + return beginCreateOrUpdateAsync( + workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName, parameters, context) + .getSyncPoller(); + } + + /** + * Create a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The Kusto pool principalAssignment's parameters supplied for the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a cluster principal assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String workspaceName, + String kustoPoolName, + String principalAssignmentName, + String resourceGroupName, + ClusterPrincipalAssignmentInner parameters) { + return beginCreateOrUpdateAsync( + workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The Kusto pool principalAssignment's parameters supplied for the 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 class representing a cluster principal assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String workspaceName, + String kustoPoolName, + String principalAssignmentName, + String resourceGroupName, + ClusterPrincipalAssignmentInner parameters, + Context context) { + return beginCreateOrUpdateAsync( + workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The Kusto pool principalAssignment's parameters supplied for the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a cluster principal assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ClusterPrincipalAssignmentInner createOrUpdate( + String workspaceName, + String kustoPoolName, + String principalAssignmentName, + String resourceGroupName, + ClusterPrincipalAssignmentInner parameters) { + return createOrUpdateAsync(workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName, parameters) + .block(); + } + + /** + * Create a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters The Kusto pool principalAssignment's parameters supplied for the 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 class representing a cluster principal assignment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ClusterPrincipalAssignmentInner createOrUpdate( + String workspaceName, + String kustoPoolName, + String principalAssignmentName, + String resourceGroupName, + ClusterPrincipalAssignmentInner parameters, + Context context) { + return createOrUpdateAsync( + workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName, parameters, context) + .block(); + } + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String workspaceName, String kustoPoolName, String principalAssignmentName, String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (principalAssignmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter principalAssignmentName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + principalAssignmentName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String workspaceName, + String kustoPoolName, + String principalAssignmentName, + String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (principalAssignmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter principalAssignmentName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + principalAssignmentName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + accept, + context); + } + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginDeleteAsync( + String workspaceName, String kustoPoolName, String principalAssignmentName, String resourceGroupName) { + Mono>> mono = + deleteWithResponseAsync(workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + } + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginDeleteAsync( + String workspaceName, + String kustoPoolName, + String principalAssignmentName, + String resourceGroupName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete( + String workspaceName, String kustoPoolName, String principalAssignmentName, String resourceGroupName) { + return beginDeleteAsync(workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName) + .getSyncPoller(); + } + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete( + String workspaceName, + String kustoPoolName, + String principalAssignmentName, + String resourceGroupName, + Context context) { + return beginDeleteAsync(workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName, context) + .getSyncPoller(); + } + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String workspaceName, String kustoPoolName, String principalAssignmentName, String resourceGroupName) { + return beginDeleteAsync(workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String workspaceName, + String kustoPoolName, + String principalAssignmentName, + String resourceGroupName, + Context context) { + return beginDeleteAsync(workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete( + String workspaceName, String kustoPoolName, String principalAssignmentName, String resourceGroupName) { + deleteAsync(workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName).block(); + } + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete( + String workspaceName, + String kustoPoolName, + String principalAssignmentName, + String resourceGroupName, + Context context) { + deleteAsync(workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName, context).block(); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolPrincipalAssignmentsImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolPrincipalAssignmentsImpl.java new file mode 100644 index 0000000000000..8ef80ddd24d2b --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolPrincipalAssignmentsImpl.java @@ -0,0 +1,290 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.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.synapse.fluent.KustoPoolPrincipalAssignmentsClient; +import com.azure.resourcemanager.synapse.fluent.models.CheckNameResultInner; +import com.azure.resourcemanager.synapse.fluent.models.ClusterPrincipalAssignmentInner; +import com.azure.resourcemanager.synapse.models.CheckNameResult; +import com.azure.resourcemanager.synapse.models.ClusterPrincipalAssignment; +import com.azure.resourcemanager.synapse.models.ClusterPrincipalAssignmentCheckNameRequest; +import com.azure.resourcemanager.synapse.models.KustoPoolPrincipalAssignments; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class KustoPoolPrincipalAssignmentsImpl implements KustoPoolPrincipalAssignments { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KustoPoolPrincipalAssignmentsImpl.class); + + private final KustoPoolPrincipalAssignmentsClient innerClient; + + private final com.azure.resourcemanager.synapse.SynapseManager serviceManager; + + public KustoPoolPrincipalAssignmentsImpl( + KustoPoolPrincipalAssignmentsClient innerClient, + com.azure.resourcemanager.synapse.SynapseManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public CheckNameResult checkNameAvailability( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + ClusterPrincipalAssignmentCheckNameRequest principalAssignmentName) { + CheckNameResultInner inner = + this + .serviceClient() + .checkNameAvailability(workspaceName, kustoPoolName, resourceGroupName, principalAssignmentName); + if (inner != null) { + return new CheckNameResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response checkNameAvailabilityWithResponse( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + ClusterPrincipalAssignmentCheckNameRequest principalAssignmentName, + Context context) { + Response inner = + this + .serviceClient() + .checkNameAvailabilityWithResponse( + workspaceName, kustoPoolName, resourceGroupName, principalAssignmentName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CheckNameResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable list( + String workspaceName, String kustoPoolName, String resourceGroupName) { + PagedIterable inner = + this.serviceClient().list(workspaceName, kustoPoolName, resourceGroupName); + return Utils.mapPage(inner, inner1 -> new ClusterPrincipalAssignmentImpl(inner1, this.manager())); + } + + public PagedIterable list( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + PagedIterable inner = + this.serviceClient().list(workspaceName, kustoPoolName, resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new ClusterPrincipalAssignmentImpl(inner1, this.manager())); + } + + public ClusterPrincipalAssignment get( + String workspaceName, String kustoPoolName, String principalAssignmentName, String resourceGroupName) { + ClusterPrincipalAssignmentInner inner = + this.serviceClient().get(workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName); + if (inner != null) { + return new ClusterPrincipalAssignmentImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String workspaceName, + String kustoPoolName, + String principalAssignmentName, + String resourceGroupName, + Context context) { + Response inner = + this + .serviceClient() + .getWithResponse(workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ClusterPrincipalAssignmentImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void delete( + String workspaceName, String kustoPoolName, String principalAssignmentName, String resourceGroupName) { + this.serviceClient().delete(workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName); + } + + public void delete( + String workspaceName, + String kustoPoolName, + String principalAssignmentName, + String resourceGroupName, + Context context) { + this.serviceClient().delete(workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName, context); + } + + public ClusterPrincipalAssignment getById(String id) { + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String kustoPoolName = Utils.getValueFromIdByName(id, "kustoPools"); + if (kustoPoolName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'kustoPools'.", id))); + } + String principalAssignmentName = Utils.getValueFromIdByName(id, "principalAssignments"); + if (principalAssignmentName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'principalAssignments'.", + id))); + } + String resourceGroupName = Utils.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))); + } + return this + .getWithResponse(workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String kustoPoolName = Utils.getValueFromIdByName(id, "kustoPools"); + if (kustoPoolName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'kustoPools'.", id))); + } + String principalAssignmentName = Utils.getValueFromIdByName(id, "principalAssignments"); + if (principalAssignmentName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'principalAssignments'.", + id))); + } + String resourceGroupName = Utils.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))); + } + return this.getWithResponse(workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName, context); + } + + public void deleteById(String id) { + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String kustoPoolName = Utils.getValueFromIdByName(id, "kustoPools"); + if (kustoPoolName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'kustoPools'.", id))); + } + String principalAssignmentName = Utils.getValueFromIdByName(id, "principalAssignments"); + if (principalAssignmentName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'principalAssignments'.", + id))); + } + String resourceGroupName = Utils.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))); + } + this.delete(workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String kustoPoolName = Utils.getValueFromIdByName(id, "kustoPools"); + if (kustoPoolName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'kustoPools'.", id))); + } + String principalAssignmentName = Utils.getValueFromIdByName(id, "principalAssignments"); + if (principalAssignmentName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'principalAssignments'.", + id))); + } + String resourceGroupName = Utils.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))); + } + this.delete(workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName, context); + } + + private KustoPoolPrincipalAssignmentsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.synapse.SynapseManager manager() { + return this.serviceManager; + } + + public ClusterPrincipalAssignmentImpl define(String name) { + return new ClusterPrincipalAssignmentImpl(name, this.manager()); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolsClientImpl.java new file mode 100644 index 0000000000000..3828716591b06 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolsClientImpl.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.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.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.fluent.KustoPoolsClient; +import com.azure.resourcemanager.synapse.fluent.models.SkuDescriptionInner; +import com.azure.resourcemanager.synapse.models.SkuDescriptionList; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in KustoPoolsClient. */ +public final class KustoPoolsClientImpl implements KustoPoolsClient { + private final ClientLogger logger = new ClientLogger(KustoPoolsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final KustoPoolsService service; + + /** The service client containing this operation class. */ + private final SynapseManagementClientImpl client; + + /** + * Initializes an instance of KustoPoolsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + KustoPoolsClientImpl(SynapseManagementClientImpl client) { + this.service = + RestProxy.create(KustoPoolsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SynapseManagementClientKustoPools to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SynapseManagementCli") + private interface KustoPoolsService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Synapse/skus") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Lists eligible SKUs for Kusto Pool resource. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the SKU descriptions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists eligible SKUs for Kusto Pool resource. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the SKU descriptions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + } + + /** + * Lists eligible SKUs for Kusto Pool resource. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the SKU descriptions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync()); + } + + /** + * Lists eligible SKUs for Kusto Pool resource. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the SKU descriptions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context)); + } + + /** + * Lists eligible SKUs for Kusto Pool resource. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the SKU descriptions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Lists eligible SKUs for Kusto Pool resource. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the SKU descriptions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolsImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolsImpl.java new file mode 100644 index 0000000000000..a463cb6105ca1 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolsImpl.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.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.synapse.fluent.KustoPoolsClient; +import com.azure.resourcemanager.synapse.fluent.models.SkuDescriptionInner; +import com.azure.resourcemanager.synapse.models.KustoPools; +import com.azure.resourcemanager.synapse.models.SkuDescription; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class KustoPoolsImpl implements KustoPools { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KustoPoolsImpl.class); + + private final KustoPoolsClient innerClient; + + private final com.azure.resourcemanager.synapse.SynapseManager serviceManager; + + public KustoPoolsImpl( + KustoPoolsClient innerClient, com.azure.resourcemanager.synapse.SynapseManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new SkuDescriptionImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new SkuDescriptionImpl(inner1, this.manager())); + } + + private KustoPoolsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.synapse.SynapseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolsOperationsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolsOperationsClientImpl.java new file mode 100644 index 0000000000000..6911c97057efb --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolsOperationsClientImpl.java @@ -0,0 +1,3912 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.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.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.synapse.fluent.KustoPoolsOperationsClient; +import com.azure.resourcemanager.synapse.fluent.models.AzureResourceSkuInner; +import com.azure.resourcemanager.synapse.fluent.models.CheckNameResultInner; +import com.azure.resourcemanager.synapse.fluent.models.FollowerDatabaseDefinitionInner; +import com.azure.resourcemanager.synapse.fluent.models.KustoPoolInner; +import com.azure.resourcemanager.synapse.fluent.models.KustoPoolListResultInner; +import com.azure.resourcemanager.synapse.fluent.models.LanguageExtensionInner; +import com.azure.resourcemanager.synapse.models.FollowerDatabaseListResult; +import com.azure.resourcemanager.synapse.models.KustoPoolCheckNameRequest; +import com.azure.resourcemanager.synapse.models.KustoPoolUpdate; +import com.azure.resourcemanager.synapse.models.LanguageExtensionsList; +import com.azure.resourcemanager.synapse.models.ListResourceSkusResult; +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 KustoPoolsOperationsClient. */ +public final class KustoPoolsOperationsClientImpl implements KustoPoolsOperationsClient { + private final ClientLogger logger = new ClientLogger(KustoPoolsOperationsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final KustoPoolsOperationsService service; + + /** The service client containing this operation class. */ + private final SynapseManagementClientImpl client; + + /** + * Initializes an instance of KustoPoolsOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + KustoPoolsOperationsClientImpl(SynapseManagementClientImpl client) { + this.service = + RestProxy + .create(KustoPoolsOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SynapseManagementClientKustoPoolsOperations to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SynapseManagementCli") + private interface KustoPoolsOperationsService { + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/providers/Microsoft.Synapse/locations/{location}" + + "/kustoPoolCheckNameAvailability") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> checkNameAvailability( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") KustoPoolCheckNameRequest kustoPoolName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByWorkspace( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("workspaceName") String workspaceName, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("kustoPoolName") String kustoPoolName, + @HeaderParam("If-Match") String ifMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") KustoPoolInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update( + @HostParam("$host") String endpoint, + @PathParam("workspaceName") String workspaceName, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("kustoPoolName") String kustoPoolName, + @HeaderParam("If-Match") String ifMatch, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") KustoPoolUpdate parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("workspaceName") String workspaceName, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/stop") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> stop( + @HostParam("$host") String endpoint, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/start") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> start( + @HostParam("$host") String endpoint, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/skus") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSkusByResource( + @HostParam("$host") String endpoint, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/listLanguageExtensions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listLanguageExtensions( + @HostParam("$host") String endpoint, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/addLanguageExtensions") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> addLanguageExtensions( + @HostParam("$host") String endpoint, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") LanguageExtensionsList languageExtensionsToAdd, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/removeLanguageExtensions") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> removeLanguageExtensions( + @HostParam("$host") String endpoint, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") LanguageExtensionsList languageExtensionsToRemove, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/listFollowerDatabases") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listFollowerDatabases( + @HostParam("$host") String endpoint, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" + + "/{workspaceName}/kustoPools/{kustoPoolName}/detachFollowerDatabases") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> detachFollowerDatabases( + @HostParam("$host") String endpoint, + @PathParam("workspaceName") String workspaceName, + @PathParam("kustoPoolName") String kustoPoolName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") FollowerDatabaseDefinitionInner followerDatabaseToRemove, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Checks that the kusto pool name is valid and is not already in use. + * + * @param location The name of Azure region. + * @param kustoPoolName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> checkNameAvailabilityWithResponseAsync( + String location, KustoPoolCheckNameRequest kustoPoolName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } else { + kustoPoolName.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .checkNameAvailability( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + location, + apiVersion, + kustoPoolName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Checks that the kusto pool name is valid and is not already in use. + * + * @param location The name of Azure region. + * @param kustoPoolName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> checkNameAvailabilityWithResponseAsync( + String location, KustoPoolCheckNameRequest kustoPoolName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } else { + kustoPoolName.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .checkNameAvailability( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + location, + apiVersion, + kustoPoolName, + accept, + context); + } + + /** + * Checks that the kusto pool name is valid and is not already in use. + * + * @param location The name of Azure region. + * @param kustoPoolName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono checkNameAvailabilityAsync( + String location, KustoPoolCheckNameRequest kustoPoolName) { + return checkNameAvailabilityWithResponseAsync(location, kustoPoolName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Checks that the kusto pool name is valid and is not already in use. + * + * @param location The name of Azure region. + * @param kustoPoolName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CheckNameResultInner checkNameAvailability(String location, KustoPoolCheckNameRequest kustoPoolName) { + return checkNameAvailabilityAsync(location, kustoPoolName).block(); + } + + /** + * Checks that the kusto pool name is valid and is not already in use. + * + * @param location The name of Azure region. + * @param kustoPoolName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkNameAvailabilityWithResponse( + String location, KustoPoolCheckNameRequest kustoPoolName, Context context) { + return checkNameAvailabilityWithResponseAsync(location, kustoPoolName, context).block(); + } + + /** + * List all Kusto pools. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto pools operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWorkspaceWithResponseAsync( + String resourceGroupName, String workspaceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByWorkspace( + this.client.getEndpoint(), + apiVersion, + resourceGroupName, + this.client.getSubscriptionId(), + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all Kusto pools. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto pools operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWorkspaceWithResponseAsync( + String resourceGroupName, String workspaceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByWorkspace( + this.client.getEndpoint(), + apiVersion, + resourceGroupName, + this.client.getSubscriptionId(), + workspaceName, + accept, + context); + } + + /** + * List all Kusto pools. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto pools operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listByWorkspaceAsync(String resourceGroupName, String workspaceName) { + return listByWorkspaceWithResponseAsync(resourceGroupName, workspaceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * List all Kusto pools. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto pools operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KustoPoolListResultInner listByWorkspace(String resourceGroupName, String workspaceName) { + return listByWorkspaceAsync(resourceGroupName, workspaceName).block(); + } + + /** + * List all Kusto pools. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto pools operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listByWorkspaceWithResponse( + String resourceGroupName, String workspaceName, Context context) { + return listByWorkspaceWithResponseAsync(resourceGroupName, workspaceName, context).block(); + } + + /** + * Gets a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String workspaceName, String kustoPoolName, String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + accept, + context); + } + + /** + * Gets a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String workspaceName, String kustoPoolName, String resourceGroupName) { + return getWithResponseAsync(workspaceName, kustoPoolName, resourceGroupName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KustoPoolInner get(String workspaceName, String kustoPoolName, String resourceGroupName) { + return getAsync(workspaceName, kustoPoolName, resourceGroupName).block(); + } + + /** + * Gets a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + return getWithResponseAsync(workspaceName, kustoPoolName, resourceGroupName, context).block(); + } + + /** + * Create or update a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the CreateOrUpdate operation. + * @param ifMatch The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new Kusto Pool to be created, but to prevent updating an existing Kusto + * Pool. Other values will result in a 412 Pre-condition Failed response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String workspaceName, + String resourceGroupName, + String kustoPoolName, + KustoPoolInner parameters, + String ifMatch, + String ifNoneMatch) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + workspaceName, + resourceGroupName, + kustoPoolName, + ifMatch, + ifNoneMatch, + this.client.getSubscriptionId(), + apiVersion, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the CreateOrUpdate operation. + * @param ifMatch The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new Kusto Pool to be created, but to prevent updating an existing Kusto + * Pool. Other values will result in a 412 Pre-condition Failed response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String workspaceName, + String resourceGroupName, + String kustoPoolName, + KustoPoolInner parameters, + String ifMatch, + String ifNoneMatch, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + workspaceName, + resourceGroupName, + kustoPoolName, + ifMatch, + ifNoneMatch, + this.client.getSubscriptionId(), + apiVersion, + parameters, + accept, + context); + } + + /** + * Create or update a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the CreateOrUpdate operation. + * @param ifMatch The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new Kusto Pool to be created, but to prevent updating an existing Kusto + * Pool. Other values will result in a 412 Pre-condition Failed response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, KustoPoolInner> beginCreateOrUpdateAsync( + String workspaceName, + String resourceGroupName, + String kustoPoolName, + KustoPoolInner parameters, + String ifMatch, + String ifNoneMatch) { + Mono>> mono = + createOrUpdateWithResponseAsync( + workspaceName, resourceGroupName, kustoPoolName, parameters, ifMatch, ifNoneMatch); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), KustoPoolInner.class, KustoPoolInner.class, Context.NONE); + } + + /** + * Create or update a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the CreateOrUpdate operation. + * @param ifMatch The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new Kusto Pool to be created, but to prevent updating an existing Kusto + * Pool. Other values will result in a 412 Pre-condition Failed response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, KustoPoolInner> beginCreateOrUpdateAsync( + String workspaceName, + String resourceGroupName, + String kustoPoolName, + KustoPoolInner parameters, + String ifMatch, + String ifNoneMatch, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync( + workspaceName, resourceGroupName, kustoPoolName, parameters, ifMatch, ifNoneMatch, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), KustoPoolInner.class, KustoPoolInner.class, context); + } + + /** + * Create or update a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the CreateOrUpdate operation. + * @param ifMatch The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new Kusto Pool to be created, but to prevent updating an existing Kusto + * Pool. Other values will result in a 412 Pre-condition Failed response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, KustoPoolInner> beginCreateOrUpdate( + String workspaceName, + String resourceGroupName, + String kustoPoolName, + KustoPoolInner parameters, + String ifMatch, + String ifNoneMatch) { + return beginCreateOrUpdateAsync( + workspaceName, resourceGroupName, kustoPoolName, parameters, ifMatch, ifNoneMatch) + .getSyncPoller(); + } + + /** + * Create or update a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the CreateOrUpdate operation. + * @param ifMatch The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new Kusto Pool to be created, but to prevent updating an existing Kusto + * Pool. Other values will result in a 412 Pre-condition Failed response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, KustoPoolInner> beginCreateOrUpdate( + String workspaceName, + String resourceGroupName, + String kustoPoolName, + KustoPoolInner parameters, + String ifMatch, + String ifNoneMatch, + Context context) { + return beginCreateOrUpdateAsync( + workspaceName, resourceGroupName, kustoPoolName, parameters, ifMatch, ifNoneMatch, context) + .getSyncPoller(); + } + + /** + * Create or update a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the CreateOrUpdate operation. + * @param ifMatch The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new Kusto Pool to be created, but to prevent updating an existing Kusto + * Pool. Other values will result in a 412 Pre-condition Failed response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String workspaceName, + String resourceGroupName, + String kustoPoolName, + KustoPoolInner parameters, + String ifMatch, + String ifNoneMatch) { + return beginCreateOrUpdateAsync( + workspaceName, resourceGroupName, kustoPoolName, parameters, ifMatch, ifNoneMatch) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String workspaceName, String resourceGroupName, String kustoPoolName, KustoPoolInner parameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginCreateOrUpdateAsync( + workspaceName, resourceGroupName, kustoPoolName, parameters, ifMatch, ifNoneMatch) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the CreateOrUpdate operation. + * @param ifMatch The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new Kusto Pool to be created, but to prevent updating an existing Kusto + * Pool. Other values will result in a 412 Pre-condition Failed response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String workspaceName, + String resourceGroupName, + String kustoPoolName, + KustoPoolInner parameters, + String ifMatch, + String ifNoneMatch, + Context context) { + return beginCreateOrUpdateAsync( + workspaceName, resourceGroupName, kustoPoolName, parameters, ifMatch, ifNoneMatch, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the CreateOrUpdate operation. + * @param ifMatch The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new Kusto Pool to be created, but to prevent updating an existing Kusto + * Pool. Other values will result in a 412 Pre-condition Failed response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KustoPoolInner createOrUpdate( + String workspaceName, + String resourceGroupName, + String kustoPoolName, + KustoPoolInner parameters, + String ifMatch, + String ifNoneMatch) { + return createOrUpdateAsync(workspaceName, resourceGroupName, kustoPoolName, parameters, ifMatch, ifNoneMatch) + .block(); + } + + /** + * Create or update a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KustoPoolInner createOrUpdate( + String workspaceName, String resourceGroupName, String kustoPoolName, KustoPoolInner parameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return createOrUpdateAsync(workspaceName, resourceGroupName, kustoPoolName, parameters, ifMatch, ifNoneMatch) + .block(); + } + + /** + * Create or update a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the CreateOrUpdate operation. + * @param ifMatch The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param ifNoneMatch Set to '*' to allow a new Kusto Pool to be created, but to prevent updating an existing Kusto + * Pool. Other values will result in a 412 Pre-condition Failed response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KustoPoolInner createOrUpdate( + String workspaceName, + String resourceGroupName, + String kustoPoolName, + KustoPoolInner parameters, + String ifMatch, + String ifNoneMatch, + Context context) { + return createOrUpdateAsync( + workspaceName, resourceGroupName, kustoPoolName, parameters, ifMatch, ifNoneMatch, context) + .block(); + } + + /** + * Update a Kusto Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the Update operation. + * @param ifMatch The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String workspaceName, + String resourceGroupName, + String kustoPoolName, + KustoPoolUpdate parameters, + String ifMatch) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + workspaceName, + resourceGroupName, + kustoPoolName, + ifMatch, + this.client.getSubscriptionId(), + apiVersion, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a Kusto Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the Update operation. + * @param ifMatch The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String workspaceName, + String resourceGroupName, + String kustoPoolName, + KustoPoolUpdate parameters, + String ifMatch, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + workspaceName, + resourceGroupName, + kustoPoolName, + ifMatch, + this.client.getSubscriptionId(), + apiVersion, + parameters, + accept, + context); + } + + /** + * Update a Kusto Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the Update operation. + * @param ifMatch The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, KustoPoolInner> beginUpdateAsync( + String workspaceName, + String resourceGroupName, + String kustoPoolName, + KustoPoolUpdate parameters, + String ifMatch) { + Mono>> mono = + updateWithResponseAsync(workspaceName, resourceGroupName, kustoPoolName, parameters, ifMatch); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), KustoPoolInner.class, KustoPoolInner.class, Context.NONE); + } + + /** + * Update a Kusto Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the Update operation. + * @param ifMatch The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, KustoPoolInner> beginUpdateAsync( + String workspaceName, + String resourceGroupName, + String kustoPoolName, + KustoPoolUpdate parameters, + String ifMatch, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateWithResponseAsync(workspaceName, resourceGroupName, kustoPoolName, parameters, ifMatch, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), KustoPoolInner.class, KustoPoolInner.class, context); + } + + /** + * Update a Kusto Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the Update operation. + * @param ifMatch The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, KustoPoolInner> beginUpdate( + String workspaceName, + String resourceGroupName, + String kustoPoolName, + KustoPoolUpdate parameters, + String ifMatch) { + return beginUpdateAsync(workspaceName, resourceGroupName, kustoPoolName, parameters, ifMatch).getSyncPoller(); + } + + /** + * Update a Kusto Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the Update operation. + * @param ifMatch The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, KustoPoolInner> beginUpdate( + String workspaceName, + String resourceGroupName, + String kustoPoolName, + KustoPoolUpdate parameters, + String ifMatch, + Context context) { + return beginUpdateAsync(workspaceName, resourceGroupName, kustoPoolName, parameters, ifMatch, context) + .getSyncPoller(); + } + + /** + * Update a Kusto Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the Update operation. + * @param ifMatch The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String workspaceName, + String resourceGroupName, + String kustoPoolName, + KustoPoolUpdate parameters, + String ifMatch) { + return beginUpdateAsync(workspaceName, resourceGroupName, kustoPoolName, parameters, ifMatch) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a Kusto Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String workspaceName, String resourceGroupName, String kustoPoolName, KustoPoolUpdate parameters) { + final String ifMatch = null; + return beginUpdateAsync(workspaceName, resourceGroupName, kustoPoolName, parameters, ifMatch) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a Kusto Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the Update operation. + * @param ifMatch The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String workspaceName, + String resourceGroupName, + String kustoPoolName, + KustoPoolUpdate parameters, + String ifMatch, + Context context) { + return beginUpdateAsync(workspaceName, resourceGroupName, kustoPoolName, parameters, ifMatch, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a Kusto Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the Update operation. + * @param ifMatch The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KustoPoolInner update( + String workspaceName, + String resourceGroupName, + String kustoPoolName, + KustoPoolUpdate parameters, + String ifMatch) { + return updateAsync(workspaceName, resourceGroupName, kustoPoolName, parameters, ifMatch).block(); + } + + /** + * Update a Kusto Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KustoPoolInner update( + String workspaceName, String resourceGroupName, String kustoPoolName, KustoPoolUpdate parameters) { + final String ifMatch = null; + return updateAsync(workspaceName, resourceGroupName, kustoPoolName, parameters, ifMatch).block(); + } + + /** + * Update a Kusto Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto pool. + * @param parameters The Kusto pool parameters supplied to the Update operation. + * @param ifMatch The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. Specify + * the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto kusto pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KustoPoolInner update( + String workspaceName, + String resourceGroupName, + String kustoPoolName, + KustoPoolUpdate parameters, + String ifMatch, + Context context) { + return updateAsync(workspaceName, resourceGroupName, kustoPoolName, parameters, ifMatch, context).block(); + } + + /** + * Deletes a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String workspaceName, String resourceGroupName, String kustoPoolName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + workspaceName, + resourceGroupName, + kustoPoolName, + this.client.getSubscriptionId(), + apiVersion, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String workspaceName, String resourceGroupName, String kustoPoolName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + workspaceName, + resourceGroupName, + kustoPoolName, + this.client.getSubscriptionId(), + apiVersion, + accept, + context); + } + + /** + * Deletes a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginDeleteAsync( + String workspaceName, String resourceGroupName, String kustoPoolName) { + Mono>> mono = + deleteWithResponseAsync(workspaceName, resourceGroupName, kustoPoolName); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + } + + /** + * Deletes a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginDeleteAsync( + String workspaceName, String resourceGroupName, String kustoPoolName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(workspaceName, resourceGroupName, kustoPoolName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Deletes a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete( + String workspaceName, String resourceGroupName, String kustoPoolName) { + return beginDeleteAsync(workspaceName, resourceGroupName, kustoPoolName).getSyncPoller(); + } + + /** + * Deletes a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete( + String workspaceName, String resourceGroupName, String kustoPoolName, Context context) { + return beginDeleteAsync(workspaceName, resourceGroupName, kustoPoolName, context).getSyncPoller(); + } + + /** + * Deletes a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String workspaceName, String resourceGroupName, String kustoPoolName) { + return beginDeleteAsync(workspaceName, resourceGroupName, kustoPoolName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String workspaceName, String resourceGroupName, String kustoPoolName, Context context) { + return beginDeleteAsync(workspaceName, resourceGroupName, kustoPoolName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto 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 workspaceName, String resourceGroupName, String kustoPoolName) { + deleteAsync(workspaceName, resourceGroupName, kustoPoolName).block(); + } + + /** + * Deletes a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto 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 workspaceName, String resourceGroupName, String kustoPoolName, Context context) { + deleteAsync(workspaceName, resourceGroupName, kustoPoolName, context).block(); + } + + /** + * Stops a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> stopWithResponseAsync( + String workspaceName, String kustoPoolName, String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .stop( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Stops a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> stopWithResponseAsync( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .stop( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + accept, + context); + } + + /** + * Stops a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginStopAsync( + String workspaceName, String kustoPoolName, String resourceGroupName) { + Mono>> mono = stopWithResponseAsync(workspaceName, kustoPoolName, resourceGroupName); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + } + + /** + * Stops a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginStopAsync( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + stopWithResponseAsync(workspaceName, kustoPoolName, resourceGroupName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Stops a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginStop( + String workspaceName, String kustoPoolName, String resourceGroupName) { + return beginStopAsync(workspaceName, kustoPoolName, resourceGroupName).getSyncPoller(); + } + + /** + * Stops a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginStop( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + return beginStopAsync(workspaceName, kustoPoolName, resourceGroupName, context).getSyncPoller(); + } + + /** + * Stops a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopAsync(String workspaceName, String kustoPoolName, String resourceGroupName) { + return beginStopAsync(workspaceName, kustoPoolName, resourceGroupName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Stops a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopAsync( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + return beginStopAsync(workspaceName, kustoPoolName, resourceGroupName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Stops a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void stop(String workspaceName, String kustoPoolName, String resourceGroupName) { + stopAsync(workspaceName, kustoPoolName, resourceGroupName).block(); + } + + /** + * Stops a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void stop(String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + stopAsync(workspaceName, kustoPoolName, resourceGroupName, context).block(); + } + + /** + * Starts a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> startWithResponseAsync( + String workspaceName, String kustoPoolName, String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .start( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Starts a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> startWithResponseAsync( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .start( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + accept, + context); + } + + /** + * Starts a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginStartAsync( + String workspaceName, String kustoPoolName, String resourceGroupName) { + Mono>> mono = startWithResponseAsync(workspaceName, kustoPoolName, resourceGroupName); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + } + + /** + * Starts a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginStartAsync( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + startWithResponseAsync(workspaceName, kustoPoolName, resourceGroupName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Starts a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginStart( + String workspaceName, String kustoPoolName, String resourceGroupName) { + return beginStartAsync(workspaceName, kustoPoolName, resourceGroupName).getSyncPoller(); + } + + /** + * Starts a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginStart( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + return beginStartAsync(workspaceName, kustoPoolName, resourceGroupName, context).getSyncPoller(); + } + + /** + * Starts a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startAsync(String workspaceName, String kustoPoolName, String resourceGroupName) { + return beginStartAsync(workspaceName, kustoPoolName, resourceGroupName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Starts a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startAsync( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + return beginStartAsync(workspaceName, kustoPoolName, resourceGroupName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Starts a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void start(String workspaceName, String kustoPoolName, String resourceGroupName) { + startAsync(workspaceName, kustoPoolName, resourceGroupName).block(); + } + + /** + * Starts a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void start(String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + startAsync(workspaceName, kustoPoolName, resourceGroupName, context).block(); + } + + /** + * Returns the SKUs available for the provided resource. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available SKUs for a Kusto Pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSkusByResourceSinglePageAsync( + String workspaceName, String kustoPoolName, String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listSkusByResource( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns the SKUs available for the provided resource. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available SKUs for a Kusto Pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSkusByResourceSinglePageAsync( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listSkusByResource( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + } + + /** + * Returns the SKUs available for the provided resource. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available SKUs for a Kusto Pool. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSkusByResourceAsync( + String workspaceName, String kustoPoolName, String resourceGroupName) { + return new PagedFlux<>( + () -> listSkusByResourceSinglePageAsync(workspaceName, kustoPoolName, resourceGroupName)); + } + + /** + * Returns the SKUs available for the provided resource. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available SKUs for a Kusto Pool. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSkusByResourceAsync( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listSkusByResourceSinglePageAsync(workspaceName, kustoPoolName, resourceGroupName, context)); + } + + /** + * Returns the SKUs available for the provided resource. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available SKUs for a Kusto Pool. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSkusByResource( + String workspaceName, String kustoPoolName, String resourceGroupName) { + return new PagedIterable<>(listSkusByResourceAsync(workspaceName, kustoPoolName, resourceGroupName)); + } + + /** + * Returns the SKUs available for the provided resource. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available SKUs for a Kusto Pool. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSkusByResource( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + return new PagedIterable<>(listSkusByResourceAsync(workspaceName, kustoPoolName, resourceGroupName, context)); + } + + /** + * Returns a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of language extension objects. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listLanguageExtensionsSinglePageAsync( + String workspaceName, String kustoPoolName, String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listLanguageExtensions( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of language extension objects. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listLanguageExtensionsSinglePageAsync( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listLanguageExtensions( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + } + + /** + * Returns a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of language extension objects. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listLanguageExtensionsAsync( + String workspaceName, String kustoPoolName, String resourceGroupName) { + return new PagedFlux<>( + () -> listLanguageExtensionsSinglePageAsync(workspaceName, kustoPoolName, resourceGroupName)); + } + + /** + * Returns a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of language extension objects. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listLanguageExtensionsAsync( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listLanguageExtensionsSinglePageAsync(workspaceName, kustoPoolName, resourceGroupName, context)); + } + + /** + * Returns a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of language extension objects. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listLanguageExtensions( + String workspaceName, String kustoPoolName, String resourceGroupName) { + return new PagedIterable<>(listLanguageExtensionsAsync(workspaceName, kustoPoolName, resourceGroupName)); + } + + /** + * Returns a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of language extension objects. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listLanguageExtensions( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + return new PagedIterable<>( + listLanguageExtensionsAsync(workspaceName, kustoPoolName, resourceGroupName, context)); + } + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToAdd The language extensions to add. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> addLanguageExtensionsWithResponseAsync( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToAdd) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (languageExtensionsToAdd == null) { + return Mono + .error( + new IllegalArgumentException("Parameter languageExtensionsToAdd is required and cannot be null.")); + } else { + languageExtensionsToAdd.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .addLanguageExtensions( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + languageExtensionsToAdd, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToAdd The language extensions to add. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> addLanguageExtensionsWithResponseAsync( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToAdd, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (languageExtensionsToAdd == null) { + return Mono + .error( + new IllegalArgumentException("Parameter languageExtensionsToAdd is required and cannot be null.")); + } else { + languageExtensionsToAdd.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .addLanguageExtensions( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + languageExtensionsToAdd, + accept, + context); + } + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToAdd The language extensions to add. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginAddLanguageExtensionsAsync( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToAdd) { + Mono>> mono = + addLanguageExtensionsWithResponseAsync( + workspaceName, kustoPoolName, resourceGroupName, languageExtensionsToAdd); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + } + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToAdd The language extensions to add. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginAddLanguageExtensionsAsync( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToAdd, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + addLanguageExtensionsWithResponseAsync( + workspaceName, kustoPoolName, resourceGroupName, languageExtensionsToAdd, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToAdd The language extensions to add. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginAddLanguageExtensions( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToAdd) { + return beginAddLanguageExtensionsAsync(workspaceName, kustoPoolName, resourceGroupName, languageExtensionsToAdd) + .getSyncPoller(); + } + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToAdd The language extensions to add. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginAddLanguageExtensions( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToAdd, + Context context) { + return beginAddLanguageExtensionsAsync( + workspaceName, kustoPoolName, resourceGroupName, languageExtensionsToAdd, context) + .getSyncPoller(); + } + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToAdd The language extensions to add. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono addLanguageExtensionsAsync( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToAdd) { + return beginAddLanguageExtensionsAsync(workspaceName, kustoPoolName, resourceGroupName, languageExtensionsToAdd) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToAdd The language extensions to add. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono addLanguageExtensionsAsync( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToAdd, + Context context) { + return beginAddLanguageExtensionsAsync( + workspaceName, kustoPoolName, resourceGroupName, languageExtensionsToAdd, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToAdd The language extensions to add. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 addLanguageExtensions( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToAdd) { + addLanguageExtensionsAsync(workspaceName, kustoPoolName, resourceGroupName, languageExtensionsToAdd).block(); + } + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToAdd The language extensions to add. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 addLanguageExtensions( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToAdd, + Context context) { + addLanguageExtensionsAsync(workspaceName, kustoPoolName, resourceGroupName, languageExtensionsToAdd, context) + .block(); + } + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToRemove The language extensions to remove. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> removeLanguageExtensionsWithResponseAsync( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToRemove) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (languageExtensionsToRemove == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter languageExtensionsToRemove is required and cannot be null.")); + } else { + languageExtensionsToRemove.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .removeLanguageExtensions( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + languageExtensionsToRemove, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToRemove The language extensions to remove. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> removeLanguageExtensionsWithResponseAsync( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToRemove, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (languageExtensionsToRemove == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter languageExtensionsToRemove is required and cannot be null.")); + } else { + languageExtensionsToRemove.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .removeLanguageExtensions( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + languageExtensionsToRemove, + accept, + context); + } + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToRemove The language extensions to remove. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginRemoveLanguageExtensionsAsync( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToRemove) { + Mono>> mono = + removeLanguageExtensionsWithResponseAsync( + workspaceName, kustoPoolName, resourceGroupName, languageExtensionsToRemove); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + } + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToRemove The language extensions to remove. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginRemoveLanguageExtensionsAsync( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToRemove, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + removeLanguageExtensionsWithResponseAsync( + workspaceName, kustoPoolName, resourceGroupName, languageExtensionsToRemove, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToRemove The language extensions to remove. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginRemoveLanguageExtensions( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToRemove) { + return beginRemoveLanguageExtensionsAsync( + workspaceName, kustoPoolName, resourceGroupName, languageExtensionsToRemove) + .getSyncPoller(); + } + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToRemove The language extensions to remove. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginRemoveLanguageExtensions( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToRemove, + Context context) { + return beginRemoveLanguageExtensionsAsync( + workspaceName, kustoPoolName, resourceGroupName, languageExtensionsToRemove, context) + .getSyncPoller(); + } + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToRemove The language extensions to remove. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono removeLanguageExtensionsAsync( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToRemove) { + return beginRemoveLanguageExtensionsAsync( + workspaceName, kustoPoolName, resourceGroupName, languageExtensionsToRemove) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToRemove The language extensions to remove. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono removeLanguageExtensionsAsync( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToRemove, + Context context) { + return beginRemoveLanguageExtensionsAsync( + workspaceName, kustoPoolName, resourceGroupName, languageExtensionsToRemove, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToRemove The language extensions to remove. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 removeLanguageExtensions( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToRemove) { + removeLanguageExtensionsAsync(workspaceName, kustoPoolName, resourceGroupName, languageExtensionsToRemove) + .block(); + } + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToRemove The language extensions to remove. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 removeLanguageExtensions( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToRemove, + Context context) { + removeLanguageExtensionsAsync( + workspaceName, kustoPoolName, resourceGroupName, languageExtensionsToRemove, context) + .block(); + } + + /** + * Returns a list of databases that are owned by this Kusto Pool and were followed by another Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto database principals operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listFollowerDatabasesSinglePageAsync( + String workspaceName, String kustoPoolName, String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listFollowerDatabases( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns a list of databases that are owned by this Kusto Pool and were followed by another Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto database principals operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listFollowerDatabasesSinglePageAsync( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listFollowerDatabases( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + } + + /** + * Returns a list of databases that are owned by this Kusto Pool and were followed by another Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto database principals operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listFollowerDatabasesAsync( + String workspaceName, String kustoPoolName, String resourceGroupName) { + return new PagedFlux<>( + () -> listFollowerDatabasesSinglePageAsync(workspaceName, kustoPoolName, resourceGroupName)); + } + + /** + * Returns a list of databases that are owned by this Kusto Pool and were followed by another Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto database principals operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listFollowerDatabasesAsync( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listFollowerDatabasesSinglePageAsync(workspaceName, kustoPoolName, resourceGroupName, context)); + } + + /** + * Returns a list of databases that are owned by this Kusto Pool and were followed by another Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto database principals operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listFollowerDatabases( + String workspaceName, String kustoPoolName, String resourceGroupName) { + return new PagedIterable<>(listFollowerDatabasesAsync(workspaceName, kustoPoolName, resourceGroupName)); + } + + /** + * Returns a list of databases that are owned by this Kusto Pool and were followed by another Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto database principals operation response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listFollowerDatabases( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + return new PagedIterable<>( + listFollowerDatabasesAsync(workspaceName, kustoPoolName, resourceGroupName, context)); + } + + /** + * Detaches all followers of a database owned by this Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param followerDatabaseToRemove The follower databases properties to remove. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> detachFollowerDatabasesWithResponseAsync( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + FollowerDatabaseDefinitionInner followerDatabaseToRemove) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (followerDatabaseToRemove == null) { + return Mono + .error( + new IllegalArgumentException("Parameter followerDatabaseToRemove is required and cannot be null.")); + } else { + followerDatabaseToRemove.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .detachFollowerDatabases( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + followerDatabaseToRemove, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Detaches all followers of a database owned by this Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param followerDatabaseToRemove The follower databases properties to remove. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> detachFollowerDatabasesWithResponseAsync( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + FollowerDatabaseDefinitionInner followerDatabaseToRemove, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (kustoPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter kustoPoolName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (followerDatabaseToRemove == null) { + return Mono + .error( + new IllegalArgumentException("Parameter followerDatabaseToRemove is required and cannot be null.")); + } else { + followerDatabaseToRemove.validate(); + } + final String apiVersion = "2021-06-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .detachFollowerDatabases( + this.client.getEndpoint(), + workspaceName, + kustoPoolName, + this.client.getSubscriptionId(), + resourceGroupName, + apiVersion, + followerDatabaseToRemove, + accept, + context); + } + + /** + * Detaches all followers of a database owned by this Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param followerDatabaseToRemove The follower databases properties to remove. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginDetachFollowerDatabasesAsync( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + FollowerDatabaseDefinitionInner followerDatabaseToRemove) { + Mono>> mono = + detachFollowerDatabasesWithResponseAsync( + workspaceName, kustoPoolName, resourceGroupName, followerDatabaseToRemove); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + } + + /** + * Detaches all followers of a database owned by this Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param followerDatabaseToRemove The follower databases properties to remove. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginDetachFollowerDatabasesAsync( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + FollowerDatabaseDefinitionInner followerDatabaseToRemove, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + detachFollowerDatabasesWithResponseAsync( + workspaceName, kustoPoolName, resourceGroupName, followerDatabaseToRemove, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Detaches all followers of a database owned by this Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param followerDatabaseToRemove The follower databases properties to remove. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDetachFollowerDatabases( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + FollowerDatabaseDefinitionInner followerDatabaseToRemove) { + return beginDetachFollowerDatabasesAsync( + workspaceName, kustoPoolName, resourceGroupName, followerDatabaseToRemove) + .getSyncPoller(); + } + + /** + * Detaches all followers of a database owned by this Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param followerDatabaseToRemove The follower databases properties to remove. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDetachFollowerDatabases( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + FollowerDatabaseDefinitionInner followerDatabaseToRemove, + Context context) { + return beginDetachFollowerDatabasesAsync( + workspaceName, kustoPoolName, resourceGroupName, followerDatabaseToRemove, context) + .getSyncPoller(); + } + + /** + * Detaches all followers of a database owned by this Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param followerDatabaseToRemove The follower databases properties to remove. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono detachFollowerDatabasesAsync( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + FollowerDatabaseDefinitionInner followerDatabaseToRemove) { + return beginDetachFollowerDatabasesAsync( + workspaceName, kustoPoolName, resourceGroupName, followerDatabaseToRemove) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Detaches all followers of a database owned by this Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param followerDatabaseToRemove The follower databases properties to remove. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono detachFollowerDatabasesAsync( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + FollowerDatabaseDefinitionInner followerDatabaseToRemove, + Context context) { + return beginDetachFollowerDatabasesAsync( + workspaceName, kustoPoolName, resourceGroupName, followerDatabaseToRemove, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Detaches all followers of a database owned by this Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param followerDatabaseToRemove The follower databases properties to remove. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 detachFollowerDatabases( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + FollowerDatabaseDefinitionInner followerDatabaseToRemove) { + detachFollowerDatabasesAsync(workspaceName, kustoPoolName, resourceGroupName, followerDatabaseToRemove).block(); + } + + /** + * Detaches all followers of a database owned by this Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param followerDatabaseToRemove The follower databases properties to remove. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 detachFollowerDatabases( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + FollowerDatabaseDefinitionInner followerDatabaseToRemove, + Context context) { + detachFollowerDatabasesAsync(workspaceName, kustoPoolName, resourceGroupName, followerDatabaseToRemove, context) + .block(); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolsOperationsImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolsOperationsImpl.java new file mode 100644 index 0000000000000..ff07081691800 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolsOperationsImpl.java @@ -0,0 +1,361 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.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.synapse.fluent.KustoPoolsOperationsClient; +import com.azure.resourcemanager.synapse.fluent.models.AzureResourceSkuInner; +import com.azure.resourcemanager.synapse.fluent.models.CheckNameResultInner; +import com.azure.resourcemanager.synapse.fluent.models.FollowerDatabaseDefinitionInner; +import com.azure.resourcemanager.synapse.fluent.models.KustoPoolInner; +import com.azure.resourcemanager.synapse.fluent.models.KustoPoolListResultInner; +import com.azure.resourcemanager.synapse.fluent.models.LanguageExtensionInner; +import com.azure.resourcemanager.synapse.models.AzureResourceSku; +import com.azure.resourcemanager.synapse.models.CheckNameResult; +import com.azure.resourcemanager.synapse.models.FollowerDatabaseDefinition; +import com.azure.resourcemanager.synapse.models.KustoPool; +import com.azure.resourcemanager.synapse.models.KustoPoolCheckNameRequest; +import com.azure.resourcemanager.synapse.models.KustoPoolListResult; +import com.azure.resourcemanager.synapse.models.KustoPoolsOperations; +import com.azure.resourcemanager.synapse.models.LanguageExtension; +import com.azure.resourcemanager.synapse.models.LanguageExtensionsList; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class KustoPoolsOperationsImpl implements KustoPoolsOperations { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KustoPoolsOperationsImpl.class); + + private final KustoPoolsOperationsClient innerClient; + + private final com.azure.resourcemanager.synapse.SynapseManager serviceManager; + + public KustoPoolsOperationsImpl( + KustoPoolsOperationsClient innerClient, com.azure.resourcemanager.synapse.SynapseManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public CheckNameResult checkNameAvailability(String location, KustoPoolCheckNameRequest kustoPoolName) { + CheckNameResultInner inner = this.serviceClient().checkNameAvailability(location, kustoPoolName); + if (inner != null) { + return new CheckNameResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response checkNameAvailabilityWithResponse( + String location, KustoPoolCheckNameRequest kustoPoolName, Context context) { + Response inner = + this.serviceClient().checkNameAvailabilityWithResponse(location, kustoPoolName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CheckNameResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public KustoPoolListResult listByWorkspace(String resourceGroupName, String workspaceName) { + KustoPoolListResultInner inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); + if (inner != null) { + return new KustoPoolListResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listByWorkspaceWithResponse( + String resourceGroupName, String workspaceName, Context context) { + Response inner = + this.serviceClient().listByWorkspaceWithResponse(resourceGroupName, workspaceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new KustoPoolListResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public KustoPool get(String workspaceName, String kustoPoolName, String resourceGroupName) { + KustoPoolInner inner = this.serviceClient().get(workspaceName, kustoPoolName, resourceGroupName); + if (inner != null) { + return new KustoPoolImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + Response inner = + this.serviceClient().getWithResponse(workspaceName, kustoPoolName, resourceGroupName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new KustoPoolImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void delete(String workspaceName, String resourceGroupName, String kustoPoolName) { + this.serviceClient().delete(workspaceName, resourceGroupName, kustoPoolName); + } + + public void delete(String workspaceName, String resourceGroupName, String kustoPoolName, Context context) { + this.serviceClient().delete(workspaceName, resourceGroupName, kustoPoolName, context); + } + + public void stop(String workspaceName, String kustoPoolName, String resourceGroupName) { + this.serviceClient().stop(workspaceName, kustoPoolName, resourceGroupName); + } + + public void stop(String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + this.serviceClient().stop(workspaceName, kustoPoolName, resourceGroupName, context); + } + + public void start(String workspaceName, String kustoPoolName, String resourceGroupName) { + this.serviceClient().start(workspaceName, kustoPoolName, resourceGroupName); + } + + public void start(String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + this.serviceClient().start(workspaceName, kustoPoolName, resourceGroupName, context); + } + + public PagedIterable listSkusByResource( + String workspaceName, String kustoPoolName, String resourceGroupName) { + PagedIterable inner = + this.serviceClient().listSkusByResource(workspaceName, kustoPoolName, resourceGroupName); + return Utils.mapPage(inner, inner1 -> new AzureResourceSkuImpl(inner1, this.manager())); + } + + public PagedIterable listSkusByResource( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + PagedIterable inner = + this.serviceClient().listSkusByResource(workspaceName, kustoPoolName, resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new AzureResourceSkuImpl(inner1, this.manager())); + } + + public PagedIterable listLanguageExtensions( + String workspaceName, String kustoPoolName, String resourceGroupName) { + PagedIterable inner = + this.serviceClient().listLanguageExtensions(workspaceName, kustoPoolName, resourceGroupName); + return Utils.mapPage(inner, inner1 -> new LanguageExtensionImpl(inner1, this.manager())); + } + + public PagedIterable listLanguageExtensions( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + PagedIterable inner = + this.serviceClient().listLanguageExtensions(workspaceName, kustoPoolName, resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new LanguageExtensionImpl(inner1, this.manager())); + } + + public void addLanguageExtensions( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToAdd) { + this + .serviceClient() + .addLanguageExtensions(workspaceName, kustoPoolName, resourceGroupName, languageExtensionsToAdd); + } + + public void addLanguageExtensions( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToAdd, + Context context) { + this + .serviceClient() + .addLanguageExtensions(workspaceName, kustoPoolName, resourceGroupName, languageExtensionsToAdd, context); + } + + public void removeLanguageExtensions( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToRemove) { + this + .serviceClient() + .removeLanguageExtensions(workspaceName, kustoPoolName, resourceGroupName, languageExtensionsToRemove); + } + + public void removeLanguageExtensions( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToRemove, + Context context) { + this + .serviceClient() + .removeLanguageExtensions( + workspaceName, kustoPoolName, resourceGroupName, languageExtensionsToRemove, context); + } + + public PagedIterable listFollowerDatabases( + String workspaceName, String kustoPoolName, String resourceGroupName) { + PagedIterable inner = + this.serviceClient().listFollowerDatabases(workspaceName, kustoPoolName, resourceGroupName); + return Utils.mapPage(inner, inner1 -> new FollowerDatabaseDefinitionImpl(inner1, this.manager())); + } + + public PagedIterable listFollowerDatabases( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context) { + PagedIterable inner = + this.serviceClient().listFollowerDatabases(workspaceName, kustoPoolName, resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new FollowerDatabaseDefinitionImpl(inner1, this.manager())); + } + + public void detachFollowerDatabases( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + FollowerDatabaseDefinitionInner followerDatabaseToRemove) { + this + .serviceClient() + .detachFollowerDatabases(workspaceName, kustoPoolName, resourceGroupName, followerDatabaseToRemove); + } + + public void detachFollowerDatabases( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + FollowerDatabaseDefinitionInner followerDatabaseToRemove, + Context context) { + this + .serviceClient() + .detachFollowerDatabases( + workspaceName, kustoPoolName, resourceGroupName, followerDatabaseToRemove, context); + } + + public KustoPool getById(String id) { + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String kustoPoolName = Utils.getValueFromIdByName(id, "kustoPools"); + if (kustoPoolName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'kustoPools'.", id))); + } + String resourceGroupName = Utils.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))); + } + return this.getWithResponse(workspaceName, kustoPoolName, resourceGroupName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String kustoPoolName = Utils.getValueFromIdByName(id, "kustoPools"); + if (kustoPoolName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'kustoPools'.", id))); + } + String resourceGroupName = Utils.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))); + } + return this.getWithResponse(workspaceName, kustoPoolName, resourceGroupName, context); + } + + public void deleteById(String id) { + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String resourceGroupName = Utils.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 kustoPoolName = Utils.getValueFromIdByName(id, "kustoPools"); + if (kustoPoolName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'kustoPools'.", id))); + } + this.delete(workspaceName, resourceGroupName, kustoPoolName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String resourceGroupName = Utils.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 kustoPoolName = Utils.getValueFromIdByName(id, "kustoPools"); + if (kustoPoolName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'kustoPools'.", id))); + } + this.delete(workspaceName, resourceGroupName, kustoPoolName, context); + } + + private KustoPoolsOperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.synapse.SynapseManager manager() { + return this.serviceManager; + } + + public KustoPoolImpl define(String name) { + return new KustoPoolImpl(name, this.manager()); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/LanguageExtensionImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/LanguageExtensionImpl.java new file mode 100644 index 0000000000000..b25223cf20d3b --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/LanguageExtensionImpl.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.implementation; + +import com.azure.resourcemanager.synapse.fluent.models.LanguageExtensionInner; +import com.azure.resourcemanager.synapse.models.LanguageExtension; +import com.azure.resourcemanager.synapse.models.LanguageExtensionName; + +public final class LanguageExtensionImpl implements LanguageExtension { + private LanguageExtensionInner innerObject; + + private final com.azure.resourcemanager.synapse.SynapseManager serviceManager; + + LanguageExtensionImpl( + LanguageExtensionInner innerObject, com.azure.resourcemanager.synapse.SynapseManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public LanguageExtensionName languageExtensionName() { + return this.innerModel().languageExtensionName(); + } + + public LanguageExtensionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.synapse.SynapseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/OperationImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/OperationImpl.java new file mode 100644 index 0000000000000..9891facd54790 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/OperationImpl.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.implementation; + +import com.azure.resourcemanager.synapse.fluent.models.OperationInner; +import com.azure.resourcemanager.synapse.models.Operation; +import com.azure.resourcemanager.synapse.models.OperationDisplay; + +public final class OperationImpl implements Operation { + private OperationInner innerObject; + + private final com.azure.resourcemanager.synapse.SynapseManager serviceManager; + + OperationImpl(OperationInner innerObject, com.azure.resourcemanager.synapse.SynapseManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String name() { + return this.innerModel().name(); + } + + public OperationDisplay display() { + return this.innerModel().display(); + } + + public String origin() { + return this.innerModel().origin(); + } + + public Object properties() { + return this.innerModel().properties(); + } + + public OperationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.synapse.SynapseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/PrivateEndpointConnectionForPrivateLinkHubImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/PrivateEndpointConnectionForPrivateLinkHubImpl.java index 7ae3ec7bca198..f880b1ac451cd 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/PrivateEndpointConnectionForPrivateLinkHubImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/PrivateEndpointConnectionForPrivateLinkHubImpl.java @@ -5,8 +5,8 @@ package com.azure.resourcemanager.synapse.implementation; import com.azure.resourcemanager.synapse.fluent.models.PrivateEndpointConnectionForPrivateLinkHubInner; -import com.azure.resourcemanager.synapse.fluent.models.PrivateEndpointConnectionProperties; import com.azure.resourcemanager.synapse.models.PrivateEndpointConnectionForPrivateLinkHub; +import com.azure.resourcemanager.synapse.models.PrivateEndpointConnectionProperties; public final class PrivateEndpointConnectionForPrivateLinkHubImpl implements PrivateEndpointConnectionForPrivateLinkHub { diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SensitivityLabelUpdatePropertiesImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SensitivityLabelUpdatePropertiesImpl.java deleted file mode 100644 index 924ea1e0d4862..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SensitivityLabelUpdatePropertiesImpl.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.implementation; - -import com.azure.resourcemanager.synapse.fluent.models.SensitivityLabelInner; -import com.azure.resourcemanager.synapse.fluent.models.SensitivityLabelUpdatePropertiesInner; -import com.azure.resourcemanager.synapse.models.SensitivityLabel; -import com.azure.resourcemanager.synapse.models.SensitivityLabelUpdateKind; -import com.azure.resourcemanager.synapse.models.SensitivityLabelUpdateProperties; - -public final class SensitivityLabelUpdatePropertiesImpl implements SensitivityLabelUpdateProperties { - private SensitivityLabelUpdatePropertiesInner innerObject; - - private final com.azure.resourcemanager.synapse.SynapseManager serviceManager; - - SensitivityLabelUpdatePropertiesImpl( - SensitivityLabelUpdatePropertiesInner innerObject, - com.azure.resourcemanager.synapse.SynapseManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public SensitivityLabelUpdateKind op() { - return this.innerModel().op(); - } - - public String schema() { - return this.innerModel().schema(); - } - - public String table() { - return this.innerModel().table(); - } - - public String column() { - return this.innerModel().column(); - } - - public SensitivityLabel sensitivityLabel() { - SensitivityLabelInner inner = this.innerModel().sensitivityLabel(); - if (inner != null) { - return new SensitivityLabelImpl(inner, this.manager()); - } else { - return null; - } - } - - public SensitivityLabelUpdatePropertiesInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.synapse.SynapseManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SkuDescriptionImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SkuDescriptionImpl.java new file mode 100644 index 0000000000000..590325353790e --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SkuDescriptionImpl.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.implementation; + +import com.azure.resourcemanager.synapse.fluent.models.SkuDescriptionInner; +import com.azure.resourcemanager.synapse.models.SkuDescription; +import com.azure.resourcemanager.synapse.models.SkuLocationInfoItem; +import java.util.Collections; +import java.util.List; + +public final class SkuDescriptionImpl implements SkuDescription { + private SkuDescriptionInner innerObject; + + private final com.azure.resourcemanager.synapse.SynapseManager serviceManager; + + SkuDescriptionImpl( + SkuDescriptionInner innerObject, com.azure.resourcemanager.synapse.SynapseManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String resourceType() { + return this.innerModel().resourceType(); + } + + public String name() { + return this.innerModel().name(); + } + + public String size() { + return this.innerModel().size(); + } + + public List locations() { + List inner = this.innerModel().locations(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List locationInfo() { + List inner = this.innerModel().locationInfo(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List restrictions() { + List inner = this.innerModel().restrictions(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public SkuDescriptionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.synapse.SynapseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolImpl.java index 5ee980278f083..91b255319d0b5 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolImpl.java @@ -8,6 +8,7 @@ import com.azure.core.management.Region; import com.azure.core.util.Context; import com.azure.resourcemanager.synapse.fluent.models.SqlPoolInner; +import com.azure.resourcemanager.synapse.models.CreateMode; import com.azure.resourcemanager.synapse.models.ResourceMoveDefinition; import com.azure.resourcemanager.synapse.models.Sku; import com.azure.resourcemanager.synapse.models.SqlPool; @@ -79,7 +80,7 @@ public OffsetDateTime restorePointInTime() { return this.innerModel().restorePointInTime(); } - public String createMode() { + public CreateMode createMode() { return this.innerModel().createMode(); } @@ -328,7 +329,7 @@ public SqlPoolImpl withRestorePointInTime(OffsetDateTime restorePointInTime) { } } - public SqlPoolImpl withCreateMode(String createMode) { + public SqlPoolImpl withCreateMode(CreateMode createMode) { if (isInCreateMode()) { this.innerModel().withCreateMode(createMode); return this; diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SynapseManagementClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SynapseManagementClientImpl.java index 9b0870c907935..6649b70ce080f 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SynapseManagementClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SynapseManagementClientImpl.java @@ -37,6 +37,15 @@ import com.azure.resourcemanager.synapse.fluent.IntegrationRuntimesClient; import com.azure.resourcemanager.synapse.fluent.IpFirewallRulesClient; import com.azure.resourcemanager.synapse.fluent.KeysClient; +import com.azure.resourcemanager.synapse.fluent.KustoOperationsClient; +import com.azure.resourcemanager.synapse.fluent.KustoPoolAttachedDatabaseConfigurationsClient; +import com.azure.resourcemanager.synapse.fluent.KustoPoolChildResourcesClient; +import com.azure.resourcemanager.synapse.fluent.KustoPoolDataConnectionsClient; +import com.azure.resourcemanager.synapse.fluent.KustoPoolDatabasePrincipalAssignmentsClient; +import com.azure.resourcemanager.synapse.fluent.KustoPoolDatabasesClient; +import com.azure.resourcemanager.synapse.fluent.KustoPoolPrincipalAssignmentsClient; +import com.azure.resourcemanager.synapse.fluent.KustoPoolsClient; +import com.azure.resourcemanager.synapse.fluent.KustoPoolsOperationsClient; import com.azure.resourcemanager.synapse.fluent.LibrariesClient; import com.azure.resourcemanager.synapse.fluent.LibrariesOperationsClient; import com.azure.resourcemanager.synapse.fluent.OperationsClient; @@ -933,6 +942,114 @@ public SparkConfigurationsOperationsClient getSparkConfigurationsOperations() { return this.sparkConfigurationsOperations; } + /** The KustoOperationsClient object to access its operations. */ + private final KustoOperationsClient kustoOperations; + + /** + * Gets the KustoOperationsClient object to access its operations. + * + * @return the KustoOperationsClient object. + */ + public KustoOperationsClient getKustoOperations() { + return this.kustoOperations; + } + + /** The KustoPoolsClient object to access its operations. */ + private final KustoPoolsClient kustoPools; + + /** + * Gets the KustoPoolsClient object to access its operations. + * + * @return the KustoPoolsClient object. + */ + public KustoPoolsClient getKustoPools() { + return this.kustoPools; + } + + /** The KustoPoolsOperationsClient object to access its operations. */ + private final KustoPoolsOperationsClient kustoPoolsOperations; + + /** + * Gets the KustoPoolsOperationsClient object to access its operations. + * + * @return the KustoPoolsOperationsClient object. + */ + public KustoPoolsOperationsClient getKustoPoolsOperations() { + return this.kustoPoolsOperations; + } + + /** The KustoPoolChildResourcesClient object to access its operations. */ + private final KustoPoolChildResourcesClient kustoPoolChildResources; + + /** + * Gets the KustoPoolChildResourcesClient object to access its operations. + * + * @return the KustoPoolChildResourcesClient object. + */ + public KustoPoolChildResourcesClient getKustoPoolChildResources() { + return this.kustoPoolChildResources; + } + + /** The KustoPoolAttachedDatabaseConfigurationsClient object to access its operations. */ + private final KustoPoolAttachedDatabaseConfigurationsClient kustoPoolAttachedDatabaseConfigurations; + + /** + * Gets the KustoPoolAttachedDatabaseConfigurationsClient object to access its operations. + * + * @return the KustoPoolAttachedDatabaseConfigurationsClient object. + */ + public KustoPoolAttachedDatabaseConfigurationsClient getKustoPoolAttachedDatabaseConfigurations() { + return this.kustoPoolAttachedDatabaseConfigurations; + } + + /** The KustoPoolDatabasesClient object to access its operations. */ + private final KustoPoolDatabasesClient kustoPoolDatabases; + + /** + * Gets the KustoPoolDatabasesClient object to access its operations. + * + * @return the KustoPoolDatabasesClient object. + */ + public KustoPoolDatabasesClient getKustoPoolDatabases() { + return this.kustoPoolDatabases; + } + + /** The KustoPoolDataConnectionsClient object to access its operations. */ + private final KustoPoolDataConnectionsClient kustoPoolDataConnections; + + /** + * Gets the KustoPoolDataConnectionsClient object to access its operations. + * + * @return the KustoPoolDataConnectionsClient object. + */ + public KustoPoolDataConnectionsClient getKustoPoolDataConnections() { + return this.kustoPoolDataConnections; + } + + /** The KustoPoolPrincipalAssignmentsClient object to access its operations. */ + private final KustoPoolPrincipalAssignmentsClient kustoPoolPrincipalAssignments; + + /** + * Gets the KustoPoolPrincipalAssignmentsClient object to access its operations. + * + * @return the KustoPoolPrincipalAssignmentsClient object. + */ + public KustoPoolPrincipalAssignmentsClient getKustoPoolPrincipalAssignments() { + return this.kustoPoolPrincipalAssignments; + } + + /** The KustoPoolDatabasePrincipalAssignmentsClient object to access its operations. */ + private final KustoPoolDatabasePrincipalAssignmentsClient kustoPoolDatabasePrincipalAssignments; + + /** + * Gets the KustoPoolDatabasePrincipalAssignmentsClient object to access its operations. + * + * @return the KustoPoolDatabasePrincipalAssignmentsClient object. + */ + public KustoPoolDatabasePrincipalAssignmentsClient getKustoPoolDatabasePrincipalAssignments() { + return this.kustoPoolDatabasePrincipalAssignments; + } + /** * Initializes an instance of SynapseManagementClient client. * @@ -1027,6 +1144,15 @@ public SparkConfigurationsOperationsClient getSparkConfigurationsOperations() { this.integrationRuntimeStatusOperations = new IntegrationRuntimeStatusOperationsClientImpl(this); this.sparkConfigurations = new SparkConfigurationsClientImpl(this); this.sparkConfigurationsOperations = new SparkConfigurationsOperationsClientImpl(this); + this.kustoOperations = new KustoOperationsClientImpl(this); + this.kustoPools = new KustoPoolsClientImpl(this); + this.kustoPoolsOperations = new KustoPoolsOperationsClientImpl(this); + this.kustoPoolChildResources = new KustoPoolChildResourcesClientImpl(this); + this.kustoPoolAttachedDatabaseConfigurations = new KustoPoolAttachedDatabaseConfigurationsClientImpl(this); + this.kustoPoolDatabases = new KustoPoolDatabasesClientImpl(this); + this.kustoPoolDataConnections = new KustoPoolDataConnectionsClientImpl(this); + this.kustoPoolPrincipalAssignments = new KustoPoolPrincipalAssignmentsClientImpl(this); + this.kustoPoolDatabasePrincipalAssignments = new KustoPoolDatabasePrincipalAssignmentsClientImpl(this); } /** diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkloadGroupImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkloadGroupImpl.java index 99099f1b0766a..da1f26ef6c84d 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkloadGroupImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkloadGroupImpl.java @@ -25,15 +25,15 @@ public String type() { return this.innerModel().type(); } - public int minResourcePercent() { + public Integer minResourcePercent() { return this.innerModel().minResourcePercent(); } - public int maxResourcePercent() { + public Integer maxResourcePercent() { return this.innerModel().maxResourcePercent(); } - public double minResourcePercentPerRequest() { + public Double minResourcePercentPerRequest() { return this.innerModel().minResourcePercentPerRequest(); } @@ -151,17 +151,17 @@ public WorkloadGroup refresh(Context context) { return this; } - public WorkloadGroupImpl withMinResourcePercent(int minResourcePercent) { + public WorkloadGroupImpl withMinResourcePercent(Integer minResourcePercent) { this.innerModel().withMinResourcePercent(minResourcePercent); return this; } - public WorkloadGroupImpl withMaxResourcePercent(int maxResourcePercent) { + public WorkloadGroupImpl withMaxResourcePercent(Integer maxResourcePercent) { this.innerModel().withMaxResourcePercent(maxResourcePercent); return this; } - public WorkloadGroupImpl withMinResourcePercentPerRequest(double minResourcePercentPerRequest) { + public WorkloadGroupImpl withMinResourcePercentPerRequest(Double minResourcePercentPerRequest) { this.innerModel().withMinResourcePercentPerRequest(minResourcePercentPerRequest); return this; } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AttachedDatabaseConfiguration.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AttachedDatabaseConfiguration.java new file mode 100644 index 0000000000000..c04e0e62c5902 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AttachedDatabaseConfiguration.java @@ -0,0 +1,323 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.synapse.fluent.models.AttachedDatabaseConfigurationInner; +import java.util.List; + +/** An immutable client-side representation of AttachedDatabaseConfiguration. */ +public interface AttachedDatabaseConfiguration { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: Resource location. + * + * @return the location value. + */ + String location(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioned state of the resource. + * + * @return the provisioningState value. + */ + ResourceProvisioningState provisioningState(); + + /** + * Gets the databaseName property: The name of the database which you would like to attach, use * if you want to + * follow all current and future databases. + * + * @return the databaseName value. + */ + String databaseName(); + + /** + * Gets the kustoPoolResourceId property: The resource id of the kusto pool where the databases you would like to + * attach reside. + * + * @return the kustoPoolResourceId value. + */ + String kustoPoolResourceId(); + + /** + * Gets the attachedDatabaseNames property: The list of databases from the clusterResourceId which are currently + * attached to the kusto pool. + * + * @return the attachedDatabaseNames value. + */ + List attachedDatabaseNames(); + + /** + * Gets the defaultPrincipalsModificationKind property: The default principals modification kind. + * + * @return the defaultPrincipalsModificationKind value. + */ + DefaultPrincipalsModificationKind defaultPrincipalsModificationKind(); + + /** + * Gets the tableLevelSharingProperties property: Table level sharing specifications. + * + * @return the tableLevelSharingProperties value. + */ + TableLevelSharingProperties tableLevelSharingProperties(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the inner com.azure.resourcemanager.synapse.fluent.models.AttachedDatabaseConfigurationInner object. + * + * @return the inner object. + */ + AttachedDatabaseConfigurationInner innerModel(); + + /** The entirety of the AttachedDatabaseConfiguration definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The AttachedDatabaseConfiguration definition stages. */ + interface DefinitionStages { + /** The first stage of the AttachedDatabaseConfiguration definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the AttachedDatabaseConfiguration definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies workspaceName, kustoPoolName, resourceGroupName. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingKustoPool(String workspaceName, String kustoPoolName, String resourceGroupName); + } + /** + * The stage of the AttachedDatabaseConfiguration 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.WithLocation, + DefinitionStages.WithDatabaseName, + DefinitionStages.WithKustoPoolResourceId, + DefinitionStages.WithDefaultPrincipalsModificationKind, + DefinitionStages.WithTableLevelSharingProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + AttachedDatabaseConfiguration create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + AttachedDatabaseConfiguration create(Context context); + } + /** The stage of the AttachedDatabaseConfiguration definition allowing to specify location. */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location Resource location. + * @return the next definition stage. + */ + WithCreate withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location Resource location. + * @return the next definition stage. + */ + WithCreate withRegion(String location); + } + /** The stage of the AttachedDatabaseConfiguration definition allowing to specify databaseName. */ + interface WithDatabaseName { + /** + * Specifies the databaseName property: The name of the database which you would like to attach, use * if + * you want to follow all current and future databases.. + * + * @param databaseName The name of the database which you would like to attach, use * if you want to follow + * all current and future databases. + * @return the next definition stage. + */ + WithCreate withDatabaseName(String databaseName); + } + /** The stage of the AttachedDatabaseConfiguration definition allowing to specify kustoPoolResourceId. */ + interface WithKustoPoolResourceId { + /** + * Specifies the kustoPoolResourceId property: The resource id of the kusto pool where the databases you + * would like to attach reside.. + * + * @param kustoPoolResourceId The resource id of the kusto pool where the databases you would like to attach + * reside. + * @return the next definition stage. + */ + WithCreate withKustoPoolResourceId(String kustoPoolResourceId); + } + /** + * The stage of the AttachedDatabaseConfiguration definition allowing to specify + * defaultPrincipalsModificationKind. + */ + interface WithDefaultPrincipalsModificationKind { + /** + * Specifies the defaultPrincipalsModificationKind property: The default principals modification kind. + * + * @param defaultPrincipalsModificationKind The default principals modification kind. + * @return the next definition stage. + */ + WithCreate withDefaultPrincipalsModificationKind( + DefaultPrincipalsModificationKind defaultPrincipalsModificationKind); + } + /** + * The stage of the AttachedDatabaseConfiguration definition allowing to specify tableLevelSharingProperties. + */ + interface WithTableLevelSharingProperties { + /** + * Specifies the tableLevelSharingProperties property: Table level sharing specifications. + * + * @param tableLevelSharingProperties Table level sharing specifications. + * @return the next definition stage. + */ + WithCreate withTableLevelSharingProperties(TableLevelSharingProperties tableLevelSharingProperties); + } + } + /** + * Begins update for the AttachedDatabaseConfiguration resource. + * + * @return the stage of resource update. + */ + AttachedDatabaseConfiguration.Update update(); + + /** The template for AttachedDatabaseConfiguration update. */ + interface Update + extends UpdateStages.WithDatabaseName, + UpdateStages.WithKustoPoolResourceId, + UpdateStages.WithDefaultPrincipalsModificationKind, + UpdateStages.WithTableLevelSharingProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + AttachedDatabaseConfiguration apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + AttachedDatabaseConfiguration apply(Context context); + } + /** The AttachedDatabaseConfiguration update stages. */ + interface UpdateStages { + /** The stage of the AttachedDatabaseConfiguration update allowing to specify databaseName. */ + interface WithDatabaseName { + /** + * Specifies the databaseName property: The name of the database which you would like to attach, use * if + * you want to follow all current and future databases.. + * + * @param databaseName The name of the database which you would like to attach, use * if you want to follow + * all current and future databases. + * @return the next definition stage. + */ + Update withDatabaseName(String databaseName); + } + /** The stage of the AttachedDatabaseConfiguration update allowing to specify kustoPoolResourceId. */ + interface WithKustoPoolResourceId { + /** + * Specifies the kustoPoolResourceId property: The resource id of the kusto pool where the databases you + * would like to attach reside.. + * + * @param kustoPoolResourceId The resource id of the kusto pool where the databases you would like to attach + * reside. + * @return the next definition stage. + */ + Update withKustoPoolResourceId(String kustoPoolResourceId); + } + /** + * The stage of the AttachedDatabaseConfiguration update allowing to specify defaultPrincipalsModificationKind. + */ + interface WithDefaultPrincipalsModificationKind { + /** + * Specifies the defaultPrincipalsModificationKind property: The default principals modification kind. + * + * @param defaultPrincipalsModificationKind The default principals modification kind. + * @return the next definition stage. + */ + Update withDefaultPrincipalsModificationKind( + DefaultPrincipalsModificationKind defaultPrincipalsModificationKind); + } + /** The stage of the AttachedDatabaseConfiguration update allowing to specify tableLevelSharingProperties. */ + interface WithTableLevelSharingProperties { + /** + * Specifies the tableLevelSharingProperties property: Table level sharing specifications. + * + * @param tableLevelSharingProperties Table level sharing specifications. + * @return the next definition stage. + */ + Update withTableLevelSharingProperties(TableLevelSharingProperties tableLevelSharingProperties); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + AttachedDatabaseConfiguration refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + AttachedDatabaseConfiguration refresh(Context context); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AttachedDatabaseConfigurationListResult.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AttachedDatabaseConfigurationListResult.java new file mode 100644 index 0000000000000..a9388b68510eb --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AttachedDatabaseConfigurationListResult.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.fluent.models.AttachedDatabaseConfigurationInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The list attached database configurations operation response. */ +@Fluent +public final class AttachedDatabaseConfigurationListResult { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AttachedDatabaseConfigurationListResult.class); + + /* + * The list of attached database configurations. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value property: The list of attached database configurations. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of attached database configurations. + * + * @param value the value value to set. + * @return the AttachedDatabaseConfigurationListResult object itself. + */ + public AttachedDatabaseConfigurationListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AzureADOnlyAuthentication.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AzureADOnlyAuthentication.java index b05b3f9a1e12a..839770722796e 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AzureADOnlyAuthentication.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AzureADOnlyAuthentication.java @@ -36,7 +36,7 @@ public interface AzureADOnlyAuthentication { * * @return the azureADOnlyAuthentication value. */ - boolean azureADOnlyAuthentication(); + Boolean azureADOnlyAuthentication(); /** * Gets the state property: property configuration state. @@ -107,7 +107,7 @@ interface WithAzureADOnlyAuthentication { * @param azureADOnlyAuthentication Azure Active Directory only Authentication enabled. * @return the next definition stage. */ - WithCreate withAzureADOnlyAuthentication(boolean azureADOnlyAuthentication); + WithCreate withAzureADOnlyAuthentication(Boolean azureADOnlyAuthentication); } } /** diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AzureCapacity.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AzureCapacity.java new file mode 100644 index 0000000000000..9717c6fb7906c --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AzureCapacity.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Azure capacity definition. */ +@Fluent +public final class AzureCapacity { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureCapacity.class); + + /* + * Scale type. + */ + @JsonProperty(value = "scaleType", required = true) + private AzureScaleType scaleType; + + /* + * Minimum allowed capacity. + */ + @JsonProperty(value = "minimum", required = true) + private int minimum; + + /* + * Maximum allowed capacity. + */ + @JsonProperty(value = "maximum", required = true) + private int maximum; + + /* + * The default capacity that would be used. + */ + @JsonProperty(value = "default", required = true) + private int defaultProperty; + + /** + * Get the scaleType property: Scale type. + * + * @return the scaleType value. + */ + public AzureScaleType scaleType() { + return this.scaleType; + } + + /** + * Set the scaleType property: Scale type. + * + * @param scaleType the scaleType value to set. + * @return the AzureCapacity object itself. + */ + public AzureCapacity withScaleType(AzureScaleType scaleType) { + this.scaleType = scaleType; + return this; + } + + /** + * Get the minimum property: Minimum allowed capacity. + * + * @return the minimum value. + */ + public int minimum() { + return this.minimum; + } + + /** + * Set the minimum property: Minimum allowed capacity. + * + * @param minimum the minimum value to set. + * @return the AzureCapacity object itself. + */ + public AzureCapacity withMinimum(int minimum) { + this.minimum = minimum; + return this; + } + + /** + * Get the maximum property: Maximum allowed capacity. + * + * @return the maximum value. + */ + public int maximum() { + return this.maximum; + } + + /** + * Set the maximum property: Maximum allowed capacity. + * + * @param maximum the maximum value to set. + * @return the AzureCapacity object itself. + */ + public AzureCapacity withMaximum(int maximum) { + this.maximum = maximum; + return this; + } + + /** + * Get the defaultProperty property: The default capacity that would be used. + * + * @return the defaultProperty value. + */ + public int defaultProperty() { + return this.defaultProperty; + } + + /** + * Set the defaultProperty property: The default capacity that would be used. + * + * @param defaultProperty the defaultProperty value to set. + * @return the AzureCapacity object itself. + */ + public AzureCapacity withDefaultProperty(int defaultProperty) { + this.defaultProperty = defaultProperty; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (scaleType() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property scaleType in model AzureCapacity")); + } + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AzureResourceSku.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AzureResourceSku.java new file mode 100644 index 0000000000000..3b9b289d0aed3 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AzureResourceSku.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.resourcemanager.synapse.fluent.models.AzureResourceSkuInner; + +/** An immutable client-side representation of AzureResourceSku. */ +public interface AzureResourceSku { + /** + * Gets the resourceType property: Resource Namespace and Type. + * + * @return the resourceType value. + */ + String resourceType(); + + /** + * Gets the sku property: The SKU details. + * + * @return the sku value. + */ + AzureSku sku(); + + /** + * Gets the capacity property: The number of instances of the cluster. + * + * @return the capacity value. + */ + AzureCapacity capacity(); + + /** + * Gets the inner com.azure.resourcemanager.synapse.fluent.models.AzureResourceSkuInner object. + * + * @return the inner object. + */ + AzureResourceSkuInner innerModel(); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AzureScaleType.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AzureScaleType.java new file mode 100644 index 0000000000000..2ece6db532d9e --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AzureScaleType.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for AzureScaleType. */ +public final class AzureScaleType extends ExpandableStringEnum { + /** Static value automatic for AzureScaleType. */ + public static final AzureScaleType AUTOMATIC = fromString("automatic"); + + /** Static value manual for AzureScaleType. */ + public static final AzureScaleType MANUAL = fromString("manual"); + + /** Static value none for AzureScaleType. */ + public static final AzureScaleType NONE = fromString("none"); + + /** + * Creates or finds a AzureScaleType from its string representation. + * + * @param name a name to look for. + * @return the corresponding AzureScaleType. + */ + @JsonCreator + public static AzureScaleType fromString(String name) { + return fromString(name, AzureScaleType.class); + } + + /** @return known AzureScaleType values. */ + public static Collection values() { + return values(AzureScaleType.class); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AzureSku.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AzureSku.java new file mode 100644 index 0000000000000..182fac137c6b2 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AzureSku.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Azure SKU definition. */ +@Fluent +public final class AzureSku { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureSku.class); + + /* + * SKU name. + */ + @JsonProperty(value = "name", required = true) + private SkuName name; + + /* + * The number of instances of the cluster. + */ + @JsonProperty(value = "capacity") + private Integer capacity; + + /* + * SKU size. + */ + @JsonProperty(value = "size", required = true) + private SkuSize size; + + /** + * Get the name property: SKU name. + * + * @return the name value. + */ + public SkuName name() { + return this.name; + } + + /** + * Set the name property: SKU name. + * + * @param name the name value to set. + * @return the AzureSku object itself. + */ + public AzureSku withName(SkuName name) { + this.name = name; + return this; + } + + /** + * Get the capacity property: The number of instances of the cluster. + * + * @return the capacity value. + */ + public Integer capacity() { + return this.capacity; + } + + /** + * Set the capacity property: The number of instances of the cluster. + * + * @param capacity the capacity value to set. + * @return the AzureSku object itself. + */ + public AzureSku withCapacity(Integer capacity) { + this.capacity = capacity; + return this; + } + + /** + * Get the size property: SKU size. + * + * @return the size value. + */ + public SkuSize size() { + return this.size; + } + + /** + * Set the size property: SKU size. + * + * @param size the size value to set. + * @return the AzureSku object itself. + */ + public AzureSku withSize(SkuSize size) { + this.size = size; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw logger + .logExceptionAsError(new IllegalArgumentException("Missing required property name in model AzureSku")); + } + if (size() == null) { + throw logger + .logExceptionAsError(new IllegalArgumentException("Missing required property size in model AzureSku")); + } + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/BigDataPoolResourceInfo.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/BigDataPoolResourceInfo.java index c4393b430b267..effc1dbd0bb05 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/BigDataPoolResourceInfo.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/BigDataPoolResourceInfo.java @@ -7,7 +7,6 @@ import com.azure.core.management.Region; import com.azure.core.util.Context; import com.azure.resourcemanager.synapse.fluent.models.BigDataPoolResourceInfoInner; -import com.azure.resourcemanager.synapse.fluent.models.LibraryInfo; import java.time.OffsetDateTime; import java.util.List; import java.util.Map; diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/BlobStorageEventType.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/BlobStorageEventType.java new file mode 100644 index 0000000000000..e6b899a60781f --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/BlobStorageEventType.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for BlobStorageEventType. */ +public final class BlobStorageEventType extends ExpandableStringEnum { + /** Static value Microsoft.Storage.BlobCreated for BlobStorageEventType. */ + public static final BlobStorageEventType MICROSOFT_STORAGE_BLOB_CREATED = + fromString("Microsoft.Storage.BlobCreated"); + + /** Static value Microsoft.Storage.BlobRenamed for BlobStorageEventType. */ + public static final BlobStorageEventType MICROSOFT_STORAGE_BLOB_RENAMED = + fromString("Microsoft.Storage.BlobRenamed"); + + /** + * Creates or finds a BlobStorageEventType from its string representation. + * + * @param name a name to look for. + * @return the corresponding BlobStorageEventType. + */ + @JsonCreator + public static BlobStorageEventType fromString(String name) { + return fromString(name, BlobStorageEventType.class); + } + + /** @return known BlobStorageEventType values. */ + public static Collection values() { + return values(BlobStorageEventType.class); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/CheckNameResult.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/CheckNameResult.java new file mode 100644 index 0000000000000..28cccea7dbe44 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/CheckNameResult.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.resourcemanager.synapse.fluent.models.CheckNameResultInner; + +/** An immutable client-side representation of CheckNameResult. */ +public interface CheckNameResult { + /** + * Gets the nameAvailable property: Specifies a Boolean value that indicates if the name is available. + * + * @return the nameAvailable value. + */ + Boolean nameAvailable(); + + /** + * Gets the name property: The name that was checked. + * + * @return the name value. + */ + String name(); + + /** + * Gets the message property: Message indicating an unavailable name due to a conflict, or a description of the + * naming rules that are violated. + * + * @return the message value. + */ + String message(); + + /** + * Gets the reason property: Message providing the reason why the given name is invalid. + * + * @return the reason value. + */ + Reason reason(); + + /** + * Gets the inner com.azure.resourcemanager.synapse.fluent.models.CheckNameResultInner object. + * + * @return the inner object. + */ + CheckNameResultInner innerModel(); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ClusterPrincipalAssignment.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ClusterPrincipalAssignment.java new file mode 100644 index 0000000000000..083a775c114db --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ClusterPrincipalAssignment.java @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.synapse.fluent.models.ClusterPrincipalAssignmentInner; + +/** An immutable client-side representation of ClusterPrincipalAssignment. */ +public interface ClusterPrincipalAssignment { + /** + * 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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the principalId property: The principal ID assigned to the cluster principal. It can be a user email, + * application ID, or security group name. + * + * @return the principalId value. + */ + String principalId(); + + /** + * Gets the role property: Cluster principal role. + * + * @return the role value. + */ + ClusterPrincipalRole role(); + + /** + * Gets the tenantId property: The tenant id of the principal. + * + * @return the tenantId value. + */ + String tenantId(); + + /** + * Gets the principalType property: Principal type. + * + * @return the principalType value. + */ + PrincipalType principalType(); + + /** + * Gets the tenantName property: The tenant name of the principal. + * + * @return the tenantName value. + */ + String tenantName(); + + /** + * Gets the principalName property: The principal name. + * + * @return the principalName value. + */ + String principalName(); + + /** + * Gets the provisioningState property: The provisioned state of the resource. + * + * @return the provisioningState value. + */ + ResourceProvisioningState provisioningState(); + + /** + * Gets the inner com.azure.resourcemanager.synapse.fluent.models.ClusterPrincipalAssignmentInner object. + * + * @return the inner object. + */ + ClusterPrincipalAssignmentInner innerModel(); + + /** The entirety of the ClusterPrincipalAssignment definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The ClusterPrincipalAssignment definition stages. */ + interface DefinitionStages { + /** The first stage of the ClusterPrincipalAssignment definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the ClusterPrincipalAssignment definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies workspaceName, kustoPoolName, resourceGroupName. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingKustoPool(String workspaceName, String kustoPoolName, String resourceGroupName); + } + /** + * The stage of the ClusterPrincipalAssignment 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.WithPrincipalId, + DefinitionStages.WithRole, + DefinitionStages.WithTenantId, + DefinitionStages.WithPrincipalType { + /** + * Executes the create request. + * + * @return the created resource. + */ + ClusterPrincipalAssignment create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ClusterPrincipalAssignment create(Context context); + } + /** The stage of the ClusterPrincipalAssignment definition allowing to specify principalId. */ + interface WithPrincipalId { + /** + * Specifies the principalId property: The principal ID assigned to the cluster principal. It can be a user + * email, application ID, or security group name.. + * + * @param principalId The principal ID assigned to the cluster principal. It can be a user email, + * application ID, or security group name. + * @return the next definition stage. + */ + WithCreate withPrincipalId(String principalId); + } + /** The stage of the ClusterPrincipalAssignment definition allowing to specify role. */ + interface WithRole { + /** + * Specifies the role property: Cluster principal role.. + * + * @param role Cluster principal role. + * @return the next definition stage. + */ + WithCreate withRole(ClusterPrincipalRole role); + } + /** The stage of the ClusterPrincipalAssignment definition allowing to specify tenantId. */ + interface WithTenantId { + /** + * Specifies the tenantId property: The tenant id of the principal. + * + * @param tenantId The tenant id of the principal. + * @return the next definition stage. + */ + WithCreate withTenantId(String tenantId); + } + /** The stage of the ClusterPrincipalAssignment definition allowing to specify principalType. */ + interface WithPrincipalType { + /** + * Specifies the principalType property: Principal type.. + * + * @param principalType Principal type. + * @return the next definition stage. + */ + WithCreate withPrincipalType(PrincipalType principalType); + } + } + /** + * Begins update for the ClusterPrincipalAssignment resource. + * + * @return the stage of resource update. + */ + ClusterPrincipalAssignment.Update update(); + + /** The template for ClusterPrincipalAssignment update. */ + interface Update + extends UpdateStages.WithPrincipalId, + UpdateStages.WithRole, + UpdateStages.WithTenantId, + UpdateStages.WithPrincipalType { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ClusterPrincipalAssignment apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ClusterPrincipalAssignment apply(Context context); + } + /** The ClusterPrincipalAssignment update stages. */ + interface UpdateStages { + /** The stage of the ClusterPrincipalAssignment update allowing to specify principalId. */ + interface WithPrincipalId { + /** + * Specifies the principalId property: The principal ID assigned to the cluster principal. It can be a user + * email, application ID, or security group name.. + * + * @param principalId The principal ID assigned to the cluster principal. It can be a user email, + * application ID, or security group name. + * @return the next definition stage. + */ + Update withPrincipalId(String principalId); + } + /** The stage of the ClusterPrincipalAssignment update allowing to specify role. */ + interface WithRole { + /** + * Specifies the role property: Cluster principal role.. + * + * @param role Cluster principal role. + * @return the next definition stage. + */ + Update withRole(ClusterPrincipalRole role); + } + /** The stage of the ClusterPrincipalAssignment update allowing to specify tenantId. */ + interface WithTenantId { + /** + * Specifies the tenantId property: The tenant id of the principal. + * + * @param tenantId The tenant id of the principal. + * @return the next definition stage. + */ + Update withTenantId(String tenantId); + } + /** The stage of the ClusterPrincipalAssignment update allowing to specify principalType. */ + interface WithPrincipalType { + /** + * Specifies the principalType property: Principal type.. + * + * @param principalType Principal type. + * @return the next definition stage. + */ + Update withPrincipalType(PrincipalType principalType); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ClusterPrincipalAssignment refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ClusterPrincipalAssignment refresh(Context context); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ClusterPrincipalAssignmentCheckNameRequest.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ClusterPrincipalAssignmentCheckNameRequest.java new file mode 100644 index 0000000000000..23f04d0269b4a --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ClusterPrincipalAssignmentCheckNameRequest.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A principal assignment check name availability request. */ +@Fluent +public final class ClusterPrincipalAssignmentCheckNameRequest { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterPrincipalAssignmentCheckNameRequest.class); + + /* + * Principal Assignment resource name. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * The type of resource, + * Microsoft.Synapse/workspaces/kustoPools/principalAssignments. + */ + @JsonProperty(value = "type", required = true) + private String type; + + /** Creates an instance of ClusterPrincipalAssignmentCheckNameRequest class. */ + public ClusterPrincipalAssignmentCheckNameRequest() { + type = "Microsoft.Synapse/workspaces/kustoPools/principalAssignments"; + } + + /** + * Get the name property: Principal Assignment resource name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Principal Assignment resource name. + * + * @param name the name value to set. + * @return the ClusterPrincipalAssignmentCheckNameRequest object itself. + */ + public ClusterPrincipalAssignmentCheckNameRequest withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: The type of resource, Microsoft.Synapse/workspaces/kustoPools/principalAssignments. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: The type of resource, Microsoft.Synapse/workspaces/kustoPools/principalAssignments. + * + * @param type the type value to set. + * @return the ClusterPrincipalAssignmentCheckNameRequest object itself. + */ + public ClusterPrincipalAssignmentCheckNameRequest withType(String type) { + this.type = type; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property name in model ClusterPrincipalAssignmentCheckNameRequest")); + } + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ClusterPrincipalAssignmentListResult.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ClusterPrincipalAssignmentListResult.java new file mode 100644 index 0000000000000..c1d7b9d0e1781 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ClusterPrincipalAssignmentListResult.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.fluent.models.ClusterPrincipalAssignmentInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The list Kusto cluster principal assignments operation response. */ +@Fluent +public final class ClusterPrincipalAssignmentListResult { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterPrincipalAssignmentListResult.class); + + /* + * The list of Kusto cluster principal assignments. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value property: The list of Kusto cluster principal assignments. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of Kusto cluster principal assignments. + * + * @param value the value value to set. + * @return the ClusterPrincipalAssignmentListResult object itself. + */ + public ClusterPrincipalAssignmentListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ClusterPrincipalRole.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ClusterPrincipalRole.java new file mode 100644 index 0000000000000..6b5dc49d1cb6d --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ClusterPrincipalRole.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ClusterPrincipalRole. */ +public final class ClusterPrincipalRole extends ExpandableStringEnum { + /** Static value AllDatabasesAdmin for ClusterPrincipalRole. */ + public static final ClusterPrincipalRole ALL_DATABASES_ADMIN = fromString("AllDatabasesAdmin"); + + /** Static value AllDatabasesViewer for ClusterPrincipalRole. */ + public static final ClusterPrincipalRole ALL_DATABASES_VIEWER = fromString("AllDatabasesViewer"); + + /** + * Creates or finds a ClusterPrincipalRole from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClusterPrincipalRole. + */ + @JsonCreator + public static ClusterPrincipalRole fromString(String name) { + return fromString(name, ClusterPrincipalRole.class); + } + + /** @return known ClusterPrincipalRole values. */ + public static Collection values() { + return values(ClusterPrincipalRole.class); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/CmdkeySetup.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/CmdkeySetup.java index cacf920eaa6f8..45695d51d929a 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/CmdkeySetup.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/CmdkeySetup.java @@ -5,8 +5,8 @@ package com.azure.resourcemanager.synapse.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.fluent.models.CmdkeySetupTypeProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -15,24 +15,28 @@ /** The custom setup of running cmdkey commands. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("CmdkeySetup") +@JsonFlatten @Fluent -public final class CmdkeySetup extends CustomSetupBase { +public class CmdkeySetup extends CustomSetupBase { @JsonIgnore private final ClientLogger logger = new ClientLogger(CmdkeySetup.class); /* - * Cmdkey command custom setup type properties. + * The server name of data source access. */ - @JsonProperty(value = "typeProperties", required = true) - private CmdkeySetupTypeProperties innerTypeProperties = new CmdkeySetupTypeProperties(); + @JsonProperty(value = "typeProperties.targetName", required = true) + private Object targetName; - /** - * Get the innerTypeProperties property: Cmdkey command custom setup type properties. - * - * @return the innerTypeProperties value. + /* + * The user name of data source access. */ - private CmdkeySetupTypeProperties innerTypeProperties() { - return this.innerTypeProperties; - } + @JsonProperty(value = "typeProperties.userName", required = true) + private Object username; + + /* + * The password of data source access. + */ + @JsonProperty(value = "typeProperties.password", required = true) + private SecretBase password; /** * Get the targetName property: The server name of data source access. @@ -40,7 +44,7 @@ private CmdkeySetupTypeProperties innerTypeProperties() { * @return the targetName value. */ public Object targetName() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().targetName(); + return this.targetName; } /** @@ -50,10 +54,7 @@ public Object targetName() { * @return the CmdkeySetup object itself. */ public CmdkeySetup withTargetName(Object targetName) { - if (this.innerTypeProperties() == null) { - this.innerTypeProperties = new CmdkeySetupTypeProperties(); - } - this.innerTypeProperties().withTargetName(targetName); + this.targetName = targetName; return this; } @@ -63,7 +64,7 @@ public CmdkeySetup withTargetName(Object targetName) { * @return the username value. */ public Object username() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().username(); + return this.username; } /** @@ -73,10 +74,7 @@ public Object username() { * @return the CmdkeySetup object itself. */ public CmdkeySetup withUsername(Object username) { - if (this.innerTypeProperties() == null) { - this.innerTypeProperties = new CmdkeySetupTypeProperties(); - } - this.innerTypeProperties().withUsername(username); + this.username = username; return this; } @@ -86,7 +84,7 @@ public CmdkeySetup withUsername(Object username) { * @return the password value. */ public SecretBase password() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().password(); + return this.password; } /** @@ -96,10 +94,7 @@ public SecretBase password() { * @return the CmdkeySetup object itself. */ public CmdkeySetup withPassword(SecretBase password) { - if (this.innerTypeProperties() == null) { - this.innerTypeProperties = new CmdkeySetupTypeProperties(); - } - this.innerTypeProperties().withPassword(password); + this.password = password; return this; } @@ -111,12 +106,22 @@ public CmdkeySetup withPassword(SecretBase password) { @Override public void validate() { super.validate(); - if (innerTypeProperties() == null) { + if (targetName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property targetName in model CmdkeySetup")); + } + if (username() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property username in model CmdkeySetup")); + } + if (password() == null) { throw logger .logExceptionAsError( - new IllegalArgumentException("Missing required property innerTypeProperties in model CmdkeySetup")); + new IllegalArgumentException("Missing required property password in model CmdkeySetup")); } else { - innerTypeProperties().validate(); + password().validate(); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ComponentSetup.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ComponentSetup.java index e75a9b2745ba6..f385ddae11b9f 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ComponentSetup.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ComponentSetup.java @@ -5,8 +5,8 @@ package com.azure.resourcemanager.synapse.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.fluent.models.LicensedComponentSetupTypeProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -15,24 +15,22 @@ /** The custom setup of installing 3rd party components. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("ComponentSetup") +@JsonFlatten @Fluent -public final class ComponentSetup extends CustomSetupBase { +public class ComponentSetup extends CustomSetupBase { @JsonIgnore private final ClientLogger logger = new ClientLogger(ComponentSetup.class); /* - * Install 3rd party component type properties. + * The name of the 3rd party component. */ - @JsonProperty(value = "typeProperties", required = true) - private LicensedComponentSetupTypeProperties innerTypeProperties = new LicensedComponentSetupTypeProperties(); + @JsonProperty(value = "typeProperties.componentName", required = true) + private String componentName; - /** - * Get the innerTypeProperties property: Install 3rd party component type properties. - * - * @return the innerTypeProperties value. + /* + * The license key to activate the component. */ - private LicensedComponentSetupTypeProperties innerTypeProperties() { - return this.innerTypeProperties; - } + @JsonProperty(value = "typeProperties.licenseKey") + private SecretBase licenseKey; /** * Get the componentName property: The name of the 3rd party component. @@ -40,7 +38,7 @@ private LicensedComponentSetupTypeProperties innerTypeProperties() { * @return the componentName value. */ public String componentName() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().componentName(); + return this.componentName; } /** @@ -50,10 +48,7 @@ public String componentName() { * @return the ComponentSetup object itself. */ public ComponentSetup withComponentName(String componentName) { - if (this.innerTypeProperties() == null) { - this.innerTypeProperties = new LicensedComponentSetupTypeProperties(); - } - this.innerTypeProperties().withComponentName(componentName); + this.componentName = componentName; return this; } @@ -63,7 +58,7 @@ public ComponentSetup withComponentName(String componentName) { * @return the licenseKey value. */ public SecretBase licenseKey() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().licenseKey(); + return this.licenseKey; } /** @@ -73,10 +68,7 @@ public SecretBase licenseKey() { * @return the ComponentSetup object itself. */ public ComponentSetup withLicenseKey(SecretBase licenseKey) { - if (this.innerTypeProperties() == null) { - this.innerTypeProperties = new LicensedComponentSetupTypeProperties(); - } - this.innerTypeProperties().withLicenseKey(licenseKey); + this.licenseKey = licenseKey; return this; } @@ -88,13 +80,13 @@ public ComponentSetup withLicenseKey(SecretBase licenseKey) { @Override public void validate() { super.validate(); - if (innerTypeProperties() == null) { + if (componentName() == null) { throw logger .logExceptionAsError( - new IllegalArgumentException( - "Missing required property innerTypeProperties in model ComponentSetup")); - } else { - innerTypeProperties().validate(); + new IllegalArgumentException("Missing required property componentName in model ComponentSetup")); + } + if (licenseKey() != null) { + licenseKey().validate(); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/Compression.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/Compression.java new file mode 100644 index 0000000000000..5b9921737f1e6 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/Compression.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for Compression. */ +public final class Compression extends ExpandableStringEnum { + /** Static value None for Compression. */ + public static final Compression NONE = fromString("None"); + + /** Static value GZip for Compression. */ + public static final Compression GZIP = fromString("GZip"); + + /** + * Creates or finds a Compression from its string representation. + * + * @param name a name to look for. + * @return the corresponding Compression. + */ + @JsonCreator + public static Compression fromString(String name) { + return fromString(name, Compression.class); + } + + /** @return known Compression values. */ + public static Collection values() { + return values(Compression.class); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/CreateMode.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/CreateMode.java new file mode 100644 index 0000000000000..f766fbbd159b7 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/CreateMode.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for CreateMode. */ +public final class CreateMode extends ExpandableStringEnum { + /** Static value Default for CreateMode. */ + public static final CreateMode DEFAULT = fromString("Default"); + + /** Static value PointInTimeRestore for CreateMode. */ + public static final CreateMode POINT_IN_TIME_RESTORE = fromString("PointInTimeRestore"); + + /** Static value Recovery for CreateMode. */ + public static final CreateMode RECOVERY = fromString("Recovery"); + + /** Static value Restore for CreateMode. */ + public static final CreateMode RESTORE = fromString("Restore"); + + /** + * Creates or finds a CreateMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding CreateMode. + */ + @JsonCreator + public static CreateMode fromString(String name) { + return fromString(name, CreateMode.class); + } + + /** @return known CreateMode values. */ + public static Collection values() { + return values(CreateMode.class); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DataConnection.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DataConnection.java new file mode 100644 index 0000000000000..1aad365bb7071 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DataConnection.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.synapse.fluent.models.DataConnectionInner; + +/** An immutable client-side representation of DataConnection. */ +public interface DataConnection { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: Resource location. + * + * @return the location value. + */ + String location(); + + /** + * 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.synapse.fluent.models.DataConnectionInner object. + * + * @return the inner object. + */ + DataConnectionInner innerModel(); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DataConnectionCheckNameRequest.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DataConnectionCheckNameRequest.java new file mode 100644 index 0000000000000..7691406fc1279 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DataConnectionCheckNameRequest.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A data connection check name availability request. */ +@Fluent +public final class DataConnectionCheckNameRequest { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DataConnectionCheckNameRequest.class); + + /* + * Data Connection name. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * The type of resource, + * Microsoft.Synapse/workspaces/kustoPools/databases/dataConnections. + */ + @JsonProperty(value = "type", required = true) + private String type; + + /** Creates an instance of DataConnectionCheckNameRequest class. */ + public DataConnectionCheckNameRequest() { + type = "Microsoft.Synapse/workspaces/kustoPools/databases/dataConnections"; + } + + /** + * Get the name property: Data Connection name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Data Connection name. + * + * @param name the name value to set. + * @return the DataConnectionCheckNameRequest object itself. + */ + public DataConnectionCheckNameRequest withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: The type of resource, Microsoft.Synapse/workspaces/kustoPools/databases/dataConnections. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: The type of resource, Microsoft.Synapse/workspaces/kustoPools/databases/dataConnections. + * + * @param type the type value to set. + * @return the DataConnectionCheckNameRequest object itself. + */ + public DataConnectionCheckNameRequest withType(String type) { + this.type = type; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property name in model DataConnectionCheckNameRequest")); + } + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DataConnectionKind.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DataConnectionKind.java new file mode 100644 index 0000000000000..1a8055d35d302 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DataConnectionKind.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for DataConnectionKind. */ +public final class DataConnectionKind extends ExpandableStringEnum { + /** Static value EventHub for DataConnectionKind. */ + public static final DataConnectionKind EVENT_HUB = fromString("EventHub"); + + /** Static value EventGrid for DataConnectionKind. */ + public static final DataConnectionKind EVENT_GRID = fromString("EventGrid"); + + /** Static value IotHub for DataConnectionKind. */ + public static final DataConnectionKind IOT_HUB = fromString("IotHub"); + + /** + * Creates or finds a DataConnectionKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding DataConnectionKind. + */ + @JsonCreator + public static DataConnectionKind fromString(String name) { + return fromString(name, DataConnectionKind.class); + } + + /** @return known DataConnectionKind values. */ + public static Collection values() { + return values(DataConnectionKind.class); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DataConnectionListResult.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DataConnectionListResult.java new file mode 100644 index 0000000000000..67dc0d4a4dcbc --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DataConnectionListResult.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.fluent.models.DataConnectionInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The list Kusto data connections operation response. */ +@Fluent +public final class DataConnectionListResult { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DataConnectionListResult.class); + + /* + * The list of Kusto data connections. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value property: The list of Kusto data connections. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of Kusto data connections. + * + * @param value the value value to set. + * @return the DataConnectionListResult object itself. + */ + public DataConnectionListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DataConnectionValidation.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DataConnectionValidation.java new file mode 100644 index 0000000000000..d34cec9162586 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DataConnectionValidation.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.resourcemanager.synapse.fluent.models.DataConnectionValidationInner; + +/** An immutable client-side representation of DataConnectionValidation. */ +public interface DataConnectionValidation { + /** + * Gets the dataConnectionName property: The name of the data connection. + * + * @return the dataConnectionName value. + */ + String dataConnectionName(); + + /** + * Gets the properties property: The data connection properties to validate. + * + * @return the properties value. + */ + DataConnection properties(); + + /** + * Gets the inner com.azure.resourcemanager.synapse.fluent.models.DataConnectionValidationInner object. + * + * @return the inner object. + */ + DataConnectionValidationInner innerModel(); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DataConnectionValidationListResult.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DataConnectionValidationListResult.java new file mode 100644 index 0000000000000..b62ec5bec285e --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DataConnectionValidationListResult.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.resourcemanager.synapse.fluent.models.DataConnectionValidationListResultInner; +import java.util.List; + +/** An immutable client-side representation of DataConnectionValidationListResult. */ +public interface DataConnectionValidationListResult { + /** + * Gets the value property: The list of Kusto data connection validation errors. + * + * @return the value value. + */ + List value(); + + /** + * Gets the inner com.azure.resourcemanager.synapse.fluent.models.DataConnectionValidationListResultInner object. + * + * @return the inner object. + */ + DataConnectionValidationListResultInner innerModel(); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DataConnectionValidationResult.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DataConnectionValidationResult.java new file mode 100644 index 0000000000000..4485f08a6e8cb --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DataConnectionValidationResult.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The result returned from a data connection validation request. */ +@Fluent +public final class DataConnectionValidationResult { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DataConnectionValidationResult.class); + + /* + * A message which indicates a problem in data connection validation. + */ + @JsonProperty(value = "errorMessage") + private String errorMessage; + + /** + * Get the errorMessage property: A message which indicates a problem in data connection validation. + * + * @return the errorMessage value. + */ + public String errorMessage() { + return this.errorMessage; + } + + /** + * Set the errorMessage property: A message which indicates a problem in data connection validation. + * + * @param errorMessage the errorMessage value to set. + * @return the DataConnectionValidationResult object itself. + */ + public DataConnectionValidationResult withErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/Database.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/Database.java new file mode 100644 index 0000000000000..44aae1458b906 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/Database.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.synapse.fluent.models.DatabaseInner; + +/** An immutable client-side representation of Database. */ +public interface Database { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: Resource location. + * + * @return the location value. + */ + String location(); + + /** + * 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.synapse.fluent.models.DatabaseInner object. + * + * @return the inner object. + */ + DatabaseInner innerModel(); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DatabaseCheckNameRequest.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DatabaseCheckNameRequest.java new file mode 100644 index 0000000000000..68b1c8b0d788f --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DatabaseCheckNameRequest.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The result returned from a database check name availability request. */ +@Fluent +public final class DatabaseCheckNameRequest { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabaseCheckNameRequest.class); + + /* + * Resource name. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * The type of resource, for instance + * Microsoft.Synapse/workspaces/kustoPools/databases. + */ + @JsonProperty(value = "type", required = true) + private Type type; + + /** + * Get the name property: Resource name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Resource name. + * + * @param name the name value to set. + * @return the DatabaseCheckNameRequest object itself. + */ + public DatabaseCheckNameRequest withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: The type of resource, for instance Microsoft.Synapse/workspaces/kustoPools/databases. + * + * @return the type value. + */ + public Type type() { + return this.type; + } + + /** + * Set the type property: The type of resource, for instance Microsoft.Synapse/workspaces/kustoPools/databases. + * + * @param type the type value to set. + * @return the DatabaseCheckNameRequest object itself. + */ + public DatabaseCheckNameRequest withType(Type type) { + this.type = type; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property name in model DatabaseCheckNameRequest")); + } + if (type() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property type in model DatabaseCheckNameRequest")); + } + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DatabaseListResult.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DatabaseListResult.java new file mode 100644 index 0000000000000..99b508e14baa7 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DatabaseListResult.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.fluent.models.DatabaseInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The list Kusto databases operation response. */ +@Fluent +public final class DatabaseListResult { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabaseListResult.class); + + /* + * The list of Kusto databases. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value property: The list of Kusto databases. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of Kusto databases. + * + * @param value the value value to set. + * @return the DatabaseListResult object itself. + */ + public DatabaseListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DatabasePrincipalAssignment.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DatabasePrincipalAssignment.java new file mode 100644 index 0000000000000..abcf40d14b940 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DatabasePrincipalAssignment.java @@ -0,0 +1,275 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.synapse.fluent.models.DatabasePrincipalAssignmentInner; + +/** An immutable client-side representation of DatabasePrincipalAssignment. */ +public interface DatabasePrincipalAssignment { + /** + * 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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the principalId property: The principal ID assigned to the database principal. It can be a user email, + * application ID, or security group name. + * + * @return the principalId value. + */ + String principalId(); + + /** + * Gets the role property: Database principal role. + * + * @return the role value. + */ + DatabasePrincipalRole role(); + + /** + * Gets the tenantId property: The tenant id of the principal. + * + * @return the tenantId value. + */ + String tenantId(); + + /** + * Gets the principalType property: Principal type. + * + * @return the principalType value. + */ + PrincipalType principalType(); + + /** + * Gets the tenantName property: The tenant name of the principal. + * + * @return the tenantName value. + */ + String tenantName(); + + /** + * Gets the principalName property: The principal name. + * + * @return the principalName value. + */ + String principalName(); + + /** + * Gets the provisioningState property: The provisioned state of the resource. + * + * @return the provisioningState value. + */ + ResourceProvisioningState provisioningState(); + + /** + * Gets the inner com.azure.resourcemanager.synapse.fluent.models.DatabasePrincipalAssignmentInner object. + * + * @return the inner object. + */ + DatabasePrincipalAssignmentInner innerModel(); + + /** The entirety of the DatabasePrincipalAssignment definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The DatabasePrincipalAssignment definition stages. */ + interface DefinitionStages { + /** The first stage of the DatabasePrincipalAssignment definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the DatabasePrincipalAssignment definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies workspaceName, kustoPoolName, databaseName, resourceGroupName. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingDatabase( + String workspaceName, String kustoPoolName, String databaseName, String resourceGroupName); + } + /** + * The stage of the DatabasePrincipalAssignment 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.WithPrincipalId, + DefinitionStages.WithRole, + DefinitionStages.WithTenantId, + DefinitionStages.WithPrincipalType { + /** + * Executes the create request. + * + * @return the created resource. + */ + DatabasePrincipalAssignment create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + DatabasePrincipalAssignment create(Context context); + } + /** The stage of the DatabasePrincipalAssignment definition allowing to specify principalId. */ + interface WithPrincipalId { + /** + * Specifies the principalId property: The principal ID assigned to the database principal. It can be a user + * email, application ID, or security group name.. + * + * @param principalId The principal ID assigned to the database principal. It can be a user email, + * application ID, or security group name. + * @return the next definition stage. + */ + WithCreate withPrincipalId(String principalId); + } + /** The stage of the DatabasePrincipalAssignment definition allowing to specify role. */ + interface WithRole { + /** + * Specifies the role property: Database principal role.. + * + * @param role Database principal role. + * @return the next definition stage. + */ + WithCreate withRole(DatabasePrincipalRole role); + } + /** The stage of the DatabasePrincipalAssignment definition allowing to specify tenantId. */ + interface WithTenantId { + /** + * Specifies the tenantId property: The tenant id of the principal. + * + * @param tenantId The tenant id of the principal. + * @return the next definition stage. + */ + WithCreate withTenantId(String tenantId); + } + /** The stage of the DatabasePrincipalAssignment definition allowing to specify principalType. */ + interface WithPrincipalType { + /** + * Specifies the principalType property: Principal type.. + * + * @param principalType Principal type. + * @return the next definition stage. + */ + WithCreate withPrincipalType(PrincipalType principalType); + } + } + /** + * Begins update for the DatabasePrincipalAssignment resource. + * + * @return the stage of resource update. + */ + DatabasePrincipalAssignment.Update update(); + + /** The template for DatabasePrincipalAssignment update. */ + interface Update + extends UpdateStages.WithPrincipalId, + UpdateStages.WithRole, + UpdateStages.WithTenantId, + UpdateStages.WithPrincipalType { + /** + * Executes the update request. + * + * @return the updated resource. + */ + DatabasePrincipalAssignment apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + DatabasePrincipalAssignment apply(Context context); + } + /** The DatabasePrincipalAssignment update stages. */ + interface UpdateStages { + /** The stage of the DatabasePrincipalAssignment update allowing to specify principalId. */ + interface WithPrincipalId { + /** + * Specifies the principalId property: The principal ID assigned to the database principal. It can be a user + * email, application ID, or security group name.. + * + * @param principalId The principal ID assigned to the database principal. It can be a user email, + * application ID, or security group name. + * @return the next definition stage. + */ + Update withPrincipalId(String principalId); + } + /** The stage of the DatabasePrincipalAssignment update allowing to specify role. */ + interface WithRole { + /** + * Specifies the role property: Database principal role.. + * + * @param role Database principal role. + * @return the next definition stage. + */ + Update withRole(DatabasePrincipalRole role); + } + /** The stage of the DatabasePrincipalAssignment update allowing to specify tenantId. */ + interface WithTenantId { + /** + * Specifies the tenantId property: The tenant id of the principal. + * + * @param tenantId The tenant id of the principal. + * @return the next definition stage. + */ + Update withTenantId(String tenantId); + } + /** The stage of the DatabasePrincipalAssignment update allowing to specify principalType. */ + interface WithPrincipalType { + /** + * Specifies the principalType property: Principal type.. + * + * @param principalType Principal type. + * @return the next definition stage. + */ + Update withPrincipalType(PrincipalType principalType); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + DatabasePrincipalAssignment refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + DatabasePrincipalAssignment refresh(Context context); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DatabasePrincipalAssignmentCheckNameRequest.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DatabasePrincipalAssignmentCheckNameRequest.java new file mode 100644 index 0000000000000..24f4bc9720e7d --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DatabasePrincipalAssignmentCheckNameRequest.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A principal assignment check name availability request. */ +@Fluent +public final class DatabasePrincipalAssignmentCheckNameRequest { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabasePrincipalAssignmentCheckNameRequest.class); + + /* + * Principal Assignment resource name. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * The type of resource, + * Microsoft.Synapse/workspaces/kustoPools/databases/principalAssignments. + */ + @JsonProperty(value = "type", required = true) + private String type; + + /** Creates an instance of DatabasePrincipalAssignmentCheckNameRequest class. */ + public DatabasePrincipalAssignmentCheckNameRequest() { + type = "Microsoft.Synapse/workspaces/kustoPools/databases/principalAssignments"; + } + + /** + * Get the name property: Principal Assignment resource name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Principal Assignment resource name. + * + * @param name the name value to set. + * @return the DatabasePrincipalAssignmentCheckNameRequest object itself. + */ + public DatabasePrincipalAssignmentCheckNameRequest withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: The type of resource, + * Microsoft.Synapse/workspaces/kustoPools/databases/principalAssignments. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: The type of resource, + * Microsoft.Synapse/workspaces/kustoPools/databases/principalAssignments. + * + * @param type the type value to set. + * @return the DatabasePrincipalAssignmentCheckNameRequest object itself. + */ + public DatabasePrincipalAssignmentCheckNameRequest withType(String type) { + this.type = type; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property name in model DatabasePrincipalAssignmentCheckNameRequest")); + } + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DatabasePrincipalAssignmentListResult.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DatabasePrincipalAssignmentListResult.java new file mode 100644 index 0000000000000..d0c8262f209c1 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DatabasePrincipalAssignmentListResult.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.fluent.models.DatabasePrincipalAssignmentInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The list Kusto database principal assignments operation response. */ +@Fluent +public final class DatabasePrincipalAssignmentListResult { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabasePrincipalAssignmentListResult.class); + + /* + * The list of Kusto database principal assignments. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value property: The list of Kusto database principal assignments. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of Kusto database principal assignments. + * + * @param value the value value to set. + * @return the DatabasePrincipalAssignmentListResult object itself. + */ + public DatabasePrincipalAssignmentListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DatabasePrincipalRole.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DatabasePrincipalRole.java new file mode 100644 index 0000000000000..21d719fa2f254 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DatabasePrincipalRole.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for DatabasePrincipalRole. */ +public final class DatabasePrincipalRole extends ExpandableStringEnum { + /** Static value Admin for DatabasePrincipalRole. */ + public static final DatabasePrincipalRole ADMIN = fromString("Admin"); + + /** Static value Ingestor for DatabasePrincipalRole. */ + public static final DatabasePrincipalRole INGESTOR = fromString("Ingestor"); + + /** Static value Monitor for DatabasePrincipalRole. */ + public static final DatabasePrincipalRole MONITOR = fromString("Monitor"); + + /** Static value User for DatabasePrincipalRole. */ + public static final DatabasePrincipalRole USER = fromString("User"); + + /** Static value UnrestrictedViewer for DatabasePrincipalRole. */ + public static final DatabasePrincipalRole UNRESTRICTED_VIEWER = fromString("UnrestrictedViewer"); + + /** Static value Viewer for DatabasePrincipalRole. */ + public static final DatabasePrincipalRole VIEWER = fromString("Viewer"); + + /** + * Creates or finds a DatabasePrincipalRole from its string representation. + * + * @param name a name to look for. + * @return the corresponding DatabasePrincipalRole. + */ + @JsonCreator + public static DatabasePrincipalRole fromString(String name) { + return fromString(name, DatabasePrincipalRole.class); + } + + /** @return known DatabasePrincipalRole values. */ + public static Collection values() { + return values(DatabasePrincipalRole.class); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DatabaseStatistics.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DatabaseStatistics.java new file mode 100644 index 0000000000000..1b3ac4201537f --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DatabaseStatistics.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A class that contains database statistics information. */ +@Fluent +public final class DatabaseStatistics { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabaseStatistics.class); + + /* + * The database size - the total size of compressed data and index in + * bytes. + */ + @JsonProperty(value = "size") + private Float size; + + /** + * Get the size property: The database size - the total size of compressed data and index in bytes. + * + * @return the size value. + */ + public Float size() { + return this.size; + } + + /** + * Set the size property: The database size - the total size of compressed data and index in bytes. + * + * @param size the size value to set. + * @return the DatabaseStatistics object itself. + */ + public DatabaseStatistics withSize(Float size) { + this.size = size; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DefaultPrincipalsModificationKind.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DefaultPrincipalsModificationKind.java new file mode 100644 index 0000000000000..734d96e7b3f66 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/DefaultPrincipalsModificationKind.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for DefaultPrincipalsModificationKind. */ +public final class DefaultPrincipalsModificationKind extends ExpandableStringEnum { + /** Static value Union for DefaultPrincipalsModificationKind. */ + public static final DefaultPrincipalsModificationKind UNION = fromString("Union"); + + /** Static value Replace for DefaultPrincipalsModificationKind. */ + public static final DefaultPrincipalsModificationKind REPLACE = fromString("Replace"); + + /** Static value None for DefaultPrincipalsModificationKind. */ + public static final DefaultPrincipalsModificationKind NONE = fromString("None"); + + /** + * Creates or finds a DefaultPrincipalsModificationKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding DefaultPrincipalsModificationKind. + */ + @JsonCreator + public static DefaultPrincipalsModificationKind fromString(String name) { + return fromString(name, DefaultPrincipalsModificationKind.class); + } + + /** @return known DefaultPrincipalsModificationKind values. */ + public static Collection values() { + return values(DefaultPrincipalsModificationKind.class); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/EnvironmentVariableSetup.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/EnvironmentVariableSetup.java index 5e708032da997..e96ec178ab43a 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/EnvironmentVariableSetup.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/EnvironmentVariableSetup.java @@ -5,8 +5,8 @@ package com.azure.resourcemanager.synapse.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.fluent.models.EnvironmentVariableSetupTypeProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -15,24 +15,22 @@ /** The custom setup of setting environment variable. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("EnvironmentVariableSetup") +@JsonFlatten @Fluent -public final class EnvironmentVariableSetup extends CustomSetupBase { +public class EnvironmentVariableSetup extends CustomSetupBase { @JsonIgnore private final ClientLogger logger = new ClientLogger(EnvironmentVariableSetup.class); /* - * Add environment variable type properties. + * The name of the environment variable. */ - @JsonProperty(value = "typeProperties", required = true) - private EnvironmentVariableSetupTypeProperties innerTypeProperties = new EnvironmentVariableSetupTypeProperties(); + @JsonProperty(value = "typeProperties.variableName", required = true) + private String variableName; - /** - * Get the innerTypeProperties property: Add environment variable type properties. - * - * @return the innerTypeProperties value. + /* + * The value of the environment variable. */ - private EnvironmentVariableSetupTypeProperties innerTypeProperties() { - return this.innerTypeProperties; - } + @JsonProperty(value = "typeProperties.variableValue", required = true) + private String variableValue; /** * Get the variableName property: The name of the environment variable. @@ -40,7 +38,7 @@ private EnvironmentVariableSetupTypeProperties innerTypeProperties() { * @return the variableName value. */ public String variableName() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().variableName(); + return this.variableName; } /** @@ -50,10 +48,7 @@ public String variableName() { * @return the EnvironmentVariableSetup object itself. */ public EnvironmentVariableSetup withVariableName(String variableName) { - if (this.innerTypeProperties() == null) { - this.innerTypeProperties = new EnvironmentVariableSetupTypeProperties(); - } - this.innerTypeProperties().withVariableName(variableName); + this.variableName = variableName; return this; } @@ -63,7 +58,7 @@ public EnvironmentVariableSetup withVariableName(String variableName) { * @return the variableValue value. */ public String variableValue() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().variableValue(); + return this.variableValue; } /** @@ -73,10 +68,7 @@ public String variableValue() { * @return the EnvironmentVariableSetup object itself. */ public EnvironmentVariableSetup withVariableValue(String variableValue) { - if (this.innerTypeProperties() == null) { - this.innerTypeProperties = new EnvironmentVariableSetupTypeProperties(); - } - this.innerTypeProperties().withVariableValue(variableValue); + this.variableValue = variableValue; return this; } @@ -88,13 +80,17 @@ public EnvironmentVariableSetup withVariableValue(String variableValue) { @Override public void validate() { super.validate(); - if (innerTypeProperties() == null) { + if (variableName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property variableName in model EnvironmentVariableSetup")); + } + if (variableValue() == null) { throw logger .logExceptionAsError( new IllegalArgumentException( - "Missing required property innerTypeProperties in model EnvironmentVariableSetup")); - } else { - innerTypeProperties().validate(); + "Missing required property variableValue in model EnvironmentVariableSetup")); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/EventGridDataConnection.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/EventGridDataConnection.java new file mode 100644 index 0000000000000..3131ef7482acb --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/EventGridDataConnection.java @@ -0,0 +1,275 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.fluent.models.DataConnectionInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Class representing an Event Grid data connection. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("EventGrid") +@JsonFlatten +@Fluent +public class EventGridDataConnection extends DataConnectionInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EventGridDataConnection.class); + + /* + * The resource ID of the storage account where the data resides. + */ + @JsonProperty(value = "properties.storageAccountResourceId") + private String storageAccountResourceId; + + /* + * The resource ID where the event grid is configured to send events. + */ + @JsonProperty(value = "properties.eventHubResourceId") + private String eventHubResourceId; + + /* + * The event hub consumer group. + */ + @JsonProperty(value = "properties.consumerGroup") + private String consumerGroup; + + /* + * The table where the data should be ingested. Optionally the table + * information can be added to each message. + */ + @JsonProperty(value = "properties.tableName") + private String tableName; + + /* + * The mapping rule to be used to ingest the data. Optionally the mapping + * information can be added to each message. + */ + @JsonProperty(value = "properties.mappingRuleName") + private String mappingRuleName; + + /* + * The data format of the message. Optionally the data format can be added + * to each message. + */ + @JsonProperty(value = "properties.dataFormat") + private EventGridDataFormat dataFormat; + + /* + * A Boolean value that, if set to true, indicates that ingestion should + * ignore the first record of every file + */ + @JsonProperty(value = "properties.ignoreFirstRecord") + private Boolean ignoreFirstRecord; + + /* + * The name of blob storage event type to process. + */ + @JsonProperty(value = "properties.blobStorageEventType") + private BlobStorageEventType blobStorageEventType; + + /* + * The provisioned state of the resource. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ResourceProvisioningState provisioningState; + + /** + * Get the storageAccountResourceId property: The resource ID of the storage account where the data resides. + * + * @return the storageAccountResourceId value. + */ + public String storageAccountResourceId() { + return this.storageAccountResourceId; + } + + /** + * Set the storageAccountResourceId property: The resource ID of the storage account where the data resides. + * + * @param storageAccountResourceId the storageAccountResourceId value to set. + * @return the EventGridDataConnection object itself. + */ + public EventGridDataConnection withStorageAccountResourceId(String storageAccountResourceId) { + this.storageAccountResourceId = storageAccountResourceId; + return this; + } + + /** + * Get the eventHubResourceId property: The resource ID where the event grid is configured to send events. + * + * @return the eventHubResourceId value. + */ + public String eventHubResourceId() { + return this.eventHubResourceId; + } + + /** + * Set the eventHubResourceId property: The resource ID where the event grid is configured to send events. + * + * @param eventHubResourceId the eventHubResourceId value to set. + * @return the EventGridDataConnection object itself. + */ + public EventGridDataConnection withEventHubResourceId(String eventHubResourceId) { + this.eventHubResourceId = eventHubResourceId; + return this; + } + + /** + * Get the consumerGroup property: The event hub consumer group. + * + * @return the consumerGroup value. + */ + public String consumerGroup() { + return this.consumerGroup; + } + + /** + * Set the consumerGroup property: The event hub consumer group. + * + * @param consumerGroup the consumerGroup value to set. + * @return the EventGridDataConnection object itself. + */ + public EventGridDataConnection withConsumerGroup(String consumerGroup) { + this.consumerGroup = consumerGroup; + return this; + } + + /** + * Get the tableName property: The table where the data should be ingested. Optionally the table information can be + * added to each message. + * + * @return the tableName value. + */ + public String tableName() { + return this.tableName; + } + + /** + * Set the tableName property: The table where the data should be ingested. Optionally the table information can be + * added to each message. + * + * @param tableName the tableName value to set. + * @return the EventGridDataConnection object itself. + */ + public EventGridDataConnection withTableName(String tableName) { + this.tableName = tableName; + return this; + } + + /** + * Get the mappingRuleName property: The mapping rule to be used to ingest the data. Optionally the mapping + * information can be added to each message. + * + * @return the mappingRuleName value. + */ + public String mappingRuleName() { + return this.mappingRuleName; + } + + /** + * Set the mappingRuleName property: The mapping rule to be used to ingest the data. Optionally the mapping + * information can be added to each message. + * + * @param mappingRuleName the mappingRuleName value to set. + * @return the EventGridDataConnection object itself. + */ + public EventGridDataConnection withMappingRuleName(String mappingRuleName) { + this.mappingRuleName = mappingRuleName; + return this; + } + + /** + * Get the dataFormat property: The data format of the message. Optionally the data format can be added to each + * message. + * + * @return the dataFormat value. + */ + public EventGridDataFormat dataFormat() { + return this.dataFormat; + } + + /** + * Set the dataFormat property: The data format of the message. Optionally the data format can be added to each + * message. + * + * @param dataFormat the dataFormat value to set. + * @return the EventGridDataConnection object itself. + */ + public EventGridDataConnection withDataFormat(EventGridDataFormat dataFormat) { + this.dataFormat = dataFormat; + return this; + } + + /** + * Get the ignoreFirstRecord property: A Boolean value that, if set to true, indicates that ingestion should ignore + * the first record of every file. + * + * @return the ignoreFirstRecord value. + */ + public Boolean ignoreFirstRecord() { + return this.ignoreFirstRecord; + } + + /** + * Set the ignoreFirstRecord property: A Boolean value that, if set to true, indicates that ingestion should ignore + * the first record of every file. + * + * @param ignoreFirstRecord the ignoreFirstRecord value to set. + * @return the EventGridDataConnection object itself. + */ + public EventGridDataConnection withIgnoreFirstRecord(Boolean ignoreFirstRecord) { + this.ignoreFirstRecord = ignoreFirstRecord; + return this; + } + + /** + * Get the blobStorageEventType property: The name of blob storage event type to process. + * + * @return the blobStorageEventType value. + */ + public BlobStorageEventType blobStorageEventType() { + return this.blobStorageEventType; + } + + /** + * Set the blobStorageEventType property: The name of blob storage event type to process. + * + * @param blobStorageEventType the blobStorageEventType value to set. + * @return the EventGridDataConnection object itself. + */ + public EventGridDataConnection withBlobStorageEventType(BlobStorageEventType blobStorageEventType) { + this.blobStorageEventType = blobStorageEventType; + return this; + } + + /** + * Get the provisioningState property: The provisioned state of the resource. + * + * @return the provisioningState value. + */ + public ResourceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** {@inheritDoc} */ + @Override + public EventGridDataConnection withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/EventGridDataFormat.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/EventGridDataFormat.java new file mode 100644 index 0000000000000..8a27b48f7810b --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/EventGridDataFormat.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for EventGridDataFormat. */ +public final class EventGridDataFormat extends ExpandableStringEnum { + /** Static value MULTIJSON for EventGridDataFormat. */ + public static final EventGridDataFormat MULTIJSON = fromString("MULTIJSON"); + + /** Static value JSON for EventGridDataFormat. */ + public static final EventGridDataFormat JSON = fromString("JSON"); + + /** Static value CSV for EventGridDataFormat. */ + public static final EventGridDataFormat CSV = fromString("CSV"); + + /** Static value TSV for EventGridDataFormat. */ + public static final EventGridDataFormat TSV = fromString("TSV"); + + /** Static value SCSV for EventGridDataFormat. */ + public static final EventGridDataFormat SCSV = fromString("SCSV"); + + /** Static value SOHSV for EventGridDataFormat. */ + public static final EventGridDataFormat SOHSV = fromString("SOHSV"); + + /** Static value PSV for EventGridDataFormat. */ + public static final EventGridDataFormat PSV = fromString("PSV"); + + /** Static value TXT for EventGridDataFormat. */ + public static final EventGridDataFormat TXT = fromString("TXT"); + + /** Static value RAW for EventGridDataFormat. */ + public static final EventGridDataFormat RAW = fromString("RAW"); + + /** Static value SINGLEJSON for EventGridDataFormat. */ + public static final EventGridDataFormat SINGLEJSON = fromString("SINGLEJSON"); + + /** Static value AVRO for EventGridDataFormat. */ + public static final EventGridDataFormat AVRO = fromString("AVRO"); + + /** Static value TSVE for EventGridDataFormat. */ + public static final EventGridDataFormat TSVE = fromString("TSVE"); + + /** Static value PARQUET for EventGridDataFormat. */ + public static final EventGridDataFormat PARQUET = fromString("PARQUET"); + + /** Static value ORC for EventGridDataFormat. */ + public static final EventGridDataFormat ORC = fromString("ORC"); + + /** Static value APACHEAVRO for EventGridDataFormat. */ + public static final EventGridDataFormat APACHEAVRO = fromString("APACHEAVRO"); + + /** Static value W3CLOGFILE for EventGridDataFormat. */ + public static final EventGridDataFormat W3CLOGFILE = fromString("W3CLOGFILE"); + + /** + * Creates or finds a EventGridDataFormat from its string representation. + * + * @param name a name to look for. + * @return the corresponding EventGridDataFormat. + */ + @JsonCreator + public static EventGridDataFormat fromString(String name) { + return fromString(name, EventGridDataFormat.class); + } + + /** @return known EventGridDataFormat values. */ + public static Collection values() { + return values(EventGridDataFormat.class); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/EventHubDataConnection.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/EventHubDataConnection.java new file mode 100644 index 0000000000000..286ef2908bb0f --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/EventHubDataConnection.java @@ -0,0 +1,247 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.fluent.models.DataConnectionInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** Class representing an event hub data connection. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("EventHub") +@JsonFlatten +@Fluent +public class EventHubDataConnection extends DataConnectionInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EventHubDataConnection.class); + + /* + * The resource ID of the event hub to be used to create a data connection. + */ + @JsonProperty(value = "properties.eventHubResourceId") + private String eventHubResourceId; + + /* + * The event hub consumer group. + */ + @JsonProperty(value = "properties.consumerGroup") + private String consumerGroup; + + /* + * The table where the data should be ingested. Optionally the table + * information can be added to each message. + */ + @JsonProperty(value = "properties.tableName") + private String tableName; + + /* + * The mapping rule to be used to ingest the data. Optionally the mapping + * information can be added to each message. + */ + @JsonProperty(value = "properties.mappingRuleName") + private String mappingRuleName; + + /* + * The data format of the message. Optionally the data format can be added + * to each message. + */ + @JsonProperty(value = "properties.dataFormat") + private EventHubDataFormat dataFormat; + + /* + * System properties of the event hub + */ + @JsonProperty(value = "properties.eventSystemProperties") + private List eventSystemProperties; + + /* + * The event hub messages compression type + */ + @JsonProperty(value = "properties.compression") + private Compression compression; + + /* + * The provisioned state of the resource. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ResourceProvisioningState provisioningState; + + /** + * Get the eventHubResourceId property: The resource ID of the event hub to be used to create a data connection. + * + * @return the eventHubResourceId value. + */ + public String eventHubResourceId() { + return this.eventHubResourceId; + } + + /** + * Set the eventHubResourceId property: The resource ID of the event hub to be used to create a data connection. + * + * @param eventHubResourceId the eventHubResourceId value to set. + * @return the EventHubDataConnection object itself. + */ + public EventHubDataConnection withEventHubResourceId(String eventHubResourceId) { + this.eventHubResourceId = eventHubResourceId; + return this; + } + + /** + * Get the consumerGroup property: The event hub consumer group. + * + * @return the consumerGroup value. + */ + public String consumerGroup() { + return this.consumerGroup; + } + + /** + * Set the consumerGroup property: The event hub consumer group. + * + * @param consumerGroup the consumerGroup value to set. + * @return the EventHubDataConnection object itself. + */ + public EventHubDataConnection withConsumerGroup(String consumerGroup) { + this.consumerGroup = consumerGroup; + return this; + } + + /** + * Get the tableName property: The table where the data should be ingested. Optionally the table information can be + * added to each message. + * + * @return the tableName value. + */ + public String tableName() { + return this.tableName; + } + + /** + * Set the tableName property: The table where the data should be ingested. Optionally the table information can be + * added to each message. + * + * @param tableName the tableName value to set. + * @return the EventHubDataConnection object itself. + */ + public EventHubDataConnection withTableName(String tableName) { + this.tableName = tableName; + return this; + } + + /** + * Get the mappingRuleName property: The mapping rule to be used to ingest the data. Optionally the mapping + * information can be added to each message. + * + * @return the mappingRuleName value. + */ + public String mappingRuleName() { + return this.mappingRuleName; + } + + /** + * Set the mappingRuleName property: The mapping rule to be used to ingest the data. Optionally the mapping + * information can be added to each message. + * + * @param mappingRuleName the mappingRuleName value to set. + * @return the EventHubDataConnection object itself. + */ + public EventHubDataConnection withMappingRuleName(String mappingRuleName) { + this.mappingRuleName = mappingRuleName; + return this; + } + + /** + * Get the dataFormat property: The data format of the message. Optionally the data format can be added to each + * message. + * + * @return the dataFormat value. + */ + public EventHubDataFormat dataFormat() { + return this.dataFormat; + } + + /** + * Set the dataFormat property: The data format of the message. Optionally the data format can be added to each + * message. + * + * @param dataFormat the dataFormat value to set. + * @return the EventHubDataConnection object itself. + */ + public EventHubDataConnection withDataFormat(EventHubDataFormat dataFormat) { + this.dataFormat = dataFormat; + return this; + } + + /** + * Get the eventSystemProperties property: System properties of the event hub. + * + * @return the eventSystemProperties value. + */ + public List eventSystemProperties() { + return this.eventSystemProperties; + } + + /** + * Set the eventSystemProperties property: System properties of the event hub. + * + * @param eventSystemProperties the eventSystemProperties value to set. + * @return the EventHubDataConnection object itself. + */ + public EventHubDataConnection withEventSystemProperties(List eventSystemProperties) { + this.eventSystemProperties = eventSystemProperties; + return this; + } + + /** + * Get the compression property: The event hub messages compression type. + * + * @return the compression value. + */ + public Compression compression() { + return this.compression; + } + + /** + * Set the compression property: The event hub messages compression type. + * + * @param compression the compression value to set. + * @return the EventHubDataConnection object itself. + */ + public EventHubDataConnection withCompression(Compression compression) { + this.compression = compression; + return this; + } + + /** + * Get the provisioningState property: The provisioned state of the resource. + * + * @return the provisioningState value. + */ + public ResourceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** {@inheritDoc} */ + @Override + public EventHubDataConnection withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/EventHubDataFormat.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/EventHubDataFormat.java new file mode 100644 index 0000000000000..9e6e5b104de5b --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/EventHubDataFormat.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for EventHubDataFormat. */ +public final class EventHubDataFormat extends ExpandableStringEnum { + /** Static value MULTIJSON for EventHubDataFormat. */ + public static final EventHubDataFormat MULTIJSON = fromString("MULTIJSON"); + + /** Static value JSON for EventHubDataFormat. */ + public static final EventHubDataFormat JSON = fromString("JSON"); + + /** Static value CSV for EventHubDataFormat. */ + public static final EventHubDataFormat CSV = fromString("CSV"); + + /** Static value TSV for EventHubDataFormat. */ + public static final EventHubDataFormat TSV = fromString("TSV"); + + /** Static value SCSV for EventHubDataFormat. */ + public static final EventHubDataFormat SCSV = fromString("SCSV"); + + /** Static value SOHSV for EventHubDataFormat. */ + public static final EventHubDataFormat SOHSV = fromString("SOHSV"); + + /** Static value PSV for EventHubDataFormat. */ + public static final EventHubDataFormat PSV = fromString("PSV"); + + /** Static value TXT for EventHubDataFormat. */ + public static final EventHubDataFormat TXT = fromString("TXT"); + + /** Static value RAW for EventHubDataFormat. */ + public static final EventHubDataFormat RAW = fromString("RAW"); + + /** Static value SINGLEJSON for EventHubDataFormat. */ + public static final EventHubDataFormat SINGLEJSON = fromString("SINGLEJSON"); + + /** Static value AVRO for EventHubDataFormat. */ + public static final EventHubDataFormat AVRO = fromString("AVRO"); + + /** Static value TSVE for EventHubDataFormat. */ + public static final EventHubDataFormat TSVE = fromString("TSVE"); + + /** Static value PARQUET for EventHubDataFormat. */ + public static final EventHubDataFormat PARQUET = fromString("PARQUET"); + + /** Static value ORC for EventHubDataFormat. */ + public static final EventHubDataFormat ORC = fromString("ORC"); + + /** Static value APACHEAVRO for EventHubDataFormat. */ + public static final EventHubDataFormat APACHEAVRO = fromString("APACHEAVRO"); + + /** Static value W3CLOGFILE for EventHubDataFormat. */ + public static final EventHubDataFormat W3CLOGFILE = fromString("W3CLOGFILE"); + + /** + * Creates or finds a EventHubDataFormat from its string representation. + * + * @param name a name to look for. + * @return the corresponding EventHubDataFormat. + */ + @JsonCreator + public static EventHubDataFormat fromString(String name) { + return fromString(name, EventHubDataFormat.class); + } + + /** @return known EventHubDataFormat values. */ + public static Collection values() { + return values(EventHubDataFormat.class); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/FollowerDatabaseDefinition.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/FollowerDatabaseDefinition.java new file mode 100644 index 0000000000000..143d9e23adef1 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/FollowerDatabaseDefinition.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.resourcemanager.synapse.fluent.models.FollowerDatabaseDefinitionInner; + +/** An immutable client-side representation of FollowerDatabaseDefinition. */ +public interface FollowerDatabaseDefinition { + /** + * Gets the kustoPoolResourceId property: Resource id of the cluster that follows a database owned by this cluster. + * + * @return the kustoPoolResourceId value. + */ + String kustoPoolResourceId(); + + /** + * Gets the attachedDatabaseConfigurationName property: Resource name of the attached database configuration in the + * follower cluster. + * + * @return the attachedDatabaseConfigurationName value. + */ + String attachedDatabaseConfigurationName(); + + /** + * Gets the databaseName property: The database name owned by this cluster that was followed. * in case following + * all databases. + * + * @return the databaseName value. + */ + String databaseName(); + + /** + * Gets the inner com.azure.resourcemanager.synapse.fluent.models.FollowerDatabaseDefinitionInner object. + * + * @return the inner object. + */ + FollowerDatabaseDefinitionInner innerModel(); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/FollowerDatabaseListResult.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/FollowerDatabaseListResult.java new file mode 100644 index 0000000000000..927b91f78c4fe --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/FollowerDatabaseListResult.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.fluent.models.FollowerDatabaseDefinitionInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The list Kusto database principals operation response. */ +@Fluent +public final class FollowerDatabaseListResult { + @JsonIgnore private final ClientLogger logger = new ClientLogger(FollowerDatabaseListResult.class); + + /* + * The list of follower database result. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value property: The list of follower database result. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of follower database result. + * + * @param value the value value to set. + * @return the FollowerDatabaseListResult object itself. + */ + public FollowerDatabaseListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/IotHubDataConnection.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/IotHubDataConnection.java new file mode 100644 index 0000000000000..476a3cc4d3d7f --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/IotHubDataConnection.java @@ -0,0 +1,247 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.fluent.models.DataConnectionInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** Class representing an iot hub data connection. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("IotHub") +@JsonFlatten +@Fluent +public class IotHubDataConnection extends DataConnectionInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(IotHubDataConnection.class); + + /* + * The resource ID of the Iot hub to be used to create a data connection. + */ + @JsonProperty(value = "properties.iotHubResourceId") + private String iotHubResourceId; + + /* + * The iot hub consumer group. + */ + @JsonProperty(value = "properties.consumerGroup") + private String consumerGroup; + + /* + * The table where the data should be ingested. Optionally the table + * information can be added to each message. + */ + @JsonProperty(value = "properties.tableName") + private String tableName; + + /* + * The mapping rule to be used to ingest the data. Optionally the mapping + * information can be added to each message. + */ + @JsonProperty(value = "properties.mappingRuleName") + private String mappingRuleName; + + /* + * The data format of the message. Optionally the data format can be added + * to each message. + */ + @JsonProperty(value = "properties.dataFormat") + private IotHubDataFormat dataFormat; + + /* + * System properties of the iot hub + */ + @JsonProperty(value = "properties.eventSystemProperties") + private List eventSystemProperties; + + /* + * The name of the share access policy + */ + @JsonProperty(value = "properties.sharedAccessPolicyName") + private String sharedAccessPolicyName; + + /* + * The provisioned state of the resource. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ResourceProvisioningState provisioningState; + + /** + * Get the iotHubResourceId property: The resource ID of the Iot hub to be used to create a data connection. + * + * @return the iotHubResourceId value. + */ + public String iotHubResourceId() { + return this.iotHubResourceId; + } + + /** + * Set the iotHubResourceId property: The resource ID of the Iot hub to be used to create a data connection. + * + * @param iotHubResourceId the iotHubResourceId value to set. + * @return the IotHubDataConnection object itself. + */ + public IotHubDataConnection withIotHubResourceId(String iotHubResourceId) { + this.iotHubResourceId = iotHubResourceId; + return this; + } + + /** + * Get the consumerGroup property: The iot hub consumer group. + * + * @return the consumerGroup value. + */ + public String consumerGroup() { + return this.consumerGroup; + } + + /** + * Set the consumerGroup property: The iot hub consumer group. + * + * @param consumerGroup the consumerGroup value to set. + * @return the IotHubDataConnection object itself. + */ + public IotHubDataConnection withConsumerGroup(String consumerGroup) { + this.consumerGroup = consumerGroup; + return this; + } + + /** + * Get the tableName property: The table where the data should be ingested. Optionally the table information can be + * added to each message. + * + * @return the tableName value. + */ + public String tableName() { + return this.tableName; + } + + /** + * Set the tableName property: The table where the data should be ingested. Optionally the table information can be + * added to each message. + * + * @param tableName the tableName value to set. + * @return the IotHubDataConnection object itself. + */ + public IotHubDataConnection withTableName(String tableName) { + this.tableName = tableName; + return this; + } + + /** + * Get the mappingRuleName property: The mapping rule to be used to ingest the data. Optionally the mapping + * information can be added to each message. + * + * @return the mappingRuleName value. + */ + public String mappingRuleName() { + return this.mappingRuleName; + } + + /** + * Set the mappingRuleName property: The mapping rule to be used to ingest the data. Optionally the mapping + * information can be added to each message. + * + * @param mappingRuleName the mappingRuleName value to set. + * @return the IotHubDataConnection object itself. + */ + public IotHubDataConnection withMappingRuleName(String mappingRuleName) { + this.mappingRuleName = mappingRuleName; + return this; + } + + /** + * Get the dataFormat property: The data format of the message. Optionally the data format can be added to each + * message. + * + * @return the dataFormat value. + */ + public IotHubDataFormat dataFormat() { + return this.dataFormat; + } + + /** + * Set the dataFormat property: The data format of the message. Optionally the data format can be added to each + * message. + * + * @param dataFormat the dataFormat value to set. + * @return the IotHubDataConnection object itself. + */ + public IotHubDataConnection withDataFormat(IotHubDataFormat dataFormat) { + this.dataFormat = dataFormat; + return this; + } + + /** + * Get the eventSystemProperties property: System properties of the iot hub. + * + * @return the eventSystemProperties value. + */ + public List eventSystemProperties() { + return this.eventSystemProperties; + } + + /** + * Set the eventSystemProperties property: System properties of the iot hub. + * + * @param eventSystemProperties the eventSystemProperties value to set. + * @return the IotHubDataConnection object itself. + */ + public IotHubDataConnection withEventSystemProperties(List eventSystemProperties) { + this.eventSystemProperties = eventSystemProperties; + return this; + } + + /** + * Get the sharedAccessPolicyName property: The name of the share access policy. + * + * @return the sharedAccessPolicyName value. + */ + public String sharedAccessPolicyName() { + return this.sharedAccessPolicyName; + } + + /** + * Set the sharedAccessPolicyName property: The name of the share access policy. + * + * @param sharedAccessPolicyName the sharedAccessPolicyName value to set. + * @return the IotHubDataConnection object itself. + */ + public IotHubDataConnection withSharedAccessPolicyName(String sharedAccessPolicyName) { + this.sharedAccessPolicyName = sharedAccessPolicyName; + return this; + } + + /** + * Get the provisioningState property: The provisioned state of the resource. + * + * @return the provisioningState value. + */ + public ResourceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** {@inheritDoc} */ + @Override + public IotHubDataConnection withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/IotHubDataFormat.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/IotHubDataFormat.java new file mode 100644 index 0000000000000..a3745931996e8 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/IotHubDataFormat.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for IotHubDataFormat. */ +public final class IotHubDataFormat extends ExpandableStringEnum { + /** Static value MULTIJSON for IotHubDataFormat. */ + public static final IotHubDataFormat MULTIJSON = fromString("MULTIJSON"); + + /** Static value JSON for IotHubDataFormat. */ + public static final IotHubDataFormat JSON = fromString("JSON"); + + /** Static value CSV for IotHubDataFormat. */ + public static final IotHubDataFormat CSV = fromString("CSV"); + + /** Static value TSV for IotHubDataFormat. */ + public static final IotHubDataFormat TSV = fromString("TSV"); + + /** Static value SCSV for IotHubDataFormat. */ + public static final IotHubDataFormat SCSV = fromString("SCSV"); + + /** Static value SOHSV for IotHubDataFormat. */ + public static final IotHubDataFormat SOHSV = fromString("SOHSV"); + + /** Static value PSV for IotHubDataFormat. */ + public static final IotHubDataFormat PSV = fromString("PSV"); + + /** Static value TXT for IotHubDataFormat. */ + public static final IotHubDataFormat TXT = fromString("TXT"); + + /** Static value RAW for IotHubDataFormat. */ + public static final IotHubDataFormat RAW = fromString("RAW"); + + /** Static value SINGLEJSON for IotHubDataFormat. */ + public static final IotHubDataFormat SINGLEJSON = fromString("SINGLEJSON"); + + /** Static value AVRO for IotHubDataFormat. */ + public static final IotHubDataFormat AVRO = fromString("AVRO"); + + /** Static value TSVE for IotHubDataFormat. */ + public static final IotHubDataFormat TSVE = fromString("TSVE"); + + /** Static value PARQUET for IotHubDataFormat. */ + public static final IotHubDataFormat PARQUET = fromString("PARQUET"); + + /** Static value ORC for IotHubDataFormat. */ + public static final IotHubDataFormat ORC = fromString("ORC"); + + /** Static value APACHEAVRO for IotHubDataFormat. */ + public static final IotHubDataFormat APACHEAVRO = fromString("APACHEAVRO"); + + /** Static value W3CLOGFILE for IotHubDataFormat. */ + public static final IotHubDataFormat W3CLOGFILE = fromString("W3CLOGFILE"); + + /** + * Creates or finds a IotHubDataFormat from its string representation. + * + * @param name a name to look for. + * @return the corresponding IotHubDataFormat. + */ + @JsonCreator + public static IotHubDataFormat fromString(String name) { + return fromString(name, IotHubDataFormat.class); + } + + /** @return known IotHubDataFormat values. */ + public static Collection values() { + return values(IotHubDataFormat.class); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/IpFirewallRuleProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/IpFirewallRuleProperties.java similarity index 95% rename from sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/IpFirewallRuleProperties.java rename to sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/IpFirewallRuleProperties.java index fa90e90d6a8d2..6645e5ee780a2 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/IpFirewallRuleProperties.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/IpFirewallRuleProperties.java @@ -2,11 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.synapse.fluent.models; +package com.azure.resourcemanager.synapse.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/Kind.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/Kind.java new file mode 100644 index 0000000000000..5215ca1318b7f --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/Kind.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for Kind. */ +public final class Kind extends ExpandableStringEnum { + /** Static value ReadWrite for Kind. */ + public static final Kind READ_WRITE = fromString("ReadWrite"); + + /** Static value ReadOnlyFollowing for Kind. */ + public static final Kind READ_ONLY_FOLLOWING = fromString("ReadOnlyFollowing"); + + /** + * Creates or finds a Kind from its string representation. + * + * @param name a name to look for. + * @return the corresponding Kind. + */ + @JsonCreator + public static Kind fromString(String name) { + return fromString(name, Kind.class); + } + + /** @return known Kind values. */ + public static Collection values() { + return values(Kind.class); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoOperations.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoOperations.java new file mode 100644 index 0000000000000..ca3070418e2eb --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoOperations.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** Resource collection API of KustoOperations. */ +public interface KustoOperations { + /** + * Lists available operations for the Kusto sub-resources inside Microsoft.Synapse provider. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to list REST API operations. + */ + PagedIterable list(); + + /** + * Lists available operations for the Kusto sub-resources inside Microsoft.Synapse provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to list REST API operations. + */ + PagedIterable list(Context context); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPool.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPool.java new file mode 100644 index 0000000000000..74bf972dd0e82 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPool.java @@ -0,0 +1,581 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.synapse.fluent.models.FollowerDatabaseDefinitionInner; +import com.azure.resourcemanager.synapse.fluent.models.KustoPoolInner; +import java.util.Map; + +/** An immutable client-side representation of KustoPool. */ +public interface KustoPool { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the sku property: The SKU of the kusto pool. + * + * @return the sku value. + */ + AzureSku sku(); + + /** + * Gets the etag property: A unique read-only string that changes whenever the resource is updated. + * + * @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 state property: The state of the resource. + * + * @return the state value. + */ + State state(); + + /** + * Gets the provisioningState property: The provisioned state of the resource. + * + * @return the provisioningState value. + */ + ResourceProvisioningState provisioningState(); + + /** + * Gets the uri property: The Kusto Pool URI. + * + * @return the uri value. + */ + String uri(); + + /** + * Gets the dataIngestionUri property: The Kusto Pool data ingestion URI. + * + * @return the dataIngestionUri value. + */ + String dataIngestionUri(); + + /** + * Gets the stateReason property: The reason for the Kusto Pool's current state. + * + * @return the stateReason value. + */ + String stateReason(); + + /** + * Gets the optimizedAutoscale property: Optimized auto scale definition. + * + * @return the optimizedAutoscale value. + */ + OptimizedAutoscale optimizedAutoscale(); + + /** + * Gets the enableStreamingIngest property: A boolean value that indicates if the streaming ingest is enabled. + * + * @return the enableStreamingIngest value. + */ + Boolean enableStreamingIngest(); + + /** + * Gets the enablePurge property: A boolean value that indicates if the purge operations are enabled. + * + * @return the enablePurge value. + */ + Boolean enablePurge(); + + /** + * Gets the languageExtensions property: List of the Kusto Pool's language extensions. + * + * @return the languageExtensions value. + */ + LanguageExtensionsList languageExtensions(); + + /** + * Gets the workspaceUid property: The workspace unique identifier. + * + * @return the workspaceUid value. + */ + String workspaceUid(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the inner com.azure.resourcemanager.synapse.fluent.models.KustoPoolInner object. + * + * @return the inner object. + */ + KustoPoolInner innerModel(); + + /** The entirety of the KustoPool definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, + DefinitionStages.WithSku, + DefinitionStages.WithCreate { + } + /** The KustoPool definition stages. */ + interface DefinitionStages { + /** The first stage of the KustoPool definition. */ + interface Blank extends WithLocation { + } + /** The stage of the KustoPool definition allowing to specify location. */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + /** The stage of the KustoPool definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies workspaceName, resourceGroupName. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithSku withExistingWorkspace(String workspaceName, String resourceGroupName); + } + /** The stage of the KustoPool definition allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: The SKU of the kusto pool.. + * + * @param sku The SKU of the kusto pool. + * @return the next definition stage. + */ + WithCreate withSku(AzureSku sku); + } + /** + * The stage of the KustoPool 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.WithOptimizedAutoscale, + DefinitionStages.WithEnableStreamingIngest, + DefinitionStages.WithEnablePurge, + DefinitionStages.WithWorkspaceUid, + DefinitionStages.WithIfMatch, + DefinitionStages.WithIfNoneMatch { + /** + * Executes the create request. + * + * @return the created resource. + */ + KustoPool create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + KustoPool create(Context context); + } + /** The stage of the KustoPool 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 KustoPool definition allowing to specify optimizedAutoscale. */ + interface WithOptimizedAutoscale { + /** + * Specifies the optimizedAutoscale property: Optimized auto scale definition.. + * + * @param optimizedAutoscale Optimized auto scale definition. + * @return the next definition stage. + */ + WithCreate withOptimizedAutoscale(OptimizedAutoscale optimizedAutoscale); + } + /** The stage of the KustoPool definition allowing to specify enableStreamingIngest. */ + interface WithEnableStreamingIngest { + /** + * Specifies the enableStreamingIngest property: A boolean value that indicates if the streaming ingest is + * enabled.. + * + * @param enableStreamingIngest A boolean value that indicates if the streaming ingest is enabled. + * @return the next definition stage. + */ + WithCreate withEnableStreamingIngest(Boolean enableStreamingIngest); + } + /** The stage of the KustoPool definition allowing to specify enablePurge. */ + interface WithEnablePurge { + /** + * Specifies the enablePurge property: A boolean value that indicates if the purge operations are enabled.. + * + * @param enablePurge A boolean value that indicates if the purge operations are enabled. + * @return the next definition stage. + */ + WithCreate withEnablePurge(Boolean enablePurge); + } + /** The stage of the KustoPool definition allowing to specify workspaceUid. */ + interface WithWorkspaceUid { + /** + * Specifies the workspaceUid property: The workspace unique identifier.. + * + * @param workspaceUid The workspace unique identifier. + * @return the next definition stage. + */ + WithCreate withWorkspaceUid(String workspaceUid); + } + /** The stage of the KustoPool definition allowing to specify ifMatch. */ + interface WithIfMatch { + /** + * Specifies the ifMatch property: The ETag of the Kusto Pool. Omit this value to always overwrite the + * current Kusto Pool. Specify the last-seen ETag value to prevent accidentally overwriting concurrent + * changes.. + * + * @param ifMatch The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. + * Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @return the next definition stage. + */ + WithCreate withIfMatch(String ifMatch); + } + /** The stage of the KustoPool definition allowing to specify ifNoneMatch. */ + interface WithIfNoneMatch { + /** + * Specifies the ifNoneMatch property: Set to '*' to allow a new Kusto Pool to be created, but to prevent + * updating an existing Kusto Pool. Other values will result in a 412 Pre-condition Failed response.. + * + * @param ifNoneMatch Set to '*' to allow a new Kusto Pool to be created, but to prevent updating an + * existing Kusto Pool. Other values will result in a 412 Pre-condition Failed response. + * @return the next definition stage. + */ + WithCreate withIfNoneMatch(String ifNoneMatch); + } + } + /** + * Begins update for the KustoPool resource. + * + * @return the stage of resource update. + */ + KustoPool.Update update(); + + /** The template for KustoPool update. */ + interface Update + extends UpdateStages.WithTags, + UpdateStages.WithSku, + UpdateStages.WithOptimizedAutoscale, + UpdateStages.WithEnableStreamingIngest, + UpdateStages.WithEnablePurge, + UpdateStages.WithWorkspaceUid, + UpdateStages.WithIfMatch { + /** + * Executes the update request. + * + * @return the updated resource. + */ + KustoPool apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + KustoPool apply(Context context); + } + /** The KustoPool update stages. */ + interface UpdateStages { + /** The stage of the KustoPool 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 KustoPool update allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: The SKU of the kusto pool.. + * + * @param sku The SKU of the kusto pool. + * @return the next definition stage. + */ + Update withSku(AzureSku sku); + } + /** The stage of the KustoPool update allowing to specify optimizedAutoscale. */ + interface WithOptimizedAutoscale { + /** + * Specifies the optimizedAutoscale property: Optimized auto scale definition.. + * + * @param optimizedAutoscale Optimized auto scale definition. + * @return the next definition stage. + */ + Update withOptimizedAutoscale(OptimizedAutoscale optimizedAutoscale); + } + /** The stage of the KustoPool update allowing to specify enableStreamingIngest. */ + interface WithEnableStreamingIngest { + /** + * Specifies the enableStreamingIngest property: A boolean value that indicates if the streaming ingest is + * enabled.. + * + * @param enableStreamingIngest A boolean value that indicates if the streaming ingest is enabled. + * @return the next definition stage. + */ + Update withEnableStreamingIngest(Boolean enableStreamingIngest); + } + /** The stage of the KustoPool update allowing to specify enablePurge. */ + interface WithEnablePurge { + /** + * Specifies the enablePurge property: A boolean value that indicates if the purge operations are enabled.. + * + * @param enablePurge A boolean value that indicates if the purge operations are enabled. + * @return the next definition stage. + */ + Update withEnablePurge(Boolean enablePurge); + } + /** The stage of the KustoPool update allowing to specify workspaceUid. */ + interface WithWorkspaceUid { + /** + * Specifies the workspaceUid property: The workspace unique identifier.. + * + * @param workspaceUid The workspace unique identifier. + * @return the next definition stage. + */ + Update withWorkspaceUid(String workspaceUid); + } + /** The stage of the KustoPool update allowing to specify ifMatch. */ + interface WithIfMatch { + /** + * Specifies the ifMatch property: The ETag of the Kusto Pool. Omit this value to always overwrite the + * current Kusto Pool. Specify the last-seen ETag value to prevent accidentally overwriting concurrent + * changes.. + * + * @param ifMatch The ETag of the Kusto Pool. Omit this value to always overwrite the current Kusto Pool. + * Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. + * @return the next definition stage. + */ + Update withIfMatch(String ifMatch); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + KustoPool refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + KustoPool refresh(Context context); + + /** + * Stops a Kusto pool. + * + * @throws com.azure.core.management.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 Kusto 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 stop(Context context); + + /** + * Starts a Kusto pool. + * + * @throws com.azure.core.management.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 start(); + + /** + * Starts a Kusto 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 start(Context context); + + /** + * Returns a list of language extensions that can run within KQL queries. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of language extension objects. + */ + PagedIterable listLanguageExtensions(); + + /** + * Returns a list of language extensions that can run within KQL queries. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of language extension objects. + */ + PagedIterable listLanguageExtensions(Context context); + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param languageExtensionsToAdd The language extensions to add. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 addLanguageExtensions(LanguageExtensionsList languageExtensionsToAdd); + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param languageExtensionsToAdd The language extensions to add. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 addLanguageExtensions(LanguageExtensionsList languageExtensionsToAdd, Context context); + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param languageExtensionsToRemove The language extensions to remove. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 removeLanguageExtensions(LanguageExtensionsList languageExtensionsToRemove); + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param languageExtensionsToRemove The language extensions to remove. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 removeLanguageExtensions(LanguageExtensionsList languageExtensionsToRemove, Context context); + + /** + * Returns a list of databases that are owned by this Kusto Pool and were followed by another Kusto Pool. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto database principals operation response. + */ + PagedIterable listFollowerDatabases(); + + /** + * Returns a list of databases that are owned by this Kusto Pool and were followed by another Kusto 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 list Kusto database principals operation response. + */ + PagedIterable listFollowerDatabases(Context context); + + /** + * Detaches all followers of a database owned by this Kusto Pool. + * + * @param followerDatabaseToRemove The follower databases properties to remove. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 detachFollowerDatabases(FollowerDatabaseDefinitionInner followerDatabaseToRemove); + + /** + * Detaches all followers of a database owned by this Kusto Pool. + * + * @param followerDatabaseToRemove The follower databases properties to remove. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 detachFollowerDatabases(FollowerDatabaseDefinitionInner followerDatabaseToRemove, Context context); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolAttachedDatabaseConfigurations.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolAttachedDatabaseConfigurations.java new file mode 100644 index 0000000000000..b724c9b0487ec --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolAttachedDatabaseConfigurations.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.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 KustoPoolAttachedDatabaseConfigurations. */ +public interface KustoPoolAttachedDatabaseConfigurations { + /** + * Returns the list of attached database configurations of the given Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list attached database configurations operation response. + */ + PagedIterable listByKustoPool( + String workspaceName, String kustoPoolName, String resourceGroupName); + + /** + * Returns the list of attached database configurations of the given Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list attached database configurations operation response. + */ + PagedIterable listByKustoPool( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context); + + /** + * Returns an attached database configuration. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing an attached database configuration. + */ + AttachedDatabaseConfiguration get( + String workspaceName, String kustoPoolName, String attachedDatabaseConfigurationName, String resourceGroupName); + + /** + * Returns an attached database configuration. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing an attached database configuration. + */ + Response getWithResponse( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName, + Context context); + + /** + * Deletes the attached database configuration with the given name. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete( + String workspaceName, String kustoPoolName, String attachedDatabaseConfigurationName, String resourceGroupName); + + /** + * Deletes the attached database configuration with the given name. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param attachedDatabaseConfigurationName The name of the attached database configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete( + String workspaceName, + String kustoPoolName, + String attachedDatabaseConfigurationName, + String resourceGroupName, + Context context); + + /** + * Returns an attached database 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 class representing an attached database configuration. + */ + AttachedDatabaseConfiguration getById(String id); + + /** + * Returns an attached database 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 class representing an attached database configuration. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes the attached database configuration with the given name. + * + * @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 the attached database configuration with the given name. + * + * @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 AttachedDatabaseConfiguration resource. + * + * @param name resource name. + * @return the first stage of the new AttachedDatabaseConfiguration definition. + */ + AttachedDatabaseConfiguration.DefinitionStages.Blank define(String name); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolCheckNameRequest.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolCheckNameRequest.java new file mode 100644 index 0000000000000..03c4fb67358b0 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolCheckNameRequest.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The object sent for a kusto pool check name availability request. */ +@Fluent +public final class KustoPoolCheckNameRequest { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KustoPoolCheckNameRequest.class); + + /* + * Kusto Pool name. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * The type of resource, Microsoft.Synapse/workspaces/kustoPools. + */ + @JsonProperty(value = "type", required = true) + private String type; + + /** Creates an instance of KustoPoolCheckNameRequest class. */ + public KustoPoolCheckNameRequest() { + type = "Microsoft.Synapse/workspaces/kustoPools"; + } + + /** + * Get the name property: Kusto Pool name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Kusto Pool name. + * + * @param name the name value to set. + * @return the KustoPoolCheckNameRequest object itself. + */ + public KustoPoolCheckNameRequest withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: The type of resource, Microsoft.Synapse/workspaces/kustoPools. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: The type of resource, Microsoft.Synapse/workspaces/kustoPools. + * + * @param type the type value to set. + * @return the KustoPoolCheckNameRequest object itself. + */ + public KustoPoolCheckNameRequest withType(String type) { + this.type = type; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property name in model KustoPoolCheckNameRequest")); + } + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolChildResources.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolChildResources.java new file mode 100644 index 0000000000000..8e2d60f978761 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolChildResources.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of KustoPoolChildResources. */ +public interface KustoPoolChildResources { + /** + * Checks that the Kusto Pool child resource name is valid and is not already in use. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Kusto Pool child 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 result returned from a check name availability request. + */ + CheckNameResult checkNameAvailability( + String workspaceName, String kustoPoolName, String resourceGroupName, DatabaseCheckNameRequest resourceName); + + /** + * Checks that the Kusto Pool child resource name is valid and is not already in use. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Kusto Pool child resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + Response checkNameAvailabilityWithResponse( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + DatabaseCheckNameRequest resourceName, + Context context); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolDataConnections.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolDataConnections.java new file mode 100644 index 0000000000000..4b1c2621847df --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolDataConnections.java @@ -0,0 +1,303 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.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.synapse.fluent.models.DataConnectionInner; +import com.azure.resourcemanager.synapse.fluent.models.DataConnectionValidationInner; + +/** Resource collection API of KustoPoolDataConnections. */ +public interface KustoPoolDataConnections { + /** + * Checks that the data connection name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + CheckNameResult checkNameAvailability( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DataConnectionCheckNameRequest dataConnectionName); + + /** + * Checks that the data connection name is valid and is not already in use. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + Response checkNameAvailabilityWithResponse( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DataConnectionCheckNameRequest dataConnectionName, + Context context); + + /** + * Checks that the data connection parameters are valid. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto data connection validation result. + */ + DataConnectionValidationListResult dataConnectionValidation( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DataConnectionValidationInner parameters); + + /** + * Checks that the data connection parameters are valid. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The data connection parameters supplied to the CreateOrUpdate 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 list Kusto data connection validation result. + */ + DataConnectionValidationListResult dataConnectionValidation( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DataConnectionValidationInner parameters, + Context context); + + /** + * Returns the list of data connections of the given Kusto pool database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 list Kusto data connections operation response. + */ + PagedIterable listByDatabase( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName); + + /** + * Returns the list of data connections of the given Kusto pool database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 list Kusto data connections operation response. + */ + PagedIterable listByDatabase( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName, Context context); + + /** + * Returns a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a data connection. + */ + DataConnection get( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName); + + /** + * Returns a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a data connection. + */ + Response getWithResponse( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + Context context); + + /** + * Creates or updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a data connection. + */ + DataConnection createOrUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters); + + /** + * Creates or updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the CreateOrUpdate 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 class representing a data connection. + */ + DataConnection createOrUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters, + Context context); + + /** + * Updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a data connection. + */ + DataConnection update( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters); + + /** + * Updates a data connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param parameters The data connection parameters supplied to the Update 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 class representing a data connection. + */ + DataConnection update( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + DataConnectionInner parameters, + Context context); + + /** + * Deletes the data connection with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName); + + /** + * Deletes the data connection with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param dataConnectionName The name of the data connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 workspaceName, + String kustoPoolName, + String databaseName, + String dataConnectionName, + Context context); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolDatabasePrincipalAssignments.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolDatabasePrincipalAssignments.java new file mode 100644 index 0000000000000..56dbdacc46489 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolDatabasePrincipalAssignments.java @@ -0,0 +1,219 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.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 KustoPoolDatabasePrincipalAssignments. */ +public interface KustoPoolDatabasePrincipalAssignments { + /** + * Checks that the database principal assignment is valid and is not already in use. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param principalAssignmentName The name of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + CheckNameResult checkNameAvailability( + String workspaceName, + String kustoPoolName, + String databaseName, + String resourceGroupName, + DatabasePrincipalAssignmentCheckNameRequest principalAssignmentName); + + /** + * Checks that the database principal assignment is valid and is not already in use. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param principalAssignmentName The name of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + Response checkNameAvailabilityWithResponse( + String workspaceName, + String kustoPoolName, + String databaseName, + String resourceGroupName, + DatabasePrincipalAssignmentCheckNameRequest principalAssignmentName, + Context context); + + /** + * Lists all Kusto pool database principalAssignments. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto database principal assignments operation response. + */ + PagedIterable list( + String workspaceName, String kustoPoolName, String databaseName, String resourceGroupName); + + /** + * Lists all Kusto pool database principalAssignments. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto database principal assignments operation response. + */ + PagedIterable list( + String workspaceName, String kustoPoolName, String databaseName, String resourceGroupName, Context context); + + /** + * Gets a Kusto pool database principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Kusto pool database principalAssignment. + */ + DatabasePrincipalAssignment get( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName); + + /** + * Gets a Kusto pool database principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Kusto pool database principalAssignment. + */ + Response getWithResponse( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName, + Context context); + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName); + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete( + String workspaceName, + String kustoPoolName, + String databaseName, + String principalAssignmentName, + String resourceGroupName, + Context context); + + /** + * Gets a Kusto pool database principalAssignment. + * + * @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 Kusto pool database principalAssignment. + */ + DatabasePrincipalAssignment getById(String id); + + /** + * Gets a Kusto pool database principalAssignment. + * + * @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 Kusto pool database principalAssignment. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a Kusto pool principalAssignment. + * + * @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 Kusto pool principalAssignment. + * + * @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 DatabasePrincipalAssignment resource. + * + * @param name resource name. + * @return the first stage of the new DatabasePrincipalAssignment definition. + */ + DatabasePrincipalAssignment.DefinitionStages.Blank define(String name); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolDatabases.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolDatabases.java new file mode 100644 index 0000000000000..cbe44db993c22 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolDatabases.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.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.synapse.fluent.models.DatabaseInner; + +/** Resource collection API of KustoPoolDatabases. */ +public interface KustoPoolDatabases { + /** + * Returns the list of databases of the given Kusto pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto 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 list Kusto databases operation response. + */ + PagedIterable listByKustoPool(String resourceGroupName, String workspaceName, String kustoPoolName); + + /** + * Returns the list of databases of the given Kusto pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto 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 list Kusto databases operation response. + */ + PagedIterable listByKustoPool( + String resourceGroupName, String workspaceName, String kustoPoolName, Context context); + + /** + * Returns a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 class representing a Kusto database. + */ + Database get(String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName); + + /** + * Returns a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 class representing a Kusto database. + */ + Response getWithResponse( + String resourceGroupName, String workspaceName, String kustoPoolName, String databaseName, Context context); + + /** + * Creates or updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto database. + */ + Database createOrUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters); + + /** + * Creates or updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the CreateOrUpdate 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 class representing a Kusto database. + */ + Database createOrUpdate( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters, + Context context); + + /** + * Updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the Update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto database. + */ + Database update( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters); + + /** + * Updates a database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto pool. + * @param parameters The database parameters supplied to the Update 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 class representing a Kusto database. + */ + Database update( + String resourceGroupName, + String workspaceName, + String kustoPoolName, + String databaseName, + DatabaseInner parameters, + Context context); + + /** + * Deletes the database with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 workspaceName, String kustoPoolName, String databaseName); + + /** + * Deletes the database with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param databaseName The name of the database in the Kusto 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 workspaceName, String kustoPoolName, String databaseName, Context context); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolListResult.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolListResult.java new file mode 100644 index 0000000000000..f89a6afe93e60 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolListResult.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.resourcemanager.synapse.fluent.models.KustoPoolListResultInner; +import java.util.List; + +/** An immutable client-side representation of KustoPoolListResult. */ +public interface KustoPoolListResult { + /** + * Gets the value property: The list of Kusto pools. + * + * @return the value value. + */ + List value(); + + /** + * Gets the inner com.azure.resourcemanager.synapse.fluent.models.KustoPoolListResultInner object. + * + * @return the inner object. + */ + KustoPoolListResultInner innerModel(); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolPrincipalAssignments.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolPrincipalAssignments.java new file mode 100644 index 0000000000000..13e3f77fe3e8e --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolPrincipalAssignments.java @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.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 KustoPoolPrincipalAssignments. */ +public interface KustoPoolPrincipalAssignments { + /** + * Checks that the principal assignment name is valid and is not already in use. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param principalAssignmentName The name of the principal 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 result returned from a check name availability request. + */ + CheckNameResult checkNameAvailability( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + ClusterPrincipalAssignmentCheckNameRequest principalAssignmentName); + + /** + * Checks that the principal assignment name is valid and is not already in use. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param principalAssignmentName The name of the principal 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 result returned from a check name availability request. + */ + Response checkNameAvailabilityWithResponse( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + ClusterPrincipalAssignmentCheckNameRequest principalAssignmentName, + Context context); + + /** + * Lists all Kusto pool principalAssignments. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto cluster principal assignments operation response. + */ + PagedIterable list( + String workspaceName, String kustoPoolName, String resourceGroupName); + + /** + * Lists all Kusto pool principalAssignments. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto cluster principal assignments operation response. + */ + PagedIterable list( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context); + + /** + * Gets a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Kusto pool principalAssignment. + */ + ClusterPrincipalAssignment get( + String workspaceName, String kustoPoolName, String principalAssignmentName, String resourceGroupName); + + /** + * Gets a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Kusto pool principalAssignment. + */ + Response getWithResponse( + String workspaceName, + String kustoPoolName, + String principalAssignmentName, + String resourceGroupName, + Context context); + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String workspaceName, String kustoPoolName, String principalAssignmentName, String resourceGroupName); + + /** + * Deletes a Kusto pool principalAssignment. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param principalAssignmentName The name of the Kusto principalAssignment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete( + String workspaceName, + String kustoPoolName, + String principalAssignmentName, + String resourceGroupName, + Context context); + + /** + * Gets a Kusto pool principalAssignment. + * + * @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 Kusto pool principalAssignment. + */ + ClusterPrincipalAssignment getById(String id); + + /** + * Gets a Kusto pool principalAssignment. + * + * @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 Kusto pool principalAssignment. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a Kusto pool principalAssignment. + * + * @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 Kusto pool principalAssignment. + * + * @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 ClusterPrincipalAssignment resource. + * + * @param name resource name. + * @return the first stage of the new ClusterPrincipalAssignment definition. + */ + ClusterPrincipalAssignment.DefinitionStages.Blank define(String name); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolUpdate.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolUpdate.java new file mode 100644 index 0000000000000..1d63e42c0127c --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolUpdate.java @@ -0,0 +1,285 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.ProxyResource; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Class representing an update to a Kusto kusto pool. */ +@JsonFlatten +@Fluent +public class KustoPoolUpdate extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KustoPoolUpdate.class); + + /* + * Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /* + * The SKU of the kusto pool. + */ + @JsonProperty(value = "sku") + private AzureSku sku; + + /* + * The state of the resource. + */ + @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) + private State state; + + /* + * The provisioned state of the resource. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ResourceProvisioningState provisioningState; + + /* + * The Kusto Pool URI. + */ + @JsonProperty(value = "properties.uri", access = JsonProperty.Access.WRITE_ONLY) + private String uri; + + /* + * The Kusto Pool data ingestion URI. + */ + @JsonProperty(value = "properties.dataIngestionUri", access = JsonProperty.Access.WRITE_ONLY) + private String dataIngestionUri; + + /* + * The reason for the Kusto Pool's current state. + */ + @JsonProperty(value = "properties.stateReason", access = JsonProperty.Access.WRITE_ONLY) + private String stateReason; + + /* + * Optimized auto scale definition. + */ + @JsonProperty(value = "properties.optimizedAutoscale") + private OptimizedAutoscale optimizedAutoscale; + + /* + * A boolean value that indicates if the streaming ingest is enabled. + */ + @JsonProperty(value = "properties.enableStreamingIngest") + private Boolean enableStreamingIngest; + + /* + * A boolean value that indicates if the purge operations are enabled. + */ + @JsonProperty(value = "properties.enablePurge") + private Boolean enablePurge; + + /* + * List of the Kusto Pool's language extensions. + */ + @JsonProperty(value = "properties.languageExtensions", access = JsonProperty.Access.WRITE_ONLY) + private LanguageExtensionsList languageExtensions; + + /* + * The workspace unique identifier. + */ + @JsonProperty(value = "properties.workspaceUID") + private String workspaceUid; + + /** + * 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 KustoPoolUpdate object itself. + */ + public KustoPoolUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the sku property: The SKU of the kusto pool. + * + * @return the sku value. + */ + public AzureSku sku() { + return this.sku; + } + + /** + * Set the sku property: The SKU of the kusto pool. + * + * @param sku the sku value to set. + * @return the KustoPoolUpdate object itself. + */ + public KustoPoolUpdate withSku(AzureSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the state property: The state of the resource. + * + * @return the state value. + */ + public State state() { + return this.state; + } + + /** + * Get the provisioningState property: The provisioned state of the resource. + * + * @return the provisioningState value. + */ + public ResourceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the uri property: The Kusto Pool URI. + * + * @return the uri value. + */ + public String uri() { + return this.uri; + } + + /** + * Get the dataIngestionUri property: The Kusto Pool data ingestion URI. + * + * @return the dataIngestionUri value. + */ + public String dataIngestionUri() { + return this.dataIngestionUri; + } + + /** + * Get the stateReason property: The reason for the Kusto Pool's current state. + * + * @return the stateReason value. + */ + public String stateReason() { + return this.stateReason; + } + + /** + * Get the optimizedAutoscale property: Optimized auto scale definition. + * + * @return the optimizedAutoscale value. + */ + public OptimizedAutoscale optimizedAutoscale() { + return this.optimizedAutoscale; + } + + /** + * Set the optimizedAutoscale property: Optimized auto scale definition. + * + * @param optimizedAutoscale the optimizedAutoscale value to set. + * @return the KustoPoolUpdate object itself. + */ + public KustoPoolUpdate withOptimizedAutoscale(OptimizedAutoscale optimizedAutoscale) { + this.optimizedAutoscale = optimizedAutoscale; + return this; + } + + /** + * Get the enableStreamingIngest property: A boolean value that indicates if the streaming ingest is enabled. + * + * @return the enableStreamingIngest value. + */ + public Boolean enableStreamingIngest() { + return this.enableStreamingIngest; + } + + /** + * Set the enableStreamingIngest property: A boolean value that indicates if the streaming ingest is enabled. + * + * @param enableStreamingIngest the enableStreamingIngest value to set. + * @return the KustoPoolUpdate object itself. + */ + public KustoPoolUpdate withEnableStreamingIngest(Boolean enableStreamingIngest) { + this.enableStreamingIngest = enableStreamingIngest; + return this; + } + + /** + * Get the enablePurge property: A boolean value that indicates if the purge operations are enabled. + * + * @return the enablePurge value. + */ + public Boolean enablePurge() { + return this.enablePurge; + } + + /** + * Set the enablePurge property: A boolean value that indicates if the purge operations are enabled. + * + * @param enablePurge the enablePurge value to set. + * @return the KustoPoolUpdate object itself. + */ + public KustoPoolUpdate withEnablePurge(Boolean enablePurge) { + this.enablePurge = enablePurge; + return this; + } + + /** + * Get the languageExtensions property: List of the Kusto Pool's language extensions. + * + * @return the languageExtensions value. + */ + public LanguageExtensionsList languageExtensions() { + return this.languageExtensions; + } + + /** + * Get the workspaceUid property: The workspace unique identifier. + * + * @return the workspaceUid value. + */ + public String workspaceUid() { + return this.workspaceUid; + } + + /** + * Set the workspaceUid property: The workspace unique identifier. + * + * @param workspaceUid the workspaceUid value to set. + * @return the KustoPoolUpdate object itself. + */ + public KustoPoolUpdate withWorkspaceUid(String workspaceUid) { + this.workspaceUid = workspaceUid; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sku() != null) { + sku().validate(); + } + if (optimizedAutoscale() != null) { + optimizedAutoscale().validate(); + } + if (languageExtensions() != null) { + languageExtensions().validate(); + } + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPools.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPools.java new file mode 100644 index 0000000000000..8824d53d311e7 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPools.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** Resource collection API of KustoPools. */ +public interface KustoPools { + /** + * Lists eligible SKUs for Kusto Pool resource. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the SKU descriptions. + */ + PagedIterable list(); + + /** + * Lists eligible SKUs for Kusto Pool resource. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the SKU descriptions. + */ + PagedIterable list(Context context); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolsOperations.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolsOperations.java new file mode 100644 index 0000000000000..c261f69327985 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/KustoPoolsOperations.java @@ -0,0 +1,415 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.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.synapse.fluent.models.FollowerDatabaseDefinitionInner; + +/** Resource collection API of KustoPoolsOperations. */ +public interface KustoPoolsOperations { + /** + * Checks that the kusto pool name is valid and is not already in use. + * + * @param location The name of Azure region. + * @param kustoPoolName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + CheckNameResult checkNameAvailability(String location, KustoPoolCheckNameRequest kustoPoolName); + + /** + * Checks that the kusto pool name is valid and is not already in use. + * + * @param location The name of Azure region. + * @param kustoPoolName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result returned from a check name availability request. + */ + Response checkNameAvailabilityWithResponse( + String location, KustoPoolCheckNameRequest kustoPoolName, Context context); + + /** + * List all Kusto pools. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto pools operation response. + */ + KustoPoolListResult listByWorkspace(String resourceGroupName, String workspaceName); + + /** + * List all Kusto pools. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto pools operation response. + */ + Response listByWorkspaceWithResponse( + String resourceGroupName, String workspaceName, Context context); + + /** + * Gets a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Kusto pool. + */ + KustoPool get(String workspaceName, String kustoPoolName, String resourceGroupName); + + /** + * Gets a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Kusto pool. + */ + Response getWithResponse( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context); + + /** + * Deletes a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto 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 workspaceName, String resourceGroupName, String kustoPoolName); + + /** + * Deletes a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kustoPoolName The name of the Kusto 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 workspaceName, String resourceGroupName, String kustoPoolName, Context context); + + /** + * Stops a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void stop(String workspaceName, String kustoPoolName, String resourceGroupName); + + /** + * Stops a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void stop(String workspaceName, String kustoPoolName, String resourceGroupName, Context context); + + /** + * Starts a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void start(String workspaceName, String kustoPoolName, String resourceGroupName); + + /** + * Starts a Kusto pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void start(String workspaceName, String kustoPoolName, String resourceGroupName, Context context); + + /** + * Returns the SKUs available for the provided resource. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available SKUs for a Kusto Pool. + */ + PagedIterable listSkusByResource( + String workspaceName, String kustoPoolName, String resourceGroupName); + + /** + * Returns the SKUs available for the provided resource. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available SKUs for a Kusto Pool. + */ + PagedIterable listSkusByResource( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context); + + /** + * Returns a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of language extension objects. + */ + PagedIterable listLanguageExtensions( + String workspaceName, String kustoPoolName, String resourceGroupName); + + /** + * Returns a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of language extension objects. + */ + PagedIterable listLanguageExtensions( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context); + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToAdd The language extensions to add. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 addLanguageExtensions( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToAdd); + + /** + * Add a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToAdd The language extensions to add. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 addLanguageExtensions( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToAdd, + Context context); + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToRemove The language extensions to remove. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 removeLanguageExtensions( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToRemove); + + /** + * Remove a list of language extensions that can run within KQL queries. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param languageExtensionsToRemove The language extensions to remove. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 removeLanguageExtensions( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + LanguageExtensionsList languageExtensionsToRemove, + Context context); + + /** + * Returns a list of databases that are owned by this Kusto Pool and were followed by another Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto database principals operation response. + */ + PagedIterable listFollowerDatabases( + String workspaceName, String kustoPoolName, String resourceGroupName); + + /** + * Returns a list of databases that are owned by this Kusto Pool and were followed by another Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list Kusto database principals operation response. + */ + PagedIterable listFollowerDatabases( + String workspaceName, String kustoPoolName, String resourceGroupName, Context context); + + /** + * Detaches all followers of a database owned by this Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param followerDatabaseToRemove The follower databases properties to remove. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 detachFollowerDatabases( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + FollowerDatabaseDefinitionInner followerDatabaseToRemove); + + /** + * Detaches all followers of a database owned by this Kusto Pool. + * + * @param workspaceName The name of the workspace. + * @param kustoPoolName The name of the Kusto pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param followerDatabaseToRemove The follower databases properties to remove. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 detachFollowerDatabases( + String workspaceName, + String kustoPoolName, + String resourceGroupName, + FollowerDatabaseDefinitionInner followerDatabaseToRemove, + Context context); + + /** + * Gets a Kusto 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 a Kusto pool. + */ + KustoPool getById(String id); + + /** + * Gets a Kusto 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 a Kusto pool. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a Kusto 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. + */ + void deleteById(String id); + + /** + * Deletes a Kusto 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. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new KustoPool resource. + * + * @param name resource name. + * @return the first stage of the new KustoPool definition. + */ + KustoPool.DefinitionStages.Blank define(String name); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/LanguageExtension.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/LanguageExtension.java new file mode 100644 index 0000000000000..65eb4170a7242 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/LanguageExtension.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.resourcemanager.synapse.fluent.models.LanguageExtensionInner; + +/** An immutable client-side representation of LanguageExtension. */ +public interface LanguageExtension { + /** + * Gets the languageExtensionName property: The language extension name. + * + * @return the languageExtensionName value. + */ + LanguageExtensionName languageExtensionName(); + + /** + * Gets the inner com.azure.resourcemanager.synapse.fluent.models.LanguageExtensionInner object. + * + * @return the inner object. + */ + LanguageExtensionInner innerModel(); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/LanguageExtensionName.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/LanguageExtensionName.java new file mode 100644 index 0000000000000..ad0fb94280cf9 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/LanguageExtensionName.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for LanguageExtensionName. */ +public final class LanguageExtensionName extends ExpandableStringEnum { + /** Static value PYTHON for LanguageExtensionName. */ + public static final LanguageExtensionName PYTHON = fromString("PYTHON"); + + /** Static value R for LanguageExtensionName. */ + public static final LanguageExtensionName R = fromString("R"); + + /** + * Creates or finds a LanguageExtensionName from its string representation. + * + * @param name a name to look for. + * @return the corresponding LanguageExtensionName. + */ + @JsonCreator + public static LanguageExtensionName fromString(String name) { + return fromString(name, LanguageExtensionName.class); + } + + /** @return known LanguageExtensionName values. */ + public static Collection values() { + return values(LanguageExtensionName.class); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/LanguageExtensionsList.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/LanguageExtensionsList.java new file mode 100644 index 0000000000000..ffcdc611b9c05 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/LanguageExtensionsList.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.fluent.models.LanguageExtensionInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The list of language extension objects. */ +@Fluent +public final class LanguageExtensionsList { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LanguageExtensionsList.class); + + /* + * The list of language extensions. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value property: The list of language extensions. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of language extensions. + * + * @param value the value value to set. + * @return the LanguageExtensionsList object itself. + */ + public LanguageExtensionsList withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/LibraryInfo.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/LibraryInfo.java similarity index 98% rename from sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/LibraryInfo.java rename to sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/LibraryInfo.java index 621de8fb24f2e..4ad4c2dd3ab3a 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/LibraryInfo.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/LibraryInfo.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.synapse.fluent.models; +package com.azure.resourcemanager.synapse.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ListResourceSkusResult.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ListResourceSkusResult.java new file mode 100644 index 0000000000000..d6172a5f1c16c --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ListResourceSkusResult.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.fluent.models.AzureResourceSkuInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List of available SKUs for a Kusto Pool. */ +@Fluent +public final class ListResourceSkusResult { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ListResourceSkusResult.class); + + /* + * The collection of available SKUs for an existing resource. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value property: The collection of available SKUs for an existing resource. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The collection of available SKUs for an existing resource. + * + * @param value the value value to set. + * @return the ListResourceSkusResult object itself. + */ + public ListResourceSkusResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ManagedIntegrationRuntime.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ManagedIntegrationRuntime.java index cde0067bff53e..432c167858e48 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ManagedIntegrationRuntime.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ManagedIntegrationRuntime.java @@ -5,8 +5,8 @@ package com.azure.resourcemanager.synapse.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.fluent.models.ManagedIntegrationRuntimeTypeProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -15,8 +15,9 @@ /** Managed integration runtime, including managed elastic and managed dedicated integration runtimes. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("Managed") +@JsonFlatten @Fluent -public final class ManagedIntegrationRuntime extends IntegrationRuntime { +public class ManagedIntegrationRuntime extends IntegrationRuntime { @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedIntegrationRuntime.class); /* @@ -27,10 +28,16 @@ public final class ManagedIntegrationRuntime extends IntegrationRuntime { private IntegrationRuntimeState state; /* - * Managed integration runtime properties. + * The compute resource for managed integration runtime. */ - @JsonProperty(value = "typeProperties", required = true) - private ManagedIntegrationRuntimeTypeProperties innerTypeProperties = new ManagedIntegrationRuntimeTypeProperties(); + @JsonProperty(value = "typeProperties.computeProperties") + private IntegrationRuntimeComputeProperties computeProperties; + + /* + * SSIS properties for managed integration runtime. + */ + @JsonProperty(value = "typeProperties.ssisProperties") + private IntegrationRuntimeSsisProperties ssisProperties; /** * Get the state property: Integration runtime state, only valid for managed dedicated integration runtime. @@ -41,29 +48,13 @@ public IntegrationRuntimeState state() { return this.state; } - /** - * Get the innerTypeProperties property: Managed integration runtime properties. - * - * @return the innerTypeProperties value. - */ - private ManagedIntegrationRuntimeTypeProperties innerTypeProperties() { - return this.innerTypeProperties; - } - - /** {@inheritDoc} */ - @Override - public ManagedIntegrationRuntime withDescription(String description) { - super.withDescription(description); - return this; - } - /** * Get the computeProperties property: The compute resource for managed integration runtime. * * @return the computeProperties value. */ public IntegrationRuntimeComputeProperties computeProperties() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().computeProperties(); + return this.computeProperties; } /** @@ -73,10 +64,7 @@ public IntegrationRuntimeComputeProperties computeProperties() { * @return the ManagedIntegrationRuntime object itself. */ public ManagedIntegrationRuntime withComputeProperties(IntegrationRuntimeComputeProperties computeProperties) { - if (this.innerTypeProperties() == null) { - this.innerTypeProperties = new ManagedIntegrationRuntimeTypeProperties(); - } - this.innerTypeProperties().withComputeProperties(computeProperties); + this.computeProperties = computeProperties; return this; } @@ -86,7 +74,7 @@ public ManagedIntegrationRuntime withComputeProperties(IntegrationRuntimeCompute * @return the ssisProperties value. */ public IntegrationRuntimeSsisProperties ssisProperties() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().ssisProperties(); + return this.ssisProperties; } /** @@ -96,10 +84,14 @@ public IntegrationRuntimeSsisProperties ssisProperties() { * @return the ManagedIntegrationRuntime object itself. */ public ManagedIntegrationRuntime withSsisProperties(IntegrationRuntimeSsisProperties ssisProperties) { - if (this.innerTypeProperties() == null) { - this.innerTypeProperties = new ManagedIntegrationRuntimeTypeProperties(); - } - this.innerTypeProperties().withSsisProperties(ssisProperties); + this.ssisProperties = ssisProperties; + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedIntegrationRuntime withDescription(String description) { + super.withDescription(description); return this; } @@ -111,13 +103,11 @@ public ManagedIntegrationRuntime withSsisProperties(IntegrationRuntimeSsisProper @Override public void validate() { super.validate(); - if (innerTypeProperties() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property innerTypeProperties in model ManagedIntegrationRuntime")); - } else { - innerTypeProperties().validate(); + if (computeProperties() != null) { + computeProperties().validate(); + } + if (ssisProperties() != null) { + ssisProperties().validate(); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ManagedIntegrationRuntimeStatus.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ManagedIntegrationRuntimeStatus.java index 756e1ca7bd6da..ca14f7edc96c6 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ManagedIntegrationRuntimeStatus.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ManagedIntegrationRuntimeStatus.java @@ -4,9 +4,9 @@ package com.azure.resourcemanager.synapse.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.fluent.models.ManagedIntegrationRuntimeStatusTypeProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -17,25 +17,35 @@ /** Managed integration runtime status. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("Managed") -@Fluent -public final class ManagedIntegrationRuntimeStatus extends IntegrationRuntimeStatus { +@JsonFlatten +@Immutable +public class ManagedIntegrationRuntimeStatus extends IntegrationRuntimeStatus { @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedIntegrationRuntimeStatus.class); /* - * Managed integration runtime status type properties. + * The time at which the integration runtime was created, in ISO8601 + * format. */ - @JsonProperty(value = "typeProperties", required = true) - private ManagedIntegrationRuntimeStatusTypeProperties innerTypeProperties = - new ManagedIntegrationRuntimeStatusTypeProperties(); + @JsonProperty(value = "typeProperties.createTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createTime; - /** - * Get the innerTypeProperties property: Managed integration runtime status type properties. - * - * @return the innerTypeProperties value. + /* + * The list of nodes for managed integration runtime. */ - private ManagedIntegrationRuntimeStatusTypeProperties innerTypeProperties() { - return this.innerTypeProperties; - } + @JsonProperty(value = "typeProperties.nodes", access = JsonProperty.Access.WRITE_ONLY) + private List nodes; + + /* + * The errors that occurred on this integration runtime. + */ + @JsonProperty(value = "typeProperties.otherErrors", access = JsonProperty.Access.WRITE_ONLY) + private List otherErrors; + + /* + * The last operation result that occurred on this integration runtime. + */ + @JsonProperty(value = "typeProperties.lastOperation", access = JsonProperty.Access.WRITE_ONLY) + private ManagedIntegrationRuntimeOperationResult lastOperation; /** * Get the createTime property: The time at which the integration runtime was created, in ISO8601 format. @@ -43,7 +53,7 @@ private ManagedIntegrationRuntimeStatusTypeProperties innerTypeProperties() { * @return the createTime value. */ public OffsetDateTime createTime() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().createTime(); + return this.createTime; } /** @@ -52,7 +62,7 @@ public OffsetDateTime createTime() { * @return the nodes value. */ public List nodes() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().nodes(); + return this.nodes; } /** @@ -61,7 +71,7 @@ public List nodes() { * @return the otherErrors value. */ public List otherErrors() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().otherErrors(); + return this.otherErrors; } /** @@ -70,7 +80,7 @@ public List otherErrors() { * @return the lastOperation value. */ public ManagedIntegrationRuntimeOperationResult lastOperation() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().lastOperation(); + return this.lastOperation; } /** @@ -81,13 +91,14 @@ public ManagedIntegrationRuntimeOperationResult lastOperation() { @Override public void validate() { super.validate(); - if (innerTypeProperties() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property innerTypeProperties in model ManagedIntegrationRuntimeStatus")); - } else { - innerTypeProperties().validate(); + if (nodes() != null) { + nodes().forEach(e -> e.validate()); + } + if (otherErrors() != null) { + otherErrors().forEach(e -> e.validate()); + } + if (lastOperation() != null) { + lastOperation().validate(); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/Operation.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/Operation.java new file mode 100644 index 0000000000000..cc374d6979c10 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/Operation.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.resourcemanager.synapse.fluent.models.OperationInner; + +/** An immutable client-side representation of Operation. */ +public interface Operation { + /** + * Gets the name property: The operation name. This is of the format {provider}/{resource}/{operation}. + * + * @return the name value. + */ + String name(); + + /** + * Gets the display property: The object that describes the operation. + * + * @return the display value. + */ + OperationDisplay display(); + + /** + * Gets the origin property: The intended executor of the operation. + * + * @return the origin value. + */ + String origin(); + + /** + * Gets the properties property: Any object. + * + * @return the properties value. + */ + Object properties(); + + /** + * Gets the inner com.azure.resourcemanager.synapse.fluent.models.OperationInner object. + * + * @return the inner object. + */ + OperationInner innerModel(); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/OperationDisplay.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/OperationDisplay.java new file mode 100644 index 0000000000000..eec227fe1d39d --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/OperationDisplay.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The object that describes the operation. */ +@Fluent +public final class OperationDisplay { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationDisplay.class); + + /* + * Friendly name of the resource provider. + */ + @JsonProperty(value = "provider") + private String provider; + + /* + * The operation type. For example: read, write, delete. + */ + @JsonProperty(value = "operation") + private String operation; + + /* + * The resource type on which the operation is performed. + */ + @JsonProperty(value = "resource") + private String resource; + + /* + * The friendly name of the operation. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get the provider property: Friendly name of the resource provider. + * + * @return the provider value. + */ + public String provider() { + return this.provider; + } + + /** + * Set the provider property: Friendly name of the resource provider. + * + * @param provider the provider value to set. + * @return the OperationDisplay object itself. + */ + public OperationDisplay withProvider(String provider) { + this.provider = provider; + return this; + } + + /** + * Get the operation property: The operation type. For example: read, write, delete. + * + * @return the operation value. + */ + public String operation() { + return this.operation; + } + + /** + * Set the operation property: The operation type. For example: read, write, delete. + * + * @param operation the operation value to set. + * @return the OperationDisplay object itself. + */ + public OperationDisplay withOperation(String operation) { + this.operation = operation; + return this; + } + + /** + * Get the resource property: The resource type on which the operation is performed. + * + * @return the resource value. + */ + public String resource() { + return this.resource; + } + + /** + * Set the resource property: The resource type on which the operation is performed. + * + * @param resource the resource value to set. + * @return the OperationDisplay object itself. + */ + public OperationDisplay withResource(String resource) { + this.resource = resource; + return this; + } + + /** + * Get the description property: The friendly name of the operation. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The friendly name of the operation. + * + * @param description the description value to set. + * @return the OperationDisplay object itself. + */ + public OperationDisplay withDescription(String description) { + this.description = description; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/OperationListResult.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/OperationListResult.java new file mode 100644 index 0000000000000..d08ccd81f46ce --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/OperationListResult.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.fluent.models.OperationInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Result of the request to list REST API operations. It contains a list of operations and a URL nextLink to get the + * next set of results. + */ +@Fluent +public final class OperationListResult { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationListResult.class); + + /* + * The list of operations supported by the resource provider. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URL to get the next set of operation list results if there are any. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Get the value property: The list of operations supported by the resource provider. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of operations supported by the resource provider. + * + * @param value the value value to set. + * @return the OperationListResult object itself. + */ + public OperationListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of operation list results if there are any. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/OptimizedAutoscale.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/OptimizedAutoscale.java new file mode 100644 index 0000000000000..cc331f25e64b9 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/OptimizedAutoscale.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A class that contains the optimized auto scale definition. */ +@Fluent +public final class OptimizedAutoscale { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OptimizedAutoscale.class); + + /* + * The version of the template defined, for instance 1. + */ + @JsonProperty(value = "version", required = true) + private int version; + + /* + * A boolean value that indicate if the optimized autoscale feature is + * enabled or not. + */ + @JsonProperty(value = "isEnabled", required = true) + private boolean isEnabled; + + /* + * Minimum allowed instances count. + */ + @JsonProperty(value = "minimum", required = true) + private int minimum; + + /* + * Maximum allowed instances count. + */ + @JsonProperty(value = "maximum", required = true) + private int maximum; + + /** + * Get the version property: The version of the template defined, for instance 1. + * + * @return the version value. + */ + public int version() { + return this.version; + } + + /** + * Set the version property: The version of the template defined, for instance 1. + * + * @param version the version value to set. + * @return the OptimizedAutoscale object itself. + */ + public OptimizedAutoscale withVersion(int version) { + this.version = version; + return this; + } + + /** + * Get the isEnabled property: A boolean value that indicate if the optimized autoscale feature is enabled or not. + * + * @return the isEnabled value. + */ + public boolean isEnabled() { + return this.isEnabled; + } + + /** + * Set the isEnabled property: A boolean value that indicate if the optimized autoscale feature is enabled or not. + * + * @param isEnabled the isEnabled value to set. + * @return the OptimizedAutoscale object itself. + */ + public OptimizedAutoscale withIsEnabled(boolean isEnabled) { + this.isEnabled = isEnabled; + return this; + } + + /** + * Get the minimum property: Minimum allowed instances count. + * + * @return the minimum value. + */ + public int minimum() { + return this.minimum; + } + + /** + * Set the minimum property: Minimum allowed instances count. + * + * @param minimum the minimum value to set. + * @return the OptimizedAutoscale object itself. + */ + public OptimizedAutoscale withMinimum(int minimum) { + this.minimum = minimum; + return this; + } + + /** + * Get the maximum property: Maximum allowed instances count. + * + * @return the maximum value. + */ + public int maximum() { + return this.maximum; + } + + /** + * Set the maximum property: Maximum allowed instances count. + * + * @param maximum the maximum value to set. + * @return the OptimizedAutoscale object itself. + */ + public OptimizedAutoscale withMaximum(int maximum) { + this.maximum = maximum; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrincipalType.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrincipalType.java new file mode 100644 index 0000000000000..aac49db2a5eca --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrincipalType.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for PrincipalType. */ +public final class PrincipalType extends ExpandableStringEnum { + /** Static value App for PrincipalType. */ + public static final PrincipalType APP = fromString("App"); + + /** Static value Group for PrincipalType. */ + public static final PrincipalType GROUP = fromString("Group"); + + /** Static value User for PrincipalType. */ + public static final PrincipalType USER = fromString("User"); + + /** + * Creates or finds a PrincipalType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PrincipalType. + */ + @JsonCreator + public static PrincipalType fromString(String name) { + return fromString(name, PrincipalType.class); + } + + /** @return known PrincipalType values. */ + public static Collection values() { + return values(PrincipalType.class); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrivateEndpointConnectionForPrivateLinkHub.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrivateEndpointConnectionForPrivateLinkHub.java index a0a260d070159..ec98b90c5dd3f 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrivateEndpointConnectionForPrivateLinkHub.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrivateEndpointConnectionForPrivateLinkHub.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.synapse.models; import com.azure.resourcemanager.synapse.fluent.models.PrivateEndpointConnectionForPrivateLinkHubInner; -import com.azure.resourcemanager.synapse.fluent.models.PrivateEndpointConnectionProperties; /** An immutable client-side representation of PrivateEndpointConnectionForPrivateLinkHub. */ public interface PrivateEndpointConnectionForPrivateLinkHub { diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrivateEndpointConnectionForPrivateLinkHubBasic.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrivateEndpointConnectionForPrivateLinkHubBasic.java index 6825dc6ad0426..06b2c73194725 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrivateEndpointConnectionForPrivateLinkHubBasic.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrivateEndpointConnectionForPrivateLinkHubBasic.java @@ -5,14 +5,15 @@ package com.azure.resourcemanager.synapse.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.fluent.models.PrivateEndpointConnectionProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Private Endpoint Connection For Private Link Hub - Basic. */ +@JsonFlatten @Fluent -public final class PrivateEndpointConnectionForPrivateLinkHubBasic { +public class PrivateEndpointConnectionForPrivateLinkHubBasic { @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionForPrivateLinkHubBasic.class); @@ -23,10 +24,22 @@ public final class PrivateEndpointConnectionForPrivateLinkHubBasic { private String id; /* - * Properties of private endpoint connection for private link hub + * The private endpoint which the connection belongs to. */ - @JsonProperty(value = "properties") - private PrivateEndpointConnectionProperties innerProperties; + @JsonProperty(value = "properties.privateEndpoint") + private PrivateEndpoint privateEndpoint; + + /* + * Connection state of the private endpoint connection. + */ + @JsonProperty(value = "properties.privateLinkServiceConnectionState") + private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + + /* + * Provisioning state of the private endpoint connection. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; /** * Get the id property: identifier. @@ -37,22 +50,13 @@ public String id() { return this.id; } - /** - * Get the innerProperties property: Properties of private endpoint connection for private link hub. - * - * @return the innerProperties value. - */ - private PrivateEndpointConnectionProperties innerProperties() { - return this.innerProperties; - } - /** * Get the privateEndpoint property: The private endpoint which the connection belongs to. * * @return the privateEndpoint value. */ public PrivateEndpoint privateEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint(); + return this.privateEndpoint; } /** @@ -62,10 +66,7 @@ public PrivateEndpoint privateEndpoint() { * @return the PrivateEndpointConnectionForPrivateLinkHubBasic object itself. */ public PrivateEndpointConnectionForPrivateLinkHubBasic withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateEndpointConnectionProperties(); - } - this.innerProperties().withPrivateEndpoint(privateEndpoint); + this.privateEndpoint = privateEndpoint; return this; } @@ -75,7 +76,7 @@ public PrivateEndpointConnectionForPrivateLinkHubBasic withPrivateEndpoint(Priva * @return the privateLinkServiceConnectionState value. */ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { - return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState(); + return this.privateLinkServiceConnectionState; } /** @@ -86,10 +87,7 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { */ public PrivateEndpointConnectionForPrivateLinkHubBasic withPrivateLinkServiceConnectionState( PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateEndpointConnectionProperties(); - } - this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; return this; } @@ -99,7 +97,7 @@ public PrivateEndpointConnectionForPrivateLinkHubBasic withPrivateLinkServiceCon * @return the provisioningState value. */ public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + return this.provisioningState; } /** @@ -108,8 +106,11 @@ public String provisioningState() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (privateEndpoint() != null) { + privateEndpoint().validate(); + } + if (privateLinkServiceConnectionState() != null) { + privateLinkServiceConnectionState().validate(); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrivateEndpointConnectionForPrivateLinkHubBasicAutoGenerated.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrivateEndpointConnectionForPrivateLinkHubBasicAutoGenerated.java index acb5adc46e5df..31cf7b8634e58 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrivateEndpointConnectionForPrivateLinkHubBasicAutoGenerated.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrivateEndpointConnectionForPrivateLinkHubBasicAutoGenerated.java @@ -6,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.fluent.models.PrivateEndpointConnectionProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrivateEndpointConnectionProperties.java similarity index 94% rename from sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateEndpointConnectionProperties.java rename to sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrivateEndpointConnectionProperties.java index c6e3e1751decc..1f63a05d0ad8e 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateEndpointConnectionProperties.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrivateEndpointConnectionProperties.java @@ -2,12 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.synapse.fluent.models; +package com.azure.resourcemanager.synapse.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.PrivateEndpoint; -import com.azure.resourcemanager.synapse.models.PrivateLinkServiceConnectionState; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ReadWriteDatabase.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ReadWriteDatabase.java new file mode 100644 index 0000000000000..089ddd45de849 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ReadWriteDatabase.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.fluent.models.DatabaseInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.Duration; + +/** Class representing a read write database. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("ReadWrite") +@JsonFlatten +@Fluent +public class ReadWriteDatabase extends DatabaseInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ReadWriteDatabase.class); + + /* + * The provisioned state of the resource. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ResourceProvisioningState provisioningState; + + /* + * The time the data should be kept before it stops being accessible to + * queries in TimeSpan. + */ + @JsonProperty(value = "properties.softDeletePeriod") + private Duration softDeletePeriod; + + /* + * The time the data should be kept in cache for fast queries in TimeSpan. + */ + @JsonProperty(value = "properties.hotCachePeriod") + private Duration hotCachePeriod; + + /* + * The statistics of the database. + */ + @JsonProperty(value = "properties.statistics", access = JsonProperty.Access.WRITE_ONLY) + private DatabaseStatistics statistics; + + /* + * Indicates whether the database is followed. + */ + @JsonProperty(value = "properties.isFollowed", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isFollowed; + + /** + * Get the provisioningState property: The provisioned state of the resource. + * + * @return the provisioningState value. + */ + public ResourceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the softDeletePeriod property: The time the data should be kept before it stops being accessible to queries + * in TimeSpan. + * + * @return the softDeletePeriod value. + */ + public Duration softDeletePeriod() { + return this.softDeletePeriod; + } + + /** + * Set the softDeletePeriod property: The time the data should be kept before it stops being accessible to queries + * in TimeSpan. + * + * @param softDeletePeriod the softDeletePeriod value to set. + * @return the ReadWriteDatabase object itself. + */ + public ReadWriteDatabase withSoftDeletePeriod(Duration softDeletePeriod) { + this.softDeletePeriod = softDeletePeriod; + return this; + } + + /** + * Get the hotCachePeriod property: The time the data should be kept in cache for fast queries in TimeSpan. + * + * @return the hotCachePeriod value. + */ + public Duration hotCachePeriod() { + return this.hotCachePeriod; + } + + /** + * Set the hotCachePeriod property: The time the data should be kept in cache for fast queries in TimeSpan. + * + * @param hotCachePeriod the hotCachePeriod value to set. + * @return the ReadWriteDatabase object itself. + */ + public ReadWriteDatabase withHotCachePeriod(Duration hotCachePeriod) { + this.hotCachePeriod = hotCachePeriod; + return this; + } + + /** + * Get the statistics property: The statistics of the database. + * + * @return the statistics value. + */ + public DatabaseStatistics statistics() { + return this.statistics; + } + + /** + * Get the isFollowed property: Indicates whether the database is followed. + * + * @return the isFollowed value. + */ + public Boolean isFollowed() { + return this.isFollowed; + } + + /** {@inheritDoc} */ + @Override + public ReadWriteDatabase withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (statistics() != null) { + statistics().validate(); + } + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/Reason.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/Reason.java new file mode 100644 index 0000000000000..125c20e9d92e3 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/Reason.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for Reason. */ +public final class Reason extends ExpandableStringEnum { + /** Static value Invalid for Reason. */ + public static final Reason INVALID = fromString("Invalid"); + + /** Static value AlreadyExists for Reason. */ + public static final Reason ALREADY_EXISTS = fromString("AlreadyExists"); + + /** + * Creates or finds a Reason from its string representation. + * + * @param name a name to look for. + * @return the corresponding Reason. + */ + @JsonCreator + public static Reason fromString(String name) { + return fromString(name, Reason.class); + } + + /** @return known Reason values. */ + public static Collection values() { + return values(Reason.class); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/RecommendedSensitivityLabelUpdate.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/RecommendedSensitivityLabelUpdate.java index 8dacd4f9ee395..e9a750dfd4229 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/RecommendedSensitivityLabelUpdate.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/RecommendedSensitivityLabelUpdate.java @@ -5,31 +5,41 @@ package com.azure.resourcemanager.synapse.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.fluent.models.RecommendedSensitivityLabelUpdateProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A recommended sensitivity label update operation. */ +@JsonFlatten @Fluent -public final class RecommendedSensitivityLabelUpdate extends ProxyResource { +public class RecommendedSensitivityLabelUpdate extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(RecommendedSensitivityLabelUpdate.class); /* - * Resource properties. + * The op property. */ - @JsonProperty(value = "properties") - private RecommendedSensitivityLabelUpdateProperties innerProperties; + @JsonProperty(value = "properties.op") + private RecommendedSensitivityLabelUpdateKind op; - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. + /* + * Schema name of the column to update. */ - private RecommendedSensitivityLabelUpdateProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.schema") + private String schema; + + /* + * Table name of the column to update. + */ + @JsonProperty(value = "properties.table") + private String table; + + /* + * Column name to update. + */ + @JsonProperty(value = "properties.column") + private String column; /** * Get the op property: The op property. @@ -37,7 +47,7 @@ private RecommendedSensitivityLabelUpdateProperties innerProperties() { * @return the op value. */ public RecommendedSensitivityLabelUpdateKind op() { - return this.innerProperties() == null ? null : this.innerProperties().op(); + return this.op; } /** @@ -47,10 +57,7 @@ public RecommendedSensitivityLabelUpdateKind op() { * @return the RecommendedSensitivityLabelUpdate object itself. */ public RecommendedSensitivityLabelUpdate withOp(RecommendedSensitivityLabelUpdateKind op) { - if (this.innerProperties() == null) { - this.innerProperties = new RecommendedSensitivityLabelUpdateProperties(); - } - this.innerProperties().withOp(op); + this.op = op; return this; } @@ -60,7 +67,7 @@ public RecommendedSensitivityLabelUpdate withOp(RecommendedSensitivityLabelUpdat * @return the schema value. */ public String schema() { - return this.innerProperties() == null ? null : this.innerProperties().schema(); + return this.schema; } /** @@ -70,10 +77,7 @@ public String schema() { * @return the RecommendedSensitivityLabelUpdate object itself. */ public RecommendedSensitivityLabelUpdate withSchema(String schema) { - if (this.innerProperties() == null) { - this.innerProperties = new RecommendedSensitivityLabelUpdateProperties(); - } - this.innerProperties().withSchema(schema); + this.schema = schema; return this; } @@ -83,7 +87,7 @@ public RecommendedSensitivityLabelUpdate withSchema(String schema) { * @return the table value. */ public String table() { - return this.innerProperties() == null ? null : this.innerProperties().table(); + return this.table; } /** @@ -93,10 +97,7 @@ public String table() { * @return the RecommendedSensitivityLabelUpdate object itself. */ public RecommendedSensitivityLabelUpdate withTable(String table) { - if (this.innerProperties() == null) { - this.innerProperties = new RecommendedSensitivityLabelUpdateProperties(); - } - this.innerProperties().withTable(table); + this.table = table; return this; } @@ -106,7 +107,7 @@ public RecommendedSensitivityLabelUpdate withTable(String table) { * @return the column value. */ public String column() { - return this.innerProperties() == null ? null : this.innerProperties().column(); + return this.column; } /** @@ -116,10 +117,7 @@ public String column() { * @return the RecommendedSensitivityLabelUpdate object itself. */ public RecommendedSensitivityLabelUpdate withColumn(String column) { - if (this.innerProperties() == null) { - this.innerProperties = new RecommendedSensitivityLabelUpdateProperties(); - } - this.innerProperties().withColumn(column); + this.column = column; return this; } @@ -129,8 +127,5 @@ public RecommendedSensitivityLabelUpdate withColumn(String column) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ReplaceAllIpFirewallRulesRequest.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ReplaceAllIpFirewallRulesRequest.java index 22fbfe4da16cc..4ed7bb95d4549 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ReplaceAllIpFirewallRulesRequest.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ReplaceAllIpFirewallRulesRequest.java @@ -6,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.fluent.models.IpFirewallRuleProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ResourceProvisioningState.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ResourceProvisioningState.java new file mode 100644 index 0000000000000..cdebe877972a5 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ResourceProvisioningState.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ResourceProvisioningState. */ +public final class ResourceProvisioningState extends ExpandableStringEnum { + /** Static value Running for ResourceProvisioningState. */ + public static final ResourceProvisioningState RUNNING = fromString("Running"); + + /** Static value Creating for ResourceProvisioningState. */ + public static final ResourceProvisioningState CREATING = fromString("Creating"); + + /** Static value Deleting for ResourceProvisioningState. */ + public static final ResourceProvisioningState DELETING = fromString("Deleting"); + + /** Static value Succeeded for ResourceProvisioningState. */ + public static final ResourceProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for ResourceProvisioningState. */ + public static final ResourceProvisioningState FAILED = fromString("Failed"); + + /** Static value Moving for ResourceProvisioningState. */ + public static final ResourceProvisioningState MOVING = fromString("Moving"); + + /** Static value Canceled for ResourceProvisioningState. */ + public static final ResourceProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates or finds a ResourceProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResourceProvisioningState. + */ + @JsonCreator + public static ResourceProvisioningState fromString(String name) { + return fromString(name, ResourceProvisioningState.class); + } + + /** @return known ResourceProvisioningState values. */ + public static Collection values() { + return values(ResourceProvisioningState.class); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SelfHostedIntegrationRuntime.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SelfHostedIntegrationRuntime.java index e7bc359d883f4..ed4b25d1fb4fc 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SelfHostedIntegrationRuntime.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SelfHostedIntegrationRuntime.java @@ -5,8 +5,8 @@ package com.azure.resourcemanager.synapse.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.fluent.models.SelfHostedIntegrationRuntimeTypeProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -15,33 +15,16 @@ /** Self-hosted integration runtime. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("SelfHosted") +@JsonFlatten @Fluent -public final class SelfHostedIntegrationRuntime extends IntegrationRuntime { +public class SelfHostedIntegrationRuntime extends IntegrationRuntime { @JsonIgnore private final ClientLogger logger = new ClientLogger(SelfHostedIntegrationRuntime.class); /* - * When this property is not null, means this is a linked integration - * runtime. The property is used to access original integration runtime. + * Linked integration runtime type from data factory */ - @JsonProperty(value = "typeProperties") - private SelfHostedIntegrationRuntimeTypeProperties innerTypeProperties; - - /** - * Get the innerTypeProperties property: When this property is not null, means this is a linked integration runtime. - * The property is used to access original integration runtime. - * - * @return the innerTypeProperties value. - */ - private SelfHostedIntegrationRuntimeTypeProperties innerTypeProperties() { - return this.innerTypeProperties; - } - - /** {@inheritDoc} */ - @Override - public SelfHostedIntegrationRuntime withDescription(String description) { - super.withDescription(description); - return this; - } + @JsonProperty(value = "typeProperties.linkedInfo") + private LinkedIntegrationRuntimeType linkedInfo; /** * Get the linkedInfo property: Linked integration runtime type from data factory. @@ -49,7 +32,7 @@ public SelfHostedIntegrationRuntime withDescription(String description) { * @return the linkedInfo value. */ public LinkedIntegrationRuntimeType linkedInfo() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().linkedInfo(); + return this.linkedInfo; } /** @@ -59,10 +42,14 @@ public LinkedIntegrationRuntimeType linkedInfo() { * @return the SelfHostedIntegrationRuntime object itself. */ public SelfHostedIntegrationRuntime withLinkedInfo(LinkedIntegrationRuntimeType linkedInfo) { - if (this.innerTypeProperties() == null) { - this.innerTypeProperties = new SelfHostedIntegrationRuntimeTypeProperties(); - } - this.innerTypeProperties().withLinkedInfo(linkedInfo); + this.linkedInfo = linkedInfo; + return this; + } + + /** {@inheritDoc} */ + @Override + public SelfHostedIntegrationRuntime withDescription(String description) { + super.withDescription(description); return this; } @@ -74,8 +61,8 @@ public SelfHostedIntegrationRuntime withLinkedInfo(LinkedIntegrationRuntimeType @Override public void validate() { super.validate(); - if (innerTypeProperties() != null) { - innerTypeProperties().validate(); + if (linkedInfo() != null) { + linkedInfo().validate(); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SelfHostedIntegrationRuntimeStatus.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SelfHostedIntegrationRuntimeStatus.java index 1da6651a52c77..c9fbb05598af4 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SelfHostedIntegrationRuntimeStatus.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SelfHostedIntegrationRuntimeStatus.java @@ -5,10 +5,11 @@ package com.azure.resourcemanager.synapse.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.fluent.models.SelfHostedIntegrationRuntimeNodeInner; -import com.azure.resourcemanager.synapse.fluent.models.SelfHostedIntegrationRuntimeStatusTypeProperties; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -19,25 +20,122 @@ /** Self-hosted integration runtime status. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("SelfHosted") +@JsonFlatten @Fluent -public final class SelfHostedIntegrationRuntimeStatus extends IntegrationRuntimeStatus { +public class SelfHostedIntegrationRuntimeStatus extends IntegrationRuntimeStatus { @JsonIgnore private final ClientLogger logger = new ClientLogger(SelfHostedIntegrationRuntimeStatus.class); /* - * Self-hosted integration runtime status type properties. + * The time at which the integration runtime was created, in ISO8601 + * format. */ - @JsonProperty(value = "typeProperties", required = true) - private SelfHostedIntegrationRuntimeStatusTypeProperties innerTypeProperties = - new SelfHostedIntegrationRuntimeStatusTypeProperties(); + @JsonProperty(value = "typeProperties.createTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createTime; - /** - * Get the innerTypeProperties property: Self-hosted integration runtime status type properties. - * - * @return the innerTypeProperties value. + /* + * The task queue id of the integration runtime. */ - private SelfHostedIntegrationRuntimeStatusTypeProperties innerTypeProperties() { - return this.innerTypeProperties; - } + @JsonProperty(value = "typeProperties.taskQueueId", access = JsonProperty.Access.WRITE_ONLY) + private String taskQueueId; + + /* + * The node communication Channel encryption mode + */ + @JsonProperty( + value = "typeProperties.nodeCommunicationChannelEncryptionMode", + access = JsonProperty.Access.WRITE_ONLY) + private String nodeCommunicationChannelEncryptionMode; + + /* + * It is used to set the encryption mode for node-node communication + * channel (when more than 2 self-hosted integration runtime nodes exist). + */ + @JsonProperty(value = "typeProperties.internalChannelEncryption", access = JsonProperty.Access.WRITE_ONLY) + private IntegrationRuntimeInternalChannelEncryptionMode internalChannelEncryption; + + /* + * Version of the integration runtime. + */ + @JsonProperty(value = "typeProperties.version", access = JsonProperty.Access.WRITE_ONLY) + private String version; + + /* + * The list of nodes for this integration runtime. + */ + @JsonProperty(value = "typeProperties.nodes") + private List nodes; + + /* + * The date at which the integration runtime will be scheduled to update, + * in ISO8601 format. + */ + @JsonProperty(value = "typeProperties.scheduledUpdateDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime scheduledUpdateDate; + + /* + * The time in the date scheduled by service to update the integration + * runtime, e.g., PT03H is 3 hours + */ + @JsonProperty(value = "typeProperties.updateDelayOffset", access = JsonProperty.Access.WRITE_ONLY) + private String updateDelayOffset; + + /* + * The local time zone offset in hours. + */ + @JsonProperty(value = "typeProperties.localTimeZoneOffset", access = JsonProperty.Access.WRITE_ONLY) + private String localTimeZoneOffset; + + /* + * Object with additional information about integration runtime + * capabilities. + */ + @JsonProperty(value = "typeProperties.capabilities", access = JsonProperty.Access.WRITE_ONLY) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map capabilities; + + /* + * The URLs for the services used in integration runtime backend service. + */ + @JsonProperty(value = "typeProperties.serviceUrls", access = JsonProperty.Access.WRITE_ONLY) + private List serviceUrls; + + /* + * Whether Self-hosted integration runtime auto update has been turned on. + */ + @JsonProperty(value = "typeProperties.autoUpdate", access = JsonProperty.Access.WRITE_ONLY) + private IntegrationRuntimeAutoUpdate autoUpdate; + + /* + * Status of the integration runtime version. + */ + @JsonProperty(value = "typeProperties.versionStatus", access = JsonProperty.Access.WRITE_ONLY) + private String versionStatus; + + /* + * The list of linked integration runtimes that are created to share with + * this integration runtime. + */ + @JsonProperty(value = "typeProperties.links") + private List links; + + /* + * The version that the integration runtime is going to update to. + */ + @JsonProperty(value = "typeProperties.pushedVersion", access = JsonProperty.Access.WRITE_ONLY) + private String pushedVersion; + + /* + * The latest version on download center. + */ + @JsonProperty(value = "typeProperties.latestVersion", access = JsonProperty.Access.WRITE_ONLY) + private String latestVersion; + + /* + * The estimated time when the self-hosted integration runtime will be + * updated. + */ + @JsonProperty(value = "typeProperties.autoUpdateETA", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime autoUpdateEta; /** * Get the createTime property: The time at which the integration runtime was created, in ISO8601 format. @@ -45,7 +143,7 @@ private SelfHostedIntegrationRuntimeStatusTypeProperties innerTypeProperties() { * @return the createTime value. */ public OffsetDateTime createTime() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().createTime(); + return this.createTime; } /** @@ -54,7 +152,7 @@ public OffsetDateTime createTime() { * @return the taskQueueId value. */ public String taskQueueId() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().taskQueueId(); + return this.taskQueueId; } /** @@ -63,9 +161,7 @@ public String taskQueueId() { * @return the nodeCommunicationChannelEncryptionMode value. */ public String nodeCommunicationChannelEncryptionMode() { - return this.innerTypeProperties() == null - ? null - : this.innerTypeProperties().nodeCommunicationChannelEncryptionMode(); + return this.nodeCommunicationChannelEncryptionMode; } /** @@ -75,7 +171,7 @@ public String nodeCommunicationChannelEncryptionMode() { * @return the internalChannelEncryption value. */ public IntegrationRuntimeInternalChannelEncryptionMode internalChannelEncryption() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().internalChannelEncryption(); + return this.internalChannelEncryption; } /** @@ -84,7 +180,7 @@ public IntegrationRuntimeInternalChannelEncryptionMode internalChannelEncryption * @return the version value. */ public String version() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().version(); + return this.version; } /** @@ -93,7 +189,7 @@ public String version() { * @return the nodes value. */ public List nodes() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().nodes(); + return this.nodes; } /** @@ -103,10 +199,7 @@ public List nodes() { * @return the SelfHostedIntegrationRuntimeStatus object itself. */ public SelfHostedIntegrationRuntimeStatus withNodes(List nodes) { - if (this.innerTypeProperties() == null) { - this.innerTypeProperties = new SelfHostedIntegrationRuntimeStatusTypeProperties(); - } - this.innerTypeProperties().withNodes(nodes); + this.nodes = nodes; return this; } @@ -117,7 +210,7 @@ public SelfHostedIntegrationRuntimeStatus withNodes(List capabilities() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().capabilities(); + return this.capabilities; } /** @@ -154,7 +247,7 @@ public Map capabilities() { * @return the serviceUrls value. */ public List serviceUrls() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().serviceUrls(); + return this.serviceUrls; } /** @@ -163,7 +256,7 @@ public List serviceUrls() { * @return the autoUpdate value. */ public IntegrationRuntimeAutoUpdate autoUpdate() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().autoUpdate(); + return this.autoUpdate; } /** @@ -172,7 +265,7 @@ public IntegrationRuntimeAutoUpdate autoUpdate() { * @return the versionStatus value. */ public String versionStatus() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().versionStatus(); + return this.versionStatus; } /** @@ -182,7 +275,7 @@ public String versionStatus() { * @return the links value. */ public List links() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().links(); + return this.links; } /** @@ -193,10 +286,7 @@ public List links() { * @return the SelfHostedIntegrationRuntimeStatus object itself. */ public SelfHostedIntegrationRuntimeStatus withLinks(List links) { - if (this.innerTypeProperties() == null) { - this.innerTypeProperties = new SelfHostedIntegrationRuntimeStatusTypeProperties(); - } - this.innerTypeProperties().withLinks(links); + this.links = links; return this; } @@ -206,7 +296,7 @@ public SelfHostedIntegrationRuntimeStatus withLinks(List e.validate()); + } + if (links() != null) { + links().forEach(e -> e.validate()); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SensitivityLabelUpdateProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SensitivityLabelUpdateProperties.java deleted file mode 100644 index d2235dfcd4593..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SensitivityLabelUpdateProperties.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.models; - -import com.azure.resourcemanager.synapse.fluent.models.SensitivityLabelUpdatePropertiesInner; - -/** An immutable client-side representation of SensitivityLabelUpdateProperties. */ -public interface SensitivityLabelUpdateProperties { - /** - * Gets the op property: The op property. - * - * @return the op value. - */ - SensitivityLabelUpdateKind op(); - - /** - * Gets the schema property: Schema name of the column to update. - * - * @return the schema value. - */ - String schema(); - - /** - * Gets the table property: Table name of the column to update. - * - * @return the table value. - */ - String table(); - - /** - * Gets the column property: Column name to update. - * - * @return the column value. - */ - String column(); - - /** - * Gets the sensitivityLabel property: The sensitivity label information to apply on a column. - * - * @return the sensitivityLabel value. - */ - SensitivityLabel sensitivityLabel(); - - /** - * Gets the inner com.azure.resourcemanager.synapse.fluent.models.SensitivityLabelUpdatePropertiesInner object. - * - * @return the inner object. - */ - SensitivityLabelUpdatePropertiesInner innerModel(); -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SkuDescription.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SkuDescription.java new file mode 100644 index 0000000000000..7c97688537d86 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SkuDescription.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.resourcemanager.synapse.fluent.models.SkuDescriptionInner; +import java.util.List; + +/** An immutable client-side representation of SkuDescription. */ +public interface SkuDescription { + /** + * Gets the resourceType property: The resource type. + * + * @return the resourceType value. + */ + String resourceType(); + + /** + * Gets the name property: The name of the SKU. + * + * @return the name value. + */ + String name(); + + /** + * Gets the size property: The size of the SKU. + * + * @return the size value. + */ + String size(); + + /** + * Gets the locations property: The set of locations that the SKU is available. + * + * @return the locations value. + */ + List locations(); + + /** + * Gets the locationInfo property: Locations and zones. + * + * @return the locationInfo value. + */ + List locationInfo(); + + /** + * Gets the restrictions property: The restrictions because of which SKU cannot be used. + * + * @return the restrictions value. + */ + List restrictions(); + + /** + * Gets the inner com.azure.resourcemanager.synapse.fluent.models.SkuDescriptionInner object. + * + * @return the inner object. + */ + SkuDescriptionInner innerModel(); +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SkuDescriptionList.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SkuDescriptionList.java new file mode 100644 index 0000000000000..96be0d89434ce --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SkuDescriptionList.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.fluent.models.SkuDescriptionInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The list of the SKU descriptions. */ +@Immutable +public final class SkuDescriptionList { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuDescriptionList.class); + + /* + * SKU descriptions + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /** + * Get the value property: SKU descriptions. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SkuLocationInfoItem.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SkuLocationInfoItem.java new file mode 100644 index 0000000000000..41b75caf52490 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SkuLocationInfoItem.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The locations and zones info for SKU. */ +@Fluent +public final class SkuLocationInfoItem { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuLocationInfoItem.class); + + /* + * The available location of the SKU. + */ + @JsonProperty(value = "location", required = true) + private String location; + + /* + * The available zone of the SKU. + */ + @JsonProperty(value = "zones") + private List zones; + + /** + * Get the location property: The available location of the SKU. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The available location of the SKU. + * + * @param location the location value to set. + * @return the SkuLocationInfoItem object itself. + */ + public SkuLocationInfoItem withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the zones property: The available zone of the SKU. + * + * @return the zones value. + */ + public List zones() { + return this.zones; + } + + /** + * Set the zones property: The available zone of the SKU. + * + * @param zones the zones value to set. + * @return the SkuLocationInfoItem object itself. + */ + public SkuLocationInfoItem withZones(List zones) { + this.zones = zones; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (location() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property location in model SkuLocationInfoItem")); + } + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SkuName.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SkuName.java new file mode 100644 index 0000000000000..76e2f9aa67c90 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SkuName.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for SkuName. */ +public final class SkuName extends ExpandableStringEnum { + /** Static value Compute optimized for SkuName. */ + public static final SkuName COMPUTE_OPTIMIZED = fromString("Compute optimized"); + + /** Static value Storage optimized for SkuName. */ + public static final SkuName STORAGE_OPTIMIZED = fromString("Storage optimized"); + + /** + * Creates or finds a SkuName from its string representation. + * + * @param name a name to look for. + * @return the corresponding SkuName. + */ + @JsonCreator + public static SkuName fromString(String name) { + return fromString(name, SkuName.class); + } + + /** @return known SkuName values. */ + public static Collection values() { + return values(SkuName.class); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SkuSize.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SkuSize.java new file mode 100644 index 0000000000000..61896a9c7cbb6 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SkuSize.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for SkuSize. */ +public final class SkuSize extends ExpandableStringEnum { + /** Static value Extra small for SkuSize. */ + public static final SkuSize EXTRA_SMALL = fromString("Extra small"); + + /** Static value Small for SkuSize. */ + public static final SkuSize SMALL = fromString("Small"); + + /** Static value Medium for SkuSize. */ + public static final SkuSize MEDIUM = fromString("Medium"); + + /** Static value Large for SkuSize. */ + public static final SkuSize LARGE = fromString("Large"); + + /** + * Creates or finds a SkuSize from its string representation. + * + * @param name a name to look for. + * @return the corresponding SkuSize. + */ + @JsonCreator + public static SkuSize fromString(String name) { + return fromString(name, SkuSize.class); + } + + /** @return known SkuSize values. */ + public static Collection values() { + return values(SkuSize.class); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SqlPool.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SqlPool.java index 21a9b6932c819..f2b2f902c63bd 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SqlPool.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SqlPool.java @@ -105,11 +105,23 @@ public interface SqlPool { OffsetDateTime restorePointInTime(); /** - * Gets the createMode property: What is this?. + * Gets the createMode property: Specifies the mode of sql pool creation. + * + *

Default: regular sql pool creation. + * + *

PointInTimeRestore: Creates a sql pool by restoring a point in time backup of an existing sql pool. + * sourceDatabaseId must be specified as the resource ID of the existing sql pool, and restorePointInTime must be + * specified. + * + *

Recovery: Creates a sql pool by a geo-replicated backup. sourceDatabaseId must be specified as the + * recoverableDatabaseId to restore. + * + *

Restore: Creates a sql pool by restoring a backup of a deleted sql pool. SourceDatabaseId should be the sql + * pool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be specified. * * @return the createMode value. */ - String createMode(); + CreateMode createMode(); /** * Gets the creationDate property: Date the SQL pool was created. @@ -320,12 +332,33 @@ interface WithRestorePointInTime { /** The stage of the SqlPool definition allowing to specify createMode. */ interface WithCreateMode { /** - * Specifies the createMode property: What is this?. + * Specifies the createMode property: Specifies the mode of sql pool creation. + * + *

Default: regular sql pool creation. + * + *

PointInTimeRestore: Creates a sql pool by restoring a point in time backup of an existing sql pool. + * sourceDatabaseId must be specified as the resource ID of the existing sql pool, and restorePointInTime + * must be specified. * - * @param createMode What is this?. + *

Recovery: Creates a sql pool by a geo-replicated backup. sourceDatabaseId must be specified as the + * recoverableDatabaseId to restore. + * + *

Restore: Creates a sql pool by restoring a backup of a deleted sql pool. SourceDatabaseId should be + * the sql pool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be specified.. + * + * @param createMode Specifies the mode of sql pool creation. + *

Default: regular sql pool creation. + *

PointInTimeRestore: Creates a sql pool by restoring a point in time backup of an existing sql + * pool. sourceDatabaseId must be specified as the resource ID of the existing sql pool, and + * restorePointInTime must be specified. + *

Recovery: Creates a sql pool by a geo-replicated backup. sourceDatabaseId must be specified as the + * recoverableDatabaseId to restore. + *

Restore: Creates a sql pool by restoring a backup of a deleted sql pool. SourceDatabaseId should + * be the sql pool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be + * specified. * @return the next definition stage. */ - WithCreate withCreateMode(String createMode); + WithCreate withCreateMode(CreateMode createMode); } /** The stage of the SqlPool definition allowing to specify creationDate. */ interface WithCreationDate { @@ -491,12 +524,33 @@ interface WithRestorePointInTime { /** The stage of the SqlPool update allowing to specify createMode. */ interface WithCreateMode { /** - * Specifies the createMode property: What is this?. + * Specifies the createMode property: Specifies the mode of sql pool creation. + * + *

Default: regular sql pool creation. + * + *

PointInTimeRestore: Creates a sql pool by restoring a point in time backup of an existing sql pool. + * sourceDatabaseId must be specified as the resource ID of the existing sql pool, and restorePointInTime + * must be specified. + * + *

Recovery: Creates a sql pool by a geo-replicated backup. sourceDatabaseId must be specified as the + * recoverableDatabaseId to restore. + * + *

Restore: Creates a sql pool by restoring a backup of a deleted sql pool. SourceDatabaseId should be + * the sql pool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be specified.. * - * @param createMode What is this?. + * @param createMode Specifies the mode of sql pool creation. + *

Default: regular sql pool creation. + *

PointInTimeRestore: Creates a sql pool by restoring a point in time backup of an existing sql + * pool. sourceDatabaseId must be specified as the resource ID of the existing sql pool, and + * restorePointInTime must be specified. + *

Recovery: Creates a sql pool by a geo-replicated backup. sourceDatabaseId must be specified as the + * recoverableDatabaseId to restore. + *

Restore: Creates a sql pool by restoring a backup of a deleted sql pool. SourceDatabaseId should + * be the sql pool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be + * specified. * @return the next definition stage. */ - Update withCreateMode(String createMode); + Update withCreateMode(CreateMode createMode); } /** The stage of the SqlPool update allowing to specify creationDate. */ interface WithCreationDate { diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SqlPoolPatchInfo.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SqlPoolPatchInfo.java index 7d7642524a5e7..1cd26735c18b7 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SqlPoolPatchInfo.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SqlPoolPatchInfo.java @@ -5,8 +5,8 @@ package com.azure.resourcemanager.synapse.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.fluent.models.SqlPoolResourceProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; @@ -14,8 +14,9 @@ import java.util.Map; /** SQL pool patch info A SQL Analytics pool patch info. */ +@JsonFlatten @Fluent -public final class SqlPoolPatchInfo { +public class SqlPoolPatchInfo { @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolPatchInfo.class); /* @@ -38,10 +39,85 @@ public final class SqlPoolPatchInfo { private Sku sku; /* - * SQL pool properties + * Maximum size in bytes */ - @JsonProperty(value = "properties") - private SqlPoolResourceProperties innerProperties; + @JsonProperty(value = "properties.maxSizeBytes") + private Long maxSizeBytes; + + /* + * Collation mode + */ + @JsonProperty(value = "properties.collation") + private String collation; + + /* + * Source database to create from + */ + @JsonProperty(value = "properties.sourceDatabaseId") + private String sourceDatabaseId; + + /* + * Backup database to restore from + */ + @JsonProperty(value = "properties.recoverableDatabaseId") + private String recoverableDatabaseId; + + /* + * Resource state + */ + @JsonProperty(value = "properties.provisioningState") + private String provisioningState; + + /* + * Resource status + */ + @JsonProperty(value = "properties.status") + private String status; + + /* + * Snapshot time to restore + */ + @JsonProperty(value = "properties.restorePointInTime") + private OffsetDateTime restorePointInTime; + + /* + * Specifies the mode of sql pool creation. + * + * Default: regular sql pool creation. + * + * PointInTimeRestore: Creates a sql pool by restoring a point in time + * backup of an existing sql pool. sourceDatabaseId must be specified as + * the resource ID of the existing sql pool, and restorePointInTime must be + * specified. + * + * Recovery: Creates a sql pool by a geo-replicated backup. + * sourceDatabaseId must be specified as the recoverableDatabaseId to + * restore. + * + * Restore: Creates a sql pool by restoring a backup of a deleted sql + * pool. SourceDatabaseId should be the sql pool's original resource ID. + * SourceDatabaseId and sourceDatabaseDeletionDate must be specified. + */ + @JsonProperty(value = "properties.createMode") + private CreateMode createMode; + + /* + * Date the SQL pool was created + */ + @JsonProperty(value = "properties.creationDate") + private OffsetDateTime creationDate; + + /* + * The storage account type used to store backups for this sql pool. + */ + @JsonProperty(value = "properties.storageAccountType") + private StorageAccountType storageAccountType; + + /* + * Specifies the time that the sql pool was deleted + */ + @JsonProperty(value = "properties.sourceDatabaseDeletionDate") + private OffsetDateTime sourceDatabaseDeletionDate; /** * Get the tags property: Resource tags. @@ -103,22 +179,13 @@ public SqlPoolPatchInfo withSku(Sku sku) { return this; } - /** - * Get the innerProperties property: SQL pool properties. - * - * @return the innerProperties value. - */ - private SqlPoolResourceProperties innerProperties() { - return this.innerProperties; - } - /** * Get the maxSizeBytes property: Maximum size in bytes. * * @return the maxSizeBytes value. */ public Long maxSizeBytes() { - return this.innerProperties() == null ? null : this.innerProperties().maxSizeBytes(); + return this.maxSizeBytes; } /** @@ -128,10 +195,7 @@ public Long maxSizeBytes() { * @return the SqlPoolPatchInfo object itself. */ public SqlPoolPatchInfo withMaxSizeBytes(Long maxSizeBytes) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withMaxSizeBytes(maxSizeBytes); + this.maxSizeBytes = maxSizeBytes; return this; } @@ -141,7 +205,7 @@ public SqlPoolPatchInfo withMaxSizeBytes(Long maxSizeBytes) { * @return the collation value. */ public String collation() { - return this.innerProperties() == null ? null : this.innerProperties().collation(); + return this.collation; } /** @@ -151,10 +215,7 @@ public String collation() { * @return the SqlPoolPatchInfo object itself. */ public SqlPoolPatchInfo withCollation(String collation) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withCollation(collation); + this.collation = collation; return this; } @@ -164,7 +225,7 @@ public SqlPoolPatchInfo withCollation(String collation) { * @return the sourceDatabaseId value. */ public String sourceDatabaseId() { - return this.innerProperties() == null ? null : this.innerProperties().sourceDatabaseId(); + return this.sourceDatabaseId; } /** @@ -174,10 +235,7 @@ public String sourceDatabaseId() { * @return the SqlPoolPatchInfo object itself. */ public SqlPoolPatchInfo withSourceDatabaseId(String sourceDatabaseId) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withSourceDatabaseId(sourceDatabaseId); + this.sourceDatabaseId = sourceDatabaseId; return this; } @@ -187,7 +245,7 @@ public SqlPoolPatchInfo withSourceDatabaseId(String sourceDatabaseId) { * @return the recoverableDatabaseId value. */ public String recoverableDatabaseId() { - return this.innerProperties() == null ? null : this.innerProperties().recoverableDatabaseId(); + return this.recoverableDatabaseId; } /** @@ -197,10 +255,7 @@ public String recoverableDatabaseId() { * @return the SqlPoolPatchInfo object itself. */ public SqlPoolPatchInfo withRecoverableDatabaseId(String recoverableDatabaseId) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withRecoverableDatabaseId(recoverableDatabaseId); + this.recoverableDatabaseId = recoverableDatabaseId; return this; } @@ -210,7 +265,7 @@ public SqlPoolPatchInfo withRecoverableDatabaseId(String recoverableDatabaseId) * @return the provisioningState value. */ public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + return this.provisioningState; } /** @@ -220,10 +275,7 @@ public String provisioningState() { * @return the SqlPoolPatchInfo object itself. */ public SqlPoolPatchInfo withProvisioningState(String provisioningState) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withProvisioningState(provisioningState); + this.provisioningState = provisioningState; return this; } @@ -233,7 +285,7 @@ public SqlPoolPatchInfo withProvisioningState(String provisioningState) { * @return the status value. */ public String status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); + return this.status; } /** @@ -243,10 +295,7 @@ public String status() { * @return the SqlPoolPatchInfo object itself. */ public SqlPoolPatchInfo withStatus(String status) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withStatus(status); + this.status = status; return this; } @@ -256,7 +305,7 @@ public SqlPoolPatchInfo withStatus(String status) { * @return the restorePointInTime value. */ public OffsetDateTime restorePointInTime() { - return this.innerProperties() == null ? null : this.innerProperties().restorePointInTime(); + return this.restorePointInTime; } /** @@ -266,33 +315,51 @@ public OffsetDateTime restorePointInTime() { * @return the SqlPoolPatchInfo object itself. */ public SqlPoolPatchInfo withRestorePointInTime(OffsetDateTime restorePointInTime) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withRestorePointInTime(restorePointInTime); + this.restorePointInTime = restorePointInTime; return this; } /** - * Get the createMode property: What is this?. + * Get the createMode property: Specifies the mode of sql pool creation. + * + *

Default: regular sql pool creation. + * + *

PointInTimeRestore: Creates a sql pool by restoring a point in time backup of an existing sql pool. + * sourceDatabaseId must be specified as the resource ID of the existing sql pool, and restorePointInTime must be + * specified. + * + *

Recovery: Creates a sql pool by a geo-replicated backup. sourceDatabaseId must be specified as the + * recoverableDatabaseId to restore. + * + *

Restore: Creates a sql pool by restoring a backup of a deleted sql pool. SourceDatabaseId should be the sql + * pool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be specified. * * @return the createMode value. */ - public String createMode() { - return this.innerProperties() == null ? null : this.innerProperties().createMode(); + public CreateMode createMode() { + return this.createMode; } /** - * Set the createMode property: What is this?. + * Set the createMode property: Specifies the mode of sql pool creation. + * + *

Default: regular sql pool creation. + * + *

PointInTimeRestore: Creates a sql pool by restoring a point in time backup of an existing sql pool. + * sourceDatabaseId must be specified as the resource ID of the existing sql pool, and restorePointInTime must be + * specified. + * + *

Recovery: Creates a sql pool by a geo-replicated backup. sourceDatabaseId must be specified as the + * recoverableDatabaseId to restore. + * + *

Restore: Creates a sql pool by restoring a backup of a deleted sql pool. SourceDatabaseId should be the sql + * pool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be specified. * * @param createMode the createMode value to set. * @return the SqlPoolPatchInfo object itself. */ - public SqlPoolPatchInfo withCreateMode(String createMode) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withCreateMode(createMode); + public SqlPoolPatchInfo withCreateMode(CreateMode createMode) { + this.createMode = createMode; return this; } @@ -302,7 +369,7 @@ public SqlPoolPatchInfo withCreateMode(String createMode) { * @return the creationDate value. */ public OffsetDateTime creationDate() { - return this.innerProperties() == null ? null : this.innerProperties().creationDate(); + return this.creationDate; } /** @@ -312,10 +379,7 @@ public OffsetDateTime creationDate() { * @return the SqlPoolPatchInfo object itself. */ public SqlPoolPatchInfo withCreationDate(OffsetDateTime creationDate) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withCreationDate(creationDate); + this.creationDate = creationDate; return this; } @@ -325,7 +389,7 @@ public SqlPoolPatchInfo withCreationDate(OffsetDateTime creationDate) { * @return the storageAccountType value. */ public StorageAccountType storageAccountType() { - return this.innerProperties() == null ? null : this.innerProperties().storageAccountType(); + return this.storageAccountType; } /** @@ -335,10 +399,7 @@ public StorageAccountType storageAccountType() { * @return the SqlPoolPatchInfo object itself. */ public SqlPoolPatchInfo withStorageAccountType(StorageAccountType storageAccountType) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withStorageAccountType(storageAccountType); + this.storageAccountType = storageAccountType; return this; } @@ -348,7 +409,7 @@ public SqlPoolPatchInfo withStorageAccountType(StorageAccountType storageAccount * @return the sourceDatabaseDeletionDate value. */ public OffsetDateTime sourceDatabaseDeletionDate() { - return this.innerProperties() == null ? null : this.innerProperties().sourceDatabaseDeletionDate(); + return this.sourceDatabaseDeletionDate; } /** @@ -358,10 +419,7 @@ public OffsetDateTime sourceDatabaseDeletionDate() { * @return the SqlPoolPatchInfo object itself. */ public SqlPoolPatchInfo withSourceDatabaseDeletionDate(OffsetDateTime sourceDatabaseDeletionDate) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withSourceDatabaseDeletionDate(sourceDatabaseDeletionDate); + this.sourceDatabaseDeletionDate = sourceDatabaseDeletionDate; return this; } @@ -374,8 +432,5 @@ public void validate() { if (sku() != null) { sku().validate(); } - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/State.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/State.java new file mode 100644 index 0000000000000..64f0d51423b6f --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/State.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for State. */ +public final class State extends ExpandableStringEnum { + /** Static value Creating for State. */ + public static final State CREATING = fromString("Creating"); + + /** Static value Unavailable for State. */ + public static final State UNAVAILABLE = fromString("Unavailable"); + + /** Static value Running for State. */ + public static final State RUNNING = fromString("Running"); + + /** Static value Deleting for State. */ + public static final State DELETING = fromString("Deleting"); + + /** Static value Deleted for State. */ + public static final State DELETED = fromString("Deleted"); + + /** Static value Stopping for State. */ + public static final State STOPPING = fromString("Stopping"); + + /** Static value Stopped for State. */ + public static final State STOPPED = fromString("Stopped"); + + /** Static value Starting for State. */ + public static final State STARTING = fromString("Starting"); + + /** Static value Updating for State. */ + public static final State UPDATING = fromString("Updating"); + + /** + * Creates or finds a State from its string representation. + * + * @param name a name to look for. + * @return the corresponding State. + */ + @JsonCreator + public static State fromString(String name) { + return fromString(name, State.class); + } + + /** @return known State values. */ + public static Collection values() { + return values(State.class); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/TableLevelSharingProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/TableLevelSharingProperties.java new file mode 100644 index 0000000000000..39e78a6bfed3f --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/TableLevelSharingProperties.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Tables that will be included and excluded in the follower database. */ +@Fluent +public final class TableLevelSharingProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TableLevelSharingProperties.class); + + /* + * List of tables to include in the follower database + */ + @JsonProperty(value = "tablesToInclude") + private List tablesToInclude; + + /* + * List of tables to exclude from the follower database + */ + @JsonProperty(value = "tablesToExclude") + private List tablesToExclude; + + /* + * List of external tables to include in the follower database + */ + @JsonProperty(value = "externalTablesToInclude") + private List externalTablesToInclude; + + /* + * List of external tables exclude from the follower database + */ + @JsonProperty(value = "externalTablesToExclude") + private List externalTablesToExclude; + + /* + * List of materialized views to include in the follower database + */ + @JsonProperty(value = "materializedViewsToInclude") + private List materializedViewsToInclude; + + /* + * List of materialized views exclude from the follower database + */ + @JsonProperty(value = "materializedViewsToExclude") + private List materializedViewsToExclude; + + /** + * Get the tablesToInclude property: List of tables to include in the follower database. + * + * @return the tablesToInclude value. + */ + public List tablesToInclude() { + return this.tablesToInclude; + } + + /** + * Set the tablesToInclude property: List of tables to include in the follower database. + * + * @param tablesToInclude the tablesToInclude value to set. + * @return the TableLevelSharingProperties object itself. + */ + public TableLevelSharingProperties withTablesToInclude(List tablesToInclude) { + this.tablesToInclude = tablesToInclude; + return this; + } + + /** + * Get the tablesToExclude property: List of tables to exclude from the follower database. + * + * @return the tablesToExclude value. + */ + public List tablesToExclude() { + return this.tablesToExclude; + } + + /** + * Set the tablesToExclude property: List of tables to exclude from the follower database. + * + * @param tablesToExclude the tablesToExclude value to set. + * @return the TableLevelSharingProperties object itself. + */ + public TableLevelSharingProperties withTablesToExclude(List tablesToExclude) { + this.tablesToExclude = tablesToExclude; + return this; + } + + /** + * Get the externalTablesToInclude property: List of external tables to include in the follower database. + * + * @return the externalTablesToInclude value. + */ + public List externalTablesToInclude() { + return this.externalTablesToInclude; + } + + /** + * Set the externalTablesToInclude property: List of external tables to include in the follower database. + * + * @param externalTablesToInclude the externalTablesToInclude value to set. + * @return the TableLevelSharingProperties object itself. + */ + public TableLevelSharingProperties withExternalTablesToInclude(List externalTablesToInclude) { + this.externalTablesToInclude = externalTablesToInclude; + return this; + } + + /** + * Get the externalTablesToExclude property: List of external tables exclude from the follower database. + * + * @return the externalTablesToExclude value. + */ + public List externalTablesToExclude() { + return this.externalTablesToExclude; + } + + /** + * Set the externalTablesToExclude property: List of external tables exclude from the follower database. + * + * @param externalTablesToExclude the externalTablesToExclude value to set. + * @return the TableLevelSharingProperties object itself. + */ + public TableLevelSharingProperties withExternalTablesToExclude(List externalTablesToExclude) { + this.externalTablesToExclude = externalTablesToExclude; + return this; + } + + /** + * Get the materializedViewsToInclude property: List of materialized views to include in the follower database. + * + * @return the materializedViewsToInclude value. + */ + public List materializedViewsToInclude() { + return this.materializedViewsToInclude; + } + + /** + * Set the materializedViewsToInclude property: List of materialized views to include in the follower database. + * + * @param materializedViewsToInclude the materializedViewsToInclude value to set. + * @return the TableLevelSharingProperties object itself. + */ + public TableLevelSharingProperties withMaterializedViewsToInclude(List materializedViewsToInclude) { + this.materializedViewsToInclude = materializedViewsToInclude; + return this; + } + + /** + * Get the materializedViewsToExclude property: List of materialized views exclude from the follower database. + * + * @return the materializedViewsToExclude value. + */ + public List materializedViewsToExclude() { + return this.materializedViewsToExclude; + } + + /** + * Set the materializedViewsToExclude property: List of materialized views exclude from the follower database. + * + * @param materializedViewsToExclude the materializedViewsToExclude value to set. + * @return the TableLevelSharingProperties object itself. + */ + public TableLevelSharingProperties withMaterializedViewsToExclude(List materializedViewsToExclude) { + this.materializedViewsToExclude = materializedViewsToExclude; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/Type.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/Type.java new file mode 100644 index 0000000000000..44c9936bad0c8 --- /dev/null +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/Type.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.synapse.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for Type. */ +public enum Type { + /** Enum value Microsoft.Synapse/workspaces/kustoPools/databases. */ + MICROSOFT_SYNAPSE_WORKSPACES_KUSTO_POOLS_DATABASES("Microsoft.Synapse/workspaces/kustoPools/databases"), + + /** Enum value Microsoft.Synapse/workspaces/kustoPools/attachedDatabaseConfigurations. */ + MICROSOFT_SYNAPSE_WORKSPACES_KUSTO_POOLS_ATTACHED_DATABASE_CONFIGURATIONS( + "Microsoft.Synapse/workspaces/kustoPools/attachedDatabaseConfigurations"); + + /** The actual serialized value for a Type instance. */ + private final String value; + + Type(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a Type instance. + * + * @param value the serialized value to parse. + * @return the parsed Type object, or null if unable to parse. + */ + @JsonCreator + public static Type fromString(String value) { + Type[] items = Type.values(); + for (Type item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/WorkloadGroup.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/WorkloadGroup.java index 09c0c122d9a34..220bb67fcd17b 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/WorkloadGroup.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/WorkloadGroup.java @@ -35,21 +35,21 @@ public interface WorkloadGroup { * * @return the minResourcePercent value. */ - int minResourcePercent(); + Integer minResourcePercent(); /** * Gets the maxResourcePercent property: The workload group cap percentage resource. * * @return the maxResourcePercent value. */ - int maxResourcePercent(); + Integer maxResourcePercent(); /** * Gets the minResourcePercentPerRequest property: The workload group request minimum grant percentage. * * @return the minResourcePercentPerRequest value. */ - double minResourcePercentPerRequest(); + Double minResourcePercentPerRequest(); /** * Gets the maxResourcePercentPerRequest property: The workload group request maximum grant percentage. @@ -134,7 +134,7 @@ interface WithMinResourcePercent { * @param minResourcePercent The workload group minimum percentage resource. * @return the next definition stage. */ - WithCreate withMinResourcePercent(int minResourcePercent); + WithCreate withMinResourcePercent(Integer minResourcePercent); } /** The stage of the WorkloadGroup definition allowing to specify maxResourcePercent. */ interface WithMaxResourcePercent { @@ -144,7 +144,7 @@ interface WithMaxResourcePercent { * @param maxResourcePercent The workload group cap percentage resource. * @return the next definition stage. */ - WithCreate withMaxResourcePercent(int maxResourcePercent); + WithCreate withMaxResourcePercent(Integer maxResourcePercent); } /** The stage of the WorkloadGroup definition allowing to specify minResourcePercentPerRequest. */ interface WithMinResourcePercentPerRequest { @@ -155,7 +155,7 @@ interface WithMinResourcePercentPerRequest { * @param minResourcePercentPerRequest The workload group request minimum grant percentage. * @return the next definition stage. */ - WithCreate withMinResourcePercentPerRequest(double minResourcePercentPerRequest); + WithCreate withMinResourcePercentPerRequest(Double minResourcePercentPerRequest); } /** The stage of the WorkloadGroup definition allowing to specify maxResourcePercentPerRequest. */ interface WithMaxResourcePercentPerRequest { @@ -229,7 +229,7 @@ interface WithMinResourcePercent { * @param minResourcePercent The workload group minimum percentage resource. * @return the next definition stage. */ - Update withMinResourcePercent(int minResourcePercent); + Update withMinResourcePercent(Integer minResourcePercent); } /** The stage of the WorkloadGroup update allowing to specify maxResourcePercent. */ interface WithMaxResourcePercent { @@ -239,7 +239,7 @@ interface WithMaxResourcePercent { * @param maxResourcePercent The workload group cap percentage resource. * @return the next definition stage. */ - Update withMaxResourcePercent(int maxResourcePercent); + Update withMaxResourcePercent(Integer maxResourcePercent); } /** The stage of the WorkloadGroup update allowing to specify minResourcePercentPerRequest. */ interface WithMinResourcePercentPerRequest { @@ -250,7 +250,7 @@ interface WithMinResourcePercentPerRequest { * @param minResourcePercentPerRequest The workload group request minimum grant percentage. * @return the next definition stage. */ - Update withMinResourcePercentPerRequest(double minResourcePercentPerRequest); + Update withMinResourcePercentPerRequest(Double minResourcePercentPerRequest); } /** The stage of the WorkloadGroup update allowing to specify maxResourcePercentPerRequest. */ interface WithMaxResourcePercentPerRequest { diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/WorkspacePatchInfo.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/WorkspacePatchInfo.java index 544454021d6f0..6defdc5759d08 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/WorkspacePatchInfo.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/WorkspacePatchInfo.java @@ -5,16 +5,17 @@ package com.azure.resourcemanager.synapse.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.fluent.models.WorkspacePatchProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** Workspace patch details. */ +@JsonFlatten @Fluent -public final class WorkspacePatchInfo { +public class WorkspacePatchInfo { @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkspacePatchInfo.class); /* @@ -31,10 +32,46 @@ public final class WorkspacePatchInfo { private ManagedIdentity identity; /* - * Workspace patch properties + * SQL administrator login password */ - @JsonProperty(value = "properties") - private WorkspacePatchProperties innerProperties; + @JsonProperty(value = "properties.sqlAdministratorLoginPassword") + private String sqlAdministratorLoginPassword; + + /* + * Managed Virtual Network Settings + */ + @JsonProperty(value = "properties.managedVirtualNetworkSettings") + private ManagedVirtualNetworkSettings managedVirtualNetworkSettings; + + /* + * Git integration settings + */ + @JsonProperty(value = "properties.workspaceRepositoryConfiguration") + private WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration; + + /* + * Purview Configuration + */ + @JsonProperty(value = "properties.purviewConfiguration") + private PurviewConfiguration purviewConfiguration; + + /* + * Resource provisioning state + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * The encryption details of the workspace + */ + @JsonProperty(value = "properties.encryption") + private EncryptionDetails encryption; + + /* + * Enable or Disable public network access to workspace + */ + @JsonProperty(value = "properties.publicNetworkAccess") + private WorkspacePublicNetworkAccess publicNetworkAccess; /** * Get the tags property: Resource tags. @@ -76,22 +113,13 @@ public WorkspacePatchInfo withIdentity(ManagedIdentity identity) { return this; } - /** - * Get the innerProperties property: Workspace patch properties. - * - * @return the innerProperties value. - */ - private WorkspacePatchProperties innerProperties() { - return this.innerProperties; - } - /** * Get the sqlAdministratorLoginPassword property: SQL administrator login password. * * @return the sqlAdministratorLoginPassword value. */ public String sqlAdministratorLoginPassword() { - return this.innerProperties() == null ? null : this.innerProperties().sqlAdministratorLoginPassword(); + return this.sqlAdministratorLoginPassword; } /** @@ -101,10 +129,7 @@ public String sqlAdministratorLoginPassword() { * @return the WorkspacePatchInfo object itself. */ public WorkspacePatchInfo withSqlAdministratorLoginPassword(String sqlAdministratorLoginPassword) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePatchProperties(); - } - this.innerProperties().withSqlAdministratorLoginPassword(sqlAdministratorLoginPassword); + this.sqlAdministratorLoginPassword = sqlAdministratorLoginPassword; return this; } @@ -114,7 +139,7 @@ public WorkspacePatchInfo withSqlAdministratorLoginPassword(String sqlAdministra * @return the managedVirtualNetworkSettings value. */ public ManagedVirtualNetworkSettings managedVirtualNetworkSettings() { - return this.innerProperties() == null ? null : this.innerProperties().managedVirtualNetworkSettings(); + return this.managedVirtualNetworkSettings; } /** @@ -125,10 +150,7 @@ public ManagedVirtualNetworkSettings managedVirtualNetworkSettings() { */ public WorkspacePatchInfo withManagedVirtualNetworkSettings( ManagedVirtualNetworkSettings managedVirtualNetworkSettings) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePatchProperties(); - } - this.innerProperties().withManagedVirtualNetworkSettings(managedVirtualNetworkSettings); + this.managedVirtualNetworkSettings = managedVirtualNetworkSettings; return this; } @@ -138,7 +160,7 @@ public WorkspacePatchInfo withManagedVirtualNetworkSettings( * @return the workspaceRepositoryConfiguration value. */ public WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().workspaceRepositoryConfiguration(); + return this.workspaceRepositoryConfiguration; } /** @@ -149,10 +171,7 @@ public WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration() { */ public WorkspacePatchInfo withWorkspaceRepositoryConfiguration( WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePatchProperties(); - } - this.innerProperties().withWorkspaceRepositoryConfiguration(workspaceRepositoryConfiguration); + this.workspaceRepositoryConfiguration = workspaceRepositoryConfiguration; return this; } @@ -162,7 +181,7 @@ public WorkspacePatchInfo withWorkspaceRepositoryConfiguration( * @return the purviewConfiguration value. */ public PurviewConfiguration purviewConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().purviewConfiguration(); + return this.purviewConfiguration; } /** @@ -172,10 +191,7 @@ public PurviewConfiguration purviewConfiguration() { * @return the WorkspacePatchInfo object itself. */ public WorkspacePatchInfo withPurviewConfiguration(PurviewConfiguration purviewConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePatchProperties(); - } - this.innerProperties().withPurviewConfiguration(purviewConfiguration); + this.purviewConfiguration = purviewConfiguration; return this; } @@ -185,7 +201,7 @@ public WorkspacePatchInfo withPurviewConfiguration(PurviewConfiguration purviewC * @return the provisioningState value. */ public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + return this.provisioningState; } /** @@ -194,7 +210,7 @@ public String provisioningState() { * @return the encryption value. */ public EncryptionDetails encryption() { - return this.innerProperties() == null ? null : this.innerProperties().encryption(); + return this.encryption; } /** @@ -204,10 +220,7 @@ public EncryptionDetails encryption() { * @return the WorkspacePatchInfo object itself. */ public WorkspacePatchInfo withEncryption(EncryptionDetails encryption) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePatchProperties(); - } - this.innerProperties().withEncryption(encryption); + this.encryption = encryption; return this; } @@ -217,7 +230,7 @@ public WorkspacePatchInfo withEncryption(EncryptionDetails encryption) { * @return the publicNetworkAccess value. */ public WorkspacePublicNetworkAccess publicNetworkAccess() { - return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); + return this.publicNetworkAccess; } /** @@ -227,10 +240,7 @@ public WorkspacePublicNetworkAccess publicNetworkAccess() { * @return the WorkspacePatchInfo object itself. */ public WorkspacePatchInfo withPublicNetworkAccess(WorkspacePublicNetworkAccess publicNetworkAccess) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePatchProperties(); - } - this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); + this.publicNetworkAccess = publicNetworkAccess; return this; } @@ -243,8 +253,17 @@ public void validate() { if (identity() != null) { identity().validate(); } - if (innerProperties() != null) { - innerProperties().validate(); + if (managedVirtualNetworkSettings() != null) { + managedVirtualNetworkSettings().validate(); + } + if (workspaceRepositoryConfiguration() != null) { + workspaceRepositoryConfiguration().validate(); + } + if (purviewConfiguration() != null) { + purviewConfiguration().validate(); + } + if (encryption() != null) { + encryption().validate(); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationsCreateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationsCreateSamples.java deleted file mode 100644 index 53d1be7f12273..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationsCreateSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.AzureADOnlyAuthenticationName; - -/** Samples for AzureADOnlyAuthentications Create. */ -public final class AzureADOnlyAuthenticationsCreateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateAzureADOnlyAuthentication.json - */ - /** - * Sample code: Create or Update Azure Active Directory Only Authentication property. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateAzureActiveDirectoryOnlyAuthenticationProperty( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .azureADOnlyAuthentications() - .define(AzureADOnlyAuthenticationName.DEFAULT) - .withExistingWorkspace("workspace-6852", "workspace-2080") - .withAzureADOnlyAuthentication(true) - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationsGetSamples.java deleted file mode 100644 index c857e49417cd7..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationsGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.AzureADOnlyAuthenticationName; - -/** Samples for AzureADOnlyAuthentications Get. */ -public final class AzureADOnlyAuthenticationsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetAzureADOnlyAuthentication.json - */ - /** - * Sample code: Get Azure Active Directory Only Authentication property. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAzureActiveDirectoryOnlyAuthenticationProperty( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .azureADOnlyAuthentications() - .getWithResponse("workspace-6852", "workspace-2080", AzureADOnlyAuthenticationName.DEFAULT, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationsListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationsListSamples.java deleted file mode 100644 index 4fd7e10b5301a..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for AzureADOnlyAuthentications List. */ -public final class AzureADOnlyAuthenticationsListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListAzureADOnlyAuthentication.json - */ - /** - * Sample code: Get a list of Azure Active Directory Only Authentication property. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAListOfAzureActiveDirectoryOnlyAuthenticationProperty( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.azureADOnlyAuthentications().list("workspace-6852", "workspace-2080", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsCreateOrUpdateSamples.java deleted file mode 100644 index fa52362ed325c..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsCreateOrUpdateSamples.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.AutoPauseProperties; -import com.azure.resourcemanager.synapse.models.AutoScaleProperties; -import com.azure.resourcemanager.synapse.models.LibraryRequirements; -import com.azure.resourcemanager.synapse.models.NodeSize; -import com.azure.resourcemanager.synapse.models.NodeSizeFamily; -import java.util.HashMap; -import java.util.Map; - -/** Samples for BigDataPools CreateOrUpdate. */ -public final class BigDataPoolsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/CreateOrUpdateBigDataPool.json - */ - /** - * Sample code: Create or update a Big Data pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateABigDataPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .bigDataPools() - .define("ExamplePool") - .withRegion("West US 2") - .withExistingWorkspace("ExampleResourceGroup", "ExampleWorkspace") - .withTags(mapOf("key", "value")) - .withAutoScale(new AutoScaleProperties().withMinNodeCount(3).withEnabled(true).withMaxNodeCount(50)) - .withAutoPause(new AutoPauseProperties().withDelayInMinutes(15).withEnabled(true)) - .withSparkEventsFolder("/events") - .withNodeCount(4) - .withLibraryRequirements(new LibraryRequirements().withContent("").withFilename("requirements.txt")) - .withSparkVersion("2.4") - .withDefaultSparkLogFolder("/logs") - .withNodeSize(NodeSize.MEDIUM) - .withNodeSizeFamily(NodeSizeFamily.MEMORY_OPTIMIZED) - .create(); - } - - @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/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsDeleteSamples.java deleted file mode 100644 index 41a64e0ac88be..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for BigDataPools Delete. */ -public final class BigDataPoolsDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/DeleteBigDataPool.json - */ - /** - * Sample code: Delete a Big Data pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void deleteABigDataPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.bigDataPools().delete("ExampleResourceGroup", "ExampleWorkspace", "ExamplePool", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsGetSamples.java deleted file mode 100644 index 2a96cacb974dd..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for BigDataPools Get. */ -public final class BigDataPoolsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/GetBigDataPool.json - */ - /** - * Sample code: Get a Big Data pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getABigDataPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.bigDataPools().getWithResponse("ExampleResourceGroup", "ExampleWorkspace", "ExamplePool", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsListByWorkspaceSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsListByWorkspaceSamples.java deleted file mode 100644 index c77f1cce82518..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsListByWorkspaceSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for BigDataPools ListByWorkspace. */ -public final class BigDataPoolsListByWorkspaceSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/ListBigDataPoolsInWorkspace.json - */ - /** - * Sample code: List Big Data pools in a workspace. - * - * @param manager Entry point to SynapseManager. - */ - public static void listBigDataPoolsInAWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.bigDataPools().listByWorkspace("ExampleResourceGroup", "ExampleWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsUpdateSamples.java deleted file mode 100644 index 4b26d8e909a23..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsUpdateSamples.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.BigDataPoolResourceInfo; -import java.util.HashMap; -import java.util.Map; - -/** Samples for BigDataPools Update. */ -public final class BigDataPoolsUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/UpdateBigDataPool.json - */ - /** - * Sample code: Update a Big Data pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void updateABigDataPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - BigDataPoolResourceInfo resource = - manager - .bigDataPools() - .getWithResponse("ExampleResourceGroup", "ExampleWorkspace", "ExamplePool", Context.NONE) - .getValue(); - resource.update().withTags(mapOf("key", "value")).apply(); - } - - @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/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingPoliciesCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index 892ada1f093fa..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.DataMaskingState; - -/** Samples for DataMaskingPolicies CreateOrUpdate. */ -public final class DataMaskingPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingPolicyCreateOrUpdateMin.json - */ - /** - * Sample code: Create or update data masking policy min. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateDataMaskingPolicyMin(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .dataMaskingPolicies() - .define() - .withExistingSqlPool("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331") - .withDataMaskingState(DataMaskingState.ENABLED) - .create(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingPolicyCreateOrUpdateMax.json - */ - /** - * Sample code: Create or update data masking policy max. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateDataMaskingPolicyMax(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .dataMaskingPolicies() - .define() - .withExistingSqlPool("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331") - .withDataMaskingState(DataMaskingState.ENABLED) - .withExemptPrincipals("testuser;") - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingPoliciesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingPoliciesGetSamples.java deleted file mode 100644 index a1cecd3644105..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingPoliciesGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for DataMaskingPolicies Get. */ -public final class DataMaskingPoliciesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingPolicyGet.json - */ - /** - * Sample code: Get data masking policy. - * - * @param manager Entry point to SynapseManager. - */ - public static void getDataMaskingPolicy(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .dataMaskingPolicies() - .getWithResponse("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulesCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulesCreateOrUpdateSamples.java deleted file mode 100644 index fc531d93c50f0..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulesCreateOrUpdateSamples.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.DataMaskingFunction; -import com.azure.resourcemanager.synapse.models.DataMaskingRuleState; - -/** Samples for DataMaskingRules CreateOrUpdate. */ -public final class DataMaskingRulesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingRuleCreateOrUpdateDefaultMin.json - */ - /** - * Sample code: Create/Update data masking rule for default min. - * - * @param manager Entry point to SynapseManager. - */ - public static void createUpdateDataMaskingRuleForDefaultMin( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .dataMaskingRules() - .define("rule1") - .withExistingSqlPool("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331") - .withSchemaName("dbo") - .withTableName("Table_1") - .withColumnName("test1") - .withMaskingFunction(DataMaskingFunction.DEFAULT) - .create(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingRuleCreateOrUpdateDefaultMax.json - */ - /** - * Sample code: Create/Update data masking rule for default max. - * - * @param manager Entry point to SynapseManager. - */ - public static void createUpdateDataMaskingRuleForDefaultMax( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .dataMaskingRules() - .define("rule1") - .withExistingSqlPool("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331") - .withAliasName("nickname") - .withRuleState(DataMaskingRuleState.ENABLED) - .withSchemaName("dbo") - .withTableName("Table_1") - .withColumnName("test1") - .withMaskingFunction(DataMaskingFunction.DEFAULT) - .create(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingRuleCreateOrUpdateText.json - */ - /** - * Sample code: Create/Update data masking rule for text. - * - * @param manager Entry point to SynapseManager. - */ - public static void createUpdateDataMaskingRuleForText(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .dataMaskingRules() - .define("rule1") - .withExistingSqlPool("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331") - .withSchemaName("dbo") - .withTableName("Table_1") - .withColumnName("test1") - .withMaskingFunction(DataMaskingFunction.TEXT) - .withPrefixSize("1") - .withSuffixSize("0") - .withReplacementString("asdf") - .create(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingRuleCreateOrUpdateNumber.json - */ - /** - * Sample code: Create/Update data masking rule for numbers. - * - * @param manager Entry point to SynapseManager. - */ - public static void createUpdateDataMaskingRuleForNumbers(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .dataMaskingRules() - .define("rule1") - .withExistingSqlPool("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331") - .withSchemaName("dbo") - .withTableName("Table_1") - .withColumnName("test1") - .withMaskingFunction(DataMaskingFunction.NUMBER) - .withNumberFrom("0") - .withNumberTo("2") - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulesGetSamples.java deleted file mode 100644 index f6d8ebb739e68..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulesGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for DataMaskingRules Get. */ -public final class DataMaskingRulesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingRuleGet.json - */ - /** - * Sample code: Get data masking rule. - * - * @param manager Entry point to SynapseManager. - */ - public static void getDataMaskingRule(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .dataMaskingRules() - .getWithResponse("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", "rule1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulesListBySqlPoolSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulesListBySqlPoolSamples.java deleted file mode 100644 index c6c163b994612..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulesListBySqlPoolSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for DataMaskingRules ListBySqlPool. */ -public final class DataMaskingRulesListBySqlPoolSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingRuleList.json - */ - /** - * Sample code: List data masking rules. - * - * @param manager Entry point to SynapseManager. - */ - public static void listDataMaskingRules(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .dataMaskingRules() - .listBySqlPool("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/ExtendedSqlPoolBlobAuditingPoliciesCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/ExtendedSqlPoolBlobAuditingPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index aa3df1b552eb8..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/ExtendedSqlPoolBlobAuditingPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.BlobAuditingPolicyState; -import java.util.Arrays; -import java.util.UUID; - -/** Samples for ExtendedSqlPoolBlobAuditingPolicies CreateOrUpdate. */ -public final class ExtendedSqlPoolBlobAuditingPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ExtendedSqlPoolBlobAuditingCreateMax.json - */ - /** - * Sample code: Create or update an extended Sql pool's blob auditing policy with all parameters. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateAnExtendedSqlPoolSBlobAuditingPolicyWithAllParameters( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .extendedSqlPoolBlobAuditingPolicies() - .define() - .withExistingSqlPool("blobauditingtest-4799", "blobauditingtest-6440", "testdb") - .withPredicateExpression("statement = 'select 1'") - .withState(BlobAuditingPolicyState.ENABLED) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey( - "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==") - .withRetentionDays(6) - .withAuditActionsAndGroups( - Arrays - .asList( - "DATABASE_LOGOUT_GROUP", - "DATABASE_ROLE_MEMBER_CHANGE_GROUP", - "UPDATE on database::TestDatabaseName by public")) - .withStorageAccountSubscriptionId(UUID.fromString("00000000-1234-0000-5678-000000000000")) - .withIsStorageSecondaryKeyInUse(false) - .withIsAzureMonitorTargetEnabled(true) - .create(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ExtendedSqlPoolAzureMonitorAuditingCreateMin.json - */ - /** - * Sample code: Create or update an extended SQL pool's azure monitor auditing policy with minimal parameters. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateAnExtendedSQLPoolSAzureMonitorAuditingPolicyWithMinimalParameters( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .extendedSqlPoolBlobAuditingPolicies() - .define() - .withExistingSqlPool("blobauditingtest-4799", "blobauditingtest-6440", "testdb") - .withState(BlobAuditingPolicyState.ENABLED) - .withIsAzureMonitorTargetEnabled(true) - .create(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ExtendedSqlPoolBlobAuditingCreateMin.json - */ - /** - * Sample code: Create or update an extended Sql pool's blob auditing policy with minimal parameters. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateAnExtendedSqlPoolSBlobAuditingPolicyWithMinimalParameters( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .extendedSqlPoolBlobAuditingPolicies() - .define() - .withExistingSqlPool("blobauditingtest-4799", "blobauditingtest-6440", "testdb") - .withState(BlobAuditingPolicyState.ENABLED) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey( - "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==") - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/ExtendedSqlPoolBlobAuditingPoliciesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/ExtendedSqlPoolBlobAuditingPoliciesGetSamples.java deleted file mode 100644 index eb75358de60c4..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/ExtendedSqlPoolBlobAuditingPoliciesGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for ExtendedSqlPoolBlobAuditingPolicies Get. */ -public final class ExtendedSqlPoolBlobAuditingPoliciesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ExtendedSqlPoolBlobAuditingGet.json - */ - /** - * Sample code: Get an extended database's blob auditing policy. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAnExtendedDatabaseSBlobAuditingPolicy( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .extendedSqlPoolBlobAuditingPolicies() - .getWithResponse("blobauditingtest-6852", "blobauditingtest-2080", "testdb", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/ExtendedSqlPoolBlobAuditingPoliciesListBySqlPoolSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/ExtendedSqlPoolBlobAuditingPoliciesListBySqlPoolSamples.java deleted file mode 100644 index f05310880dc9c..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/ExtendedSqlPoolBlobAuditingPoliciesListBySqlPoolSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for ExtendedSqlPoolBlobAuditingPolicies ListBySqlPool. */ -public final class ExtendedSqlPoolBlobAuditingPoliciesListBySqlPoolSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolExtendedAuditingSettingsList.json - */ - /** - * Sample code: List extended auditing settings of a database. - * - * @param manager Entry point to SynapseManager. - */ - public static void listExtendedAuditingSettingsOfADatabase( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .extendedSqlPoolBlobAuditingPolicies() - .listBySqlPool("blobauditingtest-6852", "blobauditingtest-2080", "testdb", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeAuthKeysOperationListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeAuthKeysOperationListSamples.java deleted file mode 100644 index eed93f9f5f396..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeAuthKeysOperationListSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimeAuthKeysOperation List. */ -public final class IntegrationRuntimeAuthKeysOperationListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_ListAuthKeys.json - */ - /** - * Sample code: List auth keys. - * - * @param manager Entry point to SynapseManager. - */ - public static void listAuthKeys(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimeAuthKeysOperations() - .listWithResponse("exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeAuthKeysOperationRegenerateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeAuthKeysOperationRegenerateSamples.java deleted file mode 100644 index b97b9b48653e6..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeAuthKeysOperationRegenerateSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeAuthKeyName; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeRegenerateKeyParameters; - -/** Samples for IntegrationRuntimeAuthKeysOperation Regenerate. */ -public final class IntegrationRuntimeAuthKeysOperationRegenerateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_RegenerateAuthKey.json - */ - /** - * Sample code: Regenerate auth key. - * - * @param manager Entry point to SynapseManager. - */ - public static void regenerateAuthKey(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimeAuthKeysOperations() - .regenerateWithResponse( - "exampleResourceGroup", - "exampleWorkspace", - "exampleIntegrationRuntime", - new IntegrationRuntimeRegenerateKeyParameters().withKeyName(IntegrationRuntimeAuthKeyName.AUTH_KEY2), - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeConnectionInfosGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeConnectionInfosGetSamples.java deleted file mode 100644 index 28ee828950bc0..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeConnectionInfosGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimeConnectionInfos Get. */ -public final class IntegrationRuntimeConnectionInfosGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_GetConnectionInfo.json - */ - /** - * Sample code: Get connection info. - * - * @param manager Entry point to SynapseManager. - */ - public static void getConnectionInfo(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimeConnectionInfos() - .getWithResponse("exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeCredentialsSyncSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeCredentialsSyncSamples.java deleted file mode 100644 index 0b06e39665792..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeCredentialsSyncSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimeCredentials Sync. */ -public final class IntegrationRuntimeCredentialsSyncSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_SyncCredentials.json - */ - /** - * Sample code: Sync credentials. - * - * @param manager Entry point to SynapseManager. - */ - public static void syncCredentials(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimeCredentials() - .syncWithResponse("exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeMonitoringDataListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeMonitoringDataListSamples.java deleted file mode 100644 index cca065b017da6..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeMonitoringDataListSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimeMonitoringData List. */ -public final class IntegrationRuntimeMonitoringDataListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimeMonitoringData_List.json - */ - /** - * Sample code: Get monitoring data. - * - * @param manager Entry point to SynapseManager. - */ - public static void getMonitoringData(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimeMonitoringDatas() - .listWithResponse("exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodeIpAddressOperationGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodeIpAddressOperationGetSamples.java deleted file mode 100644 index bf3d1702ee835..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodeIpAddressOperationGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimeNodeIpAddressOperation Get. */ -public final class IntegrationRuntimeNodeIpAddressOperationGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimeNodes_GetIpAddress.json - */ - /** - * Sample code: Get integration runtime node IP address. - * - * @param manager Entry point to SynapseManager. - */ - public static void getIntegrationRuntimeNodeIPAddress(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimeNodeIpAddressOperations() - .getWithResponse( - "exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", "Node_1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodesDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodesDeleteSamples.java deleted file mode 100644 index 2570848206954..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodesDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimeNodes Delete. */ -public final class IntegrationRuntimeNodesDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimeNodes_Delete.json - */ - /** - * Sample code: Delete integration runtime node. - * - * @param manager Entry point to SynapseManager. - */ - public static void deleteIntegrationRuntimeNode(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimeNodes() - .deleteWithResponse( - "exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", "Node_1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodesGetSamples.java deleted file mode 100644 index f7a2ce3c15b3c..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodesGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimeNodes Get. */ -public final class IntegrationRuntimeNodesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimeNodes_Get.json - */ - /** - * Sample code: Get integration runtime node. - * - * @param manager Entry point to SynapseManager. - */ - public static void getIntegrationRuntimeNode(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimeNodes() - .getWithResponse( - "exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", "Node_1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodesUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodesUpdateSamples.java deleted file mode 100644 index e698b4988f1f8..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodesUpdateSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.UpdateIntegrationRuntimeNodeRequest; - -/** Samples for IntegrationRuntimeNodes Update. */ -public final class IntegrationRuntimeNodesUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimeNodes_Update.json - */ - /** - * Sample code: Update integration runtime node. - * - * @param manager Entry point to SynapseManager. - */ - public static void updateIntegrationRuntimeNode(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimeNodes() - .updateWithResponse( - "exampleResourceGroup", - "exampleWorkspace", - "exampleIntegrationRuntime", - "Node_1", - new UpdateIntegrationRuntimeNodeRequest().withConcurrentJobsLimit(2), - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeObjectMetadataListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeObjectMetadataListSamples.java deleted file mode 100644 index 2e2231e2e5056..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeObjectMetadataListSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.GetSsisObjectMetadataRequest; - -/** Samples for IntegrationRuntimeObjectMetadata List. */ -public final class IntegrationRuntimeObjectMetadataListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimeObjectMetadata_List.json - */ - /** - * Sample code: Get integration runtime object metadata. - * - * @param manager Entry point to SynapseManager. - */ - public static void getIntegrationRuntimeObjectMetadata(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimeObjectMetadatas() - .listWithResponse( - "exampleResourceGroup", - "exampleWorkspace", - "testactivityv2", - new GetSsisObjectMetadataRequest().withMetadataPath("ssisFolders"), - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeObjectMetadataRefreshSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeObjectMetadataRefreshSamples.java deleted file mode 100644 index d97e1318f9316..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeObjectMetadataRefreshSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimeObjectMetadata Refresh. */ -public final class IntegrationRuntimeObjectMetadataRefreshSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimeObjectMetadata_Refresh.json - */ - /** - * Sample code: Refresh object metadata. - * - * @param manager Entry point to SynapseManager. - */ - public static void refreshObjectMetadata(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimeObjectMetadatas() - .refresh("exampleResourceGroup", "exampleWorkspace", "testactivityv2", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeStatusOperationGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeStatusOperationGetSamples.java deleted file mode 100644 index b9f08e69921ac..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeStatusOperationGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimeStatusOperation Get. */ -public final class IntegrationRuntimeStatusOperationGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_GetStatus.json - */ - /** - * Sample code: Get status. - * - * @param manager Entry point to SynapseManager. - */ - public static void getStatus(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimeStatusOperations() - .getWithResponse("exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesCreateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesCreateSamples.java deleted file mode 100644 index bd6d426736259..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesCreateSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.SelfHostedIntegrationRuntime; - -/** Samples for IntegrationRuntimes Create. */ -public final class IntegrationRuntimesCreateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Create.json - */ - /** - * Sample code: Create integration runtime. - * - * @param manager Entry point to SynapseManager. - */ - public static void createIntegrationRuntime(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimes() - .define("exampleIntegrationRuntime") - .withExistingWorkspace("exampleResourceGroup", "exampleWorkspace") - .withProperties(new SelfHostedIntegrationRuntime().withDescription("A selfhosted integration runtime")) - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesDeleteSamples.java deleted file mode 100644 index 8e530a4ca8f0f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimes Delete. */ -public final class IntegrationRuntimesDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Delete.json - */ - /** - * Sample code: Delete integration runtime. - * - * @param manager Entry point to SynapseManager. - */ - public static void deleteIntegrationRuntime(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimes() - .delete("exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesDisableInteractiveQuerySamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesDisableInteractiveQuerySamples.java deleted file mode 100644 index a5d0f8dfb22af..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesDisableInteractiveQuerySamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimes DisableInteractiveQuery. */ -public final class IntegrationRuntimesDisableInteractiveQuerySamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_DisableInteractiveQuery.json - */ - /** - * Sample code: Stop integration runtime. - * - * @param manager Entry point to SynapseManager. - */ - public static void stopIntegrationRuntime(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimes() - .disableInteractiveQuery( - "exampleResourceGroup", "exampleWorkspace", "exampleManagedIntegrationRuntime", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesEnableInteractiveQuerySamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesEnableInteractiveQuerySamples.java deleted file mode 100644 index c97f87718ad1e..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesEnableInteractiveQuerySamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimes EnableInteractiveQuery. */ -public final class IntegrationRuntimesEnableInteractiveQuerySamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_EnableInteractiveQuery.json - */ - /** - * Sample code: Stop integration runtime. - * - * @param manager Entry point to SynapseManager. - */ - public static void stopIntegrationRuntime(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimes() - .enableInteractiveQuery( - "exampleResourceGroup", "exampleWorkspace", "exampleManagedIntegrationRuntime", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesGetSamples.java deleted file mode 100644 index 6cc8189ba5418..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimes Get. */ -public final class IntegrationRuntimesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Get.json - */ - /** - * Sample code: Get integration runtime. - * - * @param manager Entry point to SynapseManager. - */ - public static void getIntegrationRuntime(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimes() - .getWithResponse( - "exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", null, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesListByWorkspaceSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesListByWorkspaceSamples.java deleted file mode 100644 index 2b67231033da4..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesListByWorkspaceSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimes ListByWorkspace. */ -public final class IntegrationRuntimesListByWorkspaceSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_ListByWorkspace.json - */ - /** - * Sample code: List integration runtimes. - * - * @param manager Entry point to SynapseManager. - */ - public static void listIntegrationRuntimes(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.integrationRuntimes().listByWorkspace("exampleResourceGroup", "exampleWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesListOutboundNetworkDependenciesEndpointsSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesListOutboundNetworkDependenciesEndpointsSamples.java deleted file mode 100644 index 2eed354d1aed6..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesListOutboundNetworkDependenciesEndpointsSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimes ListOutboundNetworkDependenciesEndpoints. */ -public final class IntegrationRuntimesListOutboundNetworkDependenciesEndpointsSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_ListOutboundNetworkDependenciesEndpoints.json - */ - /** - * Sample code: Get outbound network dependency endpoints. - * - * @param manager Entry point to SynapseManager. - */ - public static void getOutboundNetworkDependencyEndpoints(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimes() - .listOutboundNetworkDependenciesEndpointsWithResponse( - "exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesStartSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesStartSamples.java deleted file mode 100644 index 9dca64dbb669b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesStartSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimes Start. */ -public final class IntegrationRuntimesStartSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Start.json - */ - /** - * Sample code: Start integration runtime. - * - * @param manager Entry point to SynapseManager. - */ - public static void startIntegrationRuntime(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimes() - .start("exampleResourceGroup", "exampleWorkspace", "exampleManagedIntegrationRuntime", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesStopSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesStopSamples.java deleted file mode 100644 index 3e258c24c61b7..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesStopSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimes Stop. */ -public final class IntegrationRuntimesStopSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Stop.json - */ - /** - * Sample code: Stop integration runtime. - * - * @param manager Entry point to SynapseManager. - */ - public static void stopIntegrationRuntime(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimes() - .stop("exampleResourceGroup", "exampleWorkspace", "exampleManagedIntegrationRuntime", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesUpdateSamples.java deleted file mode 100644 index 4af3d794836b1..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesUpdateSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeAutoUpdate; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeResource; - -/** Samples for IntegrationRuntimes Update. */ -public final class IntegrationRuntimesUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Update.json - */ - /** - * Sample code: Update integration runtime. - * - * @param manager Entry point to SynapseManager. - */ - public static void updateIntegrationRuntime(com.azure.resourcemanager.synapse.SynapseManager manager) { - IntegrationRuntimeResource resource = - manager - .integrationRuntimes() - .getWithResponse( - "exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", null, Context.NONE) - .getValue(); - resource.update().withAutoUpdate(IntegrationRuntimeAutoUpdate.OFF).withUpdateDelayOffset("\"PT3H\"").apply(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesUpgradeSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesUpgradeSamples.java deleted file mode 100644 index 640c6f82921ee..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesUpgradeSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimes Upgrade. */ -public final class IntegrationRuntimesUpgradeSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Upgrade.json - */ - /** - * Sample code: Upgrade integration runtime. - * - * @param manager Entry point to SynapseManager. - */ - public static void upgradeIntegrationRuntime(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimes() - .upgradeWithResponse("exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesCreateOrUpdateSamples.java deleted file mode 100644 index 23b32596e8dc3..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesCreateOrUpdateSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -/** Samples for IpFirewallRules CreateOrUpdate. */ -public final class IpFirewallRulesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateIpFirewallRule.json - */ - /** - * Sample code: Create an IP firewall rule. - * - * @param manager Entry point to SynapseManager. - */ - public static void createAnIPFirewallRule(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .ipFirewallRules() - .define("ExampleIpFirewallRule") - .withExistingWorkspace("ExampleResourceGroup", "ExampleWorkspace") - .withEndIpAddress("10.0.0.254") - .withStartIpAddress("10.0.0.0") - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesDeleteSamples.java deleted file mode 100644 index 8b34f6af5d7b4..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IpFirewallRules Delete. */ -public final class IpFirewallRulesDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteIpFirewallRule.json - */ - /** - * Sample code: Delete an IP firewall rule from a workspace. - * - * @param manager Entry point to SynapseManager. - */ - public static void deleteAnIPFirewallRuleFromAWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .ipFirewallRules() - .delete("ExampleResourceGroup", "ExampleWorkspace", "ExampleIpFirewallRule", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesGetSamples.java deleted file mode 100644 index 7b9df3095e680..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IpFirewallRules Get. */ -public final class IpFirewallRulesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetIpFirewallRule.json - */ - /** - * Sample code: Create an IP firewall rule. - * - * @param manager Entry point to SynapseManager. - */ - public static void createAnIPFirewallRule(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .ipFirewallRules() - .getWithResponse("ExampleResourceGroup", "ExampleWorkspace", "ExampleIpFirewallRule", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesListByWorkspaceSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesListByWorkspaceSamples.java deleted file mode 100644 index ac9b21831cf85..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesListByWorkspaceSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IpFirewallRules ListByWorkspace. */ -public final class IpFirewallRulesListByWorkspaceSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListIpFirewallRules.json - */ - /** - * Sample code: List IP firewall rules in a workspace. - * - * @param manager Entry point to SynapseManager. - */ - public static void listIPFirewallRulesInAWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.ipFirewallRules().listByWorkspace("ExampleResourceGroup", "ExampleWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesReplaceAllSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesReplaceAllSamples.java deleted file mode 100644 index c2085b928854a..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesReplaceAllSamples.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.fluent.models.IpFirewallRuleProperties; -import com.azure.resourcemanager.synapse.models.ReplaceAllIpFirewallRulesRequest; -import java.util.HashMap; -import java.util.Map; - -/** Samples for IpFirewallRules ReplaceAll. */ -public final class IpFirewallRulesReplaceAllSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ReplaceAllIpFirewallRules.json - */ - /** - * Sample code: Replace all IP firewall rules in a workspace. - * - * @param manager Entry point to SynapseManager. - */ - public static void replaceAllIPFirewallRulesInAWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .ipFirewallRules() - .replaceAll( - "ExampleResourceGroup", - "ExampleWorkspace", - new ReplaceAllIpFirewallRulesRequest() - .withIpFirewallRules( - mapOf( - "AnotherExampleFirewallRule", - new IpFirewallRuleProperties() - .withEndIpAddress("10.0.1.254") - .withStartIpAddress("10.0.1.0"), - "ExampleFirewallRule", - new IpFirewallRuleProperties() - .withEndIpAddress("10.0.0.254") - .withStartIpAddress("10.0.0.0"))), - Context.NONE); - } - - @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/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/KeysCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/KeysCreateOrUpdateSamples.java deleted file mode 100644 index 78c93cc07878c..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/KeysCreateOrUpdateSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -/** Samples for Keys CreateOrUpdate. */ -public final class KeysCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateKey.json - */ - /** - * Sample code: Create or update a workspace key. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateAWorkspaceKey(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .keys() - .define("somekey") - .withExistingWorkspace("ExampleResourceGroup", "ExampleWorkspace") - .withIsActiveCmk(true) - .withKeyVaultUrl("https://vault.azure.net/keys/somesecret") - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/KeysDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/KeysDeleteSamples.java deleted file mode 100644 index 2e991b21a2dd4..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/KeysDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for Keys Delete. */ -public final class KeysDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteKey.json - */ - /** - * Sample code: Delete a workspace key. - * - * @param manager Entry point to SynapseManager. - */ - public static void deleteAWorkspaceKey(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.keys().deleteWithResponse("ExampleResourceGroup", "ExampleWorkspace", "somekey", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/KeysGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/KeysGetSamples.java deleted file mode 100644 index 8a521a353628f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/KeysGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for Keys Get. */ -public final class KeysGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetKey.json - */ - /** - * Sample code: Get a workspace key. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAWorkspaceKey(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.keys().getWithResponse("ExampleResourceGroup", "ExampleWorkspace", "somekey", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/KeysListByWorkspaceSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/KeysListByWorkspaceSamples.java deleted file mode 100644 index 97b0cf00b84da..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/KeysListByWorkspaceSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for Keys ListByWorkspace. */ -public final class KeysListByWorkspaceSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListKeysInWorkspace.json - */ - /** - * Sample code: List keys in workspace. - * - * @param manager Entry point to SynapseManager. - */ - public static void listKeysInWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.keys().listByWorkspace("ExampleResourceGroup", "ExampleWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/LibrariesOperationListByWorkspaceSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/LibrariesOperationListByWorkspaceSamples.java deleted file mode 100644 index 37969080d6038..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/LibrariesOperationListByWorkspaceSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for LibrariesOperation ListByWorkspace. */ -public final class LibrariesOperationListByWorkspaceSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/Libraries_ListByWorkspace.json - */ - /** - * Sample code: List libraries in a workspace. - * - * @param manager Entry point to SynapseManager. - */ - public static void listLibrariesInAWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.librariesOperations().listByWorkspace("exampleResourceGroup", "exampleWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/LibraryGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/LibraryGetSamples.java deleted file mode 100644 index c193fbf4b5cd1..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/LibraryGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for Library Get. */ -public final class LibraryGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/Library_Get.json - */ - /** - * Sample code: Get Library by name. - * - * @param manager Entry point to SynapseManager. - */ - public static void getLibraryByName(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .libraries() - .getWithResponse("exampleResourceGroup", "exampleLibraryName.jar", "exampleWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/OperationsCheckNameAvailabilitySamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/OperationsCheckNameAvailabilitySamples.java deleted file mode 100644 index c58f590358c0a..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/OperationsCheckNameAvailabilitySamples.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.CheckNameAvailabilityRequest; - -/** Samples for Operations CheckNameAvailability. */ -public final class OperationsCheckNameAvailabilitySamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CheckNameAvailabilityWorkspaceAlreadyExists.json - */ - /** - * Sample code: Check for a workspace name that already exists. - * - * @param manager Entry point to SynapseManager. - */ - public static void checkForAWorkspaceNameThatAlreadyExists( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .operations() - .checkNameAvailabilityWithResponse( - new CheckNameAvailabilityRequest().withName("workspace1").withType("Microsoft.Synapse/workspaces"), - Context.NONE); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CheckNameAvailabilityWorkspaceAvailable.json - */ - /** - * Sample code: Check for a workspace name that is available. - * - * @param manager Entry point to SynapseManager. - */ - public static void checkForAWorkspaceNameThatIsAvailable(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .operations() - .checkNameAvailabilityWithResponse( - new CheckNameAvailabilityRequest() - .withName("workspace1") - .withType("Microsoft.ProjectArcadia/workspaces"), - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/OperationsGetAzureAsyncHeaderResultSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/OperationsGetAzureAsyncHeaderResultSamples.java deleted file mode 100644 index 33cd54a5dc0cd..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/OperationsGetAzureAsyncHeaderResultSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for Operations GetAzureAsyncHeaderResult. */ -public final class OperationsGetAzureAsyncHeaderResultSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetAzureAsyncOperationHeader.json - */ - /** - * Sample code: Get azure async operation header result. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAzureAsyncOperationHeaderResult(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .operations() - .getAzureAsyncHeaderResultWithResponse( - "resourceGroup1", "workspace1", "01234567-89ab-4def-0123-456789abcdef", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/OperationsGetLocationHeaderResultSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/OperationsGetLocationHeaderResultSamples.java deleted file mode 100644 index a616b4d350be9..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/OperationsGetLocationHeaderResultSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for Operations GetLocationHeaderResult. */ -public final class OperationsGetLocationHeaderResultSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetLocationHeader.json - */ - /** - * Sample code: Get location header result. - * - * @param manager Entry point to SynapseManager. - */ - public static void getLocationHeaderResult(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .operations() - .getLocationHeaderResultWithResponse( - "resourceGroup1", "workspace1", "01234567-89ab-4def-0123-456789abcdef", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/OperationsListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/OperationsListSamples.java deleted file mode 100644 index 77d793bc6aa55..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/OperationsListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for Operations List. */ -public final class OperationsListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetAvailableOperations.json - */ - /** - * Sample code: Get available operations. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAvailableOperations(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.operations().listWithResponse(Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsCreateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsCreateSamples.java deleted file mode 100644 index ffb511f1f5ee8..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsCreateSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.PrivateLinkServiceConnectionState; - -/** Samples for PrivateEndpointConnections Create. */ -public final class PrivateEndpointConnectionsCreateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ApprovePrivateEndpointConnection.json - */ - /** - * Sample code: Approve private endpoint connection. - * - * @param manager Entry point to SynapseManager. - */ - public static void approvePrivateEndpointConnection(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .privateEndpointConnections() - .define("ExamplePrivateEndpointConnection") - .withExistingWorkspace("ExampleResourceGroup", "ExampleWorkspace") - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus("Approved") - .withDescription("Approved by abc@example.com")) - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsDeleteSamples.java deleted file mode 100644 index 5cd2a567d5961..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateEndpointConnections Delete. */ -public final class PrivateEndpointConnectionsDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeletePrivateEndpointConnection.json - */ - /** - * Sample code: Delete private endpoint connection. - * - * @param manager Entry point to SynapseManager. - */ - public static void deletePrivateEndpointConnection(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .privateEndpointConnections() - .delete("ExampleResourceGroup", "ExampleWorkspace", "ExamplePrivateEndpointConnection", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsGetSamples.java deleted file mode 100644 index ff7d696dde582..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateEndpointConnections Get. */ -public final class PrivateEndpointConnectionsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetPrivateEndpointConnection.json - */ - /** - * Sample code: Get private endpoint connection. - * - * @param manager Entry point to SynapseManager. - */ - public static void getPrivateEndpointConnection(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .privateEndpointConnections() - .getWithResponse( - "ExampleResourceGroup", "ExampleWorkspace", "ExamplePrivateEndpointConnection", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsListSamples.java deleted file mode 100644 index b568117f40358..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateEndpointConnections List. */ -public final class PrivateEndpointConnectionsListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListPrivateEndpointConnections.json - */ - /** - * Sample code: List private endpoint connections in workspace. - * - * @param manager Entry point to SynapseManager. - */ - public static void listPrivateEndpointConnectionsInWorkspace( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.privateEndpointConnections().list("ExampleResourceGroup", "ExampleWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsPrivateLinkHubGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsPrivateLinkHubGetSamples.java deleted file mode 100644 index 91f36c24356b4..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsPrivateLinkHubGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateEndpointConnectionsPrivateLinkHub Get. */ -public final class PrivateEndpointConnectionsPrivateLinkHubGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/PrivateEndpointConnectionsPrivateLinkHub_Get.json - */ - /** - * Sample code: Get a privateLinkHub. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAPrivateLinkHub(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .privateEndpointConnectionsPrivateLinkHubs() - .getWithResponse("gh-res-grp", "pe0", "pe0-f3ed30f5-338c-4855-a542-24a403694ad2", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsPrivateLinkHubListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsPrivateLinkHubListSamples.java deleted file mode 100644 index 3182b6e780dae..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsPrivateLinkHubListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateEndpointConnectionsPrivateLinkHub List. */ -public final class PrivateEndpointConnectionsPrivateLinkHubListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/PrivateEndpointConnectionsPrivateLinkHub_List.json - */ - /** - * Sample code: Get a privateLinkHub. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAPrivateLinkHub(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.privateEndpointConnectionsPrivateLinkHubs().list("gh-res-grp", "pe0", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubPrivateLinkResourcesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubPrivateLinkResourcesGetSamples.java deleted file mode 100644 index e330e4ccb6e62..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubPrivateLinkResourcesGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateLinkHubPrivateLinkResources Get. */ -public final class PrivateLinkHubPrivateLinkResourcesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetPrivateLinkHubPrivateLinkResource.json - */ - /** - * Sample code: Get private link resources for private link hub. - * - * @param manager Entry point to SynapseManager. - */ - public static void getPrivateLinkResourcesForPrivateLinkHub( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .privateLinkHubPrivateLinkResources() - .getWithResponse("ExampleResourceGroup", "ExamplePrivateLinkHub", "sql", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubPrivateLinkResourcesListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubPrivateLinkResourcesListSamples.java deleted file mode 100644 index 6cdc9cee0b8d3..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubPrivateLinkResourcesListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateLinkHubPrivateLinkResources List. */ -public final class PrivateLinkHubPrivateLinkResourcesListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListPrivateLinkHubPrivateLinkResources.json - */ - /** - * Sample code: Get private link resources for private link hub. - * - * @param manager Entry point to SynapseManager. - */ - public static void getPrivateLinkResourcesForPrivateLinkHub( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .privateLinkHubPrivateLinkResources() - .list("ExampleResourceGroup", "ExamplePrivateLinkHub", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsCreateOrUpdateSamples.java deleted file mode 100644 index fde30dd251167..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsCreateOrUpdateSamples.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import java.util.HashMap; -import java.util.Map; - -/** Samples for PrivateLinkHubs CreateOrUpdate. */ -public final class PrivateLinkHubsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdatePrivateLinkHub.json - */ - /** - * Sample code: Create or update a privateLinkHub. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateAPrivateLinkHub(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .privateLinkHubs() - .define("privateLinkHub1") - .withRegion("East US") - .withExistingResourceGroup("resourceGroup1") - .withTags(mapOf("key", "value")) - .create(); - } - - @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/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsDeleteSamples.java deleted file mode 100644 index 6611508873b10..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateLinkHubs Delete. */ -public final class PrivateLinkHubsDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeletePrivateLinkHub.json - */ - /** - * Sample code: Delete a privateLinkHub. - * - * @param manager Entry point to SynapseManager. - */ - public static void deleteAPrivateLinkHub(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.privateLinkHubs().delete("resourceGroup1", "privateLinkHub1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsGetByResourceGroupSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsGetByResourceGroupSamples.java deleted file mode 100644 index b13231e743502..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsGetByResourceGroupSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateLinkHubs GetByResourceGroup. */ -public final class PrivateLinkHubsGetByResourceGroupSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetPrivateLinkHub.json - */ - /** - * Sample code: Get a privateLinkHub. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAPrivateLinkHub(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.privateLinkHubs().getByResourceGroupWithResponse("resourceGroup1", "privateLinkHub1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsListByResourceGroupSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsListByResourceGroupSamples.java deleted file mode 100644 index c8c3bb66d74b4..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsListByResourceGroupSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateLinkHubs ListByResourceGroup. */ -public final class PrivateLinkHubsListByResourceGroupSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListPrivateLinkHubsInResourceGroup.json - */ - /** - * Sample code: List privateLinkHubs in resource group. - * - * @param manager Entry point to SynapseManager. - */ - public static void listPrivateLinkHubsInResourceGroup(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.privateLinkHubs().listByResourceGroup("resourceGroup1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsListSamples.java deleted file mode 100644 index 61c6fa7585a61..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateLinkHubs List. */ -public final class PrivateLinkHubsListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListPrivateLinkHubsInSubscription.json - */ - /** - * Sample code: List privateLinkHubs in subscription. - * - * @param manager Entry point to SynapseManager. - */ - public static void listPrivateLinkHubsInSubscription(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.privateLinkHubs().list(Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsUpdateSamples.java deleted file mode 100644 index 4c59059d278f8..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsUpdateSamples.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.PrivateLinkHub; -import java.util.HashMap; -import java.util.Map; - -/** Samples for PrivateLinkHubs Update. */ -public final class PrivateLinkHubsUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/UpdatePrivateLinkHub.json - */ - /** - * Sample code: Update a privateLinkHub. - * - * @param manager Entry point to SynapseManager. - */ - public static void updateAPrivateLinkHub(com.azure.resourcemanager.synapse.SynapseManager manager) { - PrivateLinkHub resource = - manager - .privateLinkHubs() - .getByResourceGroupWithResponse("resourceGroup1", "privateLinkHub1", Context.NONE) - .getValue(); - resource.update().withTags(mapOf("key", "value")).apply(); - } - - @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/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourcesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourcesGetSamples.java deleted file mode 100644 index 902eb040d3574..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourcesGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateLinkResources Get. */ -public final class PrivateLinkResourcesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetPrivateLinkResource.json - */ - /** - * Sample code: Get private link resources for workspace. - * - * @param manager Entry point to SynapseManager. - */ - public static void getPrivateLinkResourcesForWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.privateLinkResources().getWithResponse("ExampleResourceGroup", "ExampleWorkspace", "sql", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourcesListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourcesListSamples.java deleted file mode 100644 index 5b775f7814d5b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourcesListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateLinkResources List. */ -public final class PrivateLinkResourcesListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListPrivateLinkResources.json - */ - /** - * Sample code: Get private link resources for workspace. - * - * @param manager Entry point to SynapseManager. - */ - public static void getPrivateLinkResourcesForWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.privateLinkResources().list("ExampleResourceGroup", "ExampleWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/RestorableDroppedSqlPoolsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/RestorableDroppedSqlPoolsGetSamples.java deleted file mode 100644 index 50f027c1ad386..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/RestorableDroppedSqlPoolsGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for RestorableDroppedSqlPools Get. */ -public final class RestorableDroppedSqlPoolsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/RestorableDroppedSqlPoolGet.json - */ - /** - * Sample code: Get a restorable dropped Sql pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getARestorableDroppedSqlPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .restorableDroppedSqlPools() - .getWithResponse( - "restorabledroppeddatabasetest-1257", - "restorabledroppeddatabasetest-2389", - "restorabledroppeddatabasetest-7654,131403269876900000", - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/RestorableDroppedSqlPoolsListByWorkspaceSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/RestorableDroppedSqlPoolsListByWorkspaceSamples.java deleted file mode 100644 index fde32bdc2aaed..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/RestorableDroppedSqlPoolsListByWorkspaceSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for RestorableDroppedSqlPools ListByWorkspace. */ -public final class RestorableDroppedSqlPoolsListByWorkspaceSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/RestorableDroppedSqlpoolList.json - */ - /** - * Sample code: Get list of restorable dropped Sql pools. - * - * @param manager Entry point to SynapseManager. - */ - public static void getListOfRestorableDroppedSqlPools(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .restorableDroppedSqlPools() - .listByWorkspace("restorabledroppeddatabasetest-1349", "restorabledroppeddatabasetest-1840", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SparkConfigurationGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SparkConfigurationGetSamples.java deleted file mode 100644 index 474fc4b4e5858..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SparkConfigurationGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SparkConfiguration Get. */ -public final class SparkConfigurationGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/SparkConfiguration_Get.json - */ - /** - * Sample code: Get SparkConfiguration by name. - * - * @param manager Entry point to SynapseManager. - */ - public static void getSparkConfigurationByName(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sparkConfigurations() - .getWithResponse("exampleResourceGroup", "exampleSparkConfigurationName", "exampleWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SparkConfigurationsOperationListByWorkspaceSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SparkConfigurationsOperationListByWorkspaceSamples.java deleted file mode 100644 index 2e9279617c8f7..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SparkConfigurationsOperationListByWorkspaceSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SparkConfigurationsOperation ListByWorkspace. */ -public final class SparkConfigurationsOperationListByWorkspaceSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/SparkConfigurations_ListByWorkspace.json - */ - /** - * Sample code: List sparkConfigurations in a workspace. - * - * @param manager Entry point to SynapseManager. - */ - public static void listSparkConfigurationsInAWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sparkConfigurationsOperations() - .listByWorkspace("exampleResourceGroup", "exampleWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolBlobAuditingPoliciesCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolBlobAuditingPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index 29ff012fcf373..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolBlobAuditingPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.BlobAuditingPolicyState; -import java.util.Arrays; -import java.util.UUID; - -/** Samples for SqlPoolBlobAuditingPolicies CreateOrUpdate. */ -public final class SqlPoolBlobAuditingPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolBlobAuditingWithAllParameters.json - */ - /** - * Sample code: Create or update a database's blob auditing policy with all parameters. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateADatabaseSBlobAuditingPolicyWithAllParameters( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolBlobAuditingPolicies() - .define() - .withExistingSqlPool("blobauditingtest-4799", "blobauditingtest-6440", "testdb") - .withState(BlobAuditingPolicyState.ENABLED) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey( - "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==") - .withRetentionDays(6) - .withAuditActionsAndGroups( - Arrays - .asList( - "DATABASE_LOGOUT_GROUP", - "DATABASE_ROLE_MEMBER_CHANGE_GROUP", - "UPDATE on database::TestDatabaseName by public")) - .withStorageAccountSubscriptionId(UUID.fromString("00000000-1234-0000-5678-000000000000")) - .withIsStorageSecondaryKeyInUse(false) - .withIsAzureMonitorTargetEnabled(true) - .create(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolBlobAuditingWithMinParameters.json - */ - /** - * Sample code: Create or update a database's blob auditing policy with minimal parameters. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateADatabaseSBlobAuditingPolicyWithMinimalParameters( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolBlobAuditingPolicies() - .define() - .withExistingSqlPool("blobauditingtest-4799", "blobauditingtest-6440", "testdb") - .withState(BlobAuditingPolicyState.ENABLED) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey( - "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==") - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolBlobAuditingPoliciesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolBlobAuditingPoliciesGetSamples.java deleted file mode 100644 index 681a3e6c6798f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolBlobAuditingPoliciesGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolBlobAuditingPolicies Get. */ -public final class SqlPoolBlobAuditingPoliciesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolBlobAuditing.json - */ - /** - * Sample code: Get blob auditing policy of a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getBlobAuditingPolicyOfASQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolBlobAuditingPolicies() - .getWithResponse("blobauditingtest-6852", "blobauditingtest-2080", "testdb", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolBlobAuditingPoliciesListBySqlPoolSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolBlobAuditingPoliciesListBySqlPoolSamples.java deleted file mode 100644 index 600a49d0ac5b0..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolBlobAuditingPoliciesListBySqlPoolSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolBlobAuditingPolicies ListBySqlPool. */ -public final class SqlPoolBlobAuditingPoliciesListBySqlPoolSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolAuditingSettingsList.json - */ - /** - * Sample code: List audit settings of a database. - * - * @param manager Entry point to SynapseManager. - */ - public static void listAuditSettingsOfADatabase(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolBlobAuditingPolicies() - .listBySqlPool("blobauditingtest-6852", "blobauditingtest-2080", "testdb", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolColumnsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolColumnsGetSamples.java deleted file mode 100644 index 3f08d0f7e4754..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolColumnsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolColumns Get. */ -public final class SqlPoolColumnsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolColumnGet.json - */ - /** - * Sample code: Get database column. - * - * @param manager Entry point to SynapseManager. - */ - public static void getDatabaseColumn(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolColumns() - .getWithResponse("myRG", "serverName", "myDatabase", "dbo", "table1", "column1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolConnectionPoliciesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolConnectionPoliciesGetSamples.java deleted file mode 100644 index ee735800c2ce0..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolConnectionPoliciesGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.ConnectionPolicyName; - -/** Samples for SqlPoolConnectionPolicies Get. */ -public final class SqlPoolConnectionPoliciesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolConnectionPolicy.json - */ - /** - * Sample code: Get a connection policy of a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAConnectionPolicyOfASQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolConnectionPolicies() - .getWithResponse( - "blobauditingtest-6852", "blobauditingtest-2080", "testdb", ConnectionPolicyName.DEFAULT, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolDataWarehouseUserActivitiesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolDataWarehouseUserActivitiesGetSamples.java deleted file mode 100644 index 285148bc569a4..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolDataWarehouseUserActivitiesGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.DataWarehouseUserActivityName; - -/** Samples for SqlPoolDataWarehouseUserActivities Get. */ -public final class SqlPoolDataWarehouseUserActivitiesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolUserActivity.json - */ - /** - * Sample code: Get a SQL Analytics pool user activity. - * - * @param manager Entry point to SynapseManager. - */ - public static void getASQLAnalyticsPoolUserActivity(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolDataWarehouseUserActivities() - .getWithResponse( - "Default-SQL-SouthEastAsia", "testsvr", "testdb", DataWarehouseUserActivityName.CURRENT, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolGeoBackupPoliciesCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolGeoBackupPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index 7ef296d0740d1..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolGeoBackupPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.GeoBackupPolicyName; -import com.azure.resourcemanager.synapse.models.GeoBackupPolicyState; - -/** Samples for SqlPoolGeoBackupPolicies CreateOrUpdate. */ -public final class SqlPoolGeoBackupPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateGeoBackupPolicies.json - */ - /** - * Sample code: Create geo backup policy. - * - * @param manager Entry point to SynapseManager. - */ - public static void createGeoBackupPolicy(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolGeoBackupPolicies() - .define(GeoBackupPolicyName.DEFAULT) - .withExistingSqlPool("testrg", "testws", "testdw") - .withState(GeoBackupPolicyState.ENABLED) - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolGeoBackupPoliciesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolGeoBackupPoliciesGetSamples.java deleted file mode 100644 index 191b63a8b07f9..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolGeoBackupPoliciesGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.GeoBackupPolicyName; - -/** Samples for SqlPoolGeoBackupPolicies Get. */ -public final class SqlPoolGeoBackupPoliciesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolGeoBackupPolicy.json - */ - /** - * Sample code: Get Sql pool geo backup policy. - * - * @param manager Entry point to SynapseManager. - */ - public static void getSqlPoolGeoBackupPolicy(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolGeoBackupPolicies() - .getWithResponse( - "sqlcrudtest-4799", "sqlcrudtest-5961", "testdw", GeoBackupPolicyName.DEFAULT, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolGeoBackupPoliciesListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolGeoBackupPoliciesListSamples.java deleted file mode 100644 index 0158577e1f98e..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolGeoBackupPoliciesListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolGeoBackupPolicies List. */ -public final class SqlPoolGeoBackupPoliciesListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolGeoBackupPolicies_List.json - */ - /** - * Sample code: Get Sql pool geo backup policy. - * - * @param manager Entry point to SynapseManager. - */ - public static void getSqlPoolGeoBackupPolicy(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPoolGeoBackupPolicies().list("sqlcrudtest-4799", "sqlcrudtest-5961", "testdw", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMaintenanceWindowOptionsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMaintenanceWindowOptionsGetSamples.java deleted file mode 100644 index ab9c45160cbe0..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMaintenanceWindowOptionsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolMaintenanceWindowOptions Get. */ -public final class SqlPoolMaintenanceWindowOptionsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetMaintenanceWindowOptions.json - */ - /** - * Sample code: Get list of transparent data encryption configurations of a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getListOfTransparentDataEncryptionConfigurationsOfASQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolMaintenanceWindowOptions() - .getWithResponse("samplerg", "testworkspace", "testsp", "current", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMaintenanceWindowsCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMaintenanceWindowsCreateOrUpdateSamples.java deleted file mode 100644 index 2934921d37005..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMaintenanceWindowsCreateOrUpdateSamples.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.fluent.models.MaintenanceWindowsInner; -import com.azure.resourcemanager.synapse.models.DayOfWeek; -import com.azure.resourcemanager.synapse.models.MaintenanceWindowTimeRange; -import java.util.Arrays; - -/** Samples for SqlPoolMaintenanceWindows CreateOrUpdate. */ -public final class SqlPoolMaintenanceWindowsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateMaintenanceWindows.json - */ - /** - * Sample code: Sets maintenance window settings for a selected SQL Analytics Pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void setsMaintenanceWindowSettingsForASelectedSQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolMaintenanceWindows() - .createOrUpdateWithResponse( - "samplerg", - "testworkspace", - "testsp", - "current", - new MaintenanceWindowsInner() - .withTimeRanges( - Arrays - .asList( - new MaintenanceWindowTimeRange() - .withDayOfWeek(DayOfWeek.SATURDAY) - .withStartTime("00:00:00") - .withDuration("PT60M"))), - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMaintenanceWindowsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMaintenanceWindowsGetSamples.java deleted file mode 100644 index cc4c43c68f937..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMaintenanceWindowsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolMaintenanceWindows Get. */ -public final class SqlPoolMaintenanceWindowsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetMaintenanceWindows.json - */ - /** - * Sample code: Gets maintenance window settings for a selected SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getsMaintenanceWindowSettingsForASelectedSQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolMaintenanceWindows() - .getWithResponse("samplerg", "testworkspace", "testsp", "current", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMetadataSyncConfigsCreateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMetadataSyncConfigsCreateSamples.java deleted file mode 100644 index 4a6e463a9d9b4..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMetadataSyncConfigsCreateSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.fluent.models.MetadataSyncConfigInner; - -/** Samples for SqlPoolMetadataSyncConfigs Create. */ -public final class SqlPoolMetadataSyncConfigsCreateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateSqlPoolMetadataSyncConfig.json - */ - /** - * Sample code: Set metadata sync config for a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void setMetadataSyncConfigForASQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolMetadataSyncConfigs() - .createWithResponse( - "ExampleResourceGroup", - "ExampleWorkspace", - "ExampleSqlPool", - new MetadataSyncConfigInner().withEnabled(true), - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMetadataSyncConfigsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMetadataSyncConfigsGetSamples.java deleted file mode 100644 index b0318f6b52f82..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMetadataSyncConfigsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolMetadataSyncConfigs Get. */ -public final class SqlPoolMetadataSyncConfigsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolMetadataSyncConfig.json - */ - /** - * Sample code: Get metadata sync config for a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getMetadataSyncConfigForASQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolMetadataSyncConfigs() - .getWithResponse("ExampleResourceGroup", "ExampleWorkspace", "ExampleSqlPool", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolOperationResultsGetLocationHeaderResultSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolOperationResultsGetLocationHeaderResultSamples.java deleted file mode 100644 index 9ba07e4fa934c..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolOperationResultsGetLocationHeaderResultSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolOperationResults GetLocationHeaderResult. */ -public final class SqlPoolOperationResultsGetLocationHeaderResultSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetLocationHeaderResultWithSqlPool.json - */ - /** - * Sample code: Get the result of an operation on a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getTheResultOfAnOperationOnASQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolOperationResults() - .getLocationHeaderResultWithResponse( - "ExampleResourceGroup", - "ExampleWorkspace", - "ExampleSqlPool", - "fedcba98-7654-4210-fedc-ba9876543210", - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolOperationsListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolOperationsListSamples.java deleted file mode 100644 index 17a78d272b1ec..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolOperationsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolOperations List. */ -public final class SqlPoolOperationsListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolOperations.json - */ - /** - * Sample code: List the Sql Analytics pool management operations. - * - * @param manager Entry point to SynapseManager. - */ - public static void listTheSqlAnalyticsPoolManagementOperations( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPoolOperations().list("sqlcrudtest-7398", "sqlcrudtest-4645", "testdb", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRecommendedSensitivityLabelsUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRecommendedSensitivityLabelsUpdateSamples.java deleted file mode 100644 index e7e4c793d3d94..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRecommendedSensitivityLabelsUpdateSamples.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.RecommendedSensitivityLabelUpdate; -import com.azure.resourcemanager.synapse.models.RecommendedSensitivityLabelUpdateKind; -import com.azure.resourcemanager.synapse.models.RecommendedSensitivityLabelUpdateList; -import java.util.Arrays; - -/** Samples for SqlPoolRecommendedSensitivityLabels Update. */ -public final class SqlPoolRecommendedSensitivityLabelsUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SensitivityLabelsRecommendedUpdate.json - */ - /** - * Sample code: Update recommended sensitivity labels of a given SQL Pool using an operations batch. - * - * @param manager Entry point to SynapseManager. - */ - public static void updateRecommendedSensitivityLabelsOfAGivenSQLPoolUsingAnOperationsBatch( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolRecommendedSensitivityLabels() - .updateWithResponse( - "myRG", - "myWorkspace", - "mySqlPool", - new RecommendedSensitivityLabelUpdateList() - .withOperations( - Arrays - .asList( - new RecommendedSensitivityLabelUpdate() - .withOp(RecommendedSensitivityLabelUpdateKind.ENABLE) - .withSchema("dbo") - .withTable("table1") - .withColumn("column1"), - new RecommendedSensitivityLabelUpdate() - .withOp(RecommendedSensitivityLabelUpdateKind.ENABLE) - .withSchema("dbo") - .withTable("table2") - .withColumn("column2"), - new RecommendedSensitivityLabelUpdate() - .withOp(RecommendedSensitivityLabelUpdateKind.DISABLE) - .withSchema("dbo") - .withTable("table1") - .withColumn("column3"))), - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolReplicationLinksGetByNameSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolReplicationLinksGetByNameSamples.java deleted file mode 100644 index 2f88eb23e2237..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolReplicationLinksGetByNameSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolReplicationLinks GetByName. */ -public final class SqlPoolReplicationLinksGetByNameSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolReplicationLinks_GetByName.json - */ - /** - * Sample code: Lists a Sql Analytic pool's replication links. - * - * @param manager Entry point to SynapseManager. - */ - public static void listsASqlAnalyticPoolSReplicationLinks( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolReplicationLinks() - .getByNameWithResponse( - "sqlcrudtest-4799", "sqlcrudtest-6440", "testdb", "5b301b68-03f6-4b26-b0f4-73ebb8634238", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolReplicationLinksListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolReplicationLinksListSamples.java deleted file mode 100644 index 04103f4793b7e..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolReplicationLinksListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolReplicationLinks List. */ -public final class SqlPoolReplicationLinksListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolReplicationLinks.json - */ - /** - * Sample code: Lists a Sql Analytic pool's replication links. - * - * @param manager Entry point to SynapseManager. - */ - public static void listsASqlAnalyticPoolSReplicationLinks( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPoolReplicationLinks().list("sqlcrudtest-4799", "sqlcrudtest-6440", "testdb", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsCreateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsCreateSamples.java deleted file mode 100644 index ee630b2c4004f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsCreateSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.CreateSqlPoolRestorePointDefinition; - -/** Samples for SqlPoolRestorePoints Create. */ -public final class SqlPoolRestorePointsCreateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateSqlPoolRestorePoints.json - */ - /** - * Sample code: Creates Sql pool restore point. - * - * @param manager Entry point to SynapseManager. - */ - public static void createsSqlPoolRestorePoint(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolRestorePoints() - .create( - "Default-SQL-SouthEastAsia", - "testserver", - "testDatabase", - new CreateSqlPoolRestorePointDefinition().withRestorePointLabel("mylabel"), - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsDeleteSamples.java deleted file mode 100644 index d35525978858f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolRestorePoints Delete. */ -public final class SqlPoolRestorePointsDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolRestorePointsDelete.json - */ - /** - * Sample code: Deletes a restore point. - * - * @param manager Entry point to SynapseManager. - */ - public static void deletesARestorePoint(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolRestorePoints() - .deleteWithResponse("Default-SQL-SouthEastAsia", "testws", "testpool", "131546477590000000", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsGetSamples.java deleted file mode 100644 index bc4644b53e349..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolRestorePoints Get. */ -public final class SqlPoolRestorePointsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolRestorePointsGet.json - */ - /** - * Sample code: Gets a Sql pool restore point. - * - * @param manager Entry point to SynapseManager. - */ - public static void getsASqlPoolRestorePoint(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolRestorePoints() - .getWithResponse("Default-SQL-SouthEastAsia", "testws", "testpool", "131546477590000000", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsListSamples.java deleted file mode 100644 index 5cc68531f7350..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolRestorePoints List. */ -public final class SqlPoolRestorePointsListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolRestorePoints.json - */ - /** - * Sample code: Get a list of restore points of a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAListOfRestorePointsOfASQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPoolRestorePoints().list("Default-SQL-SouthEastAsia", "testserver", "testDatabase", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSchemasGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSchemasGetSamples.java deleted file mode 100644 index c7273f56c5719..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSchemasGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolSchemas Get. */ -public final class SqlPoolSchemasGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolSchemaGet.json - */ - /** - * Sample code: Get database schema. - * - * @param manager Entry point to SynapseManager. - */ - public static void getDatabaseSchema(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPoolSchemas().getWithResponse("myRG", "serverName", "myDatabase", "dbo", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSchemasListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSchemasListSamples.java deleted file mode 100644 index 558e792273287..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSchemasListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolSchemas List. */ -public final class SqlPoolSchemasListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolSchema.json - */ - /** - * Sample code: List the schema in a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void listTheSchemaInASQLAnalyticsPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPoolSchemas().list("myRG", "serverName", "myDatabase", null, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSecurityAlertPoliciesCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSecurityAlertPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index 65ba1e898cad2..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSecurityAlertPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.SecurityAlertPolicyName; -import com.azure.resourcemanager.synapse.models.SecurityAlertPolicyState; -import com.azure.resourcemanager.synapse.models.SqlPoolSecurityAlertPolicy; -import java.util.Arrays; - -/** Samples for SqlPoolSecurityAlertPolicies CreateOrUpdate. */ -public final class SqlPoolSecurityAlertPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolSecurityAlertWithAllParameters.json - */ - /** - * Sample code: Update a Sql pool's threat detection policy with all parameters. - * - * @param manager Entry point to SynapseManager. - */ - public static void updateASqlPoolSThreatDetectionPolicyWithAllParameters( - com.azure.resourcemanager.synapse.SynapseManager manager) { - SqlPoolSecurityAlertPolicy resource = - manager - .sqlPoolSecurityAlertPolicies() - .getWithResponse( - "securityalert-4799", "securityalert-6440", "testdb", SecurityAlertPolicyName.DEFAULT, Context.NONE) - .getValue(); - resource - .update() - .withState(SecurityAlertPolicyState.ENABLED) - .withDisabledAlerts(Arrays.asList("Sql_Injection", "Usage_Anomaly")) - .withEmailAddresses(Arrays.asList("test@microsoft.com", "user@microsoft.com")) - .withEmailAccountAdmins(true) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey( - "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==") - .withRetentionDays(6) - .apply(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolSecurityAlertWithMinParameters.json - */ - /** - * Sample code: Update a Sql pool's threat detection policy with minimal parameters. - * - * @param manager Entry point to SynapseManager. - */ - public static void updateASqlPoolSThreatDetectionPolicyWithMinimalParameters( - com.azure.resourcemanager.synapse.SynapseManager manager) { - SqlPoolSecurityAlertPolicy resource = - manager - .sqlPoolSecurityAlertPolicies() - .getWithResponse( - "securityalert-4799", "securityalert-6440", "testdb", SecurityAlertPolicyName.DEFAULT, Context.NONE) - .getValue(); - resource.update().withState(SecurityAlertPolicyState.ENABLED).apply(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSecurityAlertPoliciesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSecurityAlertPoliciesGetSamples.java deleted file mode 100644 index 153d68a60cf63..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSecurityAlertPoliciesGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.SecurityAlertPolicyName; - -/** Samples for SqlPoolSecurityAlertPolicies Get. */ -public final class SqlPoolSecurityAlertPoliciesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolSecurityAlert.json - */ - /** - * Sample code: Get a security alert of a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getASecurityAlertOfASQLAnalyticsPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolSecurityAlertPolicies() - .getWithResponse( - "securityalert-6852", "securityalert-2080", "testdb", SecurityAlertPolicyName.DEFAULT, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSecurityAlertPoliciesListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSecurityAlertPoliciesListSamples.java deleted file mode 100644 index 4292aed408385..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSecurityAlertPoliciesListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolSecurityAlertPolicies List. */ -public final class SqlPoolSecurityAlertPoliciesListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolSecurityAlertPolicies_List.json - */ - /** - * Sample code: Get a security alert of a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getASecurityAlertOfASQLAnalyticsPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPoolSecurityAlertPolicies().list("securityalert-6852", "securityalert-2080", "testdb", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsDeleteSamples.java deleted file mode 100644 index 5f78c400d9b72..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolSensitivityLabels Delete. */ -public final class SqlPoolSensitivityLabelsDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteSqlPoolColumnSensitivityLabel.json - */ - /** - * Sample code: Deletes the sensitivity label of a given column. - * - * @param manager Entry point to SynapseManager. - */ - public static void deletesTheSensitivityLabelOfAGivenColumn( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolSensitivityLabels() - .deleteWithResponse("myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsDisableRecommendationSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsDisableRecommendationSamples.java deleted file mode 100644 index afc6b8402f9cc..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsDisableRecommendationSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolSensitivityLabels DisableRecommendation. */ -public final class SqlPoolSensitivityLabelsDisableRecommendationSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/RecommendedColumnSensitivityLabelDisable.json - */ - /** - * Sample code: Disables sensitivity recommendations on a given column. - * - * @param manager Entry point to SynapseManager. - */ - public static void disablesSensitivityRecommendationsOnAGivenColumn( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolSensitivityLabels() - .disableRecommendationWithResponse( - "myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsEnableRecommendationSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsEnableRecommendationSamples.java deleted file mode 100644 index b2701d7f5b880..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsEnableRecommendationSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolSensitivityLabels EnableRecommendation. */ -public final class SqlPoolSensitivityLabelsEnableRecommendationSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/RecommendedColumnSensitivityLabelEnable.json - */ - /** - * Sample code: Enables sensitivity recommendations on a given column. - * - * @param manager Entry point to SynapseManager. - */ - public static void enablesSensitivityRecommendationsOnAGivenColumn( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolSensitivityLabels() - .enableRecommendationWithResponse( - "myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsGetSamples.java deleted file mode 100644 index 4559e05181d9a..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsGetSamples.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.SensitivityLabelSource; - -/** Samples for SqlPoolSensitivityLabels Get. */ -public final class SqlPoolSensitivityLabelsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolColumnSensitivityLabelGet.json - */ - /** - * Sample code: Gets the sensitivity label of a given column. - * - * @param manager Entry point to SynapseManager. - */ - public static void getsTheSensitivityLabelOfAGivenColumn(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolSensitivityLabels() - .getWithResponse( - "myRG", - "myServer", - "myDatabase", - "dbo", - "myTable", - "myColumn", - SensitivityLabelSource.CURRENT, - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsListCurrentSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsListCurrentSamples.java deleted file mode 100644 index 2e9f6d1d0f3f3..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsListCurrentSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolSensitivityLabels ListCurrent. */ -public final class SqlPoolSensitivityLabelsListCurrentSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolsSensitivityLabelsWithSourceCurrent.json - */ - /** - * Sample code: Gets the current sensitivity labels of a given SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getsTheCurrentSensitivityLabelsOfAGivenSQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPoolSensitivityLabels().listCurrent("myRG", "myServer", "myDatabase", null, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsListRecommendedSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsListRecommendedSamples.java deleted file mode 100644 index 16a16f8cd1e33..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsListRecommendedSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolSensitivityLabels ListRecommended. */ -public final class SqlPoolSensitivityLabelsListRecommendedSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolSensitivityLabelsWithSourceRecommended.json - */ - /** - * Sample code: Gets the recommended sensitivity labels of a given SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getsTheRecommendedSensitivityLabelsOfAGivenSQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolSensitivityLabels() - .listRecommended("myRG", "myServer", "myDatabase", null, null, null, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsUpdateSamples.java deleted file mode 100644 index a6b84cefc7e50..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsUpdateSamples.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.fluent.models.SensitivityLabelInner; -import com.azure.resourcemanager.synapse.fluent.models.SensitivityLabelUpdateInner; -import com.azure.resourcemanager.synapse.models.SensitivityLabelRank; -import com.azure.resourcemanager.synapse.models.SensitivityLabelUpdateKind; -import com.azure.resourcemanager.synapse.models.SensitivityLabelUpdateList; -import java.util.Arrays; - -/** Samples for SqlPoolSensitivityLabels Update. */ -public final class SqlPoolSensitivityLabelsUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SensitivityLabelsCurrentUpdate.json - */ - /** - * Sample code: Update sensitivity labels of a given database using an operations batch. - * - * @param manager Entry point to SynapseManager. - */ - public static void updateSensitivityLabelsOfAGivenDatabaseUsingAnOperationsBatch( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolSensitivityLabels() - .updateWithResponse( - "myRG", - "myWorkspace", - "mySqlPool", - new SensitivityLabelUpdateList() - .withOperations( - Arrays - .asList( - new SensitivityLabelUpdateInner() - .withOp(SensitivityLabelUpdateKind.SET) - .withSchema("dbo") - .withTable("table1") - .withColumn("column1") - .withSensitivityLabel( - new SensitivityLabelInner() - .withLabelName("Highly Confidential") - .withLabelId("3A477B16-9423-432B-AA97-6069B481CEC3") - .withInformationType("Financial") - .withInformationTypeId("1D3652D6-422C-4115-82F1-65DAEBC665C8") - .withRank(SensitivityLabelRank.LOW)), - new SensitivityLabelUpdateInner() - .withOp(SensitivityLabelUpdateKind.SET) - .withSchema("dbo") - .withTable("table2") - .withColumn("column2") - .withSensitivityLabel( - new SensitivityLabelInner() - .withLabelName("PII") - .withLabelId("bf91e08c-f4f0-478a-b016-25164b2a65ff") - .withInformationType("PhoneNumber") - .withInformationTypeId("d22fa6e9-5ee4-3bde-4c2b-a409604c4646") - .withRank(SensitivityLabelRank.CRITICAL)), - new SensitivityLabelUpdateInner() - .withOp(SensitivityLabelUpdateKind.REMOVE) - .withSchema("dbo") - .withTable("Table1") - .withColumn("Column3"))), - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTableColumnsListByTableNameSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTableColumnsListByTableNameSamples.java deleted file mode 100644 index 3d0f13eecaf12..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTableColumnsListByTableNameSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolTableColumns ListByTableName. */ -public final class SqlPoolTableColumnsListByTableNameSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolColumns.json - */ - /** - * Sample code: List the columns in a table of a given schema in a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void listTheColumnsInATableOfAGivenSchemaInASQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolTableColumns() - .listByTableName("myRG", "serverName", "myDatabase", "dbo", "table1", null, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTablesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTablesGetSamples.java deleted file mode 100644 index 24471d7672408..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTablesGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolTables Get. */ -public final class SqlPoolTablesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolTableGet.json - */ - /** - * Sample code: Get database table. - * - * @param manager Entry point to SynapseManager. - */ - public static void getDatabaseTable(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPoolTables().getWithResponse("myRG", "serverName", "myDatabase", "dbo", "table1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTablesListBySchemaSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTablesListBySchemaSamples.java deleted file mode 100644 index 5619b10e2a978..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTablesListBySchemaSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolTables ListBySchema. */ -public final class SqlPoolTablesListBySchemaSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolTables.json - */ - /** - * Sample code: List the tables of a given schema in a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void listTheTablesOfAGivenSchemaInASQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPoolTables().listBySchema("myRG", "serverName", "myDatabase", "dbo", null, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTransparentDataEncryptionsCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTransparentDataEncryptionsCreateOrUpdateSamples.java deleted file mode 100644 index 086e6ddb41090..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTransparentDataEncryptionsCreateOrUpdateSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.TransparentDataEncryptionName; -import com.azure.resourcemanager.synapse.models.TransparentDataEncryptionStatus; - -/** Samples for SqlPoolTransparentDataEncryptions CreateOrUpdate. */ -public final class SqlPoolTransparentDataEncryptionsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolTransparentDataEncryption.json - */ - /** - * Sample code: Create or update a Sql pool's transparent data encryption configuration. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateASqlPoolSTransparentDataEncryptionConfiguration( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolTransparentDataEncryptions() - .define(TransparentDataEncryptionName.CURRENT) - .withExistingSqlPool("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187") - .withStatus(TransparentDataEncryptionStatus.ENABLED) - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTransparentDataEncryptionsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTransparentDataEncryptionsGetSamples.java deleted file mode 100644 index dcc3659ba2d0f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTransparentDataEncryptionsGetSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.TransparentDataEncryptionName; - -/** Samples for SqlPoolTransparentDataEncryptions Get. */ -public final class SqlPoolTransparentDataEncryptionsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolTransparentDataEncryption.json - */ - /** - * Sample code: Get transparent data encryption configuration of a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getTransparentDataEncryptionConfigurationOfASQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolTransparentDataEncryptions() - .getWithResponse( - "sqlcrudtest-6852", - "sqlcrudtest-2080", - "sqlcrudtest-9187", - TransparentDataEncryptionName.CURRENT, - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTransparentDataEncryptionsListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTransparentDataEncryptionsListSamples.java deleted file mode 100644 index b4ddb467bb1c1..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTransparentDataEncryptionsListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolTransparentDataEncryptions List. */ -public final class SqlPoolTransparentDataEncryptionsListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolTransparentDataEncryptionList.json - */ - /** - * Sample code: Get list of transparent data encryption configurations of a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getListOfTransparentDataEncryptionConfigurationsOfASQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolTransparentDataEncryptions() - .list("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolUsagesListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolUsagesListSamples.java deleted file mode 100644 index 67652e794cf9a..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolUsagesListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolUsages List. */ -public final class SqlPoolUsagesListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolUsageMetricsList.json - */ - /** - * Sample code: List the usages of a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void listTheUsagesOfASQLAnalyticsPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPoolUsages().list("sqlcrudtest-6730", "sqlcrudtest-9007", "3481", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples.java deleted file mode 100644 index 7b3ec14452529..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.SqlPoolVulnerabilityAssessmentRuleBaselineItem; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentPolicyBaselineName; -import java.util.Arrays; - -/** Samples for SqlPoolVulnerabilityAssessmentRuleBaselines CreateOrUpdate. */ -public final class SqlPoolVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolVulnerabilityAssessmentRuleBaseline.json - */ - /** - * Sample code: Creates or updates a database's vulnerability assessment rule baseline. - * - * @param manager Entry point to SynapseManager. - */ - public static void createsOrUpdatesADatabaseSVulnerabilityAssessmentRuleBaseline( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolVulnerabilityAssessmentRuleBaselines() - .define(VulnerabilityAssessmentPolicyBaselineName.DEFAULT) - .withExistingRule( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - "VA1001") - .withBaselineResults( - Arrays - .asList( - new SqlPoolVulnerabilityAssessmentRuleBaselineItem() - .withResult(Arrays.asList("userA", "SELECT")), - new SqlPoolVulnerabilityAssessmentRuleBaselineItem() - .withResult(Arrays.asList("userB", "SELECT")), - new SqlPoolVulnerabilityAssessmentRuleBaselineItem() - .withResult(Arrays.asList("userC", "SELECT", "tableId_4")))) - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinesDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinesDeleteSamples.java deleted file mode 100644 index c3668bb6bea52..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinesDeleteSamples.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentPolicyBaselineName; - -/** Samples for SqlPoolVulnerabilityAssessmentRuleBaselines Delete. */ -public final class SqlPoolVulnerabilityAssessmentRuleBaselinesDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteSqlPoolVulnerabilityAssessmentRuleBaseline.json - */ - /** - * Sample code: Removes a database's vulnerability assessment rule baseline. - * - * @param manager Entry point to SynapseManager. - */ - public static void removesADatabaseSVulnerabilityAssessmentRuleBaseline( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolVulnerabilityAssessmentRuleBaselines() - .deleteWithResponse( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - "VA1001", - VulnerabilityAssessmentPolicyBaselineName.DEFAULT, - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinesGetSamples.java deleted file mode 100644 index 407e013757f78..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinesGetSamples.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentPolicyBaselineName; - -/** Samples for SqlPoolVulnerabilityAssessmentRuleBaselines Get. */ -public final class SqlPoolVulnerabilityAssessmentRuleBaselinesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolVulnerabilityAssessmentRuleBaselineGet.json - */ - /** - * Sample code: Gets a Sql pool's vulnerability assessment rule baseline. - * - * @param manager Entry point to SynapseManager. - */ - public static void getsASqlPoolSVulnerabilityAssessmentRuleBaseline( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolVulnerabilityAssessmentRuleBaselines() - .getWithResponse( - "vulnerabilityaseessmenttest-4711", - "vulnerabilityaseessmenttest-6411", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - "VA1001", - VulnerabilityAssessmentPolicyBaselineName.MASTER, - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansExportSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansExportSamples.java deleted file mode 100644 index e2d9da6409eb9..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansExportSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; - -/** Samples for SqlPoolVulnerabilityAssessmentScans Export. */ -public final class SqlPoolVulnerabilityAssessmentScansExportSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ExportSqlPoolVulnerabilityAssessmentScan.json - */ - /** - * Sample code: Export a database's vulnerability assessment scan results. - * - * @param manager Entry point to SynapseManager. - */ - public static void exportADatabaseSVulnerabilityAssessmentScanResults( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolVulnerabilityAssessmentScans() - .exportWithResponse( - "vulnerabilityassessmenttest-4799", - "vulnerabilityassessmenttest-6440", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - "scan001", - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansGetSamples.java deleted file mode 100644 index 11636f46bf958..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansGetSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; - -/** Samples for SqlPoolVulnerabilityAssessmentScans Get. */ -public final class SqlPoolVulnerabilityAssessmentScansGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolVulnerabilityAssessmentScanRecordsGet.json - */ - /** - * Sample code: Gets a database vulnerability assessment scan record by scan ID. - * - * @param manager Entry point to SynapseManager. - */ - public static void getsADatabaseVulnerabilityAssessmentScanRecordByScanID( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolVulnerabilityAssessmentScans() - .getWithResponse( - "vulnerabilityassessmenttest-4711", - "vulnerabilityassessmenttest-6411", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - "scan001", - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansInitiateScanSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansInitiateScanSamples.java deleted file mode 100644 index 1d12a89e192fd..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansInitiateScanSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; - -/** Samples for SqlPoolVulnerabilityAssessmentScans InitiateScan. */ -public final class SqlPoolVulnerabilityAssessmentScansInitiateScanSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ExecuteSqlPoolVulnerabilityAssessmentScans.json - */ - /** - * Sample code: Executes a Sql pool's vulnerability assessment scan. - * - * @param manager Entry point to SynapseManager. - */ - public static void executesASqlPoolSVulnerabilityAssessmentScan( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolVulnerabilityAssessmentScans() - .initiateScan( - "vulnerabilityassessmenttest-4711", - "vulnerabilityassessmenttest-6411", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - "scan01", - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansListSamples.java deleted file mode 100644 index 46170692218da..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansListSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; - -/** Samples for SqlPoolVulnerabilityAssessmentScans List. */ -public final class SqlPoolVulnerabilityAssessmentScansListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolVulnerabilityAssessmentScanRecords.json - */ - /** - * Sample code: Get a vulnerability scan record of a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAVulnerabilityScanRecordOfASQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolVulnerabilityAssessmentScans() - .list( - "vulnerabilityassessmenttest-4711", - "vulnerabilityassessmenttest-6411", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsCreateOrUpdateSamples.java deleted file mode 100644 index 7d2140060b96d..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsCreateOrUpdateSamples.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentRecurringScansProperties; -import java.util.Arrays; - -/** Samples for SqlPoolVulnerabilityAssessments CreateOrUpdate. */ -public final class SqlPoolVulnerabilityAssessmentsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolVulnerabilityAssessmentWithContainerSasKeyAndMinParameters.json - */ - /** - * Sample code: Create a database's vulnerability assessment with minimal parameters, when storageContainerSasKey is - * specified. - * - * @param manager Entry point to SynapseManager. - */ - public static void - createADatabaseSVulnerabilityAssessmentWithMinimalParametersWhenStorageContainerSasKeyIsSpecified( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolVulnerabilityAssessments() - .define(VulnerabilityAssessmentName.DEFAULT) - .withExistingSqlPool("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb") - .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") - .withStorageContainerSasKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") - .create(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolVulnerabilityAssessmentWithAllParameters.json - */ - /** - * Sample code: Create a database's vulnerability assessment with all parameters. - * - * @param manager Entry point to SynapseManager. - */ - public static void createADatabaseSVulnerabilityAssessmentWithAllParameters( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolVulnerabilityAssessments() - .define(VulnerabilityAssessmentName.DEFAULT) - .withExistingSqlPool("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb") - .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") - .withStorageContainerSasKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") - .withStorageAccountAccessKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") - .withRecurringScans( - new VulnerabilityAssessmentRecurringScansProperties() - .withIsEnabled(true) - .withEmailSubscriptionAdmins(true) - .withEmails(Arrays.asList("email1@mail.com", "email2@mail.com"))) - .create(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateVulnerabilityAssessmentWithStorageAccessKeyAndMinParameters.json - */ - /** - * Sample code: Create a database's vulnerability assessment with minimal parameters, when storageAccountAccessKey - * is specified. - * - * @param manager Entry point to SynapseManager. - */ - public static void - createADatabaseSVulnerabilityAssessmentWithMinimalParametersWhenStorageAccountAccessKeyIsSpecified( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolVulnerabilityAssessments() - .define(VulnerabilityAssessmentName.DEFAULT) - .withExistingSqlPool("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb") - .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") - .withStorageAccountAccessKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsDeleteSamples.java deleted file mode 100644 index f32fe29aaf458..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsDeleteSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; - -/** Samples for SqlPoolVulnerabilityAssessments Delete. */ -public final class SqlPoolVulnerabilityAssessmentsDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteSqlPoolVulnerabilityAssessment.json - */ - /** - * Sample code: Remove a database's vulnerability assessment. - * - * @param manager Entry point to SynapseManager. - */ - public static void removeADatabaseSVulnerabilityAssessment( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolVulnerabilityAssessments() - .deleteWithResponse( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsGetSamples.java deleted file mode 100644 index 0cf43e30c2b8f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsGetSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; - -/** Samples for SqlPoolVulnerabilityAssessments Get. */ -public final class SqlPoolVulnerabilityAssessmentsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolVulnerabilityAssessment.json - */ - /** - * Sample code: Get a Sql pool's vulnerability assessment. - * - * @param manager Entry point to SynapseManager. - */ - public static void getASqlPoolSVulnerabilityAssessment(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolVulnerabilityAssessments() - .getWithResponse( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsListSamples.java deleted file mode 100644 index d06d5eb667940..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolVulnerabilityAssessments List. */ -public final class SqlPoolVulnerabilityAssessmentsListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolVulnerabilityAssessments.json - */ - /** - * Sample code: Get a vulnerability assessment of a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAVulnerabilityAssessmentOfASQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolVulnerabilityAssessments() - .list("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifierCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifierCreateOrUpdateSamples.java deleted file mode 100644 index 909e8e36d5fe4..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifierCreateOrUpdateSamples.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -/** Samples for SqlPoolWorkloadClassifier CreateOrUpdate. */ -public final class SqlPoolWorkloadClassifierCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolWorkloadClassifierMin.json - */ - /** - * Sample code: Create a workload classifier with the required properties specified. - * - * @param manager Entry point to SynapseManager. - */ - public static void createAWorkloadClassifierWithTheRequiredPropertiesSpecified( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolWorkloadClassifiers() - .define("wlm_workloadclassifier") - .withExistingWorkloadGroup("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", "wlm_workloadgroup") - .withMemberName("dbo") - .create(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolWorkloadClassifierMax.json - */ - /** - * Sample code: Create a workload classifier with all properties specified. - * - * @param manager Entry point to SynapseManager. - */ - public static void createAWorkloadClassifierWithAllPropertiesSpecified( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolWorkloadClassifiers() - .define("wlm_workloadclassifier") - .withExistingWorkloadGroup("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", "wlm_workloadgroup") - .withMemberName("dbo") - .withLabel("test_label") - .withContext("test_context") - .withStartTime("12:00") - .withEndTime("14:00") - .withImportance("high") - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifierDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifierDeleteSamples.java deleted file mode 100644 index 31446758e1337..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifierDeleteSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolWorkloadClassifier Delete. */ -public final class SqlPoolWorkloadClassifierDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteSqlPoolWorkloadGroupWorkloadClassifer.json - */ - /** - * Sample code: Delete a workload classifier of a SQL Analytics pool's workload group. - * - * @param manager Entry point to SynapseManager. - */ - public static void deleteAWorkloadClassifierOfASQLAnalyticsPoolSWorkloadGroup( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolWorkloadClassifiers() - .delete( - "sqlcrudtest-6852", - "sqlcrudtest-2080", - "sqlcrudtest-9187", - "wlm_workloadgroup", - "wlm_workloadclassifier", - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifierGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifierGetSamples.java deleted file mode 100644 index 841c6ce83ca28..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifierGetSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolWorkloadClassifier Get. */ -public final class SqlPoolWorkloadClassifierGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolWorkloadGroupWorkloadClassifier.json - */ - /** - * Sample code: Get a workload classifier for SQL Analytics pool's workload group. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAWorkloadClassifierForSQLAnalyticsPoolSWorkloadGroup( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolWorkloadClassifiers() - .getWithResponse( - "sqlcrudtest-6852", - "sqlcrudtest-2080", - "sqlcrudtest-9187", - "wlm_workloadgroup", - "wlm_classifier", - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifierListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifierListSamples.java deleted file mode 100644 index 25751ee3753e0..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifierListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolWorkloadClassifier List. */ -public final class SqlPoolWorkloadClassifierListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolWorkloadGroupWorkloadClassifierList.json - */ - /** - * Sample code: Get the list of workload classifiers of a SQL Analytics pool's workload group. - * - * @param manager Entry point to SynapseManager. - */ - public static void getTheListOfWorkloadClassifiersOfASQLAnalyticsPoolSWorkloadGroup( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolWorkloadClassifiers() - .list("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", "wlm_workloadgroup", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupCreateOrUpdateSamples.java deleted file mode 100644 index e2ab6e5284da8..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupCreateOrUpdateSamples.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -/** Samples for SqlPoolWorkloadGroup CreateOrUpdate. */ -public final class SqlPoolWorkloadGroupCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolWorkloadGroupMin.json - */ - /** - * Sample code: Create a workload group with the required properties specified. - * - * @param manager Entry point to SynapseManager. - */ - public static void createAWorkloadGroupWithTheRequiredPropertiesSpecified( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolWorkloadGroups() - .define("smallrc") - .withExistingSqlPool("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187") - .withMinResourcePercent(0) - .withMaxResourcePercent(100) - .withMinResourcePercentPerRequest(3.0) - .create(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolWorkloadGroupMax.json - */ - /** - * Sample code: Create a workload group with all properties specified. - * - * @param manager Entry point to SynapseManager. - */ - public static void createAWorkloadGroupWithAllPropertiesSpecified( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolWorkloadGroups() - .define("smallrc") - .withExistingSqlPool("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187") - .withMinResourcePercent(0) - .withMaxResourcePercent(100) - .withMinResourcePercentPerRequest(3.0) - .withMaxResourcePercentPerRequest(3.0) - .withImportance("normal") - .withQueryExecutionTimeout(0) - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupDeleteSamples.java deleted file mode 100644 index e3d8b2f8def6a..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolWorkloadGroup Delete. */ -public final class SqlPoolWorkloadGroupDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteSqlPoolWorkloadGroup.json - */ - /** - * Sample code: Delete a workload group of a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void deleteAWorkloadGroupOfASQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolWorkloadGroups() - .delete("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", "wlm_workloadgroup", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupGetSamples.java deleted file mode 100644 index 50fde434a756f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolWorkloadGroup Get. */ -public final class SqlPoolWorkloadGroupGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolWorkloadGroup.json - */ - /** - * Sample code: Get a a workload group of a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAAWorkloadGroupOfASQLAnalyticsPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolWorkloadGroups() - .getWithResponse("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", "smallrc", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupListSamples.java deleted file mode 100644 index 34e73eae0bade..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolWorkloadGroup List. */ -public final class SqlPoolWorkloadGroupListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolWorkloadGroupList.json - */ - /** - * Sample code: Get the list of workload groups of a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getTheListOfWorkloadGroupsOfASQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPoolWorkloadGroups().list("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsCreateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsCreateSamples.java deleted file mode 100644 index cf00299a1f287..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsCreateSamples.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.Sku; -import com.azure.resourcemanager.synapse.models.StorageAccountType; -import java.util.HashMap; -import java.util.Map; - -/** Samples for SqlPools Create. */ -public final class SqlPoolsCreateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateSqlPool.json - */ - /** - * Sample code: Create a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void createASQLAnalyticsPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPools() - .define("ExampleSqlPool") - .withRegion("Southeast Asia") - .withExistingWorkspace("ExampleResourceGroup", "ExampleWorkspace") - .withTags(mapOf()) - .withSku(new Sku().withTier("").withName("")) - .withMaxSizeBytes(0L) - .withCollation("") - .withSourceDatabaseId("") - .withRecoverableDatabaseId("") - .withCreateMode("") - .withStorageAccountType(StorageAccountType.LRS) - .create(); - } - - @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/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsDeleteSamples.java deleted file mode 100644 index c8b1c548a7bf7..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPools Delete. */ -public final class SqlPoolsDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteSqlPool.json - */ - /** - * Sample code: Delete a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void deleteASQLAnalyticsPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPools().delete("ExampleResourceGroup", "ExampleWorkspace", "ExampleSqlPool", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsGetSamples.java deleted file mode 100644 index bd8961c34cf8c..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPools Get. */ -public final class SqlPoolsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPool.json - */ - /** - * Sample code: Get a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getASQLAnalyticsPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPools().getWithResponse("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsListByWorkspaceSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsListByWorkspaceSamples.java deleted file mode 100644 index ca6656d27649e..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsListByWorkspaceSamples.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPools ListByWorkspace. */ -public final class SqlPoolsListByWorkspaceSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolsInWorkspaceWithFilter.json - */ - /** - * Sample code: List SQL Analytics pools in a workspace with filter. - * - * @param manager Entry point to SynapseManager. - */ - public static void listSQLAnalyticsPoolsInAWorkspaceWithFilter( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPools().listByWorkspace("sqlcrudtest-6845", "sqlcrudtest-7177", Context.NONE); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolsInWorkspace.json - */ - /** - * Sample code: List SQL Analytics pools in a workspace. - * - * @param manager Entry point to SynapseManager. - */ - public static void listSQLAnalyticsPoolsInAWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPools().listByWorkspace("sqlcrudtest-6845", "sqlcrudtest-7177", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsPauseSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsPauseSamples.java deleted file mode 100644 index b54cafc242444..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsPauseSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPools Pause. */ -public final class SqlPoolsPauseSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/PauseSqlPool.json - */ - /** - * Sample code: Pause a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void pauseASQLAnalyticsPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPools().pause("Default-SQL-SouthEastAsia", "testsvr", "testdwdb", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsRenameSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsRenameSamples.java deleted file mode 100644 index 96b7c454225b5..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsRenameSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.ResourceMoveDefinition; - -/** Samples for SqlPools Rename. */ -public final class SqlPoolsRenameSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/RenameSqlPool.json - */ - /** - * Sample code: Rename a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void renameASQLAnalyticsPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPools() - .renameWithResponse( - "Default-SQL-SouthEastAsia", - "testsvr", - "testdb", - new ResourceMoveDefinition() - .withId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Synapse/workspaces/testsvr/sqlPools/newtestdb"), - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsResumeSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsResumeSamples.java deleted file mode 100644 index 8643f0d9ab9c2..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsResumeSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPools Resume. */ -public final class SqlPoolsResumeSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ResumeSqlPool.json - */ - /** - * Sample code: Resume a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void resumeASQLAnalyticsPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPools().resume("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsUpdateSamples.java deleted file mode 100644 index b4d0debef7a2d..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsUpdateSamples.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.Sku; -import com.azure.resourcemanager.synapse.models.SqlPool; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; - -/** Samples for SqlPools Update. */ -public final class SqlPoolsUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/UpdateSqlPool.json - */ - /** - * Sample code: Update a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void updateASQLAnalyticsPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - SqlPool resource = - manager - .sqlPools() - .getWithResponse("ExampleResourceGroup", "ExampleWorkspace", "ExampleSqlPool", Context.NONE) - .getValue(); - resource - .update() - .withTags(mapOf()) - .withSku(new Sku().withTier("").withName("")) - .withMaxSizeBytes(0L) - .withCollation("") - .withSourceDatabaseId("") - .withRecoverableDatabaseId("") - .withRestorePointInTime(OffsetDateTime.parse("1970-01-01T00:00:00.000Z")) - .withCreateMode("") - .withCreationDate(OffsetDateTime.parse("1970-01-01T00:00:00.000Z")) - .apply(); - } - - @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/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminsCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminsCreateOrUpdateSamples.java deleted file mode 100644 index 87f693cd2de73..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminsCreateOrUpdateSamples.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.fluent.models.WorkspaceAadAdminInfoInner; - -/** Samples for WorkspaceAadAdmins CreateOrUpdate. */ -public final class WorkspaceAadAdminsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateWorkspaceAadAdmin.json - */ - /** - * Sample code: Create or update workspace active directory admin. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateWorkspaceActiveDirectoryAdmin( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceAadAdmins() - .createOrUpdate( - "resourceGroup1", - "workspace1", - new WorkspaceAadAdminInfoInner() - .withTenantId("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c") - .withLogin("bob@contoso.com") - .withAdministratorType("ActiveDirectory") - .withSid("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminsDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminsDeleteSamples.java deleted file mode 100644 index a6dd079c09414..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminsDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for WorkspaceAadAdmins Delete. */ -public final class WorkspaceAadAdminsDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteWorkspaceAadAdmin.json - */ - /** - * Sample code: Delete workspace active directory admin. - * - * @param manager Entry point to SynapseManager. - */ - public static void deleteWorkspaceActiveDirectoryAdmin(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.workspaceAadAdmins().delete("resourceGroup1", "workspace1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminsGetSamples.java deleted file mode 100644 index 71d0de9bf8193..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminsGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for WorkspaceAadAdmins Get. */ -public final class WorkspaceAadAdminsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceAadAdmin.json - */ - /** - * Sample code: Get workspace active directory admin. - * - * @param manager Entry point to SynapseManager. - */ - public static void getWorkspaceActiveDirectoryAdmin(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.workspaceAadAdmins().getWithResponse("resourceGroup1", "workspace1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedIdentitySqlControlSettingsCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedIdentitySqlControlSettingsCreateOrUpdateSamples.java deleted file mode 100644 index 6e0162c5642fa..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedIdentitySqlControlSettingsCreateOrUpdateSamples.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.fluent.models.ManagedIdentitySqlControlSettingsModelInner; -import com.azure.resourcemanager.synapse.models.ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity; -import com.azure.resourcemanager.synapse.models.ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentityDesiredState; - -/** Samples for WorkspaceManagedIdentitySqlControlSettings CreateOrUpdate. */ -public final class WorkspaceManagedIdentitySqlControlSettingsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateManagedIdentitySqlControlSettings.json - */ - /** - * Sample code: Create or update managed identity sql control settings. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateManagedIdentitySqlControlSettings( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedIdentitySqlControlSettings() - .createOrUpdate( - "resourceGroup1", - "workspace1", - new ManagedIdentitySqlControlSettingsModelInner() - .withGrantSqlControlToManagedIdentity( - new ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity() - .withDesiredState( - ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentityDesiredState - .ENABLED)), - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedIdentitySqlControlSettingsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedIdentitySqlControlSettingsGetSamples.java deleted file mode 100644 index 7667620dabd45..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedIdentitySqlControlSettingsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for WorkspaceManagedIdentitySqlControlSettings Get. */ -public final class WorkspaceManagedIdentitySqlControlSettingsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetManagedIdentitySqlControlSettings.json - */ - /** - * Sample code: Get managed identity sql control settings. - * - * @param manager Entry point to SynapseManager. - */ - public static void getManagedIdentitySqlControlSettings(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedIdentitySqlControlSettings() - .getWithResponse("resourceGroup1", "workspace1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerBlobAuditingPoliciesCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerBlobAuditingPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index 6e24bdef03eee..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerBlobAuditingPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.BlobAuditingPolicyName; -import com.azure.resourcemanager.synapse.models.BlobAuditingPolicyState; -import java.util.Arrays; -import java.util.UUID; - -/** Samples for WorkspaceManagedSqlServerBlobAuditingPolicies CreateOrUpdate. */ -public final class WorkspaceManagedSqlServerBlobAuditingPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateWorkspaceManagedSqlServerBlobAuditingSettingsWithAllParameters.json - */ - /** - * Sample code: Create or update blob auditing policy of workspace SQL Server with all parameters. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateBlobAuditingPolicyOfWorkspaceSQLServerWithAllParameters( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerBlobAuditingPolicies() - .define(BlobAuditingPolicyName.DEFAULT) - .withExistingWorkspace("wsg-7398", "testWorkspace") - .withState(BlobAuditingPolicyState.ENABLED) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey( - "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==") - .withRetentionDays(6) - .withAuditActionsAndGroups( - Arrays - .asList( - "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", - "FAILED_DATABASE_AUTHENTICATION_GROUP", - "BATCH_COMPLETED_GROUP")) - .withStorageAccountSubscriptionId(UUID.fromString("00000000-1234-0000-5678-000000000000")) - .withIsStorageSecondaryKeyInUse(false) - .withIsAzureMonitorTargetEnabled(true) - .withQueueDelayMs(4000) - .create(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateWorkspaceManagedSqlServerBlobAuditingSettingsWithMinParameters.json - */ - /** - * Sample code: Create or update blob auditing policy of workspace managed Sql Server with minimal parameters. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateBlobAuditingPolicyOfWorkspaceManagedSqlServerWithMinimalParameters( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerBlobAuditingPolicies() - .define(BlobAuditingPolicyName.DEFAULT) - .withExistingWorkspace("wsg-7398", "testWorkspace") - .withState(BlobAuditingPolicyState.ENABLED) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey( - "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==") - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerBlobAuditingPoliciesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerBlobAuditingPoliciesGetSamples.java deleted file mode 100644 index 4bd34853b63c1..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerBlobAuditingPoliciesGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.BlobAuditingPolicyName; - -/** Samples for WorkspaceManagedSqlServerBlobAuditingPolicies Get. */ -public final class WorkspaceManagedSqlServerBlobAuditingPoliciesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceManagedSqlServerBlobAuditingSettings.json - */ - /** - * Sample code: Get blob auditing setting of workspace managed sql Server. - * - * @param manager Entry point to SynapseManager. - */ - public static void getBlobAuditingSettingOfWorkspaceManagedSqlServer( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerBlobAuditingPolicies() - .getWithResponse("wsg-7398", "testWorkspace", BlobAuditingPolicyName.DEFAULT, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerBlobAuditingPoliciesListByWorkspaceSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerBlobAuditingPoliciesListByWorkspaceSamples.java deleted file mode 100644 index c0d874cbc4a9f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerBlobAuditingPoliciesListByWorkspaceSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for WorkspaceManagedSqlServerBlobAuditingPolicies ListByWorkspace. */ -public final class WorkspaceManagedSqlServerBlobAuditingPoliciesListByWorkspaceSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspaceManagedSqlServerBlobAuditingSettings.json - */ - /** - * Sample code: Get blob auditing policy of workspace manged sql Server. - * - * @param manager Entry point to SynapseManager. - */ - public static void getBlobAuditingPolicyOfWorkspaceMangedSqlServer( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerBlobAuditingPolicies() - .listByWorkspace("wsg-7398", "testWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorCreateOrUpdateSamples.java deleted file mode 100644 index c72b25f0401b6..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorCreateOrUpdateSamples.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.EncryptionProtector; -import com.azure.resourcemanager.synapse.models.EncryptionProtectorName; -import com.azure.resourcemanager.synapse.models.ServerKeyType; - -/** Samples for WorkspaceManagedSqlServerEncryptionProtector CreateOrUpdate. */ -public final class WorkspaceManagedSqlServerEncryptionProtectorCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/WorkspaceManagedSqlServerEncryptionProtectorCreateOrUpdateKeyVault.json - */ - /** - * Sample code: Update the encryption protector to key vault. - * - * @param manager Entry point to SynapseManager. - */ - public static void updateTheEncryptionProtectorToKeyVault( - com.azure.resourcemanager.synapse.SynapseManager manager) { - EncryptionProtector resource = - manager - .workspaceManagedSqlServerEncryptionProtectors() - .getWithResponse("wsg-7398", "testWorkspace", EncryptionProtectorName.CURRENT, Context.NONE) - .getValue(); - resource - .update() - .withServerKeyName("someVault_someKey_01234567890123456789012345678901") - .withServerKeyType(ServerKeyType.AZURE_KEY_VAULT) - .apply(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/WorkspaceManagedSqlServerEncryptionProtectorCreateOrUpdateServiceManaged.json - */ - /** - * Sample code: Update the encryption protector to service managed. - * - * @param manager Entry point to SynapseManager. - */ - public static void updateTheEncryptionProtectorToServiceManaged( - com.azure.resourcemanager.synapse.SynapseManager manager) { - EncryptionProtector resource = - manager - .workspaceManagedSqlServerEncryptionProtectors() - .getWithResponse("wsg-7398", "testWorkspace", EncryptionProtectorName.CURRENT, Context.NONE) - .getValue(); - resource.update().withServerKeyName("ServiceManaged").withServerKeyType(ServerKeyType.SERVICE_MANAGED).apply(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorGetSamples.java deleted file mode 100644 index f491d41a8d4f9..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.EncryptionProtectorName; - -/** Samples for WorkspaceManagedSqlServerEncryptionProtector Get. */ -public final class WorkspaceManagedSqlServerEncryptionProtectorGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceManagedSqlServerEncryptionProtector.json - */ - /** - * Sample code: Get workspace managed sql Server's encryption protector. - * - * @param manager Entry point to SynapseManager. - */ - public static void getWorkspaceManagedSqlServerSEncryptionProtector( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerEncryptionProtectors() - .getWithResponse("wsg-7398", "testWorkspace", EncryptionProtectorName.CURRENT, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorListSamples.java deleted file mode 100644 index 6995ab8cc1573..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for WorkspaceManagedSqlServerEncryptionProtector List. */ -public final class WorkspaceManagedSqlServerEncryptionProtectorListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceManagedSqlServerEncryptionProtectorList.json - */ - /** - * Sample code: Get workspace managed sql Server's encryption protectors. - * - * @param manager Entry point to SynapseManager. - */ - public static void getWorkspaceManagedSqlServerSEncryptionProtectors( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.workspaceManagedSqlServerEncryptionProtectors().list("wsg-7398", "testWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorRevalidateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorRevalidateSamples.java deleted file mode 100644 index fe13f0dc55b02..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorRevalidateSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.EncryptionProtectorName; - -/** Samples for WorkspaceManagedSqlServerEncryptionProtector Revalidate. */ -public final class WorkspaceManagedSqlServerEncryptionProtectorRevalidateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/WorkspaceManagedSqlServerEncryptionProtectorRevalidate.json - */ - /** - * Sample code: Revalidates the encryption protector. - * - * @param manager Entry point to SynapseManager. - */ - public static void revalidatesTheEncryptionProtector(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerEncryptionProtectors() - .revalidate("wsg-7398", "testWorkspace", EncryptionProtectorName.CURRENT, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index 1a797eaec7904..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.BlobAuditingPolicyName; -import com.azure.resourcemanager.synapse.models.BlobAuditingPolicyState; -import java.util.Arrays; -import java.util.UUID; - -/** Samples for WorkspaceManagedSqlServerExtendedBlobAuditingPolicies CreateOrUpdate. */ -public final class WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateWorkspaceManagedSqlServerExtendedBlobAuditingSettingsWithAllParameters.json - */ - /** - * Sample code: Create or update workspace managed sql server's extended blob auditing policy of with all - * parameters. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateWorkspaceManagedSqlServerSExtendedBlobAuditingPolicyOfWithAllParameters( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerExtendedBlobAuditingPolicies() - .define(BlobAuditingPolicyName.DEFAULT) - .withExistingWorkspace("wsg-7398", "testWorkspace") - .withPredicateExpression("object_name = 'SensitiveData'") - .withState(BlobAuditingPolicyState.ENABLED) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey( - "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==") - .withRetentionDays(6) - .withAuditActionsAndGroups( - Arrays - .asList( - "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", - "FAILED_DATABASE_AUTHENTICATION_GROUP", - "BATCH_COMPLETED_GROUP")) - .withStorageAccountSubscriptionId(UUID.fromString("00000000-1234-0000-5678-000000000000")) - .withIsStorageSecondaryKeyInUse(false) - .withIsAzureMonitorTargetEnabled(true) - .create(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateWorkspaceManagedSqlServerExetendedBlobAuditingSettingsWithMinParameters.json - */ - /** - * Sample code: Create or update workspace managed sql server's extended blob auditing policy of with minimal - * parameters. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateWorkspaceManagedSqlServerSExtendedBlobAuditingPolicyOfWithMinimalParameters( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerExtendedBlobAuditingPolicies() - .define(BlobAuditingPolicyName.DEFAULT) - .withExistingWorkspace("wsg-7398", "testWorkspace") - .withState(BlobAuditingPolicyState.ENABLED) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey( - "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==") - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesGetSamples.java deleted file mode 100644 index 8fe7c851c0752..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.BlobAuditingPolicyName; - -/** Samples for WorkspaceManagedSqlServerExtendedBlobAuditingPolicies Get. */ -public final class WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceManagedSqlExtendedServerBlobAuditingSettings.json - */ - /** - * Sample code: Get workspace managed sql servers' extended blob auditing settings. - * - * @param manager Entry point to SynapseManager. - */ - public static void getWorkspaceManagedSqlServersExtendedBlobAuditingSettings( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerExtendedBlobAuditingPolicies() - .getWithResponse("wsg-7398", "testWorkspace", BlobAuditingPolicyName.DEFAULT, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesListByWorkspaceSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesListByWorkspaceSamples.java deleted file mode 100644 index 640800d1ebaff..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesListByWorkspaceSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for WorkspaceManagedSqlServerExtendedBlobAuditingPolicies ListByWorkspace. */ -public final class WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesListByWorkspaceSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspaceManagedSqlServerExtendedBlobAuditingSettings.json - */ - /** - * Sample code: Get workspace managed sql server's extended blob auditing settings. - * - * @param manager Entry point to SynapseManager. - */ - public static void getWorkspaceManagedSqlServerSExtendedBlobAuditingSettings( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerExtendedBlobAuditingPolicies() - .listByWorkspace("wsg-7398", "testWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerRecoverableSqlPoolsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerRecoverableSqlPoolsGetSamples.java deleted file mode 100644 index 970c3550e1230..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerRecoverableSqlPoolsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for WorkspaceManagedSqlServerRecoverableSqlPools Get. */ -public final class WorkspaceManagedSqlServerRecoverableSqlPoolsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceManagedSqlServerRecoverableSqlPool.json - */ - /** - * Sample code: Get recoverable sql pools for the server. - * - * @param manager Entry point to SynapseManager. - */ - public static void getRecoverableSqlPoolsForTheServer(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerRecoverableSqlPools() - .getWithResponse("wsg-7398", "testWorkspace", "recoverableSqlpools-1235", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerRecoverableSqlPoolsListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerRecoverableSqlPoolsListSamples.java deleted file mode 100644 index 8172be9f52494..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerRecoverableSqlPoolsListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for WorkspaceManagedSqlServerRecoverableSqlPools List. */ -public final class WorkspaceManagedSqlServerRecoverableSqlPoolsListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspaceManagedSqlServerRecoverableSqlPool.json - */ - /** - * Sample code: List recoverable sql pools for the server. - * - * @param manager Entry point to SynapseManager. - */ - public static void listRecoverableSqlPoolsForTheServer(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.workspaceManagedSqlServerRecoverableSqlPools().list("wsg-7398", "testWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerSecurityAlertPolicyCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerSecurityAlertPolicyCreateOrUpdateSamples.java deleted file mode 100644 index 98b0556e0134f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerSecurityAlertPolicyCreateOrUpdateSamples.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.SecurityAlertPolicyNameAutoGenerated; -import com.azure.resourcemanager.synapse.models.SecurityAlertPolicyState; -import com.azure.resourcemanager.synapse.models.ServerSecurityAlertPolicy; -import java.util.Arrays; - -/** Samples for WorkspaceManagedSqlServerSecurityAlertPolicy CreateOrUpdate. */ -public final class WorkspaceManagedSqlServerSecurityAlertPolicyCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/WorkspaceManagedSqlServerSecurityAlertWithAllParameters.json - */ - /** - * Sample code: Update a workspace managed sql server's threat detection policy with all parameters. - * - * @param manager Entry point to SynapseManager. - */ - public static void updateAWorkspaceManagedSqlServerSThreatDetectionPolicyWithAllParameters( - com.azure.resourcemanager.synapse.SynapseManager manager) { - ServerSecurityAlertPolicy resource = - manager - .workspaceManagedSqlServerSecurityAlertPolicies() - .getWithResponse( - "wsg-7398", "testWorkspace", SecurityAlertPolicyNameAutoGenerated.DEFAULT, Context.NONE) - .getValue(); - resource - .update() - .withState(SecurityAlertPolicyState.ENABLED) - .withDisabledAlerts(Arrays.asList("Access_Anomaly", "Usage_Anomaly")) - .withEmailAddresses(Arrays.asList("testSecurityAlert@microsoft.com")) - .withEmailAccountAdmins(true) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey( - "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==") - .withRetentionDays(5) - .apply(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/WorkspaceManagedSqlServerSecurityAlertCreateWithMinParameters.json - */ - /** - * Sample code: Update a workspace managed sql server's threat detection policy with minimal parameters. - * - * @param manager Entry point to SynapseManager. - */ - public static void updateAWorkspaceManagedSqlServerSThreatDetectionPolicyWithMinimalParameters( - com.azure.resourcemanager.synapse.SynapseManager manager) { - ServerSecurityAlertPolicy resource = - manager - .workspaceManagedSqlServerSecurityAlertPolicies() - .getWithResponse( - "wsg-7398", "testWorkspace", SecurityAlertPolicyNameAutoGenerated.DEFAULT, Context.NONE) - .getValue(); - resource - .update() - .withState(SecurityAlertPolicyState.DISABLED) - .withEmailAccountAdmins(true) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey( - "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==") - .apply(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerSecurityAlertPolicyGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerSecurityAlertPolicyGetSamples.java deleted file mode 100644 index ad799aab379ae..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerSecurityAlertPolicyGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.SecurityAlertPolicyNameAutoGenerated; - -/** Samples for WorkspaceManagedSqlServerSecurityAlertPolicy Get. */ -public final class WorkspaceManagedSqlServerSecurityAlertPolicyGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceManagedSqlServerSecurityAlertPolicy.json - */ - /** - * Sample code: Get workspace managed sql Server's security alert policy. - * - * @param manager Entry point to SynapseManager. - */ - public static void getWorkspaceManagedSqlServerSSecurityAlertPolicy( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerSecurityAlertPolicies() - .getWithResponse("wsg-7398", "testWorkspace", SecurityAlertPolicyNameAutoGenerated.DEFAULT, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerSecurityAlertPolicyListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerSecurityAlertPolicyListSamples.java deleted file mode 100644 index d0afbbabaf43a..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerSecurityAlertPolicyListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for WorkspaceManagedSqlServerSecurityAlertPolicy List. */ -public final class WorkspaceManagedSqlServerSecurityAlertPolicyListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspaceManagedSqlServerSecurityAlertPolicies.json - */ - /** - * Sample code: Get workspace managed sql server's security alert policy. - * - * @param manager Entry point to SynapseManager. - */ - public static void getWorkspaceManagedSqlServerSSecurityAlertPolicy( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.workspaceManagedSqlServerSecurityAlertPolicies().list("wsg-7398", "testWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerUsagesListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerUsagesListSamples.java deleted file mode 100644 index 3c672fb80abd6..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerUsagesListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for WorkspaceManagedSqlServerUsages List. */ -public final class WorkspaceManagedSqlServerUsagesListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspaceManagedSqlServerUsages.json - */ - /** - * Sample code: List usages metric for the workspace managed sql server. - * - * @param manager Entry point to SynapseManager. - */ - public static void listUsagesMetricForTheWorkspaceManagedSqlServer( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.workspaceManagedSqlServerUsages().list("wsg-7398", "testWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsCreateOrUpdateSamples.java deleted file mode 100644 index 188ce097da20b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsCreateOrUpdateSamples.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentRecurringScansProperties; -import java.util.Arrays; - -/** Samples for WorkspaceManagedSqlServerVulnerabilityAssessments CreateOrUpdate. */ -public final class WorkspaceManagedSqlServerVulnerabilityAssessmentsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/PutWorkspaceMangedSqlServerVulnerabilityAssessmentCreateContainerSasKeyMin.json - */ - /** - * Sample code: Create or Update a workspace managed sql server's vulnerability assessment with minimal parameters, - * when storageContainerSasKey is specified. - * - * @param manager Entry point to SynapseManager. - */ - public static void - createOrUpdateAWorkspaceManagedSqlServerSVulnerabilityAssessmentWithMinimalParametersWhenStorageContainerSasKeyIsSpecified( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerVulnerabilityAssessments() - .define(VulnerabilityAssessmentName.DEFAULT) - .withExistingWorkspace("wsg-7398", "testWorkspace") - .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") - .withStorageContainerSasKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") - .create(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/PutWorkspaceMangedSqlServerVulnerabilityAssessmentCreateStorageAccessKeyMin.json - */ - /** - * Sample code: Create or Update a workspace managed sql server's vulnerability assessment with minimal parameters, - * when storageAccountAccessKey is specified. - * - * @param manager Entry point to SynapseManager. - */ - public static void - createOrUpdateAWorkspaceManagedSqlServerSVulnerabilityAssessmentWithMinimalParametersWhenStorageAccountAccessKeyIsSpecified( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerVulnerabilityAssessments() - .define(VulnerabilityAssessmentName.DEFAULT) - .withExistingWorkspace("wsg-7398", "testWorkspace") - .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") - .withStorageAccountAccessKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") - .create(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/PutWorkspaceManagedSqlServerVulnerabilityAssessmentWithAllParameters.json - */ - /** - * Sample code: Create or Update a workspace managed sql server's vulnerability assessment with all parameters. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateAWorkspaceManagedSqlServerSVulnerabilityAssessmentWithAllParameters( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerVulnerabilityAssessments() - .define(VulnerabilityAssessmentName.DEFAULT) - .withExistingWorkspace("wsg-7398", "testWorkspace") - .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") - .withStorageContainerSasKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") - .withStorageAccountAccessKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") - .withRecurringScans( - new VulnerabilityAssessmentRecurringScansProperties() - .withIsEnabled(true) - .withEmailSubscriptionAdmins(true) - .withEmails(Arrays.asList("email1@mail.com", "email2@mail.com"))) - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsDeleteSamples.java deleted file mode 100644 index 5e0ac48d64571..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsDeleteSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; - -/** Samples for WorkspaceManagedSqlServerVulnerabilityAssessments Delete. */ -public final class WorkspaceManagedSqlServerVulnerabilityAssessmentsDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteWorkspaceManagedSqlServerVulnerabilityAssessment.json - */ - /** - * Sample code: Remove workspace managed sql Server's vulnerability assessment. - * - * @param manager Entry point to SynapseManager. - */ - public static void removeWorkspaceManagedSqlServerSVulnerabilityAssessment( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerVulnerabilityAssessments() - .deleteWithResponse("wsg-7398", "testWorkspace", VulnerabilityAssessmentName.DEFAULT, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsGetSamples.java deleted file mode 100644 index 71c59a123c684..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; - -/** Samples for WorkspaceManagedSqlServerVulnerabilityAssessments Get. */ -public final class WorkspaceManagedSqlServerVulnerabilityAssessmentsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceManagedSqlServerVulnerabilityAssessment.json - */ - /** - * Sample code: Get workspace managed sql Server's vulnerability assessment. - * - * @param manager Entry point to SynapseManager. - */ - public static void getWorkspaceManagedSqlServerSVulnerabilityAssessment( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerVulnerabilityAssessments() - .getWithResponse("wsg-7398", "testWorkspace", VulnerabilityAssessmentName.DEFAULT, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsListSamples.java deleted file mode 100644 index d53f42c712adf..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for WorkspaceManagedSqlServerVulnerabilityAssessments List. */ -public final class WorkspaceManagedSqlServerVulnerabilityAssessmentsListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspaceManagedSqlServerVulnerabilityAssessmentPolicies.json - */ - /** - * Sample code: Get workspace managed sql Server's vulnerability assessment policies. - * - * @param manager Entry point to SynapseManager. - */ - public static void getWorkspaceManagedSqlServerSVulnerabilityAssessmentPolicies( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.workspaceManagedSqlServerVulnerabilityAssessments().list("wsg-7398", "testWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceSqlAadAdminsCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceSqlAadAdminsCreateOrUpdateSamples.java deleted file mode 100644 index 45b572c398c5e..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceSqlAadAdminsCreateOrUpdateSamples.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.fluent.models.WorkspaceAadAdminInfoInner; - -/** Samples for WorkspaceSqlAadAdmins CreateOrUpdate. */ -public final class WorkspaceSqlAadAdminsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateWorkspaceAadAdmin.json - */ - /** - * Sample code: Create or update workspace active directory admin. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateWorkspaceActiveDirectoryAdmin( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceSqlAadAdmins() - .createOrUpdate( - "resourceGroup1", - "workspace1", - new WorkspaceAadAdminInfoInner() - .withTenantId("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c") - .withLogin("bob@contoso.com") - .withAdministratorType("ActiveDirectory") - .withSid("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceSqlAadAdminsDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceSqlAadAdminsDeleteSamples.java deleted file mode 100644 index 97c25153d9a40..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceSqlAadAdminsDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for WorkspaceSqlAadAdmins Delete. */ -public final class WorkspaceSqlAadAdminsDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteWorkspaceAadAdmin.json - */ - /** - * Sample code: Delete workspace active directory admin. - * - * @param manager Entry point to SynapseManager. - */ - public static void deleteWorkspaceActiveDirectoryAdmin(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.workspaceSqlAadAdmins().delete("resourceGroup1", "workspace1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceSqlAadAdminsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceSqlAadAdminsGetSamples.java deleted file mode 100644 index 96f950a270d25..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceSqlAadAdminsGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for WorkspaceSqlAadAdmins Get. */ -public final class WorkspaceSqlAadAdminsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceAadAdmin.json - */ - /** - * Sample code: Get workspace active directory admin. - * - * @param manager Entry point to SynapseManager. - */ - public static void getWorkspaceActiveDirectoryAdmin(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.workspaceSqlAadAdmins().getWithResponse("resourceGroup1", "workspace1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesCreateOrUpdateSamples.java deleted file mode 100644 index 3d27efbe97d92..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesCreateOrUpdateSamples.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.CspWorkspaceAdminProperties; -import com.azure.resourcemanager.synapse.models.CustomerManagedKeyDetails; -import com.azure.resourcemanager.synapse.models.DataLakeStorageAccountDetails; -import com.azure.resourcemanager.synapse.models.EncryptionDetails; -import com.azure.resourcemanager.synapse.models.KekIdentityProperties; -import com.azure.resourcemanager.synapse.models.ManagedIdentity; -import com.azure.resourcemanager.synapse.models.ManagedVirtualNetworkSettings; -import com.azure.resourcemanager.synapse.models.PurviewConfiguration; -import com.azure.resourcemanager.synapse.models.ResourceIdentityType; -import com.azure.resourcemanager.synapse.models.UserAssignedManagedIdentity; -import com.azure.resourcemanager.synapse.models.WorkspaceKeyDetails; -import com.azure.resourcemanager.synapse.models.WorkspacePublicNetworkAccess; -import com.azure.resourcemanager.synapse.models.WorkspaceRepositoryConfiguration; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** Samples for Workspaces CreateOrUpdate. */ -public final class WorkspacesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateWorkspace.json - */ - /** - * Sample code: Create or update a workspace. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateAWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaces() - .define("workspace1") - .withRegion("East US") - .withExistingResourceGroup("resourceGroup1") - .withTags(mapOf("key", "value")) - .withIdentity( - new ManagedIdentity() - .withType(ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/resourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1", - new UserAssignedManagedIdentity()))) - .withDefaultDataLakeStorage( - new DataLakeStorageAccountDetails() - .withAccountUrl("https://accountname.dfs.core.windows.net") - .withFilesystem("default")) - .withSqlAdministratorLoginPassword("password") - .withManagedResourceGroupName("workspaceManagedResourceGroupUnique") - .withSqlAdministratorLogin("login") - .withManagedVirtualNetwork("default") - .withEncryption( - new EncryptionDetails() - .withCmk( - new CustomerManagedKeyDetails() - .withKey( - new WorkspaceKeyDetails() - .withName("default") - .withKeyVaultUrl("https://vault.azure.net/keys/key1")) - .withKekIdentity( - new KekIdentityProperties() - .withUserAssignedIdentity( - "/subscriptions/b64d7b94-73e7-4d36-94b2-7764ea3fd74a/resourcegroups/SynapseCI/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1") - .withUseSystemAssignedIdentity(false)))) - .withManagedVirtualNetworkSettings( - new ManagedVirtualNetworkSettings() - .withPreventDataExfiltration(false) - .withLinkedAccessCheckOnTargetResource(false) - .withAllowedAadTenantIdsForLinking(Arrays.asList("740239CE-A25B-485B-86A0-262F29F6EBDB"))) - .withWorkspaceRepositoryConfiguration( - new WorkspaceRepositoryConfiguration() - .withType("FactoryGitHubConfiguration") - .withHostname("") - .withAccountName("mygithubaccount") - .withProjectName("myproject") - .withRepositoryName("myrepository") - .withCollaborationBranch("master") - .withRootFolder("/")) - .withPurviewConfiguration( - new PurviewConfiguration() - .withPurviewResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.ProjectPurview/accounts/accountname1")) - .withPublicNetworkAccess(WorkspacePublicNetworkAccess.ENABLED) - .withCspWorkspaceAdminProperties( - new CspWorkspaceAdminProperties() - .withInitialWorkspaceAdminObjectId("6c20646f-8050-49ec-b3b1-80a0e58e454d")) - .create(); - } - - @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/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesDeleteSamples.java deleted file mode 100644 index 57f815f26f5de..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for Workspaces Delete. */ -public final class WorkspacesDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteWorkspace.json - */ - /** - * Sample code: Delete a workspace. - * - * @param manager Entry point to SynapseManager. - */ - public static void deleteAWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.workspaces().delete("resourceGroup1", "workspace1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesGetByResourceGroupSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesGetByResourceGroupSamples.java deleted file mode 100644 index 1bdffc6449d96..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesGetByResourceGroupSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for Workspaces GetByResourceGroup. */ -public final class WorkspacesGetByResourceGroupSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspace.json - */ - /** - * Sample code: Get a workspace. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.workspaces().getByResourceGroupWithResponse("resourceGroup1", "workspace1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesListByResourceGroupSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesListByResourceGroupSamples.java deleted file mode 100644 index 4621621207fa0..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesListByResourceGroupSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for Workspaces ListByResourceGroup. */ -public final class WorkspacesListByResourceGroupSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspacesInResourceGroup.json - */ - /** - * Sample code: List workspaces in resource group. - * - * @param manager Entry point to SynapseManager. - */ - public static void listWorkspacesInResourceGroup(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.workspaces().listByResourceGroup("resourceGroup1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesListSamples.java deleted file mode 100644 index 30ee7a6a7f3d9..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for Workspaces List. */ -public final class WorkspacesListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspacesInSubscription.json - */ - /** - * Sample code: List workspaces in subscription. - * - * @param manager Entry point to SynapseManager. - */ - public static void listWorkspacesInSubscription(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.workspaces().list(Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesUpdateSamples.java deleted file mode 100644 index a60f8dff75213..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesUpdateSamples.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.CustomerManagedKeyDetails; -import com.azure.resourcemanager.synapse.models.EncryptionDetails; -import com.azure.resourcemanager.synapse.models.ManagedIdentity; -import com.azure.resourcemanager.synapse.models.ManagedVirtualNetworkSettings; -import com.azure.resourcemanager.synapse.models.PurviewConfiguration; -import com.azure.resourcemanager.synapse.models.ResourceIdentityType; -import com.azure.resourcemanager.synapse.models.Workspace; -import com.azure.resourcemanager.synapse.models.WorkspaceKeyDetails; -import com.azure.resourcemanager.synapse.models.WorkspacePublicNetworkAccess; -import com.azure.resourcemanager.synapse.models.WorkspaceRepositoryConfiguration; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** Samples for Workspaces Update. */ -public final class WorkspacesUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/UpdateWorkspace.json - */ - /** - * Sample code: Update a workspace. - * - * @param manager Entry point to SynapseManager. - */ - public static void updateAWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) { - Workspace resource = - manager - .workspaces() - .getByResourceGroupWithResponse("resourceGroup1", "workspace1", Context.NONE) - .getValue(); - resource - .update() - .withTags(mapOf("key", "value")) - .withIdentity(new ManagedIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withSqlAdministratorLoginPassword("password") - .withManagedVirtualNetworkSettings( - new ManagedVirtualNetworkSettings() - .withPreventDataExfiltration(false) - .withLinkedAccessCheckOnTargetResource(false) - .withAllowedAadTenantIdsForLinking(Arrays.asList("740239CE-A25B-485B-86A0-262F29F6EBDB"))) - .withWorkspaceRepositoryConfiguration( - new WorkspaceRepositoryConfiguration() - .withType("FactoryGitHubConfiguration") - .withHostname("") - .withAccountName("adifferentacount") - .withProjectName("myproject") - .withRepositoryName("myrepository") - .withCollaborationBranch("master") - .withRootFolder("/")) - .withPurviewConfiguration( - new PurviewConfiguration() - .withPurviewResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.ProjectPurview/accounts/accountname1")) - .withEncryption( - new EncryptionDetails() - .withCmk( - new CustomerManagedKeyDetails() - .withKey( - new WorkspaceKeyDetails() - .withName("default") - .withKeyVaultUrl("https://vault.azure.net/keys/key1")))) - .withPublicNetworkAccess(WorkspacePublicNetworkAccess.ENABLED) - .apply(); - } - - @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; - } -}