From 25bc5557c42b3ca08f0b7bd919b8e89535bc8c3a Mon Sep 17 00:00:00 2001 From: pshao25 <97225342+pshao25@users.noreply.github.com> Date: Thu, 29 Jun 2023 14:08:31 +0800 Subject: [PATCH 1/6] Tag Aynapse.Artifacts to package-artifacts-composite-v7 --- ...lytics.Synapse.Artifacts.netstandard2.0.cs | 691 ++++++- .../src/Generated/ArtifactsClientOptions.cs | 20 +- .../src/Generated/ArtifactsModelFactory.cs | 338 +++- .../src/Generated/LinkConnectionRestClient.cs | 26 +- .../Models/ActionOnExistingTargetTable.cs | 54 + .../Models/Activity.Serialization.cs | 10 + .../src/Generated/Models/Activity.cs | 10 +- .../Models/ActivityOnInactiveMarkAs.cs | 54 + .../src/Generated/Models/ActivityState.cs | 51 + ...ForSqlServerLinkedService.Serialization.cs | 17 +- .../AmazonRdsForSqlServerLinkedService.cs | 6 +- ...azonRdsForSqlServerSource.Serialization.cs | 17 +- .../Models/AmazonRdsForSqlServerSource.cs | 6 +- .../AppendVariableActivity.Serialization.cs | 32 +- .../Models/AppendVariableActivity.cs | 4 +- .../AzureBatchLinkedService.Serialization.cs | 17 +- .../Models/AzureBatchLinkedService.cs | 6 +- .../AzureBlobFSLinkedService.Serialization.cs | 60 +- .../Models/AzureBlobFSLinkedService.cs | 31 +- .../AzureBlobFSReadSettings.Serialization.cs | 8 +- .../Models/AzureBlobFSReadSettings.cs | 8 +- .../src/Generated/Models/AzureBlobFSSink.cs | 4 +- ...eBlobStorageLinkedService.Serialization.cs | 47 +- .../Models/AzureBlobStorageLinkedService.cs | 14 +- ...taExplorerCommandActivity.Serialization.cs | 32 +- .../AzureDataExplorerCommandActivity.cs | 4 +- ...DataExplorerLinkedService.Serialization.cs | 17 +- .../Models/AzureDataExplorerLinkedService.cs | 6 +- ...ataLakeStoreLinkedService.Serialization.cs | 17 +- .../Models/AzureDataLakeStoreLinkedService.cs | 6 +- ...DataLakeStoreReadSettings.Serialization.cs | 8 +- .../Models/AzureDataLakeStoreReadSettings.cs | 8 +- .../Models/AzureDataLakeStoreSink.cs | 4 +- .../Models/AzureDataLakeStoreWriteSettings.cs | 4 +- ...cksDeltaLakeLinkedService.Serialization.cs | 17 +- .../AzureDatabricksDeltaLakeLinkedService.cs | 6 +- ...reDatabricksLinkedService.Serialization.cs | 17 +- .../Models/AzureDatabricksLinkedService.cs | 6 +- .../AzureFunctionActivity.Serialization.cs | 32 +- .../Generated/Models/AzureFunctionActivity.cs | 4 +- ...zureFunctionLinkedService.Serialization.cs | 47 +- .../Models/AzureFunctionLinkedService.cs | 14 +- ...zureKeyVaultLinkedService.Serialization.cs | 17 +- .../Models/AzureKeyVaultLinkedService.cs | 6 +- ...eMLBatchExecutionActivity.Serialization.cs | 32 +- .../Models/AzureMLBatchExecutionActivity.cs | 4 +- ...MLExecutePipelineActivity.Serialization.cs | 32 +- .../Models/AzureMLExecutePipelineActivity.cs | 4 +- .../AzureMLLinkedService.Serialization.cs | 17 +- .../Generated/Models/AzureMLLinkedService.cs | 6 +- ...ureMLServiceLinkedService.Serialization.cs | 17 +- .../Models/AzureMLServiceLinkedService.cs | 6 +- ...eMLUpdateResourceActivity.Serialization.cs | 32 +- .../Models/AzureMLUpdateResourceActivity.cs | 4 +- .../AzureSqlDWLinkedService.Serialization.cs | 17 +- .../Models/AzureSqlDWLinkedService.cs | 6 +- ...eSqlDatabaseLinkedService.Serialization.cs | 32 +- .../Models/AzureSqlDatabaseLinkedService.cs | 10 +- .../AzureSqlMILinkedService.Serialization.cs | 32 +- .../Models/AzureSqlMILinkedService.cs | 10 +- .../Models/AzureSqlSource.Serialization.cs | 17 +- .../src/Generated/Models/AzureSqlSource.cs | 6 +- .../Models/AzureStorageAuthenticationType.cs | 60 + .../Models/BaseNamespace.Serialization.cs | 57 + .../src/Generated/Models/BaseNamespace.cs | 29 + ...mnRelationshipInformation.Serialization.cs | 65 + .../Models/ColumnRelationshipInformation.cs | 34 + .../Models/ControlActivity.Serialization.cs | 32 +- .../src/Generated/Models/ControlActivity.cs | 4 +- .../Models/CopyActivity.Serialization.cs | 32 +- .../src/Generated/Models/CopyActivity.cs | 4 +- .../CosmosDbLinkedService.Serialization.cs | 17 +- .../Generated/Models/CosmosDbLinkedService.cs | 6 +- .../CredentialReference.Serialization.cs | 75 + .../Generated/Models/CredentialReference.cs | 48 + .../Models/CredentialReferenceType.cs | 48 + .../Models/CustomActivity.Serialization.cs | 32 +- .../src/Generated/Models/CustomActivity.cs | 4 +- .../Models/DDLBatch.Serialization.cs | 43 + .../src/Generated/Models/DDLBatch.cs | 31 + .../Models/DDLPayload.Serialization.cs | 48 + .../src/Generated/Models/DDLPayload.cs | 27 + .../Generated/Models/DDLType.Serialization.cs | 30 + .../src/Generated/Models/DDLType.cs | 20 + .../Models/DataColumn.Serialization.cs | 65 + .../src/Generated/Models/DataColumn.cs | 34 + ...LakeAnalyticsUsqlActivity.Serialization.cs | 32 +- .../Models/DataLakeAnalyticsUsqlActivity.cs | 4 +- .../Models/DataSource.Serialization.cs | 107 + .../src/Generated/Models/DataSource.cs | 46 + .../Models/DatabaseEntity.Serialization.cs | 79 + .../src/Generated/Models/DatabaseEntity.cs | 42 + .../DatabaseProperties.Serialization.cs | 149 ++ .../Generated/Models/DatabaseProperties.cs | 46 + ...atabricksNotebookActivity.Serialization.cs | 32 +- .../Models/DatabricksNotebookActivity.cs | 4 +- ...atabricksSparkJarActivity.Serialization.cs | 32 +- .../Models/DatabricksSparkJarActivity.cs | 4 +- ...bricksSparkPythonActivity.Serialization.cs | 32 +- .../Models/DatabricksSparkPythonActivity.cs | 4 +- .../Models/DeleteActivity.Serialization.cs | 32 +- .../src/Generated/Models/DeleteActivity.cs | 4 +- .../Models/DistributionInfo.Serialization.cs | 126 ++ .../src/Generated/Models/DistributionInfo.cs | 45 + .../DynamicsLinkedService.Serialization.cs | 17 +- .../Generated/Models/DynamicsLinkedService.cs | 6 +- .../ExecuteDataFlowActivity.Serialization.cs | 32 +- .../Models/ExecuteDataFlowActivity.cs | 4 +- .../ExecutePipelineActivity.Serialization.cs | 32 +- .../Models/ExecutePipelineActivity.cs | 4 +- ...xecuteSsisPackageActivity.Serialization.cs | 32 +- .../Models/ExecuteSsisPackageActivity.cs | 4 +- .../Models/ExecutionActivity.Serialization.cs | 32 +- .../src/Generated/Models/ExecutionActivity.cs | 4 +- .../Models/FailActivity.Serialization.cs | 32 +- .../src/Generated/Models/FailActivity.cs | 4 +- .../Models/FilterActivity.Serialization.cs | 32 +- .../src/Generated/Models/FilterActivity.cs | 4 +- .../Models/ForEachActivity.Serialization.cs | 32 +- .../src/Generated/Models/ForEachActivity.cs | 4 +- .../Models/FormatInfo.Serialization.cs | 131 ++ .../src/Generated/Models/FormatInfo.cs | 67 + .../GetMetadataActivity.Serialization.cs | 32 +- .../Generated/Models/GetMetadataActivity.cs | 4 +- .../HDInsightHiveActivity.Serialization.cs | 32 +- .../Generated/Models/HDInsightHiveActivity.cs | 4 +- ...DInsightMapReduceActivity.Serialization.cs | 32 +- .../Models/HDInsightMapReduceActivity.cs | 4 +- ...ightOnDemandLinkedService.Serialization.cs | 17 +- .../Models/HDInsightOnDemandLinkedService.cs | 6 +- .../HDInsightPigActivity.Serialization.cs | 32 +- .../Generated/Models/HDInsightPigActivity.cs | 4 +- .../HDInsightSparkActivity.Serialization.cs | 32 +- .../Models/HDInsightSparkActivity.cs | 4 +- ...DInsightStreamingActivity.Serialization.cs | 32 +- .../Models/HDInsightStreamingActivity.cs | 4 +- .../IfConditionActivity.Serialization.cs | 32 +- .../Generated/Models/IfConditionActivity.cs | 4 +- ...getDatabaseTypeProperties.Serialization.cs | 17 +- ...kConnectionTargetDatabaseTypeProperties.cs | 6 +- .../Models/LookupActivity.Serialization.cs | 32 +- .../src/Generated/Models/LookupActivity.cs | 4 +- .../Models/MDEntity.Serialization.cs | 71 + .../src/Generated/Models/MDEntity.cs | 46 + .../MDEntityProperties.Serialization.cs | 130 ++ .../Generated/Models/MDEntityProperties.cs | 48 + ...MongoDbAtlasLinkedService.Serialization.cs | 17 +- .../Models/MongoDbAtlasLinkedService.cs | 6 +- .../src/Generated/Models/Office365Source.cs | 4 +- .../src/Generated/Models/OutputColumn.cs | 21 + .../Models/PartitionInfo.Serialization.cs | 86 + .../src/Generated/Models/PartitionInfo.cs | 38 + .../PartitionInfoNamespace.Serialization.cs | 76 + .../Models/PartitionInfoNamespace.cs | 43 + .../PartitionInfoProperties.Serialization.cs | 176 ++ .../Models/PartitionInfoProperties.cs | 57 + .../src/Generated/Models/PublishStatus.cs | 48 + .../QueryArtifactsResponse.Serialization.cs | 72 + .../Models/QueryArtifactsResponse.cs | 36 + .../RelationshipEntity.Serialization.cs | 79 + .../Generated/Models/RelationshipEntity.cs | 42 + .../RelationshipProperties.Serialization.cs | 199 ++ .../Models/RelationshipProperties.cs | 76 + .../Models/RelationshipType.Serialization.cs | 32 + .../src/Generated/Models/RelationshipType.cs | 22 + .../RestServiceLinkedService.Serialization.cs | 17 +- .../Models/RestServiceLinkedService.cs | 6 +- .../Models/RunNotebookError.Serialization.cs | 71 + .../src/Generated/Models/RunNotebookError.cs | 40 + .../RunNotebookParameter.Serialization.cs | 75 + .../Generated/Models/RunNotebookParameter.cs | 32 + .../RunNotebookRequest.Serialization.cs | 67 + .../Generated/Models/RunNotebookRequest.cs | 33 + .../RunNotebookResponse.Serialization.cs | 59 + .../Generated/Models/RunNotebookResponse.cs | 32 + .../Models/RunNotebookResult.Serialization.cs | 103 + .../src/Generated/Models/RunNotebookResult.cs | 56 + .../RunNotebookSnapshot.Serialization.cs | 123 ++ .../Generated/Models/RunNotebookSnapshot.cs | 73 + ...nNotebookSnapshotResponse.Serialization.cs | 59 + .../Models/RunNotebookSnapshotResponse.cs | 32 + ...RunNotebookSnapshotResult.Serialization.cs | 93 + .../Models/RunNotebookSnapshotResult.cs | 66 + ...tebookSparkSessionOptions.Serialization.cs | 347 ++++ .../Models/RunNotebookSparkSessionOptions.cs | 101 + .../Models/SASEntityType.Serialization.cs | 38 + .../src/Generated/Models/SASEntityType.cs | 28 + ...esforceServiceCloudSource.Serialization.cs | 8 +- .../Models/SalesforceServiceCloudSource.cs | 8 +- .../Models/SalesforceSource.Serialization.cs | 8 +- .../src/Generated/Models/SalesforceSource.cs | 8 +- .../Models/SalesforceSourceReadBehavior.cs | 4 +- .../Models/ScalarTypeInfo.Serialization.cs | 197 ++ .../src/Generated/Models/ScalarTypeInfo.cs | 39 + .../Models/SchemaEntity.Serialization.cs | 79 + .../src/Generated/Models/SchemaEntity.cs | 42 + .../Models/SchemaProperties.Serialization.cs | 138 ++ .../src/Generated/Models/SchemaProperties.cs | 42 + .../Models/ScriptActivity.Serialization.cs | 32 +- .../src/Generated/Models/ScriptActivity.cs | 4 +- .../SecureInputOutputPolicy.Serialization.cs | 79 + .../Models/SecureInputOutputPolicy.cs | 32 + .../SetVariableActivity.Serialization.cs | 62 +- .../Generated/Models/SetVariableActivity.cs | 12 +- .../Models/SortOrder.Serialization.cs | 28 + .../src/Generated/Models/SortOrder.cs | 18 + .../Models/SortingItem.Serialization.cs | 65 + .../src/Generated/Models/SortingItem.cs | 33 + .../Models/SqlAlwaysEncryptedAkvAuthType.cs | 54 + ...AlwaysEncryptedProperties.Serialization.cs | 102 + .../Models/SqlAlwaysEncryptedProperties.cs | 50 + .../Models/SqlDWSource.Serialization.cs | 17 +- .../src/Generated/Models/SqlDWSource.cs | 6 +- .../Models/SqlMISource.Serialization.cs | 17 +- .../src/Generated/Models/SqlMISource.cs | 6 +- ...olStoredProcedureActivity.Serialization.cs | 32 +- .../Models/SqlPoolStoredProcedureActivity.cs | 4 +- .../SqlServerLinkedService.Serialization.cs | 17 +- .../Models/SqlServerLinkedService.cs | 6 +- .../Models/SqlServerSource.Serialization.cs | 17 +- .../src/Generated/Models/SqlServerSource.cs | 6 +- ...erStoredProcedureActivity.Serialization.cs | 32 +- .../SqlServerStoredProcedureActivity.cs | 4 +- .../Models/StorageDescriptor.Serialization.cs | 152 ++ .../src/Generated/Models/StorageDescriptor.cs | 65 + .../Models/SwitchActivity.Serialization.cs | 32 +- .../src/Generated/Models/SwitchActivity.cs | 4 +- .../SyMsapiddlResponse.Serialization.cs | 85 + .../Generated/Models/SyMsapiddlResponse.cs | 73 + .../SyMsapiddlResponses.Serialization.cs | 55 + .../Generated/Models/SyMsapiddlResponses.cs | 38 + .../SynapseNotebookActivity.Serialization.cs | 106 +- .../Models/SynapseNotebookActivity.cs | 23 +- ...parkJobDefinitionActivity.Serialization.cs | 32 +- .../SynapseSparkJobDefinitionActivity.cs | 4 +- .../Models/TableEntity.Serialization.cs | 79 + .../src/Generated/Models/TableEntity.cs | 42 + .../Models/TableNamespace.Serialization.cs | 68 + .../src/Generated/Models/TableNamespace.cs | 38 + .../Models/TablePartitioning.Serialization.cs | 76 + .../src/Generated/Models/TablePartitioning.cs | 45 + .../Models/TableProperties.Serialization.cs | 199 ++ .../src/Generated/Models/TableProperties.cs | 67 + .../Models/TableType.Serialization.cs | 28 + .../src/Generated/Models/TableType.cs | 18 + .../Models/TypeInfo.Serialization.cs | 197 ++ .../src/Generated/Models/TypeInfo.cs | 70 + .../Models/UnknownActivity.Serialization.cs | 32 +- .../src/Generated/Models/UnknownActivity.cs | 4 +- .../Models/UntilActivity.Serialization.cs | 32 +- .../src/Generated/Models/UntilActivity.cs | 4 +- .../ValidationActivity.Serialization.cs | 32 +- .../Generated/Models/ValidationActivity.cs | 4 +- .../Models/ValidationStatus.Serialization.cs | 28 + .../src/Generated/Models/ValidationStatus.cs | 18 + .../Models/ViewEntity.Serialization.cs | 79 + .../src/Generated/Models/ViewEntity.cs | 42 + .../ViewEntityProperties.Serialization.cs | 213 ++ .../Generated/Models/ViewEntityProperties.cs | 69 + .../Models/WaitActivity.Serialization.cs | 32 +- .../src/Generated/Models/WaitActivity.cs | 4 +- .../Models/WebActivity.Serialization.cs | 32 +- .../src/Generated/Models/WebActivity.cs | 4 +- ...WebActivityAuthentication.Serialization.cs | 42 +- .../Models/WebActivityAuthentication.cs | 16 +- .../Models/WebHookActivity.Serialization.cs | 32 +- .../src/Generated/Models/WebHookActivity.cs | 4 +- .../src/Generated/RunNotebookClient.cs | 232 +++ .../Generated/RunNotebookCreateRunHeaders.cs | 23 + .../RunNotebookCreateRunOperation.cs | 82 + .../src/Generated/RunNotebookRestClient.cs | 323 ++++ .../src/Generated/SynapseMetadataClient.cs | 894 +++++++++ ...ataExecuteChangeWithValidationOperation.cs | 62 + .../Generated/SynapseMetadataRestClient.cs | 1718 +++++++++++++++++ .../src/autorest.md | 21 +- 275 files changed, 14247 insertions(+), 270 deletions(-) create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActionOnExistingTargetTable.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityOnInactiveMarkAs.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityState.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureStorageAuthenticationType.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/BaseNamespace.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/BaseNamespace.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ColumnRelationshipInformation.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ColumnRelationshipInformation.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CredentialReference.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CredentialReference.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CredentialReferenceType.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLBatch.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLBatch.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLPayload.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLPayload.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLType.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLType.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataColumn.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataColumn.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataSource.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataSource.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseEntity.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseEntity.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseProperties.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseProperties.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DistributionInfo.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DistributionInfo.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FormatInfo.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FormatInfo.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntity.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntity.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntityProperties.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntityProperties.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OutputColumn.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfo.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfo.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoNamespace.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoNamespace.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoProperties.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoProperties.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PublishStatus.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QueryArtifactsResponse.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QueryArtifactsResponse.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipEntity.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipEntity.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipProperties.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipProperties.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipType.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipType.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookError.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookError.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookParameter.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookParameter.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookRequest.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookRequest.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookResponse.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookResponse.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookResult.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookResult.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSnapshot.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSnapshot.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSnapshotResponse.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSnapshotResponse.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSnapshotResult.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSnapshotResult.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSparkSessionOptions.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSparkSessionOptions.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SASEntityType.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SASEntityType.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ScalarTypeInfo.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ScalarTypeInfo.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaEntity.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaEntity.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaProperties.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaProperties.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SecureInputOutputPolicy.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SecureInputOutputPolicy.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortOrder.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortOrder.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortingItem.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortingItem.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlAlwaysEncryptedAkvAuthType.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlAlwaysEncryptedProperties.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlAlwaysEncryptedProperties.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StorageDescriptor.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StorageDescriptor.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponse.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponse.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponses.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponses.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableEntity.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableEntity.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableNamespace.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableNamespace.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TablePartitioning.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TablePartitioning.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableProperties.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableProperties.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableType.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableType.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TypeInfo.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TypeInfo.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValidationStatus.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValidationStatus.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntity.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntity.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntityProperties.Serialization.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntityProperties.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/RunNotebookClient.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/RunNotebookCreateRunHeaders.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/RunNotebookCreateRunOperation.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/RunNotebookRestClient.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SynapseMetadataClient.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SynapseMetadataExecuteChangeWithValidationOperation.cs create mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SynapseMetadataRestClient.cs diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/api/Azure.Analytics.Synapse.Artifacts.netstandard2.0.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/api/Azure.Analytics.Synapse.Artifacts.netstandard2.0.cs index 7765c510deeb..1785a5d83f5f 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/api/Azure.Analytics.Synapse.Artifacts.netstandard2.0.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/api/Azure.Analytics.Synapse.Artifacts.netstandard2.0.cs @@ -2,14 +2,16 @@ namespace Azure.Analytics.Synapse.Artifacts { public partial class ArtifactsClientOptions : Azure.Core.ClientOptions { - public ArtifactsClientOptions(Azure.Analytics.Synapse.Artifacts.ArtifactsClientOptions.ServiceVersion version = Azure.Analytics.Synapse.Artifacts.ArtifactsClientOptions.ServiceVersion.V2022_12_01_Preview) { } + public ArtifactsClientOptions(Azure.Analytics.Synapse.Artifacts.ArtifactsClientOptions.ServiceVersion version = Azure.Analytics.Synapse.Artifacts.ArtifactsClientOptions.ServiceVersion.V2023_04_18_Preview) { } public enum ServiceVersion { V2020_12_01 = 1, - V2021_06_01_Preview = 2, - V2021_07_01_Preview = 3, - V2021_11_01_Preview = 4, - V2022_12_01_Preview = 5, + V2021_04_01 = 2, + V2021_06_01_Preview = 3, + V2021_07_01_Preview = 4, + V2021_11_01_Preview = 5, + V2022_03_01_Preview = 6, + V2023_04_18_Preview = 7, } } public partial class BigDataPoolsClient @@ -559,6 +561,34 @@ public PipelineRunClient(System.Uri endpoint, Azure.Core.TokenCredential credent public virtual Azure.Response QueryPipelineRunsByWorkspace(Azure.Analytics.Synapse.Artifacts.Models.RunFilterParameters filterParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> QueryPipelineRunsByWorkspaceAsync(Azure.Analytics.Synapse.Artifacts.Models.RunFilterParameters filterParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class RunNotebookClient + { + protected RunNotebookClient() { } + public RunNotebookClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.Analytics.Synapse.Artifacts.ArtifactsClientOptions options = null) { } + public virtual Azure.Response CancelRun(string runId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CancelRunAsync(string runId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSnapshot(string runId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSnapshotAsync(string runId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetStatus(string runId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetStatusAsync(string runId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Analytics.Synapse.Artifacts.RunNotebookCreateRunOperation StartCreateRun(string runId, Azure.Analytics.Synapse.Artifacts.Models.RunNotebookRequest runNotebookRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartCreateRunAsync(string runId, Azure.Analytics.Synapse.Artifacts.Models.RunNotebookRequest runNotebookRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class RunNotebookCreateRunOperation : Azure.Operation + { + protected RunNotebookCreateRunOperation() { } + public override bool HasCompleted { get { throw null; } } + public override bool HasValue { get { throw null; } } + public override string Id { get { throw null; } } + public override Azure.Analytics.Synapse.Artifacts.Models.RunNotebookResponse Value { get { throw null; } } + public override Azure.Response GetRawResponse() { throw null; } + public override Azure.Response UpdateStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask UpdateStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override Azure.Response WaitForCompletion(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override Azure.Response WaitForCompletion(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class SparkConfigurationClient { protected SparkConfigurationClient() { } @@ -770,6 +800,62 @@ protected SqlScriptRenameSqlScriptOperation() { } public override System.Threading.Tasks.ValueTask WaitForCompletionResponseAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public override System.Threading.Tasks.ValueTask WaitForCompletionResponseAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class SynapseMetadataClient + { + protected SynapseMetadataClient() { } + public SynapseMetadataClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.Analytics.Synapse.Artifacts.ArtifactsClientOptions options = null) { } + public virtual Azure.Response DeleteArtifactForDB(string databaseName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string artifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteArtifactForDBAsync(string databaseName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string artifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DeleteArtifactFromSchema(string databaseName, string schemaName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string artifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteArtifactFromSchemaAsync(string databaseName, string schemaName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string artifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DeleteDatabase(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteDatabaseAsync(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ExecuteChange(Azure.Analytics.Synapse.Artifacts.Models.DDLBatch createArtifactsPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExecuteChangeAsync(Azure.Analytics.Synapse.Artifacts.Models.DDLBatch createArtifactsPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetArtifactFromDB(string databaseName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string artifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetArtifactFromDBAsync(string databaseName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string artifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetArtifactFromSchema(string databaseName, string schemaName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string artifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetArtifactFromSchemaAsync(string databaseName, string schemaName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string artifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDatabase(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDatabaseAsync(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSyMSOperationStatus(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSyMSOperationStatusAsync(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ListArtifacts(string databaseName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ListArtifactsAsync(string databaseName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ListArtifactsInSchemaByType(string databaseName, string schemaName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ListArtifactsInSchemaByTypeAsync(string databaseName, string schemaName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ListDatabases(string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ListDatabasesAsync(string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ListPartitionInfosForSchemaAndTable(string databaseName, string schemaName, string tableName, string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ListPartitionInfosForSchemaAndTableAsync(string databaseName, string schemaName, string tableName, string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ListPartitionInfosForSchemaAndView(string databaseName, string schemaName, string viewName, string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ListPartitionInfosForSchemaAndViewAsync(string databaseName, string schemaName, string viewName, string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ListPartitionInfosForTable(string databaseName, string tableName, string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ListPartitionInfosForTableAsync(string databaseName, string tableName, string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ListPartitionInfosForView(string databaseName, string viewName, string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ListPartitionInfosForViewAsync(string databaseName, string viewName, string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response PutArtifactInDB(string databaseName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string artifactName, Azure.Analytics.Synapse.Artifacts.Models.MDEntity createArtifactsPayload, string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PutArtifactInDBAsync(string databaseName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string artifactName, Azure.Analytics.Synapse.Artifacts.Models.MDEntity createArtifactsPayload, string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response PutArtifactInSchema(string databaseName, string schemaName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string artifactName, Azure.Analytics.Synapse.Artifacts.Models.MDEntity createArtifactsPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PutArtifactInSchemaAsync(string databaseName, string schemaName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string artifactName, Azure.Analytics.Synapse.Artifacts.Models.MDEntity createArtifactsPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response PutDatabase(string databaseName, Azure.Analytics.Synapse.Artifacts.Models.DatabaseEntity createArtifactsPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PutDatabaseAsync(string databaseName, Azure.Analytics.Synapse.Artifacts.Models.DatabaseEntity createArtifactsPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Analytics.Synapse.Artifacts.SynapseMetadataExecuteChangeWithValidationOperation StartExecuteChangeWithValidation(string validationType, Azure.Analytics.Synapse.Artifacts.Models.DDLBatch createArtifactsPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartExecuteChangeWithValidationAsync(string validationType, Azure.Analytics.Synapse.Artifacts.Models.DDLBatch createArtifactsPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class SynapseMetadataExecuteChangeWithValidationOperation : Azure.Operation + { + protected SynapseMetadataExecuteChangeWithValidationOperation() { } + public override bool HasCompleted { get { throw null; } } + public override string Id { get { throw null; } } + public override Azure.Response GetRawResponse() { throw null; } + public override Azure.Response UpdateStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask UpdateStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override Azure.Response WaitForCompletionResponse(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override Azure.Response WaitForCompletionResponse(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask WaitForCompletionResponseAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask WaitForCompletionResponseAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class TriggerClient { protected TriggerClient() { } @@ -905,6 +991,25 @@ public WorkspaceGitRepoManagementClient(System.Uri endpoint, Azure.Core.TokenCre } namespace Azure.Analytics.Synapse.Artifacts.Models { + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ActionOnExistingTargetTable : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ActionOnExistingTargetTable(string value) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.ActionOnExistingTargetTable DropAndRecreateTable { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.ActionOnExistingTargetTable FailOnNonEmptyTable { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.ActionOnExistingTargetTable MergeWithExistingData { get { throw null; } } + public bool Equals(Azure.Analytics.Synapse.Artifacts.Models.ActionOnExistingTargetTable other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Analytics.Synapse.Artifacts.Models.ActionOnExistingTargetTable left, Azure.Analytics.Synapse.Artifacts.Models.ActionOnExistingTargetTable right) { throw null; } + public static implicit operator Azure.Analytics.Synapse.Artifacts.Models.ActionOnExistingTargetTable (string value) { throw null; } + public static bool operator !=(Azure.Analytics.Synapse.Artifacts.Models.ActionOnExistingTargetTable left, Azure.Analytics.Synapse.Artifacts.Models.ActionOnExistingTargetTable right) { throw null; } + public override string ToString() { throw null; } + } public partial class Activity { public Activity(string name) { } @@ -912,6 +1017,8 @@ public Activity(string name) { } public System.Collections.Generic.IList DependsOn { get { throw null; } } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.ActivityOnInactiveMarkAs? OnInactiveMarkAs { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.ActivityState? State { get { throw null; } set { } } public System.Collections.Generic.IList UserProperties { get { throw null; } } } public partial class ActivityDependency @@ -921,6 +1028,25 @@ public ActivityDependency(string activity, System.Collections.Generic.IEnumerabl public System.Collections.Generic.IDictionary AdditionalProperties { get { throw null; } } public System.Collections.Generic.IList DependencyConditions { get { throw null; } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ActivityOnInactiveMarkAs : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ActivityOnInactiveMarkAs(string value) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.ActivityOnInactiveMarkAs Failed { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.ActivityOnInactiveMarkAs Skipped { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.ActivityOnInactiveMarkAs Succeeded { get { throw null; } } + public bool Equals(Azure.Analytics.Synapse.Artifacts.Models.ActivityOnInactiveMarkAs other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Analytics.Synapse.Artifacts.Models.ActivityOnInactiveMarkAs left, Azure.Analytics.Synapse.Artifacts.Models.ActivityOnInactiveMarkAs right) { throw null; } + public static implicit operator Azure.Analytics.Synapse.Artifacts.Models.ActivityOnInactiveMarkAs (string value) { throw null; } + public static bool operator !=(Azure.Analytics.Synapse.Artifacts.Models.ActivityOnInactiveMarkAs left, Azure.Analytics.Synapse.Artifacts.Models.ActivityOnInactiveMarkAs right) { throw null; } + public override string ToString() { throw null; } + } public partial class ActivityPolicy { public ActivityPolicy() { } @@ -955,6 +1081,24 @@ internal ActivityRunsQueryResponse() { } public string ContinuationToken { get { throw null; } } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ActivityState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ActivityState(string value) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.ActivityState Active { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.ActivityState Inactive { get { throw null; } } + public bool Equals(Azure.Analytics.Synapse.Artifacts.Models.ActivityState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Analytics.Synapse.Artifacts.Models.ActivityState left, Azure.Analytics.Synapse.Artifacts.Models.ActivityState right) { throw null; } + public static implicit operator Azure.Analytics.Synapse.Artifacts.Models.ActivityState (string value) { throw null; } + public static bool operator !=(Azure.Analytics.Synapse.Artifacts.Models.ActivityState left, Azure.Analytics.Synapse.Artifacts.Models.ActivityState right) { throw null; } + public override string ToString() { throw null; } + } public partial class AddDataFlowToDebugSessionResponse { internal AddDataFlowToDebugSessionResponse() { } @@ -1017,6 +1161,7 @@ public AmazonRdsForOracleTableDataset(Azure.Analytics.Synapse.Artifacts.Models.L public partial class AmazonRdsForSqlServerLinkedService : Azure.Analytics.Synapse.Artifacts.Models.LinkedService { public AmazonRdsForSqlServerLinkedService(object connectionString) { } + public Azure.Analytics.Synapse.Artifacts.Models.SqlAlwaysEncryptedProperties AlwaysEncryptedSettings { get { throw null; } set { } } public object ConnectionString { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase Password { get { throw null; } set { } } @@ -1025,6 +1170,7 @@ public AmazonRdsForSqlServerLinkedService(object connectionString) { } public partial class AmazonRdsForSqlServerSource : Azure.Analytics.Synapse.Artifacts.Models.TabularSource { public AmazonRdsForSqlServerSource() { } + public object IsolationLevel { get { throw null; } set { } } public object PartitionOption { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SqlPartitionSettings PartitionSettings { get { throw null; } set { } } public object ProduceAdditionalTypes { get { throw null; } set { } } @@ -1137,6 +1283,8 @@ public static partial class ArtifactsModelFactory public static Azure.Analytics.Synapse.Artifacts.Models.CreateRunResponse CreateRunResponse(string runId = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.CustomerManagedKeyDetails CustomerManagedKeyDetails(string status = null, Azure.Analytics.Synapse.Artifacts.Models.WorkspaceKeyDetails key = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.CustomEventsTrigger CustomEventsTrigger(string description = null, Azure.Analytics.Synapse.Artifacts.Models.TriggerRuntimeState? runtimeState = default(Azure.Analytics.Synapse.Artifacts.Models.TriggerRuntimeState?), System.Collections.Generic.IEnumerable annotations = null, System.Collections.Generic.IDictionary additionalProperties = null, System.Collections.Generic.IEnumerable pipelines = null, string subjectBeginsWith = null, string subjectEndsWith = null, System.Collections.Generic.IEnumerable events = null, string scope = null) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.DatabaseEntity DatabaseEntity(string name = null, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType type = Azure.Analytics.Synapse.Artifacts.Models.SASEntityType.Database, string id = null, Azure.Analytics.Synapse.Artifacts.Models.DatabaseProperties properties = null) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.DatabaseProperties DatabaseProperties(string originObjectId = null, string objectId = null, long? objectVersion = default(long?), Azure.Analytics.Synapse.Artifacts.Models.PublishStatus? publishStatus = default(Azure.Analytics.Synapse.Artifacts.Models.PublishStatus?), System.Collections.Generic.IDictionary properties = null, Azure.Analytics.Synapse.Artifacts.Models.DataSource source = null, string description = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.DataFlowDebugCommandResponse DataFlowDebugCommandResponse(string status = null, string data = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.DataFlowDebugSessionInfo DataFlowDebugSessionInfo(string dataFlowName = null, string computeType = null, int? coreCount = default(int?), int? nodeCount = default(int?), string integrationRuntimeName = null, string sessionId = null, string startTime = null, int? timeToLiveInMinutes = default(int?), string lastActivityTime = null, System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.DataFlowResource DataFlowResource(string id = null, string name = null, string type = null, string etag = null, Azure.Analytics.Synapse.Artifacts.Models.DataFlow properties = null) { throw null; } @@ -1161,12 +1309,16 @@ public static partial class ArtifactsModelFactory public static Azure.Analytics.Synapse.Artifacts.Models.ManagedIdentity ManagedIdentity(string principalId = null, System.Guid? tenantId = default(System.Guid?), Azure.Analytics.Synapse.Artifacts.Models.ResourceIdentityType? type = default(Azure.Analytics.Synapse.Artifacts.Models.ResourceIdentityType?)) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.ManagedIntegrationRuntime ManagedIntegrationRuntime(Azure.Analytics.Synapse.Artifacts.Models.IntegrationRuntimeType type = default(Azure.Analytics.Synapse.Artifacts.Models.IntegrationRuntimeType), string description = null, System.Collections.Generic.IDictionary additionalProperties = null, Azure.Analytics.Synapse.Artifacts.Models.IntegrationRuntimeState? state = default(Azure.Analytics.Synapse.Artifacts.Models.IntegrationRuntimeState?), Azure.Analytics.Synapse.Artifacts.Models.ManagedVirtualNetworkReference managedVirtualNetwork = null, Azure.Analytics.Synapse.Artifacts.Models.IntegrationRuntimeComputeProperties computeProperties = null, Azure.Analytics.Synapse.Artifacts.Models.IntegrationRuntimeSsisProperties ssisProperties = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.ManagedVirtualNetworkReference ManagedVirtualNetworkReference(Azure.Analytics.Synapse.Artifacts.Models.ManagedVirtualNetworkReferenceType type = default(Azure.Analytics.Synapse.Artifacts.Models.ManagedVirtualNetworkReferenceType), string referenceName = null) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.MDEntity MDEntity(string name = null, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType type = Azure.Analytics.Synapse.Artifacts.Models.SASEntityType.Database, string id = null) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.MDEntityProperties MDEntityProperties(string originObjectId = null, string objectId = null, long? objectVersion = default(long?), Azure.Analytics.Synapse.Artifacts.Models.PublishStatus? publishStatus = default(Azure.Analytics.Synapse.Artifacts.Models.PublishStatus?), System.Collections.Generic.IDictionary properties = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.MetastoreRegistrationResponse MetastoreRegistrationResponse(Azure.Analytics.Synapse.Artifacts.Models.RequestStatus? status = default(Azure.Analytics.Synapse.Artifacts.Models.RequestStatus?)) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.MetastoreRequestSuccessResponse MetastoreRequestSuccessResponse(Azure.Analytics.Synapse.Artifacts.Models.ResourceStatus? status = default(Azure.Analytics.Synapse.Artifacts.Models.ResourceStatus?)) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.MetastoreUpdationResponse MetastoreUpdationResponse(Azure.Analytics.Synapse.Artifacts.Models.RequestStatus? status = default(Azure.Analytics.Synapse.Artifacts.Models.RequestStatus?)) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.MultiplePipelineTrigger MultiplePipelineTrigger(string description = null, Azure.Analytics.Synapse.Artifacts.Models.TriggerRuntimeState? runtimeState = default(Azure.Analytics.Synapse.Artifacts.Models.TriggerRuntimeState?), System.Collections.Generic.IEnumerable annotations = null, System.Collections.Generic.IDictionary additionalProperties = null, System.Collections.Generic.IEnumerable pipelines = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.NotebookResource NotebookResource(string id = null, string name = null, string type = null, string etag = null, Azure.Analytics.Synapse.Artifacts.Models.Notebook properties = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.OperationResult OperationResult(string status = null, string code = null, string message = null, string target = null, System.Collections.Generic.IEnumerable details = null) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.PartitionInfo PartitionInfo(string name = null, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType type = Azure.Analytics.Synapse.Artifacts.Models.SASEntityType.Database, string id = null, Azure.Analytics.Synapse.Artifacts.Models.PartitionInfoProperties properties = null) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.PartitionInfoProperties PartitionInfoProperties(string originObjectId = null, string objectId = null, long? objectVersion = default(long?), Azure.Analytics.Synapse.Artifacts.Models.PublishStatus? publishStatus = default(Azure.Analytics.Synapse.Artifacts.Models.PublishStatus?), System.Collections.Generic.IDictionary properties = null, Azure.Analytics.Synapse.Artifacts.Models.PartitionInfoNamespace @namespace = null, Azure.Analytics.Synapse.Artifacts.Models.StorageDescriptor storageDescriptor = null, System.Collections.Generic.IEnumerable partitionKeyValues = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.PipelineResource PipelineResource(string id = null, string name = null, string type = null, string etag = null, string description = null, System.Collections.Generic.IEnumerable activities = null, System.Collections.Generic.IDictionary parameters = null, System.Collections.Generic.IDictionary variables = null, int? concurrency = default(int?), System.Collections.Generic.IEnumerable annotations = null, System.Collections.Generic.IDictionary runDimensions = null, Azure.Analytics.Synapse.Artifacts.Models.PipelineFolder folder = null, System.Collections.Generic.IDictionary additionalProperties = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.PipelineRun PipelineRun(string runId = null, string runGroupId = null, bool? isLatest = default(bool?), string pipelineName = null, System.Collections.Generic.IReadOnlyDictionary parameters = null, Azure.Analytics.Synapse.Artifacts.Models.PipelineRunInvokedBy invokedBy = null, System.DateTimeOffset? lastUpdated = default(System.DateTimeOffset?), System.DateTimeOffset? runStart = default(System.DateTimeOffset?), System.DateTimeOffset? runEnd = default(System.DateTimeOffset?), int? durationInMs = default(int?), string status = null, string message = null, System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.PipelineRunInvokedBy PipelineRunInvokedBy(string name = null, string id = null, string invokedByType = null) { throw null; } @@ -1175,11 +1327,22 @@ public static partial class ArtifactsModelFactory public static Azure.Analytics.Synapse.Artifacts.Models.PrivateEndpointConnection PrivateEndpointConnection(string id = null, string name = null, string type = null, Azure.Analytics.Synapse.Artifacts.Models.PrivateEndpoint privateEndpoint = null, Azure.Analytics.Synapse.Artifacts.Models.PrivateLinkServiceConnectionState connectionState = null, string provisioningState = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState(string status = null, string description = null, string actionsRequired = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.ProxyResource ProxyResource(string id = null, string name = null, string type = null) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.QueryArtifactsResponse QueryArtifactsResponse(System.Collections.Generic.IEnumerable items = null, string continuationToken = null) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.RelationshipEntity RelationshipEntity(string name = null, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType type = Azure.Analytics.Synapse.Artifacts.Models.SASEntityType.Database, string id = null, Azure.Analytics.Synapse.Artifacts.Models.RelationshipProperties properties = null) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.RelationshipProperties RelationshipProperties(string originObjectId = null, string objectId = null, long? objectVersion = default(long?), Azure.Analytics.Synapse.Artifacts.Models.PublishStatus? publishStatus = default(Azure.Analytics.Synapse.Artifacts.Models.PublishStatus?), System.Collections.Generic.IDictionary properties = null, Azure.Analytics.Synapse.Artifacts.Models.BaseNamespace @namespace = null, string fromTableId = null, string fromTableName = null, string toTableId = null, string toTableName = null, Azure.Analytics.Synapse.Artifacts.Models.RelationshipType? relationshipType = default(Azure.Analytics.Synapse.Artifacts.Models.RelationshipType?), System.Collections.Generic.IEnumerable columnRelationshipInformations = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.RerunTriggerListResponse RerunTriggerListResponse(System.Collections.Generic.IEnumerable value = null, string nextLink = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.RerunTriggerResource RerunTriggerResource(string id = null, string name = null, string type = null, string etag = null, Azure.Analytics.Synapse.Artifacts.Models.RerunTumblingWindowTrigger properties = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.RerunTumblingWindowTrigger RerunTumblingWindowTrigger(string description = null, Azure.Analytics.Synapse.Artifacts.Models.TriggerRuntimeState? runtimeState = default(Azure.Analytics.Synapse.Artifacts.Models.TriggerRuntimeState?), System.Collections.Generic.IEnumerable annotations = null, System.Collections.Generic.IDictionary additionalProperties = null, object parentTrigger = null, System.DateTimeOffset requestedStartTime = default(System.DateTimeOffset), System.DateTimeOffset requestedEndTime = default(System.DateTimeOffset), int rerunConcurrency = 0) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.Resource Resource(string id = null, string name = null, string type = null) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.RunNotebookError RunNotebookError(string ename = null, string evalue = null, System.Collections.Generic.IEnumerable traceback = null) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.RunNotebookResponse RunNotebookResponse(string message = null, Azure.Analytics.Synapse.Artifacts.Models.RunNotebookResult result = null) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.RunNotebookResult RunNotebookResult(string runId = null, string runStatus = null, string lastCheckedOn = null, long? sessionId = default(long?), string sparkPool = null, object sessionDetail = null, string exitValue = null, Azure.Analytics.Synapse.Artifacts.Models.RunNotebookError error = null) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.RunNotebookSnapshot RunNotebookSnapshot(string exitValue = null, string id = null, string notebook = null, Azure.Analytics.Synapse.Artifacts.Models.RunNotebookSparkSessionOptions sessionOptions = null, bool? honorSessionTimeToLive = default(bool?), long? sessionId = default(long?), string sparkPool = null, System.Collections.Generic.IReadOnlyDictionary parameters = null, Azure.Analytics.Synapse.Artifacts.Models.NotebookResource notebookContent = null) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.RunNotebookSnapshotResponse RunNotebookSnapshotResponse(string message = null, Azure.Analytics.Synapse.Artifacts.Models.RunNotebookSnapshotResult result = null) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.RunNotebookSnapshotResult RunNotebookSnapshotResult(Azure.Analytics.Synapse.Artifacts.Models.RunNotebookSnapshot snapshot = null, Azure.Analytics.Synapse.Artifacts.Models.RunNotebookError error = null, string runId = null, string runStatus = null, string lastCheckedOn = null, long? sessionId = default(long?), string sparkPool = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.ScheduleTrigger ScheduleTrigger(string description = null, Azure.Analytics.Synapse.Artifacts.Models.TriggerRuntimeState? runtimeState = default(Azure.Analytics.Synapse.Artifacts.Models.TriggerRuntimeState?), System.Collections.Generic.IEnumerable annotations = null, System.Collections.Generic.IDictionary additionalProperties = null, System.Collections.Generic.IEnumerable pipelines = null, Azure.Analytics.Synapse.Artifacts.Models.ScheduleTriggerRecurrence recurrence = null) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.SchemaEntity SchemaEntity(string name = null, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType type = Azure.Analytics.Synapse.Artifacts.Models.SASEntityType.Database, string id = null, Azure.Analytics.Synapse.Artifacts.Models.SchemaProperties properties = null) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.SchemaProperties SchemaProperties(string originObjectId = null, string objectId = null, long? objectVersion = default(long?), Azure.Analytics.Synapse.Artifacts.Models.PublishStatus? publishStatus = default(Azure.Analytics.Synapse.Artifacts.Models.PublishStatus?), System.Collections.Generic.IDictionary properties = null, Azure.Analytics.Synapse.Artifacts.Models.BaseNamespace @namespace = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.SparkBatchJob SparkBatchJob(Azure.Analytics.Synapse.Artifacts.Models.SparkBatchJobState livyInfo = null, string name = null, string workspaceName = null, string sparkPoolName = null, string submitterName = null, string submitterId = null, string artifactId = null, Azure.Analytics.Synapse.Artifacts.Models.SparkJobType? jobType = default(Azure.Analytics.Synapse.Artifacts.Models.SparkJobType?), Azure.Analytics.Synapse.Artifacts.Models.SparkBatchJobResultType? result = default(Azure.Analytics.Synapse.Artifacts.Models.SparkBatchJobResultType?), Azure.Analytics.Synapse.Artifacts.Models.SparkScheduler scheduler = null, Azure.Analytics.Synapse.Artifacts.Models.SparkServicePlugin plugin = null, System.Collections.Generic.IEnumerable errors = null, System.Collections.Generic.IReadOnlyDictionary tags = null, int id = 0, string appId = null, System.Collections.Generic.IReadOnlyDictionary appInfo = null, Azure.Analytics.Synapse.Artifacts.Models.LivyStates? state = default(Azure.Analytics.Synapse.Artifacts.Models.LivyStates?), System.Collections.Generic.IEnumerable logLines = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.SparkBatchJobState SparkBatchJobState(System.DateTimeOffset? notStartedAt = default(System.DateTimeOffset?), System.DateTimeOffset? startingAt = default(System.DateTimeOffset?), System.DateTimeOffset? runningAt = default(System.DateTimeOffset?), System.DateTimeOffset? deadAt = default(System.DateTimeOffset?), System.DateTimeOffset? successAt = default(System.DateTimeOffset?), System.DateTimeOffset? terminatedAt = default(System.DateTimeOffset?), System.DateTimeOffset? recoveringAt = default(System.DateTimeOffset?), string currentState = null, Azure.Analytics.Synapse.Artifacts.Models.SparkRequest jobCreationRequest = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.SparkConfigurationResource SparkConfigurationResource(string id = null, string name = null, string type = null, string etag = null, Azure.Analytics.Synapse.Artifacts.Models.SparkConfiguration properties = null) { throw null; } @@ -1192,6 +1355,10 @@ public static partial class ArtifactsModelFactory public static Azure.Analytics.Synapse.Artifacts.Models.SqlPoolInfoListResult SqlPoolInfoListResult(string nextLink = null, System.Collections.Generic.IEnumerable value = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.SqlScriptResource SqlScriptResource(string id = null, string name = null, string type = null, string etag = null, Azure.Analytics.Synapse.Artifacts.Models.SqlScript properties = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.SubResource SubResource(string id = null, string name = null, string type = null, string etag = null) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.SyMsapiddlResponse SyMsapiddlResponse(Azure.Analytics.Synapse.Artifacts.Models.DDLType ddlType = Azure.Analytics.Synapse.Artifacts.Models.DDLType.Create, string entityName = null, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType entityType = Azure.Analytics.Synapse.Artifacts.Models.SASEntityType.Database, Azure.Analytics.Synapse.Artifacts.Models.PublishStatus publishStatus = default(Azure.Analytics.Synapse.Artifacts.Models.PublishStatus), string originObjectId = null, string objectId = null, long objectVersion = (long)0) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.SyMsapiddlResponses SyMsapiddlResponses(System.Collections.Generic.IEnumerable syMsApiDdlResponse = null) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.TableEntity TableEntity(string name = null, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType type = Azure.Analytics.Synapse.Artifacts.Models.SASEntityType.Database, string id = null, Azure.Analytics.Synapse.Artifacts.Models.TableProperties properties = null) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.TableProperties TableProperties(string originObjectId = null, string objectId = null, long? objectVersion = default(long?), Azure.Analytics.Synapse.Artifacts.Models.PublishStatus? publishStatus = default(Azure.Analytics.Synapse.Artifacts.Models.PublishStatus?), System.Collections.Generic.IDictionary properties = null, Azure.Analytics.Synapse.Artifacts.Models.TableNamespace @namespace = null, Azure.Analytics.Synapse.Artifacts.Models.TablePartitioning partitioning = null, Azure.Analytics.Synapse.Artifacts.Models.TableType tableType = Azure.Analytics.Synapse.Artifacts.Models.TableType.Managed, Azure.Analytics.Synapse.Artifacts.Models.StorageDescriptor storageDescriptor = null, bool? temporary = default(bool?), bool? isRewriteEnabled = default(bool?)) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.TrackedResource TrackedResource(string id = null, string name = null, string type = null, System.Collections.Generic.IDictionary tags = null, string location = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.Trigger Trigger(string type = null, string description = null, Azure.Analytics.Synapse.Artifacts.Models.TriggerRuntimeState? runtimeState = default(Azure.Analytics.Synapse.Artifacts.Models.TriggerRuntimeState?), System.Collections.Generic.IEnumerable annotations = null, System.Collections.Generic.IDictionary additionalProperties = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.TriggerResource TriggerResource(string id = null, string name = null, string type = null, string etag = null, Azure.Analytics.Synapse.Artifacts.Models.Trigger properties = null) { throw null; } @@ -1199,6 +1366,8 @@ public static partial class ArtifactsModelFactory public static Azure.Analytics.Synapse.Artifacts.Models.TriggerRunsQueryResponse TriggerRunsQueryResponse(System.Collections.Generic.IEnumerable value = null, string continuationToken = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.TriggerSubscriptionOperationStatus TriggerSubscriptionOperationStatus(string triggerName = null, Azure.Analytics.Synapse.Artifacts.Models.EventSubscriptionStatus? status = default(Azure.Analytics.Synapse.Artifacts.Models.EventSubscriptionStatus?)) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.TumblingWindowTrigger TumblingWindowTrigger(string description = null, Azure.Analytics.Synapse.Artifacts.Models.TriggerRuntimeState? runtimeState = default(Azure.Analytics.Synapse.Artifacts.Models.TriggerRuntimeState?), System.Collections.Generic.IEnumerable annotations = null, System.Collections.Generic.IDictionary additionalProperties = null, Azure.Analytics.Synapse.Artifacts.Models.TriggerPipelineReference pipeline = null, Azure.Analytics.Synapse.Artifacts.Models.TumblingWindowFrequency frequency = default(Azure.Analytics.Synapse.Artifacts.Models.TumblingWindowFrequency), int interval = 0, System.DateTimeOffset startTime = default(System.DateTimeOffset), System.DateTimeOffset? endTime = default(System.DateTimeOffset?), object delay = null, int maxConcurrency = 0, Azure.Analytics.Synapse.Artifacts.Models.RetryPolicy retryPolicy = null, System.Collections.Generic.IEnumerable dependsOn = null) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.ViewEntity ViewEntity(string name = null, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType type = Azure.Analytics.Synapse.Artifacts.Models.SASEntityType.Database, string id = null, Azure.Analytics.Synapse.Artifacts.Models.ViewEntityProperties properties = null) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.ViewEntityProperties ViewEntityProperties(string originObjectId = null, string objectId = null, long? objectVersion = default(long?), Azure.Analytics.Synapse.Artifacts.Models.PublishStatus? publishStatus = default(Azure.Analytics.Synapse.Artifacts.Models.PublishStatus?), System.Collections.Generic.IDictionary properties = null, Azure.Analytics.Synapse.Artifacts.Models.TableNamespace @namespace = null, Azure.Analytics.Synapse.Artifacts.Models.TablePartitioning partitioning = null, Azure.Analytics.Synapse.Artifacts.Models.StorageDescriptor storageDescriptor = null, string viewOriginalText = null, string viewExpandedText = null, bool? temporary = default(bool?), bool? isRewriteEnabled = default(bool?)) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.Workspace Workspace(string id = null, string name = null, string type = null, System.Collections.Generic.IDictionary tags = null, string location = null, Azure.Analytics.Synapse.Artifacts.Models.ManagedIdentity identity = null, Azure.Analytics.Synapse.Artifacts.Models.DataLakeStorageAccountDetails defaultDataLakeStorage = null, string sqlAdministratorLoginPassword = null, string managedResourceGroupName = null, string provisioningState = null, string sqlAdministratorLogin = null, Azure.Analytics.Synapse.Artifacts.Models.VirtualNetworkProfile virtualNetworkProfile = null, System.Collections.Generic.IDictionary connectivityEndpoints = null, string managedVirtualNetwork = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.Analytics.Synapse.Artifacts.Models.EncryptionDetails encryption = null, System.Guid? workspaceUID = default(System.Guid?), System.Collections.Generic.IReadOnlyDictionary extraProperties = null, Azure.Analytics.Synapse.Artifacts.Models.ManagedVirtualNetworkSettings managedVirtualNetworkSettings = null, Azure.Analytics.Synapse.Artifacts.Models.WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration = null, Azure.Analytics.Synapse.Artifacts.Models.PurviewConfiguration purviewConfiguration = null, string adlaResourceId = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.WorkspaceIdentity WorkspaceIdentity(Azure.Analytics.Synapse.Artifacts.Models.WorkspaceIdentityType type = default(Azure.Analytics.Synapse.Artifacts.Models.WorkspaceIdentityType), string principalId = null, string tenantId = null) { throw null; } } @@ -1258,6 +1427,7 @@ public AzureBatchLinkedService(object accountName, object batchUri, object poolN public Azure.Analytics.Synapse.Artifacts.Models.SecretBase AccessKey { get { throw null; } set { } } public object AccountName { get { throw null; } set { } } public object BatchUri { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.CredentialReference Credential { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.LinkedServiceReference LinkedServiceName { get { throw null; } set { } } public object PoolName { get { throw null; } set { } } @@ -1283,10 +1453,13 @@ public AzureBlobFSDataset(Azure.Analytics.Synapse.Artifacts.Models.LinkedService } public partial class AzureBlobFSLinkedService : Azure.Analytics.Synapse.Artifacts.Models.LinkedService { - public AzureBlobFSLinkedService(object url) { } + public AzureBlobFSLinkedService() { } public object AccountKey { get { throw null; } set { } } public object AzureCloudType { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.CredentialReference Credential { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.SecretBase SasToken { get { throw null; } set { } } + public object SasUri { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase ServicePrincipalCredential { get { throw null; } set { } } public object ServicePrincipalCredentialType { get { throw null; } set { } } public object ServicePrincipalId { get { throw null; } set { } } @@ -1303,7 +1476,7 @@ public partial class AzureBlobFSReadSettings : Azure.Analytics.Synapse.Artifacts { public AzureBlobFSReadSettings() { } public object DeleteFilesAfterCompletion { get { throw null; } set { } } - public bool? EnablePartitionDiscovery { get { throw null; } set { } } + public object EnablePartitionDiscovery { get { throw null; } set { } } public object FileListPath { get { throw null; } set { } } public object ModifiedDatetimeEnd { get { throw null; } set { } } public object ModifiedDatetimeStart { get { throw null; } set { } } @@ -1334,8 +1507,11 @@ public partial class AzureBlobStorageLinkedService : Azure.Analytics.Synapse.Art public AzureBlobStorageLinkedService() { } public Azure.Analytics.Synapse.Artifacts.Models.AzureKeyVaultSecretReference AccountKey { get { throw null; } set { } } public string AccountKind { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.AzureStorageAuthenticationType? AuthenticationType { get { throw null; } set { } } public object AzureCloudType { get { throw null; } set { } } public object ConnectionString { get { throw null; } set { } } + public object ContainerUri { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.CredentialReference Credential { get { throw null; } set { } } public string EncryptedCredential { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.AzureKeyVaultSecretReference SasToken { get { throw null; } set { } } public object SasUri { get { throw null; } set { } } @@ -1391,6 +1567,7 @@ public partial class AzureDatabricksDeltaLakeLinkedService : Azure.Analytics.Syn public AzureDatabricksDeltaLakeLinkedService(object domain, Azure.Analytics.Synapse.Artifacts.Models.SecretBase accessToken) { } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase AccessToken { get { throw null; } set { } } public object ClusterId { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.CredentialReference Credential { get { throw null; } set { } } public object Domain { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } } @@ -1411,6 +1588,7 @@ public partial class AzureDatabricksLinkedService : Azure.Analytics.Synapse.Arti public AzureDatabricksLinkedService(object domain) { } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase AccessToken { get { throw null; } set { } } public object Authentication { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.CredentialReference Credential { get { throw null; } set { } } public object Domain { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } public object ExistingClusterId { get { throw null; } set { } } @@ -1437,6 +1615,7 @@ public AzureDataExplorerCommandActivity(string name, object command) : base (def public partial class AzureDataExplorerLinkedService : Azure.Analytics.Synapse.Artifacts.Models.LinkedService { public AzureDataExplorerLinkedService(object endpoint, object database) { } + public Azure.Analytics.Synapse.Artifacts.Models.CredentialReference Credential { get { throw null; } set { } } public object Database { get { throw null; } set { } } public object Endpoint { get { throw null; } set { } } public object ServicePrincipalId { get { throw null; } set { } } @@ -1488,6 +1667,7 @@ public partial class AzureDataLakeStoreLinkedService : Azure.Analytics.Synapse.A public AzureDataLakeStoreLinkedService(object dataLakeStoreUri) { } public object AccountName { get { throw null; } set { } } public object AzureCloudType { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.CredentialReference Credential { get { throw null; } set { } } public object DataLakeStoreUri { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } public object ResourceGroupName { get { throw null; } set { } } @@ -1504,7 +1684,7 @@ public partial class AzureDataLakeStoreReadSettings : Azure.Analytics.Synapse.Ar { public AzureDataLakeStoreReadSettings() { } public object DeleteFilesAfterCompletion { get { throw null; } set { } } - public bool? EnablePartitionDiscovery { get { throw null; } set { } } + public object EnablePartitionDiscovery { get { throw null; } set { } } public object FileListPath { get { throw null; } set { } } public object ListAfter { get { throw null; } set { } } public object ListBefore { get { throw null; } set { } } @@ -1606,14 +1786,18 @@ public AzureFunctionActivity(string name, Azure.Analytics.Synapse.Artifacts.Mode public partial class AzureFunctionLinkedService : Azure.Analytics.Synapse.Artifacts.Models.LinkedService { public AzureFunctionLinkedService(object functionAppUrl) { } + public object Authentication { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.CredentialReference Credential { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } public object FunctionAppUrl { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase FunctionKey { get { throw null; } set { } } + public object ResourceId { get { throw null; } set { } } } public partial class AzureKeyVaultLinkedService : Azure.Analytics.Synapse.Artifacts.Models.LinkedService { public AzureKeyVaultLinkedService(object baseUrl) { } public object BaseUrl { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.CredentialReference Credential { get { throw null; } set { } } } public partial class AzureKeyVaultSecretReference : Azure.Analytics.Synapse.Artifacts.Models.SecretBase { @@ -1659,6 +1843,7 @@ public partial class AzureMLLinkedService : Azure.Analytics.Synapse.Artifacts.Mo { public AzureMLLinkedService(object mlEndpoint, Azure.Analytics.Synapse.Artifacts.Models.SecretBase apiKey) { } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase ApiKey { get { throw null; } set { } } + public object Authentication { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } public object MlEndpoint { get { throw null; } set { } } public object ServicePrincipalId { get { throw null; } set { } } @@ -1669,6 +1854,7 @@ public AzureMLLinkedService(object mlEndpoint, Azure.Analytics.Synapse.Artifacts public partial class AzureMLServiceLinkedService : Azure.Analytics.Synapse.Artifacts.Models.LinkedService { public AzureMLServiceLinkedService(object subscriptionId, object resourceGroupName, object mlWorkspaceName) { } + public object Authentication { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } public object MlWorkspaceName { get { throw null; } set { } } public object ResourceGroupName { get { throw null; } set { } } @@ -1779,8 +1965,10 @@ public AzureSearchLinkedService(object url) { } public partial class AzureSqlDatabaseLinkedService : Azure.Analytics.Synapse.Artifacts.Models.LinkedService { public AzureSqlDatabaseLinkedService(object connectionString) { } + public Azure.Analytics.Synapse.Artifacts.Models.SqlAlwaysEncryptedProperties AlwaysEncryptedSettings { get { throw null; } set { } } public object AzureCloudType { get { throw null; } set { } } public object ConnectionString { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.CredentialReference Credential { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.AzureKeyVaultSecretReference Password { get { throw null; } set { } } public object ServicePrincipalId { get { throw null; } set { } } @@ -1792,6 +1980,7 @@ public partial class AzureSqlDWLinkedService : Azure.Analytics.Synapse.Artifacts public AzureSqlDWLinkedService(object connectionString) { } public object AzureCloudType { get { throw null; } set { } } public object ConnectionString { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.CredentialReference Credential { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.AzureKeyVaultSecretReference Password { get { throw null; } set { } } public object ServicePrincipalId { get { throw null; } set { } } @@ -1808,8 +1997,10 @@ public AzureSqlDWTableDataset(Azure.Analytics.Synapse.Artifacts.Models.LinkedSer public partial class AzureSqlMILinkedService : Azure.Analytics.Synapse.Artifacts.Models.LinkedService { public AzureSqlMILinkedService(object connectionString) { } + public Azure.Analytics.Synapse.Artifacts.Models.SqlAlwaysEncryptedProperties AlwaysEncryptedSettings { get { throw null; } set { } } public object AzureCloudType { get { throw null; } set { } } public object ConnectionString { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.CredentialReference Credential { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.AzureKeyVaultSecretReference Password { get { throw null; } set { } } public object ServicePrincipalId { get { throw null; } set { } } @@ -1836,6 +2027,7 @@ public AzureSqlSink() { } public partial class AzureSqlSource : Azure.Analytics.Synapse.Artifacts.Models.TabularSource { public AzureSqlSource() { } + public object IsolationLevel { get { throw null; } set { } } public object PartitionOption { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SqlPartitionSettings PartitionSettings { get { throw null; } set { } } public object ProduceAdditionalTypes { get { throw null; } set { } } @@ -1850,6 +2042,27 @@ public AzureSqlTableDataset(Azure.Analytics.Synapse.Artifacts.Models.LinkedServi public object Table { get { throw null; } set { } } public object TableName { get { throw null; } set { } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AzureStorageAuthenticationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AzureStorageAuthenticationType(string value) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.AzureStorageAuthenticationType AccountKey { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.AzureStorageAuthenticationType Anonymous { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.AzureStorageAuthenticationType Msi { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.AzureStorageAuthenticationType SasUri { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.AzureStorageAuthenticationType ServicePrincipal { get { throw null; } } + public bool Equals(Azure.Analytics.Synapse.Artifacts.Models.AzureStorageAuthenticationType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Analytics.Synapse.Artifacts.Models.AzureStorageAuthenticationType left, Azure.Analytics.Synapse.Artifacts.Models.AzureStorageAuthenticationType right) { throw null; } + public static implicit operator Azure.Analytics.Synapse.Artifacts.Models.AzureStorageAuthenticationType (string value) { throw null; } + public static bool operator !=(Azure.Analytics.Synapse.Artifacts.Models.AzureStorageAuthenticationType left, Azure.Analytics.Synapse.Artifacts.Models.AzureStorageAuthenticationType right) { throw null; } + public override string ToString() { throw null; } + } public partial class AzureStorageLinkedService : Azure.Analytics.Synapse.Artifacts.Models.LinkedService { public AzureStorageLinkedService() { } @@ -1894,6 +2107,11 @@ public AzureTableStorageLinkedService() { } public Azure.Analytics.Synapse.Artifacts.Models.AzureKeyVaultSecretReference SasToken { get { throw null; } set { } } public object SasUri { get { throw null; } set { } } } + public partial class BaseNamespace + { + public BaseNamespace(string databaseName) { } + public string DatabaseName { get { throw null; } set { } } + } public partial class BigDataPoolParametrizationReference { public BigDataPoolParametrizationReference(Azure.Analytics.Synapse.Artifacts.Models.BigDataPoolReferenceType type, object referenceName) { } @@ -2105,6 +2323,12 @@ internal CloudError() { } public string Message { get { throw null; } } public string Target { get { throw null; } } } + public partial class ColumnRelationshipInformation + { + public ColumnRelationshipInformation(string fromColumnName, string toColumnName) { } + public string FromColumnName { get { throw null; } set { } } + public string ToColumnName { get { throw null; } set { } } + } public partial class CommonDataServiceForAppsEntityDataset : Azure.Analytics.Synapse.Artifacts.Models.Dataset { public CommonDataServiceForAppsEntityDataset(Azure.Analytics.Synapse.Artifacts.Models.LinkedServiceReference linkedServiceName) : base (default(Azure.Analytics.Synapse.Artifacts.Models.LinkedServiceReference)) { } @@ -2245,6 +2469,7 @@ public CosmosDbLinkedService() { } public object AccountEndpoint { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase AccountKey { get { throw null; } set { } } public object ConnectionString { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.CredentialReference Credential { get { throw null; } set { } } public object Database { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } } @@ -2347,6 +2572,30 @@ public partial class CreateRunResponse internal CreateRunResponse() { } public string RunId { get { throw null; } } } + public partial class CredentialReference + { + public CredentialReference(Azure.Analytics.Synapse.Artifacts.Models.CredentialReferenceType type, string referenceName) { } + public System.Collections.Generic.IDictionary AdditionalProperties { get { throw null; } } + public string ReferenceName { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.CredentialReferenceType Type { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CredentialReferenceType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CredentialReferenceType(string value) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.CredentialReferenceType CredentialReference { get { throw null; } } + public bool Equals(Azure.Analytics.Synapse.Artifacts.Models.CredentialReferenceType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Analytics.Synapse.Artifacts.Models.CredentialReferenceType left, Azure.Analytics.Synapse.Artifacts.Models.CredentialReferenceType right) { throw null; } + public static implicit operator Azure.Analytics.Synapse.Artifacts.Models.CredentialReferenceType (string value) { throw null; } + public static bool operator !=(Azure.Analytics.Synapse.Artifacts.Models.CredentialReferenceType left, Azure.Analytics.Synapse.Artifacts.Models.CredentialReferenceType right) { throw null; } + public override string ToString() { throw null; } + } public partial class CustomActivity : Azure.Analytics.Synapse.Artifacts.Models.ExecutionActivity { public CustomActivity(string name, object command) : base (default(string)) { } @@ -2392,6 +2641,17 @@ public partial class CustomSetupBase { public CustomSetupBase() { } } + public partial class DatabaseEntity : Azure.Analytics.Synapse.Artifacts.Models.MDEntity + { + public DatabaseEntity(string name, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType type, Azure.Analytics.Synapse.Artifacts.Models.DatabaseProperties properties) : base (default(string), default(Azure.Analytics.Synapse.Artifacts.Models.SASEntityType)) { } + public Azure.Analytics.Synapse.Artifacts.Models.DatabaseProperties Properties { get { throw null; } set { } } + } + public partial class DatabaseProperties : Azure.Analytics.Synapse.Artifacts.Models.MDEntityProperties + { + public DatabaseProperties(Azure.Analytics.Synapse.Artifacts.Models.DataSource source) { } + public string Description { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.DataSource Source { get { throw null; } set { } } + } public partial class DatabricksNotebookActivity : Azure.Analytics.Synapse.Artifacts.Models.ExecutionActivity { public DatabricksNotebookActivity(string name, object notebookPath) : base (default(string)) { } @@ -2413,6 +2673,12 @@ public DatabricksSparkPythonActivity(string name, object pythonFile) : base (def public System.Collections.Generic.IList Parameters { get { throw null; } } public object PythonFile { get { throw null; } set { } } } + public partial class DataColumn + { + public DataColumn(string name, Azure.Analytics.Synapse.Artifacts.Models.TypeInfo originDataTypeName) { } + public string Name { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.TypeInfo OriginDataTypeName { get { throw null; } set { } } + } public partial class DataFlow { public DataFlow() { } @@ -2706,6 +2972,13 @@ public DatasetStorageFormat() { } public object Deserializer { get { throw null; } set { } } public object Serializer { get { throw null; } set { } } } + public partial class DataSource + { + public DataSource(string location) { } + public string Location { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Properties { get { throw null; } } + public string Provider { get { throw null; } set { } } + } public partial class DataworldLinkedService : Azure.Analytics.Synapse.Artifacts.Models.LinkedService { public DataworldLinkedService(Azure.Analytics.Synapse.Artifacts.Models.SecretBase apiToken) { } @@ -2764,6 +3037,24 @@ public Db2TableDataset(Azure.Analytics.Synapse.Artifacts.Models.LinkedServiceRef public object Table { get { throw null; } set { } } public object TableName { get { throw null; } set { } } } + public partial class DDLBatch + { + public DDLBatch(System.Collections.Generic.IEnumerable ddls) { } + public System.Collections.Generic.IList Ddls { get { throw null; } } + } + public partial class DDLPayload + { + public DDLPayload(Azure.Analytics.Synapse.Artifacts.Models.DDLType actionType) { } + public Azure.Analytics.Synapse.Artifacts.Models.DDLType ActionType { get { throw null; } } + public Azure.Analytics.Synapse.Artifacts.Models.MDEntity NewEntity { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.MDEntity OldEntity { get { throw null; } set { } } + } + public enum DDLType + { + Create = 0, + Alter = 1, + Drop = 2, + } public partial class DeleteActivity : Azure.Analytics.Synapse.Artifacts.Models.ExecutionActivity { public DeleteActivity(string name, Azure.Analytics.Synapse.Artifacts.Models.DatasetReference dataset) : base (default(string)) { } @@ -2852,6 +3143,14 @@ public DistcpSettings(object resourceManagerEndpoint, object tempScriptPath) { } public object ResourceManagerEndpoint { get { throw null; } set { } } public object TempScriptPath { get { throw null; } set { } } } + public partial class DistributionInfo + { + public DistributionInfo() { } + public int? Count { get { throw null; } set { } } + public System.Collections.Generic.IList Keys { get { throw null; } } + public System.Collections.Generic.IList SortKeys { get { throw null; } } + public string Type { get { throw null; } set { } } + } public partial class DocumentDbCollectionDataset : Azure.Analytics.Synapse.Artifacts.Models.Dataset { public DocumentDbCollectionDataset(Azure.Analytics.Synapse.Artifacts.Models.LinkedServiceReference linkedServiceName, object collectionName) : base (default(Azure.Analytics.Synapse.Artifacts.Models.LinkedServiceReference)) { } @@ -2971,6 +3270,7 @@ public partial class DynamicsLinkedService : Azure.Analytics.Synapse.Artifacts.M { public DynamicsLinkedService(object deploymentType, object authenticationType) { } public object AuthenticationType { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.CredentialReference Credential { get { throw null; } set { } } public object DeploymentType { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } public object HostName { get { throw null; } set { } } @@ -3266,6 +3566,16 @@ public ForEachActivity(string name, Azure.Analytics.Synapse.Artifacts.Models.Exp public bool? IsSequential { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.Expression Items { get { throw null; } set { } } } + public partial class FormatInfo + { + public FormatInfo(string inputFormat, string outputFormat, string formatType, string serializeLib) { } + public string FormatType { get { throw null; } set { } } + public string InputFormat { get { throw null; } set { } } + public string OutputFormat { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Properties { get { throw null; } } + public string SerDeName { get { throw null; } set { } } + public string SerializeLib { get { throw null; } set { } } + } public partial class FormatReadSettings { public FormatReadSettings() { } @@ -3641,6 +3951,7 @@ public HDInsightOnDemandLinkedService(object clusterSize, object timeToLive, obj public object ClusterType { get { throw null; } set { } } public object ClusterUserName { get { throw null; } set { } } public object CoreConfiguration { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.CredentialReference Credential { get { throw null; } set { } } public object DataNodeSize { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } public object HBaseConfiguration { get { throw null; } set { } } @@ -4408,6 +4719,7 @@ public LinkConnectionTargetDatabase() { } public partial class LinkConnectionTargetDatabaseTypeProperties { public LinkConnectionTargetDatabaseTypeProperties() { } + public Azure.Analytics.Synapse.Artifacts.Models.ActionOnExistingTargetTable? ActionOnExistingTargetTable { get { throw null; } set { } } public bool? CrossTableTransaction { get { throw null; } set { } } public bool? DropExistingTargetTableOnStart { get { throw null; } set { } } } @@ -4678,6 +4990,22 @@ public partial class MarketoSource : Azure.Analytics.Synapse.Artifacts.Models.Ta public MarketoSource() { } public object Query { get { throw null; } set { } } } + public partial class MDEntity + { + public MDEntity(string name, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType type) { } + public string Id { get { throw null; } } + public string Name { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.SASEntityType Type { get { throw null; } set { } } + } + public partial class MDEntityProperties + { + public MDEntityProperties() { } + public string ObjectId { get { throw null; } } + public long? ObjectVersion { get { throw null; } } + public string OriginObjectId { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Properties { get { throw null; } } + public Azure.Analytics.Synapse.Artifacts.Models.PublishStatus? PublishStatus { get { throw null; } set { } } + } public partial class MetastoreRegisterObject { public MetastoreRegisterObject(string inputFolder) { } @@ -4739,6 +5067,7 @@ public partial class MongoDbAtlasLinkedService : Azure.Analytics.Synapse.Artifac public MongoDbAtlasLinkedService(object connectionString, object database) { } public object ConnectionString { get { throw null; } set { } } public object Database { get { throw null; } set { } } + public object MongoDbAtlasDriverVersion { get { throw null; } set { } } } public partial class MongoDbAtlasSource : Azure.Analytics.Synapse.Artifacts.Models.CopySource { @@ -5340,6 +5669,23 @@ public ParquetWriteSettings() { } public object FileNamePrefix { get { throw null; } set { } } public object MaxRowsPerFile { get { throw null; } set { } } } + public partial class PartitionInfo : Azure.Analytics.Synapse.Artifacts.Models.MDEntity + { + public PartitionInfo(string name, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType type) : base (default(string), default(Azure.Analytics.Synapse.Artifacts.Models.SASEntityType)) { } + public Azure.Analytics.Synapse.Artifacts.Models.PartitionInfoProperties Properties { get { throw null; } set { } } + } + public partial class PartitionInfoNamespace : Azure.Analytics.Synapse.Artifacts.Models.TableNamespace + { + public PartitionInfoNamespace(string databaseName, string tableName) : base (default(string)) { } + public string TableName { get { throw null; } set { } } + } + public partial class PartitionInfoProperties : Azure.Analytics.Synapse.Artifacts.Models.MDEntityProperties + { + public PartitionInfoProperties(Azure.Analytics.Synapse.Artifacts.Models.PartitionInfoNamespace @namespace, Azure.Analytics.Synapse.Artifacts.Models.StorageDescriptor storageDescriptor, System.Collections.Generic.IEnumerable partitionKeyValues) { } + public Azure.Analytics.Synapse.Artifacts.Models.PartitionInfoNamespace Namespace { get { throw null; } set { } } + public System.Collections.Generic.IList PartitionKeyValues { get { throw null; } } + public Azure.Analytics.Synapse.Artifacts.Models.StorageDescriptor StorageDescriptor { get { throw null; } set { } } + } public partial class PaypalLinkedService : Azure.Analytics.Synapse.Artifacts.Models.LinkedService { public PaypalLinkedService(object host, object clientId) { } @@ -5626,11 +5972,34 @@ public partial class ProxyResource : Azure.Analytics.Synapse.Artifacts.Models.Re { public ProxyResource() { } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PublishStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PublishStatus(string value) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.PublishStatus PUBLISHED { get { throw null; } } + public bool Equals(Azure.Analytics.Synapse.Artifacts.Models.PublishStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Analytics.Synapse.Artifacts.Models.PublishStatus left, Azure.Analytics.Synapse.Artifacts.Models.PublishStatus right) { throw null; } + public static implicit operator Azure.Analytics.Synapse.Artifacts.Models.PublishStatus (string value) { throw null; } + public static bool operator !=(Azure.Analytics.Synapse.Artifacts.Models.PublishStatus left, Azure.Analytics.Synapse.Artifacts.Models.PublishStatus right) { throw null; } + public override string ToString() { throw null; } + } public partial class PurviewConfiguration { public PurviewConfiguration() { } public string PurviewResourceId { get { throw null; } set { } } } + public partial class QueryArtifactsResponse + { + internal QueryArtifactsResponse() { } + public string ContinuationToken { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Items { get { throw null; } } + } public partial class QueryTableStatusRequest { public QueryTableStatusRequest() { } @@ -5731,6 +6100,29 @@ public partial class RelationalTableDataset : Azure.Analytics.Synapse.Artifacts. public RelationalTableDataset(Azure.Analytics.Synapse.Artifacts.Models.LinkedServiceReference linkedServiceName) : base (default(Azure.Analytics.Synapse.Artifacts.Models.LinkedServiceReference)) { } public object TableName { get { throw null; } set { } } } + public partial class RelationshipEntity : Azure.Analytics.Synapse.Artifacts.Models.MDEntity + { + public RelationshipEntity(string name, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType type, Azure.Analytics.Synapse.Artifacts.Models.RelationshipProperties properties) : base (default(string), default(Azure.Analytics.Synapse.Artifacts.Models.SASEntityType)) { } + public Azure.Analytics.Synapse.Artifacts.Models.RelationshipProperties Properties { get { throw null; } set { } } + } + public partial class RelationshipProperties : Azure.Analytics.Synapse.Artifacts.Models.MDEntityProperties + { + public RelationshipProperties(Azure.Analytics.Synapse.Artifacts.Models.BaseNamespace @namespace, string fromTableName, string toTableName, System.Collections.Generic.IEnumerable columnRelationshipInformations) { } + public System.Collections.Generic.IList ColumnRelationshipInformations { get { throw null; } } + public string FromTableId { get { throw null; } } + public string FromTableName { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.BaseNamespace Namespace { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.RelationshipType? RelationshipType { get { throw null; } set { } } + public string ToTableId { get { throw null; } } + public string ToTableName { get { throw null; } set { } } + } + public enum RelationshipType + { + Onetoone = 0, + Onetomany = 1, + Manytoone = 2, + Manytomany = 3, + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct RequestStatus : System.IEquatable { @@ -5860,6 +6252,7 @@ public RestServiceLinkedService(object url, Azure.Analytics.Synapse.Artifacts.Mo public object AzureCloudType { get { throw null; } set { } } public object ClientId { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase ClientSecret { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.CredentialReference Credential { get { throw null; } set { } } public object EnableServerCertificateValidation { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase Password { get { throw null; } set { } } @@ -5907,6 +6300,97 @@ public RunFilterParameters(System.DateTimeOffset lastUpdatedAfter, System.DateTi public System.DateTimeOffset LastUpdatedBefore { get { throw null; } } public System.Collections.Generic.IList OrderBy { get { throw null; } } } + public partial class RunNotebookError + { + internal RunNotebookError() { } + public string Ename { get { throw null; } } + public string Evalue { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Traceback { get { throw null; } } + } + public partial class RunNotebookParameter + { + public RunNotebookParameter() { } + public string Type { get { throw null; } set { } } + public object Value { get { throw null; } set { } } + } + public partial class RunNotebookRequest + { + public RunNotebookRequest() { } + public bool? HonorSessionTimeToLive { get { throw null; } set { } } + public string Notebook { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Parameters { get { throw null; } } + public Azure.Analytics.Synapse.Artifacts.Models.RunNotebookSparkSessionOptions SessionOptions { get { throw null; } set { } } + public string SparkPool { get { throw null; } set { } } + } + public partial class RunNotebookResponse + { + internal RunNotebookResponse() { } + public string Message { get { throw null; } } + public Azure.Analytics.Synapse.Artifacts.Models.RunNotebookResult Result { get { throw null; } } + } + public partial class RunNotebookResult + { + internal RunNotebookResult() { } + public Azure.Analytics.Synapse.Artifacts.Models.RunNotebookError Error { get { throw null; } } + public string ExitValue { get { throw null; } } + public string LastCheckedOn { get { throw null; } } + public string RunId { get { throw null; } } + public string RunStatus { get { throw null; } } + public object SessionDetail { get { throw null; } } + public long? SessionId { get { throw null; } } + public string SparkPool { get { throw null; } } + } + public partial class RunNotebookSnapshot + { + internal RunNotebookSnapshot() { } + public string ExitValue { get { throw null; } } + public bool? HonorSessionTimeToLive { get { throw null; } } + public string Id { get { throw null; } } + public string Notebook { get { throw null; } } + public Azure.Analytics.Synapse.Artifacts.Models.NotebookResource NotebookContent { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Parameters { get { throw null; } } + public long? SessionId { get { throw null; } } + public Azure.Analytics.Synapse.Artifacts.Models.RunNotebookSparkSessionOptions SessionOptions { get { throw null; } } + public string SparkPool { get { throw null; } } + } + public partial class RunNotebookSnapshotResponse + { + internal RunNotebookSnapshotResponse() { } + public string Message { get { throw null; } } + public Azure.Analytics.Synapse.Artifacts.Models.RunNotebookSnapshotResult Result { get { throw null; } } + } + public partial class RunNotebookSnapshotResult + { + internal RunNotebookSnapshotResult() { } + public Azure.Analytics.Synapse.Artifacts.Models.RunNotebookError Error { get { throw null; } } + public string LastCheckedOn { get { throw null; } } + public string RunId { get { throw null; } } + public string RunStatus { get { throw null; } } + public long? SessionId { get { throw null; } } + public Azure.Analytics.Synapse.Artifacts.Models.RunNotebookSnapshot Snapshot { get { throw null; } } + public string SparkPool { get { throw null; } } + } + public partial class RunNotebookSparkSessionOptions + { + public RunNotebookSparkSessionOptions() { } + public System.Collections.Generic.IList Archives { get { throw null; } } + public System.Collections.Generic.IDictionary Configuration { get { throw null; } } + public int? DriverCores { get { throw null; } set { } } + public string DriverMemory { get { throw null; } set { } } + public int? ExecutorCores { get { throw null; } set { } } + public int? ExecutorCount { get { throw null; } set { } } + public string ExecutorMemory { get { throw null; } set { } } + public System.Collections.Generic.IList Files { get { throw null; } } + public int? HeartbeatTimeoutInSecond { get { throw null; } set { } } + public bool? IsQueueable { get { throw null; } set { } } + public System.Collections.Generic.IList Jars { get { throw null; } } + public string Kind { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public string ProxyUser { get { throw null; } set { } } + public System.Collections.Generic.IList PythonFiles { get { throw null; } } + public object Queue { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } public partial class RunQueryFilter { public RunQueryFilter(Azure.Analytics.Synapse.Artifacts.Models.RunQueryFilterOperand operand, Azure.Analytics.Synapse.Artifacts.Models.RunQueryFilterOperator @operator, System.Collections.Generic.IEnumerable values) { } @@ -6075,7 +6559,7 @@ public partial class SalesforceServiceCloudSource : Azure.Analytics.Synapse.Arti public SalesforceServiceCloudSource() { } public object AdditionalColumns { get { throw null; } set { } } public object Query { get { throw null; } set { } } - public Azure.Analytics.Synapse.Artifacts.Models.SalesforceSourceReadBehavior? ReadBehavior { get { throw null; } set { } } + public object ReadBehavior { get { throw null; } set { } } } public partial class SalesforceSink : Azure.Analytics.Synapse.Artifacts.Models.CopySink { @@ -6106,25 +6590,7 @@ public partial class SalesforceSource : Azure.Analytics.Synapse.Artifacts.Models { public SalesforceSource() { } public object Query { get { throw null; } set { } } - public Azure.Analytics.Synapse.Artifacts.Models.SalesforceSourceReadBehavior? ReadBehavior { get { throw null; } set { } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SalesforceSourceReadBehavior : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public SalesforceSourceReadBehavior(string value) { throw null; } - public static Azure.Analytics.Synapse.Artifacts.Models.SalesforceSourceReadBehavior Query { get { throw null; } } - public static Azure.Analytics.Synapse.Artifacts.Models.SalesforceSourceReadBehavior QueryAll { get { throw null; } } - public bool Equals(Azure.Analytics.Synapse.Artifacts.Models.SalesforceSourceReadBehavior other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.Analytics.Synapse.Artifacts.Models.SalesforceSourceReadBehavior left, Azure.Analytics.Synapse.Artifacts.Models.SalesforceSourceReadBehavior right) { throw null; } - public static implicit operator Azure.Analytics.Synapse.Artifacts.Models.SalesforceSourceReadBehavior (string value) { throw null; } - public static bool operator !=(Azure.Analytics.Synapse.Artifacts.Models.SalesforceSourceReadBehavior left, Azure.Analytics.Synapse.Artifacts.Models.SalesforceSourceReadBehavior right) { throw null; } - public override string ToString() { throw null; } + public object ReadBehavior { get { throw null; } set { } } } public partial class SapBwCubeDataset : Azure.Analytics.Synapse.Artifacts.Models.Dataset { @@ -6407,6 +6873,20 @@ public SapTableSource() { } public object RowSkips { get { throw null; } set { } } public object SapDataColumnDelimiter { get { throw null; } set { } } } + public enum SASEntityType + { + Database = 0, + Table = 1, + Schema = 2, + View = 3, + Function = 4, + Partitioninfo = 5, + Relationship = 6, + } + public partial class ScalarTypeInfo : Azure.Analytics.Synapse.Artifacts.Models.TypeInfo + { + public ScalarTypeInfo(string typeName) : base (default(string)) { } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct SchedulerCurrentState : System.IEquatable { @@ -6442,6 +6922,16 @@ public ScheduleTriggerRecurrence() { } public System.DateTimeOffset? StartTime { get { throw null; } set { } } public string TimeZone { get { throw null; } set { } } } + public partial class SchemaEntity : Azure.Analytics.Synapse.Artifacts.Models.MDEntity + { + public SchemaEntity(string name, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType type, Azure.Analytics.Synapse.Artifacts.Models.SchemaProperties properties) : base (default(string), default(Azure.Analytics.Synapse.Artifacts.Models.SASEntityType)) { } + public Azure.Analytics.Synapse.Artifacts.Models.SchemaProperties Properties { get { throw null; } set { } } + } + public partial class SchemaProperties : Azure.Analytics.Synapse.Artifacts.Models.MDEntityProperties + { + public SchemaProperties(Azure.Analytics.Synapse.Artifacts.Models.BaseNamespace @namespace) { } + public Azure.Analytics.Synapse.Artifacts.Models.BaseNamespace Namespace { get { throw null; } set { } } + } public partial class ScriptAction { public ScriptAction(string name, string uri, object roles) { } @@ -6565,6 +7055,12 @@ public partial class SecretBase { public SecretBase() { } } + public partial class SecureInputOutputPolicy + { + public SecureInputOutputPolicy() { } + public bool? SecureInput { get { throw null; } set { } } + public bool? SecureOutput { get { throw null; } set { } } + } public partial class SecureString : Azure.Analytics.Synapse.Artifacts.Models.SecretBase { public SecureString(string value) { } @@ -6626,6 +7122,8 @@ public ServiceNowSource() { } public partial class SetVariableActivity : Azure.Analytics.Synapse.Artifacts.Models.ControlActivity { public SetVariableActivity(string name) : base (default(string)) { } + public Azure.Analytics.Synapse.Artifacts.Models.SecureInputOutputPolicy Policy { get { throw null; } set { } } + public bool? SetSystemVariable { get { throw null; } set { } } public object Value { get { throw null; } set { } } public string VariableName { get { throw null; } set { } } } @@ -6782,6 +7280,17 @@ public SnowflakeSource(Azure.Analytics.Synapse.Artifacts.Models.SnowflakeExportC public Azure.Analytics.Synapse.Artifacts.Models.SnowflakeExportCopyCommand ExportSettings { get { throw null; } set { } } public object Query { get { throw null; } set { } } } + public partial class SortingItem + { + public SortingItem(string keyName, Azure.Analytics.Synapse.Artifacts.Models.SortOrder sortOrder) { } + public string KeyName { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.SortOrder SortOrder { get { throw null; } set { } } + } + public enum SortOrder + { + Desc = 0, + ASC = 1, + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct SparkAuthenticationType : System.IEquatable { @@ -7109,6 +7618,33 @@ public SparkSource() { } public static bool operator !=(Azure.Analytics.Synapse.Artifacts.Models.SparkThriftTransportProtocol left, Azure.Analytics.Synapse.Artifacts.Models.SparkThriftTransportProtocol right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SqlAlwaysEncryptedAkvAuthType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SqlAlwaysEncryptedAkvAuthType(string value) { throw null; } + public static Azure.Analytics.Synapse.Artifacts.Models.SqlAlwaysEncryptedAkvAuthType ManagedIdentity { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.SqlAlwaysEncryptedAkvAuthType ServicePrincipal { get { throw null; } } + public static Azure.Analytics.Synapse.Artifacts.Models.SqlAlwaysEncryptedAkvAuthType UserAssignedManagedIdentity { get { throw null; } } + public bool Equals(Azure.Analytics.Synapse.Artifacts.Models.SqlAlwaysEncryptedAkvAuthType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Analytics.Synapse.Artifacts.Models.SqlAlwaysEncryptedAkvAuthType left, Azure.Analytics.Synapse.Artifacts.Models.SqlAlwaysEncryptedAkvAuthType right) { throw null; } + public static implicit operator Azure.Analytics.Synapse.Artifacts.Models.SqlAlwaysEncryptedAkvAuthType (string value) { throw null; } + public static bool operator !=(Azure.Analytics.Synapse.Artifacts.Models.SqlAlwaysEncryptedAkvAuthType left, Azure.Analytics.Synapse.Artifacts.Models.SqlAlwaysEncryptedAkvAuthType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SqlAlwaysEncryptedProperties + { + public SqlAlwaysEncryptedProperties(Azure.Analytics.Synapse.Artifacts.Models.SqlAlwaysEncryptedAkvAuthType alwaysEncryptedAkvAuthType) { } + public Azure.Analytics.Synapse.Artifacts.Models.SqlAlwaysEncryptedAkvAuthType AlwaysEncryptedAkvAuthType { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.CredentialReference Credential { get { throw null; } set { } } + public object ServicePrincipalId { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.SecretBase ServicePrincipalKey { get { throw null; } set { } } + } public partial class SqlConnection { public SqlConnection() { } @@ -7149,6 +7685,7 @@ public SqlDWSink() { } public partial class SqlDWSource : Azure.Analytics.Synapse.Artifacts.Models.TabularSource { public SqlDWSource() { } + public object IsolationLevel { get { throw null; } set { } } public object PartitionOption { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SqlPartitionSettings PartitionSettings { get { throw null; } set { } } public object SqlReaderQuery { get { throw null; } set { } } @@ -7168,6 +7705,7 @@ public SqlMISink() { } public partial class SqlMISource : Azure.Analytics.Synapse.Artifacts.Models.TabularSource { public SqlMISource() { } + public object IsolationLevel { get { throw null; } set { } } public object PartitionOption { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SqlPartitionSettings PartitionSettings { get { throw null; } set { } } public object ProduceAdditionalTypes { get { throw null; } set { } } @@ -7290,6 +7828,7 @@ public SqlScriptResource(string name, Azure.Analytics.Synapse.Artifacts.Models.S public partial class SqlServerLinkedService : Azure.Analytics.Synapse.Artifacts.Models.LinkedService { public SqlServerLinkedService(object connectionString) { } + public Azure.Analytics.Synapse.Artifacts.Models.SqlAlwaysEncryptedProperties AlwaysEncryptedSettings { get { throw null; } set { } } public object ConnectionString { get { throw null; } set { } } public object EncryptedCredential { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase Password { get { throw null; } set { } } @@ -7308,6 +7847,7 @@ public SqlServerSink() { } public partial class SqlServerSource : Azure.Analytics.Synapse.Artifacts.Models.TabularSource { public SqlServerSource() { } + public object IsolationLevel { get { throw null; } set { } } public object PartitionOption { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SqlPartitionSettings PartitionSettings { get { throw null; } set { } } public object ProduceAdditionalTypes { get { throw null; } set { } } @@ -7496,6 +8036,16 @@ public partial class StartDataFlowDebugSessionResponse public StartDataFlowDebugSessionResponse() { } public string JobVersion { get { throw null; } set { } } } + public partial class StorageDescriptor + { + public StorageDescriptor(System.Collections.Generic.IEnumerable columns, Azure.Analytics.Synapse.Artifacts.Models.FormatInfo format, Azure.Analytics.Synapse.Artifacts.Models.DataSource source) { } + public System.Collections.Generic.IList Columns { get { throw null; } } + public Azure.Analytics.Synapse.Artifacts.Models.DistributionInfo Distribution { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.FormatInfo Format { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Properties { get { throw null; } } + public object SerDeInfo { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.DataSource Source { get { throw null; } set { } } + } public partial class StoredProcedureParameter { public StoredProcedureParameter() { } @@ -7599,16 +8149,35 @@ public partial class SybaseTableDataset : Azure.Analytics.Synapse.Artifacts.Mode public SybaseTableDataset(Azure.Analytics.Synapse.Artifacts.Models.LinkedServiceReference linkedServiceName) : base (default(Azure.Analytics.Synapse.Artifacts.Models.LinkedServiceReference)) { } public object TableName { get { throw null; } set { } } } + public partial class SyMsapiddlResponse + { + internal SyMsapiddlResponse() { } + public Azure.Analytics.Synapse.Artifacts.Models.DDLType DdlType { get { throw null; } } + public string EntityName { get { throw null; } } + public Azure.Analytics.Synapse.Artifacts.Models.SASEntityType EntityType { get { throw null; } } + public string ObjectId { get { throw null; } } + public long ObjectVersion { get { throw null; } } + public string OriginObjectId { get { throw null; } } + public Azure.Analytics.Synapse.Artifacts.Models.PublishStatus PublishStatus { get { throw null; } } + } + public partial class SyMsapiddlResponses + { + internal SyMsapiddlResponses() { } + public System.Collections.Generic.IReadOnlyList SyMsApiDdlResponse { get { throw null; } } + } public partial class SynapseNotebookActivity : Azure.Analytics.Synapse.Artifacts.Models.ExecutionActivity { public SynapseNotebookActivity(string name, Azure.Analytics.Synapse.Artifacts.Models.SynapseNotebookReference notebook) : base (default(string)) { } public object Conf { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.ConfigurationType? ConfigurationType { get { throw null; } set { } } public object DriverSize { get { throw null; } set { } } public object ExecutorSize { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SynapseNotebookReference Notebook { get { throw null; } set { } } - public int? NumExecutors { get { throw null; } set { } } + public object NumExecutors { get { throw null; } set { } } public System.Collections.Generic.IDictionary Parameters { get { throw null; } } + public System.Collections.Generic.IDictionary SparkConfig { get { throw null; } } public Azure.Analytics.Synapse.Artifacts.Models.BigDataPoolParametrizationReference SparkPool { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.SparkConfigurationParametrizationReference TargetSparkConfiguration { get { throw null; } set { } } } public partial class SynapseNotebookReference { @@ -7642,6 +8211,37 @@ public SynapseSparkJobReference(Azure.Analytics.Synapse.Artifacts.Models.SparkJo public string ReferenceName { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SparkJobReferenceType Type { get { throw null; } set { } } } + public partial class TableEntity : Azure.Analytics.Synapse.Artifacts.Models.MDEntity + { + public TableEntity(string name, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType type, Azure.Analytics.Synapse.Artifacts.Models.TableProperties properties) : base (default(string), default(Azure.Analytics.Synapse.Artifacts.Models.SASEntityType)) { } + public Azure.Analytics.Synapse.Artifacts.Models.TableProperties Properties { get { throw null; } set { } } + } + public partial class TableNamespace : Azure.Analytics.Synapse.Artifacts.Models.BaseNamespace + { + public TableNamespace(string databaseName) : base (default(string)) { } + public string SchemaName { get { throw null; } set { } } + } + public partial class TablePartitioning + { + public TablePartitioning(System.Collections.Generic.IEnumerable keys, string partitionFunctionType) { } + public System.Collections.Generic.IList Keys { get { throw null; } } + public string PartitionFunctionType { get { throw null; } set { } } + } + public partial class TableProperties : Azure.Analytics.Synapse.Artifacts.Models.MDEntityProperties + { + public TableProperties(Azure.Analytics.Synapse.Artifacts.Models.TableNamespace @namespace, Azure.Analytics.Synapse.Artifacts.Models.TableType tableType, Azure.Analytics.Synapse.Artifacts.Models.StorageDescriptor storageDescriptor) { } + public bool? IsRewriteEnabled { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.TableNamespace Namespace { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.TablePartitioning Partitioning { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.StorageDescriptor StorageDescriptor { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.TableType TableType { get { throw null; } set { } } + public bool? Temporary { get { throw null; } set { } } + } + public enum TableType + { + Managed = 0, + External = 1, + } public partial class TabularSource : Azure.Analytics.Synapse.Artifacts.Models.CopySource { public TabularSource() { } @@ -7962,6 +8562,19 @@ public TypeConversionSettings() { } public object TimeSpanFormat { get { throw null; } set { } } public object TreatBooleanAsNumber { get { throw null; } set { } } } + public partial class TypeInfo + { + public TypeInfo(string typeName) { } + public bool? IsComplexType { get { throw null; } set { } } + public bool? IsNullable { get { throw null; } set { } } + public bool? IsTableType { get { throw null; } set { } } + public int? Length { get { throw null; } set { } } + public int? Precision { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Properties { get { throw null; } } + public int? Scale { get { throw null; } set { } } + public string TypeFamily { get { throw null; } set { } } + public string TypeName { get { throw null; } set { } } + } public partial class UntilActivity : Azure.Analytics.Synapse.Artifacts.Models.ControlActivity { public UntilActivity(string name, Azure.Analytics.Synapse.Artifacts.Models.Expression expression, System.Collections.Generic.IEnumerable activities) : base (default(string)) { } @@ -8034,6 +8647,22 @@ public VerticaTableDataset(Azure.Analytics.Synapse.Artifacts.Models.LinkedServic public object Table { get { throw null; } set { } } public object TableName { get { throw null; } set { } } } + public partial class ViewEntity : Azure.Analytics.Synapse.Artifacts.Models.MDEntity + { + public ViewEntity(string name, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType type, Azure.Analytics.Synapse.Artifacts.Models.ViewEntityProperties properties) : base (default(string), default(Azure.Analytics.Synapse.Artifacts.Models.SASEntityType)) { } + public Azure.Analytics.Synapse.Artifacts.Models.ViewEntityProperties Properties { get { throw null; } set { } } + } + public partial class ViewEntityProperties : Azure.Analytics.Synapse.Artifacts.Models.MDEntityProperties + { + public ViewEntityProperties(Azure.Analytics.Synapse.Artifacts.Models.TableNamespace @namespace, Azure.Analytics.Synapse.Artifacts.Models.StorageDescriptor storageDescriptor) { } + public bool? IsRewriteEnabled { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.TableNamespace Namespace { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.TablePartitioning Partitioning { get { throw null; } set { } } + public Azure.Analytics.Synapse.Artifacts.Models.StorageDescriptor StorageDescriptor { get { throw null; } set { } } + public bool? Temporary { get { throw null; } set { } } + public string ViewExpandedText { get { throw null; } set { } } + public string ViewOriginalText { get { throw null; } set { } } + } public partial class VirtualNetworkProfile { public VirtualNetworkProfile() { } @@ -8059,11 +8688,13 @@ public WebActivity(string name, Azure.Analytics.Synapse.Artifacts.Models.WebActi public partial class WebActivityAuthentication { public WebActivityAuthentication(string type) { } + public Azure.Analytics.Synapse.Artifacts.Models.CredentialReference Credential { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase Password { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SecretBase Pfx { get { throw null; } set { } } - public string Resource { get { throw null; } set { } } + public object Resource { get { throw null; } set { } } public string Type { get { throw null; } set { } } public string Username { get { throw null; } set { } } + public object UserTenant { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct WebActivityMethod : System.IEquatable diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/ArtifactsClientOptions.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/ArtifactsClientOptions.cs index 0b2581a01886..b2020f1cd059 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/ArtifactsClientOptions.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/ArtifactsClientOptions.cs @@ -13,21 +13,25 @@ namespace Azure.Analytics.Synapse.Artifacts /// Client options for ArtifactsClient. public partial class ArtifactsClientOptions : ClientOptions { - private const ServiceVersion LatestVersion = ServiceVersion.V2022_12_01_Preview; + private const ServiceVersion LatestVersion = ServiceVersion.V2023_04_18_Preview; /// The version of the service to use. public enum ServiceVersion { /// Service version "2020-12-01". V2020_12_01 = 1, + /// Service version "2021-04-01". + V2021_04_01 = 2, /// Service version "2021-06-01-preview". - V2021_06_01_Preview = 2, + V2021_06_01_Preview = 3, /// Service version "2021-07-01-preview". - V2021_07_01_Preview = 3, + V2021_07_01_Preview = 4, /// Service version "2021-11-01-preview". - V2021_11_01_Preview = 4, - /// Service version "2022-12-01-preview". - V2022_12_01_Preview = 5, + V2021_11_01_Preview = 5, + /// Service version "2022-03-01-preview". + V2022_03_01_Preview = 6, + /// Service version "2023-04-18-preview". + V2023_04_18_Preview = 7, } internal string Version { get; } @@ -38,10 +42,12 @@ public ArtifactsClientOptions(ServiceVersion version = LatestVersion) Version = version switch { ServiceVersion.V2020_12_01 => "2020-12-01", + ServiceVersion.V2021_04_01 => "2021-04-01", ServiceVersion.V2021_06_01_Preview => "2021-06-01-preview", ServiceVersion.V2021_07_01_Preview => "2021-07-01-preview", ServiceVersion.V2021_11_01_Preview => "2021-11-01-preview", - ServiceVersion.V2022_12_01_Preview => "2022-12-01-preview", + ServiceVersion.V2022_03_01_Preview => "2022-03-01-preview", + ServiceVersion.V2023_04_18_Preview => "2023-04-18-preview", _ => throw new NotSupportedException() }; } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/ArtifactsModelFactory.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/ArtifactsModelFactory.cs index ee35971765c1..ae49f3c19ca5 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/ArtifactsModelFactory.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/ArtifactsModelFactory.cs @@ -102,6 +102,95 @@ public static LinkTableStatus LinkTableStatus(string id = null, string status = return new LinkTableStatus(id, status, errorMessage, startTime, stopTime, linkTableId, errorCode, lastProcessedData, lastTransactionCommitTime); } + /// Initializes a new instance of RunNotebookResponse. + /// Response message. + /// Result of run notebook. + /// A new instance for mocking. + public static RunNotebookResponse RunNotebookResponse(string message = null, RunNotebookResult result = null) + { + return new RunNotebookResponse(message, result); + } + + /// Initializes a new instance of RunNotebookResult. + /// Run id. + /// Status of the run notebook. + /// Timestamp of last update. + /// Livy session id. + /// SparkPool name. + /// Run notebook session details. + /// Output of exit command. + /// Run notebook error. + /// A new instance for mocking. + public static RunNotebookResult RunNotebookResult(string runId = null, string runStatus = null, string lastCheckedOn = null, long? sessionId = null, string sparkPool = null, object sessionDetail = null, string exitValue = null, RunNotebookError error = null) + { + return new RunNotebookResult(runId, runStatus, lastCheckedOn, sessionId, sparkPool, sessionDetail, exitValue, error); + } + + /// Initializes a new instance of RunNotebookError. + /// Error name. + /// Error message. + /// Error trace. + /// A new instance for mocking. + public static RunNotebookError RunNotebookError(string ename = null, string evalue = null, IEnumerable traceback = null) + { + traceback ??= new List(); + + return new RunNotebookError(ename, evalue, traceback?.ToList()); + } + + /// Initializes a new instance of RunNotebookSnapshotResponse. + /// Response message. + /// Run notebook snapshot result. + /// A new instance for mocking. + public static RunNotebookSnapshotResponse RunNotebookSnapshotResponse(string message = null, RunNotebookSnapshotResult result = null) + { + return new RunNotebookSnapshotResponse(message, result); + } + + /// Initializes a new instance of RunNotebookSnapshotResult. + /// Run notebook snapshot. + /// Run notebook error. + /// Run id. + /// Status of the run notebook. + /// Timestamp of last update. + /// Livy session id. + /// SparkPool name. + /// A new instance for mocking. + public static RunNotebookSnapshotResult RunNotebookSnapshotResult(RunNotebookSnapshot snapshot = null, RunNotebookError error = null, string runId = null, string runStatus = null, string lastCheckedOn = null, long? sessionId = null, string sparkPool = null) + { + return new RunNotebookSnapshotResult(snapshot, error, runId, runStatus, lastCheckedOn, sessionId, sparkPool); + } + + /// Initializes a new instance of RunNotebookSnapshot. + /// Output of exit command. + /// Run notebook runId. + /// Notebook name. + /// Session properties. + /// Whether session should run till time to live after run completes. + /// Livy session id. + /// SparkPool name. + /// Run notebook parameters. + /// Notebook resource type. + /// A new instance for mocking. + public static RunNotebookSnapshot RunNotebookSnapshot(string exitValue = null, string id = null, string notebook = null, RunNotebookSparkSessionOptions sessionOptions = null, bool? honorSessionTimeToLive = null, long? sessionId = null, string sparkPool = null, IReadOnlyDictionary parameters = null, NotebookResource notebookContent = null) + { + parameters ??= new Dictionary(); + + return new RunNotebookSnapshot(exitValue, id, notebook, sessionOptions, honorSessionTimeToLive, sessionId, sparkPool, parameters, notebookContent); + } + + /// Initializes a new instance of NotebookResource. + /// Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + /// The name of the resource. + /// The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + /// Resource Etag. + /// Properties of Notebook. + /// A new instance for mocking. + public static NotebookResource NotebookResource(string id = null, string name = null, string type = null, string etag = null, Notebook properties = null) + { + return new NotebookResource(id, name, type, etag, properties); + } + /// Initializes a new instance of MetastoreRegistrationResponse. /// Enumerates possible request statuses. /// A new instance for mocking. @@ -435,18 +524,6 @@ public static LinkedServiceResource LinkedServiceResource(string id = null, stri return new LinkedServiceResource(id, name, type, etag, properties); } - /// Initializes a new instance of NotebookResource. - /// Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - /// The name of the resource. - /// The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - /// Resource Etag. - /// Properties of Notebook. - /// A new instance for mocking. - public static NotebookResource NotebookResource(string id = null, string name = null, string type = null, string etag = null, Notebook properties = null) - { - return new NotebookResource(id, name, type, etag, properties); - } - /// Initializes a new instance of PipelineResource. /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. /// The name of the resource. @@ -922,6 +999,92 @@ public static ManagedIdentity ManagedIdentity(string principalId = null, Guid? t return new ManagedIdentity(principalId, tenantId, type); } + /// Initializes a new instance of MDEntity. + /// Entity Name. + /// Artifact type. + /// Entity Resource Id. + /// A new instance for mocking. + public static MDEntity MDEntity(string name = null, SASEntityType type = default, string id = null) + { + return new MDEntity(name, type, id); + } + + /// Initializes a new instance of SyMsapiddlResponses. + /// List of DDL response. + /// A new instance for mocking. + public static SyMsapiddlResponses SyMsapiddlResponses(IEnumerable syMsApiDdlResponse = null) + { + syMsApiDdlResponse ??= new List(); + + return new SyMsapiddlResponses(syMsApiDdlResponse?.ToList()); + } + + /// Initializes a new instance of SyMsapiddlResponse. + /// DDL type. + /// Entity name. + /// Artifact type. + /// Publish status. + /// Object id maintained by Origin Catalog. + /// Object id maintained by SyMS. + /// Object version maintained by SyMS. + /// A new instance for mocking. + public static SyMsapiddlResponse SyMsapiddlResponse(DDLType ddlType = default, string entityName = null, SASEntityType entityType = default, PublishStatus publishStatus = default, string originObjectId = null, string objectId = null, long objectVersion = default) + { + return new SyMsapiddlResponse(ddlType, entityName, entityType, publishStatus, originObjectId, objectId, objectVersion); + } + + /// Initializes a new instance of QueryArtifactsResponse. + /// + /// Continuation token to get next page. + /// A new instance for mocking. + public static QueryArtifactsResponse QueryArtifactsResponse(IEnumerable items = null, string continuationToken = null) + { + items ??= new List(); + + return new QueryArtifactsResponse(items?.ToList(), continuationToken); + } + + /// Initializes a new instance of DatabaseEntity. + /// Entity Name. + /// Artifact type. + /// Entity Resource Id. + /// Database properties. + /// A new instance for mocking. + public static DatabaseEntity DatabaseEntity(string name = null, SASEntityType type = default, string id = null, DatabaseProperties properties = null) + { + return new DatabaseEntity(name, type, id, properties); + } + + /// Initializes a new instance of DatabaseProperties. + /// Entity object id maintained by the caller. + /// Entity object id maintained by SyMS. + /// Entity object version maintained by SyMS. + /// Publish status. + /// Property bag. + /// Data source properties. + /// Description of the database. + /// A new instance for mocking. + public static DatabaseProperties DatabaseProperties(string originObjectId = null, string objectId = null, long? objectVersion = null, PublishStatus? publishStatus = null, IDictionary properties = null, DataSource source = null, string description = null) + { + properties ??= new Dictionary(); + + return new DatabaseProperties(originObjectId, objectId, objectVersion, publishStatus, properties, source, description); + } + + /// Initializes a new instance of MDEntityProperties. + /// Entity object id maintained by the caller. + /// Entity object id maintained by SyMS. + /// Entity object version maintained by SyMS. + /// Publish status. + /// Property bag. + /// A new instance for mocking. + public static MDEntityProperties MDEntityProperties(string originObjectId = null, string objectId = null, long? objectVersion = null, PublishStatus? publishStatus = null, IDictionary properties = null) + { + properties ??= new Dictionary(); + + return new MDEntityProperties(originObjectId, objectId, objectVersion, publishStatus, properties); + } + /// Initializes a new instance of WorkspaceIdentity. /// The identity type. Currently the only supported type is 'SystemAssigned'. /// The principal id of the identity. @@ -1123,6 +1286,157 @@ public static ChainingTrigger ChainingTrigger(string description = null, Trigger return new ChainingTrigger("ChainingTrigger", description, runtimeState, annotations?.ToList(), additionalProperties, pipeline, dependsOn?.ToList(), runDimension); } + /// Initializes a new instance of PartitionInfoProperties. + /// Entity object id maintained by the caller. + /// Entity object id maintained by SyMS. + /// Entity object version maintained by SyMS. + /// Publish status. + /// Property bag. + /// Partition information namespace. + /// Storage descriptor. + /// Partition key values. + /// A new instance for mocking. + public static PartitionInfoProperties PartitionInfoProperties(string originObjectId = null, string objectId = null, long? objectVersion = null, PublishStatus? publishStatus = null, IDictionary properties = null, PartitionInfoNamespace @namespace = null, StorageDescriptor storageDescriptor = null, IEnumerable partitionKeyValues = null) + { + properties ??= new Dictionary(); + partitionKeyValues ??= new List(); + + return new PartitionInfoProperties(originObjectId, objectId, objectVersion, publishStatus, properties, @namespace, storageDescriptor, partitionKeyValues?.ToList()); + } + + /// Initializes a new instance of SchemaProperties. + /// Entity object id maintained by the caller. + /// Entity object id maintained by SyMS. + /// Entity object version maintained by SyMS. + /// Publish status. + /// Property bag. + /// Namespace. + /// A new instance for mocking. + public static SchemaProperties SchemaProperties(string originObjectId = null, string objectId = null, long? objectVersion = null, PublishStatus? publishStatus = null, IDictionary properties = null, BaseNamespace @namespace = null) + { + properties ??= new Dictionary(); + + return new SchemaProperties(originObjectId, objectId, objectVersion, publishStatus, properties, @namespace); + } + + /// Initializes a new instance of ViewEntityProperties. + /// Entity object id maintained by the caller. + /// Entity object id maintained by SyMS. + /// Entity object version maintained by SyMS. + /// Publish status. + /// Property bag. + /// Table namespace. + /// Table partitioning information. + /// Storage descriptor. + /// View original text. + /// View expanded text. + /// Temporary. + /// Is rewrite enabled. + /// A new instance for mocking. + public static ViewEntityProperties ViewEntityProperties(string originObjectId = null, string objectId = null, long? objectVersion = null, PublishStatus? publishStatus = null, IDictionary properties = null, TableNamespace @namespace = null, TablePartitioning partitioning = null, StorageDescriptor storageDescriptor = null, string viewOriginalText = null, string viewExpandedText = null, bool? temporary = null, bool? isRewriteEnabled = null) + { + properties ??= new Dictionary(); + + return new ViewEntityProperties(originObjectId, objectId, objectVersion, publishStatus, properties, @namespace, partitioning, storageDescriptor, viewOriginalText, viewExpandedText, temporary, isRewriteEnabled); + } + + /// Initializes a new instance of RelationshipProperties. + /// Entity object id maintained by the caller. + /// Entity object id maintained by SyMS. + /// Entity object version maintained by SyMS. + /// Publish status. + /// Property bag. + /// Namespace. + /// From Table Id. + /// From Table Name. + /// To Table Id. + /// To Table Name. + /// Relation Type. + /// List of Column Relationships. + /// A new instance for mocking. + public static RelationshipProperties RelationshipProperties(string originObjectId = null, string objectId = null, long? objectVersion = null, PublishStatus? publishStatus = null, IDictionary properties = null, BaseNamespace @namespace = null, string fromTableId = null, string fromTableName = null, string toTableId = null, string toTableName = null, RelationshipType? relationshipType = null, IEnumerable columnRelationshipInformations = null) + { + properties ??= new Dictionary(); + columnRelationshipInformations ??= new List(); + + return new RelationshipProperties(originObjectId, objectId, objectVersion, publishStatus, properties, @namespace, fromTableId, fromTableName, toTableId, toTableName, relationshipType, columnRelationshipInformations?.ToList()); + } + + /// Initializes a new instance of TableProperties. + /// Entity object id maintained by the caller. + /// Entity object id maintained by SyMS. + /// Entity object version maintained by SyMS. + /// Publish status. + /// Property bag. + /// Table namespace. + /// Table partitioning information. + /// Entity type. + /// Storage descriptor. + /// Temporary. + /// Is rewrite enabled. + /// A new instance for mocking. + public static TableProperties TableProperties(string originObjectId = null, string objectId = null, long? objectVersion = null, PublishStatus? publishStatus = null, IDictionary properties = null, TableNamespace @namespace = null, TablePartitioning partitioning = null, TableType tableType = default, StorageDescriptor storageDescriptor = null, bool? temporary = null, bool? isRewriteEnabled = null) + { + properties ??= new Dictionary(); + + return new TableProperties(originObjectId, objectId, objectVersion, publishStatus, properties, @namespace, partitioning, tableType, storageDescriptor, temporary, isRewriteEnabled); + } + + /// Initializes a new instance of PartitionInfo. + /// Entity Name. + /// Artifact type. + /// Entity Resource Id. + /// Database properties. + /// A new instance for mocking. + public static PartitionInfo PartitionInfo(string name = null, SASEntityType type = default, string id = null, PartitionInfoProperties properties = null) + { + return new PartitionInfo(name, type, id, properties); + } + + /// Initializes a new instance of SchemaEntity. + /// Entity Name. + /// Artifact type. + /// Entity Resource Id. + /// Database properties. + /// A new instance for mocking. + public static SchemaEntity SchemaEntity(string name = null, SASEntityType type = default, string id = null, SchemaProperties properties = null) + { + return new SchemaEntity(name, type, id, properties); + } + + /// Initializes a new instance of ViewEntity. + /// Entity Name. + /// Artifact type. + /// Entity Resource Id. + /// Database properties. + /// A new instance for mocking. + public static ViewEntity ViewEntity(string name = null, SASEntityType type = default, string id = null, ViewEntityProperties properties = null) + { + return new ViewEntity(name, type, id, properties); + } + + /// Initializes a new instance of RelationshipEntity. + /// Entity Name. + /// Artifact type. + /// Entity Resource Id. + /// Database properties. + /// A new instance for mocking. + public static RelationshipEntity RelationshipEntity(string name = null, SASEntityType type = default, string id = null, RelationshipProperties properties = null) + { + return new RelationshipEntity(name, type, id, properties); + } + + /// Initializes a new instance of TableEntity. + /// Entity Name. + /// Artifact type. + /// Entity Resource Id. + /// Database properties. + /// A new instance for mocking. + public static TableEntity TableEntity(string name = null, SASEntityType type = default, string id = null, TableProperties properties = null) + { + return new TableEntity(name, type, id, properties); + } + /// Initializes a new instance of ManagedIntegrationRuntime. /// Type of integration runtime. /// Integration runtime description. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/LinkConnectionRestClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/LinkConnectionRestClient.cs index 791ec6eac1e3..260f7f8e15aa 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/LinkConnectionRestClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/LinkConnectionRestClient.cs @@ -44,7 +44,7 @@ internal HttpMessage CreateListByWorkspaceRequest() var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/linkconnections", false); - uri.AppendQuery("api-version", "2022-12-01-preview", true); + uri.AppendQuery("api-version", "2023-04-18-preview", true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); return message; @@ -99,7 +99,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string linkConnectionName, Link uri.Reset(_endpoint); uri.AppendPath("/linkconnections/", false); uri.AppendPath(linkConnectionName, true); - uri.AppendQuery("api-version", "2022-12-01-preview", true); + uri.AppendQuery("api-version", "2023-04-18-preview", true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); @@ -182,7 +182,7 @@ internal HttpMessage CreateGetRequest(string linkConnectionName) uri.Reset(_endpoint); uri.AppendPath("/linkconnections/", false); uri.AppendPath(linkConnectionName, true); - uri.AppendQuery("api-version", "2022-12-01-preview", true); + uri.AppendQuery("api-version", "2023-04-18-preview", true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); return message; @@ -251,7 +251,7 @@ internal HttpMessage CreateDeleteRequest(string linkConnectionName) uri.Reset(_endpoint); uri.AppendPath("/linkconnections/", false); uri.AppendPath(linkConnectionName, true); - uri.AppendQuery("api-version", "2022-12-01-preview", true); + uri.AppendQuery("api-version", "2023-04-18-preview", true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); return message; @@ -313,7 +313,7 @@ internal HttpMessage CreateEditTablesRequest(string linkConnectionName, EditTabl uri.AppendPath("/linkconnections/", false); uri.AppendPath(linkConnectionName, true); uri.AppendPath("/edittables", false); - uri.AppendQuery("api-version", "2022-12-01-preview", true); + uri.AppendQuery("api-version", "2023-04-18-preview", true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); @@ -387,7 +387,7 @@ internal HttpMessage CreateStartRequest(string linkConnectionName) uri.AppendPath("/linkconnections/", false); uri.AppendPath(linkConnectionName, true); uri.AppendPath("/start", false); - uri.AppendQuery("api-version", "2022-12-01-preview", true); + uri.AppendQuery("api-version", "2023-04-18-preview", true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); return message; @@ -447,7 +447,7 @@ internal HttpMessage CreateStopRequest(string linkConnectionName) uri.AppendPath("/linkconnections/", false); uri.AppendPath(linkConnectionName, true); uri.AppendPath("/stop", false); - uri.AppendQuery("api-version", "2022-12-01-preview", true); + uri.AppendQuery("api-version", "2023-04-18-preview", true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); return message; @@ -507,7 +507,7 @@ internal HttpMessage CreateGetDetailedStatusRequest(string linkConnectionName) uri.AppendPath("/linkconnections/", false); uri.AppendPath(linkConnectionName, true); uri.AppendPath("/detailedstatus", false); - uri.AppendQuery("api-version", "2022-12-01-preview", true); + uri.AppendQuery("api-version", "2023-04-18-preview", true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); return message; @@ -577,7 +577,7 @@ internal HttpMessage CreateListLinkTablesRequest(string linkConnectionName) uri.AppendPath("/linkconnections/", false); uri.AppendPath(linkConnectionName, true); uri.AppendPath("/linktables", false); - uri.AppendQuery("api-version", "2022-12-01-preview", true); + uri.AppendQuery("api-version", "2023-04-18-preview", true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); return message; @@ -647,7 +647,7 @@ internal HttpMessage CreateQueryTableStatusRequest(string linkConnectionName, Qu uri.AppendPath("/linkconnections/", false); uri.AppendPath(linkConnectionName, true); uri.AppendPath("/querytablestatus", false); - uri.AppendQuery("api-version", "2022-12-01-preview", true); + uri.AppendQuery("api-version", "2023-04-18-preview", true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); @@ -731,7 +731,7 @@ internal HttpMessage CreateUpdateLandingZoneCredentialRequest(string linkConnect uri.AppendPath("/linkconnections/", false); uri.AppendPath(linkConnectionName, true); uri.AppendPath("/updateLandingZoneCredential", false); - uri.AppendQuery("api-version", "2022-12-01-preview", true); + uri.AppendQuery("api-version", "2023-04-18-preview", true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); @@ -805,7 +805,7 @@ internal HttpMessage CreatePauseRequest(string linkConnectionName) uri.AppendPath("/linkconnections/", false); uri.AppendPath(linkConnectionName, true); uri.AppendPath("/pause", false); - uri.AppendQuery("api-version", "2022-12-01-preview", true); + uri.AppendQuery("api-version", "2023-04-18-preview", true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); return message; @@ -865,7 +865,7 @@ internal HttpMessage CreateResumeRequest(string linkConnectionName) uri.AppendPath("/linkconnections/", false); uri.AppendPath(linkConnectionName, true); uri.AppendPath("/resume", false); - uri.AppendQuery("api-version", "2022-12-01-preview", true); + uri.AppendQuery("api-version", "2023-04-18-preview", true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); return message; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActionOnExistingTargetTable.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActionOnExistingTargetTable.cs new file mode 100644 index 000000000000..d3c3c05562b8 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActionOnExistingTargetTable.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Action on existing target table. If not specified, 'FailOnNonEmptyTable' action is used. + public readonly partial struct ActionOnExistingTargetTable : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ActionOnExistingTargetTable(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string FailOnNonEmptyTableValue = "FailOnNonEmptyTable"; + private const string DropAndRecreateTableValue = "DropAndRecreateTable"; + private const string MergeWithExistingDataValue = "MergeWithExistingData"; + + /// Same existing tables on target database will be Failed. + public static ActionOnExistingTargetTable FailOnNonEmptyTable { get; } = new ActionOnExistingTargetTable(FailOnNonEmptyTableValue); + /// Same existing tables on target database will be dropped and recreated. + public static ActionOnExistingTargetTable DropAndRecreateTable { get; } = new ActionOnExistingTargetTable(DropAndRecreateTableValue); + /// Same existing tables on target database will be Merged together. + public static ActionOnExistingTargetTable MergeWithExistingData { get; } = new ActionOnExistingTargetTable(MergeWithExistingDataValue); + /// Determines if two values are the same. + public static bool operator ==(ActionOnExistingTargetTable left, ActionOnExistingTargetTable right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ActionOnExistingTargetTable left, ActionOnExistingTargetTable right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ActionOnExistingTargetTable(string value) => new ActionOnExistingTargetTable(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ActionOnExistingTargetTable other && Equals(other); + /// + public bool Equals(ActionOnExistingTargetTable other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Activity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Activity.Serialization.cs index b7df9912c12a..3967feb40a87 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Activity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Activity.Serialization.cs @@ -27,6 +27,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Activity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Activity.cs index 1380ccd19a74..f9873cf4ae8b 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Activity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Activity.cs @@ -35,14 +35,18 @@ public Activity(string name) /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. - internal Activity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties) + internal Activity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties) { Name = name; Type = type; Description = description; + State = state; + OnInactiveMarkAs = onInactiveMarkAs; DependsOn = dependsOn; UserProperties = userProperties; AdditionalProperties = additionalProperties; @@ -54,6 +58,10 @@ internal Activity(string name, string type, string description, IList Activity description. public string Description { get; set; } + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + public ActivityState? State { get; set; } + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. + public ActivityOnInactiveMarkAs? OnInactiveMarkAs { get; set; } /// Activity depends on condition. public IList DependsOn { get; } /// Activity user properties. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityOnInactiveMarkAs.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityOnInactiveMarkAs.cs new file mode 100644 index 000000000000..9034b5ae7af7 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityOnInactiveMarkAs.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. + public readonly partial struct ActivityOnInactiveMarkAs : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ActivityOnInactiveMarkAs(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string SkippedValue = "Skipped"; + + /// Succeeded. + public static ActivityOnInactiveMarkAs Succeeded { get; } = new ActivityOnInactiveMarkAs(SucceededValue); + /// Failed. + public static ActivityOnInactiveMarkAs Failed { get; } = new ActivityOnInactiveMarkAs(FailedValue); + /// Skipped. + public static ActivityOnInactiveMarkAs Skipped { get; } = new ActivityOnInactiveMarkAs(SkippedValue); + /// Determines if two values are the same. + public static bool operator ==(ActivityOnInactiveMarkAs left, ActivityOnInactiveMarkAs right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ActivityOnInactiveMarkAs left, ActivityOnInactiveMarkAs right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ActivityOnInactiveMarkAs(string value) => new ActivityOnInactiveMarkAs(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ActivityOnInactiveMarkAs other && Equals(other); + /// + public bool Equals(ActivityOnInactiveMarkAs other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityState.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityState.cs new file mode 100644 index 000000000000..0678e77f000c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ActivityState.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + public readonly partial struct ActivityState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ActivityState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveValue = "Active"; + private const string InactiveValue = "Inactive"; + + /// Active. + public static ActivityState Active { get; } = new ActivityState(ActiveValue); + /// Inactive. + public static ActivityState Inactive { get; } = new ActivityState(InactiveValue); + /// Determines if two values are the same. + public static bool operator ==(ActivityState left, ActivityState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ActivityState left, ActivityState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ActivityState(string value) => new ActivityState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ActivityState other && Equals(other); + /// + public bool Equals(ActivityState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForSqlServerLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForSqlServerLinkedService.Serialization.cs index aa62cd203b3b..ea565a04e2ad 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForSqlServerLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForSqlServerLinkedService.Serialization.cs @@ -76,6 +76,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("encryptedCredential"u8); writer.WriteObjectValue(EncryptedCredential); } + if (Optional.IsDefined(AlwaysEncryptedSettings)) + { + writer.WritePropertyName("alwaysEncryptedSettings"u8); + writer.WriteObjectValue(AlwaysEncryptedSettings); + } writer.WriteEndObject(); foreach (var item in AdditionalProperties) { @@ -100,6 +105,7 @@ internal static AmazonRdsForSqlServerLinkedService DeserializeAmazonRdsForSqlSer Optional userName = default; Optional password = default; Optional encryptedCredential = default; + Optional alwaysEncryptedSettings = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -199,13 +205,22 @@ internal static AmazonRdsForSqlServerLinkedService DeserializeAmazonRdsForSqlSer encryptedCredential = property0.Value.GetObject(); continue; } + if (property0.NameEquals("alwaysEncryptedSettings"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + alwaysEncryptedSettings = SqlAlwaysEncryptedProperties.DeserializeSqlAlwaysEncryptedProperties(property0.Value); + continue; + } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new AmazonRdsForSqlServerLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, userName.Value, password.Value, encryptedCredential.Value); + return new AmazonRdsForSqlServerLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, userName.Value, password.Value, encryptedCredential.Value, alwaysEncryptedSettings.Value); } internal partial class AmazonRdsForSqlServerLinkedServiceConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForSqlServerLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForSqlServerLinkedService.cs index df94ec0848fd..aed61235d046 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForSqlServerLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForSqlServerLinkedService.cs @@ -40,12 +40,14 @@ public AmazonRdsForSqlServerLinkedService(object connectionString) /// The available derived classes include and . /// /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). - internal AmazonRdsForSqlServerLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, object userName, SecretBase password, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + /// Sql always encrypted properties. + internal AmazonRdsForSqlServerLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, object userName, SecretBase password, object encryptedCredential, SqlAlwaysEncryptedProperties alwaysEncryptedSettings) : base(type, connectVia, description, parameters, annotations, additionalProperties) { ConnectionString = connectionString; UserName = userName; Password = password; EncryptedCredential = encryptedCredential; + AlwaysEncryptedSettings = alwaysEncryptedSettings; Type = type ?? "AmazonRdsForSqlServer"; } @@ -61,5 +63,7 @@ internal AmazonRdsForSqlServerLinkedService(string type, IntegrationRuntimeRefer public SecretBase Password { get; set; } /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). public object EncryptedCredential { get; set; } + /// Sql always encrypted properties. + public SqlAlwaysEncryptedProperties AlwaysEncryptedSettings { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForSqlServerSource.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForSqlServerSource.Serialization.cs index 4b9421fe42c7..6e2cd87b304f 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForSqlServerSource.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForSqlServerSource.Serialization.cs @@ -40,6 +40,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndObject(); } + if (Optional.IsDefined(IsolationLevel)) + { + writer.WritePropertyName("isolationLevel"u8); + writer.WriteObjectValue(IsolationLevel); + } if (Optional.IsDefined(ProduceAdditionalTypes)) { writer.WritePropertyName("produceAdditionalTypes"u8); @@ -99,6 +104,7 @@ internal static AmazonRdsForSqlServerSource DeserializeAmazonRdsForSqlServerSour Optional sqlReaderQuery = default; Optional sqlReaderStoredProcedureName = default; Optional> storedProcedureParameters = default; + Optional isolationLevel = default; Optional produceAdditionalTypes = default; Optional partitionOption = default; Optional partitionSettings = default; @@ -144,6 +150,15 @@ internal static AmazonRdsForSqlServerSource DeserializeAmazonRdsForSqlServerSour storedProcedureParameters = dictionary; continue; } + if (property.NameEquals("isolationLevel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isolationLevel = property.Value.GetObject(); + continue; + } if (property.NameEquals("produceAdditionalTypes"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -224,7 +239,7 @@ internal static AmazonRdsForSqlServerSource DeserializeAmazonRdsForSqlServerSour additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new AmazonRdsForSqlServerSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, sqlReaderQuery.Value, sqlReaderStoredProcedureName.Value, Optional.ToDictionary(storedProcedureParameters), produceAdditionalTypes.Value, partitionOption.Value, partitionSettings.Value); + return new AmazonRdsForSqlServerSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, sqlReaderQuery.Value, sqlReaderStoredProcedureName.Value, Optional.ToDictionary(storedProcedureParameters), isolationLevel.Value, produceAdditionalTypes.Value, partitionOption.Value, partitionSettings.Value); } internal partial class AmazonRdsForSqlServerSourceConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForSqlServerSource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForSqlServerSource.cs index 1041f3884bfd..7b57da597668 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForSqlServerSource.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AmazonRdsForSqlServerSource.cs @@ -31,14 +31,16 @@ public AmazonRdsForSqlServerSource() /// SQL reader query. Type: string (or Expression with resultType string). /// Name of the stored procedure for a SQL Database source. This cannot be used at the same time as SqlReaderQuery. Type: string (or Expression with resultType string). /// Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". + /// Specifies the transaction locking behavior for the SQL source. Allowed values: ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. The default value is ReadCommitted. Type: string (or Expression with resultType string). /// Which additional types to produce. /// The partition mechanism that will be used for Sql read in parallel. Possible values include: "None", "PhysicalPartitionsOfTable", "DynamicRange". /// The settings that will be leveraged for Sql source partitioning. - internal AmazonRdsForSqlServerSource(string type, object sourceRetryCount, object sourceRetryWait, object maxConcurrentConnections, IDictionary additionalProperties, object queryTimeout, object additionalColumns, object sqlReaderQuery, object sqlReaderStoredProcedureName, IDictionary storedProcedureParameters, object produceAdditionalTypes, object partitionOption, SqlPartitionSettings partitionSettings) : base(type, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, additionalProperties, queryTimeout, additionalColumns) + internal AmazonRdsForSqlServerSource(string type, object sourceRetryCount, object sourceRetryWait, object maxConcurrentConnections, IDictionary additionalProperties, object queryTimeout, object additionalColumns, object sqlReaderQuery, object sqlReaderStoredProcedureName, IDictionary storedProcedureParameters, object isolationLevel, object produceAdditionalTypes, object partitionOption, SqlPartitionSettings partitionSettings) : base(type, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, additionalProperties, queryTimeout, additionalColumns) { SqlReaderQuery = sqlReaderQuery; SqlReaderStoredProcedureName = sqlReaderStoredProcedureName; StoredProcedureParameters = storedProcedureParameters; + IsolationLevel = isolationLevel; ProduceAdditionalTypes = produceAdditionalTypes; PartitionOption = partitionOption; PartitionSettings = partitionSettings; @@ -51,6 +53,8 @@ internal AmazonRdsForSqlServerSource(string type, object sourceRetryCount, objec public object SqlReaderStoredProcedureName { get; set; } /// Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". public IDictionary StoredProcedureParameters { get; } + /// Specifies the transaction locking behavior for the SQL source. Allowed values: ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. The default value is ReadCommitted. Type: string (or Expression with resultType string). + public object IsolationLevel { get; set; } /// Which additional types to produce. public object ProduceAdditionalTypes { get; set; } /// The partition mechanism that will be used for Sql read in parallel. Possible values include: "None", "PhysicalPartitionsOfTable", "DynamicRange". diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AppendVariableActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AppendVariableActivity.Serialization.cs index d7e807abddfb..9b1799c08fd0 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AppendVariableActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AppendVariableActivity.Serialization.cs @@ -28,6 +28,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -78,6 +88,8 @@ internal static AppendVariableActivity DeserializeAppendVariableActivity(JsonEle string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; Optional variableName = default; @@ -101,6 +113,24 @@ internal static AppendVariableActivity DeserializeAppendVariableActivity(JsonEle description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -158,7 +188,7 @@ internal static AppendVariableActivity DeserializeAppendVariableActivity(JsonEle additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new AppendVariableActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, variableName.Value, value.Value); + return new AppendVariableActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, variableName.Value, value.Value); } internal partial class AppendVariableActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AppendVariableActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AppendVariableActivity.cs index ecbdf98059b1..bfae1f79a6bb 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AppendVariableActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AppendVariableActivity.cs @@ -28,12 +28,14 @@ public AppendVariableActivity(string name) : base(name) /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. /// Name of the variable whose value needs to be appended to. /// Value to be appended. Could be a static value or Expression. - internal AppendVariableActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, string variableName, object value) : base(name, type, description, dependsOn, userProperties, additionalProperties) + internal AppendVariableActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, string variableName, object value) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) { VariableName = variableName; Value = value; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBatchLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBatchLinkedService.Serialization.cs index 8a195c973be7..b8d141c706e6 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBatchLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBatchLinkedService.Serialization.cs @@ -77,6 +77,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("encryptedCredential"u8); writer.WriteObjectValue(EncryptedCredential); } + if (Optional.IsDefined(Credential)) + { + writer.WritePropertyName("credential"u8); + writer.WriteObjectValue(Credential); + } writer.WriteEndObject(); foreach (var item in AdditionalProperties) { @@ -103,6 +108,7 @@ internal static AzureBatchLinkedService DeserializeAzureBatchLinkedService(JsonE object poolName = default; LinkedServiceReference linkedServiceName = default; Optional encryptedCredential = default; + Optional credential = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -208,13 +214,22 @@ internal static AzureBatchLinkedService DeserializeAzureBatchLinkedService(JsonE encryptedCredential = property0.Value.GetObject(); continue; } + if (property0.NameEquals("credential"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + credential = CredentialReference.DeserializeCredentialReference(property0.Value); + continue; + } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new AzureBatchLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, accountName, accessKey.Value, batchUri, poolName, linkedServiceName, encryptedCredential.Value); + return new AzureBatchLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, accountName, accessKey.Value, batchUri, poolName, linkedServiceName, encryptedCredential.Value, credential.Value); } internal partial class AzureBatchLinkedServiceConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBatchLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBatchLinkedService.cs index 4b1198b8ca70..d4c002321a0b 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBatchLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBatchLinkedService.cs @@ -51,7 +51,8 @@ public AzureBatchLinkedService(object accountName, object batchUri, object poolN /// The Azure Batch pool name. Type: string (or Expression with resultType string). /// The Azure Storage linked service reference. /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). - internal AzureBatchLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object accountName, SecretBase accessKey, object batchUri, object poolName, LinkedServiceReference linkedServiceName, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + /// The credential reference containing authentication information. + internal AzureBatchLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object accountName, SecretBase accessKey, object batchUri, object poolName, LinkedServiceReference linkedServiceName, object encryptedCredential, CredentialReference credential) : base(type, connectVia, description, parameters, annotations, additionalProperties) { AccountName = accountName; AccessKey = accessKey; @@ -59,6 +60,7 @@ internal AzureBatchLinkedService(string type, IntegrationRuntimeReference connec PoolName = poolName; LinkedServiceName = linkedServiceName; EncryptedCredential = encryptedCredential; + Credential = credential; Type = type ?? "AzureBatch"; } @@ -78,5 +80,7 @@ internal AzureBatchLinkedService(string type, IntegrationRuntimeReference connec public LinkedServiceReference LinkedServiceName { get; set; } /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). public object EncryptedCredential { get; set; } + /// The credential reference containing authentication information. + public CredentialReference Credential { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobFSLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobFSLinkedService.Serialization.cs index 7f76182402bf..253446f35fc2 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobFSLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobFSLinkedService.Serialization.cs @@ -59,8 +59,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WritePropertyName("typeProperties"u8); writer.WriteStartObject(); - writer.WritePropertyName("url"u8); - writer.WriteObjectValue(Url); + if (Optional.IsDefined(Url)) + { + writer.WritePropertyName("url"u8); + writer.WriteObjectValue(Url); + } if (Optional.IsDefined(AccountKey)) { writer.WritePropertyName("accountKey"u8); @@ -101,6 +104,21 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("encryptedCredential"u8); writer.WriteObjectValue(EncryptedCredential); } + if (Optional.IsDefined(SasUri)) + { + writer.WritePropertyName("sasUri"u8); + writer.WriteObjectValue(SasUri); + } + if (Optional.IsDefined(SasToken)) + { + writer.WritePropertyName("sasToken"u8); + writer.WriteObjectValue(SasToken); + } + if (Optional.IsDefined(Credential)) + { + writer.WritePropertyName("credential"u8); + writer.WriteObjectValue(Credential); + } writer.WriteEndObject(); foreach (var item in AdditionalProperties) { @@ -121,7 +139,7 @@ internal static AzureBlobFSLinkedService DeserializeAzureBlobFSLinkedService(Jso Optional description = default; Optional> parameters = default; Optional> annotations = default; - object url = default; + Optional url = default; Optional accountKey = default; Optional servicePrincipalId = default; Optional servicePrincipalKey = default; @@ -130,6 +148,9 @@ internal static AzureBlobFSLinkedService DeserializeAzureBlobFSLinkedService(Jso Optional servicePrincipalCredentialType = default; Optional servicePrincipalCredential = default; Optional encryptedCredential = default; + Optional sasUri = default; + Optional sasToken = default; + Optional credential = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -199,6 +220,10 @@ internal static AzureBlobFSLinkedService DeserializeAzureBlobFSLinkedService(Jso { if (property0.NameEquals("url"u8)) { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } url = property0.Value.GetObject(); continue; } @@ -274,13 +299,40 @@ internal static AzureBlobFSLinkedService DeserializeAzureBlobFSLinkedService(Jso encryptedCredential = property0.Value.GetObject(); continue; } + if (property0.NameEquals("sasUri"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sasUri = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("sasToken"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sasToken = SecretBase.DeserializeSecretBase(property0.Value); + continue; + } + if (property0.NameEquals("credential"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + credential = CredentialReference.DeserializeCredentialReference(property0.Value); + continue; + } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new AzureBlobFSLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, url, accountKey.Value, servicePrincipalId.Value, servicePrincipalKey.Value, tenant.Value, azureCloudType.Value, servicePrincipalCredentialType.Value, servicePrincipalCredential.Value, encryptedCredential.Value); + return new AzureBlobFSLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, url.Value, accountKey.Value, servicePrincipalId.Value, servicePrincipalKey.Value, tenant.Value, azureCloudType.Value, servicePrincipalCredentialType.Value, servicePrincipalCredential.Value, encryptedCredential.Value, sasUri.Value, sasToken.Value, credential.Value); } internal partial class AzureBlobFSLinkedServiceConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobFSLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobFSLinkedService.cs index 144ef2a39da8..b4912105fc65 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobFSLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobFSLinkedService.cs @@ -5,9 +5,7 @@ #nullable disable -using System; using System.Collections.Generic; -using Azure.Core; namespace Azure.Analytics.Synapse.Artifacts.Models { @@ -15,13 +13,8 @@ namespace Azure.Analytics.Synapse.Artifacts.Models public partial class AzureBlobFSLinkedService : LinkedService { /// Initializes a new instance of AzureBlobFSLinkedService. - /// Endpoint for the Azure Data Lake Storage Gen2 service. Type: string (or Expression with resultType string). - /// is null. - public AzureBlobFSLinkedService(object url) + public AzureBlobFSLinkedService() { - Argument.AssertNotNull(url, nameof(url)); - - Url = url; Type = "AzureBlobFS"; } @@ -49,7 +42,14 @@ public AzureBlobFSLinkedService(object url) /// The available derived classes include and . /// /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). - internal AzureBlobFSLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object url, object accountKey, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object azureCloudType, object servicePrincipalCredentialType, SecretBase servicePrincipalCredential, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + /// SAS URI of the Azure Data Lake Storage Gen2 service. Type: string, SecureString or AzureKeyVaultSecretReference. + /// + /// The Azure key vault secret reference of sasToken in sas uri. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// The credential reference containing authentication information. + internal AzureBlobFSLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object url, object accountKey, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object azureCloudType, object servicePrincipalCredentialType, SecretBase servicePrincipalCredential, object encryptedCredential, object sasUri, SecretBase sasToken, CredentialReference credential) : base(type, connectVia, description, parameters, annotations, additionalProperties) { Url = url; AccountKey = accountKey; @@ -60,6 +60,9 @@ internal AzureBlobFSLinkedService(string type, IntegrationRuntimeReference conne ServicePrincipalCredentialType = servicePrincipalCredentialType; ServicePrincipalCredential = servicePrincipalCredential; EncryptedCredential = encryptedCredential; + SasUri = sasUri; + SasToken = sasToken; + Credential = credential; Type = type ?? "AzureBlobFS"; } @@ -89,5 +92,15 @@ internal AzureBlobFSLinkedService(string type, IntegrationRuntimeReference conne public SecretBase ServicePrincipalCredential { get; set; } /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). public object EncryptedCredential { get; set; } + /// SAS URI of the Azure Data Lake Storage Gen2 service. Type: string, SecureString or AzureKeyVaultSecretReference. + public object SasUri { get; set; } + /// + /// The Azure key vault secret reference of sasToken in sas uri. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public SecretBase SasToken { get; set; } + /// The credential reference containing authentication information. + public CredentialReference Credential { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobFSReadSettings.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobFSReadSettings.Serialization.cs index 47f7ea13b827..96acc6cbade7 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobFSReadSettings.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobFSReadSettings.Serialization.cs @@ -42,7 +42,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) if (Optional.IsDefined(EnablePartitionDiscovery)) { writer.WritePropertyName("enablePartitionDiscovery"u8); - writer.WriteBooleanValue(EnablePartitionDiscovery.Value); + writer.WriteObjectValue(EnablePartitionDiscovery); } if (Optional.IsDefined(PartitionRootPath)) { @@ -89,7 +89,7 @@ internal static AzureBlobFSReadSettings DeserializeAzureBlobFSReadSettings(JsonE Optional wildcardFolderPath = default; Optional wildcardFileName = default; Optional fileListPath = default; - Optional enablePartitionDiscovery = default; + Optional enablePartitionDiscovery = default; Optional partitionRootPath = default; Optional deleteFilesAfterCompletion = default; Optional modifiedDatetimeStart = default; @@ -142,7 +142,7 @@ internal static AzureBlobFSReadSettings DeserializeAzureBlobFSReadSettings(JsonE { continue; } - enablePartitionDiscovery = property.Value.GetBoolean(); + enablePartitionDiscovery = property.Value.GetObject(); continue; } if (property.NameEquals("partitionRootPath"u8)) @@ -198,7 +198,7 @@ internal static AzureBlobFSReadSettings DeserializeAzureBlobFSReadSettings(JsonE additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new AzureBlobFSReadSettings(type, maxConcurrentConnections.Value, additionalProperties, recursive.Value, wildcardFolderPath.Value, wildcardFileName.Value, fileListPath.Value, Optional.ToNullable(enablePartitionDiscovery), partitionRootPath.Value, deleteFilesAfterCompletion.Value, modifiedDatetimeStart.Value, modifiedDatetimeEnd.Value); + return new AzureBlobFSReadSettings(type, maxConcurrentConnections.Value, additionalProperties, recursive.Value, wildcardFolderPath.Value, wildcardFileName.Value, fileListPath.Value, enablePartitionDiscovery.Value, partitionRootPath.Value, deleteFilesAfterCompletion.Value, modifiedDatetimeStart.Value, modifiedDatetimeEnd.Value); } internal partial class AzureBlobFSReadSettingsConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobFSReadSettings.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobFSReadSettings.cs index b618634ed1b2..04abde4b20e3 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobFSReadSettings.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobFSReadSettings.cs @@ -26,12 +26,12 @@ public AzureBlobFSReadSettings() /// Azure blobFS wildcardFolderPath. Type: string (or Expression with resultType string). /// Azure blobFS wildcardFileName. Type: string (or Expression with resultType string). /// Point to a text file that lists each file (relative path to the path configured in the dataset) that you want to copy. Type: string (or Expression with resultType string). - /// Indicates whether to enable partition discovery. + /// Indicates whether to enable partition discovery. Type: boolean (or Expression with resultType boolean). /// Specify the root path where partition discovery starts from. Type: string (or Expression with resultType string). /// Indicates whether the source files need to be deleted after copy completion. Default is false. Type: boolean (or Expression with resultType boolean). /// The start of file's modified datetime. Type: string (or Expression with resultType string). /// The end of file's modified datetime. Type: string (or Expression with resultType string). - internal AzureBlobFSReadSettings(string type, object maxConcurrentConnections, IDictionary additionalProperties, object recursive, object wildcardFolderPath, object wildcardFileName, object fileListPath, bool? enablePartitionDiscovery, object partitionRootPath, object deleteFilesAfterCompletion, object modifiedDatetimeStart, object modifiedDatetimeEnd) : base(type, maxConcurrentConnections, additionalProperties) + internal AzureBlobFSReadSettings(string type, object maxConcurrentConnections, IDictionary additionalProperties, object recursive, object wildcardFolderPath, object wildcardFileName, object fileListPath, object enablePartitionDiscovery, object partitionRootPath, object deleteFilesAfterCompletion, object modifiedDatetimeStart, object modifiedDatetimeEnd) : base(type, maxConcurrentConnections, additionalProperties) { Recursive = recursive; WildcardFolderPath = wildcardFolderPath; @@ -53,8 +53,8 @@ internal AzureBlobFSReadSettings(string type, object maxConcurrentConnections, I public object WildcardFileName { get; set; } /// Point to a text file that lists each file (relative path to the path configured in the dataset) that you want to copy. Type: string (or Expression with resultType string). public object FileListPath { get; set; } - /// Indicates whether to enable partition discovery. - public bool? EnablePartitionDiscovery { get; set; } + /// Indicates whether to enable partition discovery. Type: boolean (or Expression with resultType boolean). + public object EnablePartitionDiscovery { get; set; } /// Specify the root path where partition discovery starts from. Type: string (or Expression with resultType string). public object PartitionRootPath { get; set; } /// Indicates whether the source files need to be deleted after copy completion. Default is false. Type: boolean (or Expression with resultType boolean). diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobFSSink.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobFSSink.cs index 8e5878ca23cf..b14c46b73236 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobFSSink.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobFSSink.cs @@ -26,14 +26,14 @@ public AzureBlobFSSink() /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). /// Additional Properties. - /// The type of copy behavior for copy sink. + /// The type of copy behavior for copy sink. Type: string (or Expression with resultType string). internal AzureBlobFSSink(string type, object writeBatchSize, object writeBatchTimeout, object sinkRetryCount, object sinkRetryWait, object maxConcurrentConnections, IDictionary additionalProperties, object copyBehavior) : base(type, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, additionalProperties) { CopyBehavior = copyBehavior; Type = type ?? "AzureBlobFSSink"; } - /// The type of copy behavior for copy sink. + /// The type of copy behavior for copy sink. Type: string (or Expression with resultType string). public object CopyBehavior { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobStorageLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobStorageLinkedService.Serialization.cs index f988c7c3a7d3..4b97e93e9073 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobStorageLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobStorageLinkedService.Serialization.cs @@ -114,6 +114,21 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("encryptedCredential"u8); writer.WriteStringValue(EncryptedCredential); } + if (Optional.IsDefined(Credential)) + { + writer.WritePropertyName("credential"u8); + writer.WriteObjectValue(Credential); + } + if (Optional.IsDefined(AuthenticationType)) + { + writer.WritePropertyName("authenticationType"u8); + writer.WriteStringValue(AuthenticationType.Value.ToString()); + } + if (Optional.IsDefined(ContainerUri)) + { + writer.WritePropertyName("containerUri"u8); + writer.WriteObjectValue(ContainerUri); + } writer.WriteEndObject(); foreach (var item in AdditionalProperties) { @@ -145,6 +160,9 @@ internal static AzureBlobStorageLinkedService DeserializeAzureBlobStorageLinkedS Optional azureCloudType = default; Optional accountKind = default; Optional encryptedCredential = default; + Optional credential = default; + Optional authenticationType = default; + Optional containerUri = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -299,13 +317,40 @@ internal static AzureBlobStorageLinkedService DeserializeAzureBlobStorageLinkedS encryptedCredential = property0.Value.GetString(); continue; } + if (property0.NameEquals("credential"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + credential = CredentialReference.DeserializeCredentialReference(property0.Value); + continue; + } + if (property0.NameEquals("authenticationType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authenticationType = new AzureStorageAuthenticationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("containerUri"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + containerUri = property0.Value.GetObject(); + continue; + } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new AzureBlobStorageLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString.Value, accountKey.Value, sasUri.Value, sasToken.Value, serviceEndpoint.Value, servicePrincipalId.Value, servicePrincipalKey.Value, tenant.Value, azureCloudType.Value, accountKind.Value, encryptedCredential.Value); + return new AzureBlobStorageLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString.Value, accountKey.Value, sasUri.Value, sasToken.Value, serviceEndpoint.Value, servicePrincipalId.Value, servicePrincipalKey.Value, tenant.Value, azureCloudType.Value, accountKind.Value, encryptedCredential.Value, credential.Value, Optional.ToNullable(authenticationType), containerUri.Value); } internal partial class AzureBlobStorageLinkedServiceConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobStorageLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobStorageLinkedService.cs index b19e1e3373d1..59fa5ab4af39 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobStorageLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureBlobStorageLinkedService.cs @@ -40,7 +40,10 @@ public AzureBlobStorageLinkedService() /// Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’ cloud type. Type: string (or Expression with resultType string). /// Specify the kind of your storage account. Allowed values are: Storage (general purpose v1), StorageV2 (general purpose v2), BlobStorage, or BlockBlobStorage. Type: string (or Expression with resultType string). /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). - internal AzureBlobStorageLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, AzureKeyVaultSecretReference accountKey, object sasUri, AzureKeyVaultSecretReference sasToken, string serviceEndpoint, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object azureCloudType, string accountKind, string encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + /// The credential reference containing authentication information. + /// The type used for authentication. Type: string. + /// Container uri of the Azure Blob Storage resource only support for anonymous access. Type: string (or Expression with resultType string). + internal AzureBlobStorageLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, AzureKeyVaultSecretReference accountKey, object sasUri, AzureKeyVaultSecretReference sasToken, string serviceEndpoint, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object azureCloudType, string accountKind, string encryptedCredential, CredentialReference credential, AzureStorageAuthenticationType? authenticationType, object containerUri) : base(type, connectVia, description, parameters, annotations, additionalProperties) { ConnectionString = connectionString; AccountKey = accountKey; @@ -53,6 +56,9 @@ internal AzureBlobStorageLinkedService(string type, IntegrationRuntimeReference AzureCloudType = azureCloudType; AccountKind = accountKind; EncryptedCredential = encryptedCredential; + Credential = credential; + AuthenticationType = authenticationType; + ContainerUri = containerUri; Type = type ?? "AzureBlobStorage"; } @@ -82,5 +88,11 @@ internal AzureBlobStorageLinkedService(string type, IntegrationRuntimeReference public string AccountKind { get; set; } /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). public string EncryptedCredential { get; set; } + /// The credential reference containing authentication information. + public CredentialReference Credential { get; set; } + /// The type used for authentication. Type: string. + public AzureStorageAuthenticationType? AuthenticationType { get; set; } + /// Container uri of the Azure Blob Storage resource only support for anonymous access. Type: string (or Expression with resultType string). + public object ContainerUri { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerCommandActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerCommandActivity.Serialization.cs index b609a6479892..f751e527fe3b 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerCommandActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerCommandActivity.Serialization.cs @@ -38,6 +38,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -87,6 +97,8 @@ internal static AzureDataExplorerCommandActivity DeserializeAzureDataExplorerCom string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; object command = default; @@ -128,6 +140,24 @@ internal static AzureDataExplorerCommandActivity DeserializeAzureDataExplorerCom description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -185,7 +215,7 @@ internal static AzureDataExplorerCommandActivity DeserializeAzureDataExplorerCom additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new AzureDataExplorerCommandActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, command, commandTimeout.Value); + return new AzureDataExplorerCommandActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, command, commandTimeout.Value); } internal partial class AzureDataExplorerCommandActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerCommandActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerCommandActivity.cs index f126886425a4..300e26af3264 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerCommandActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerCommandActivity.cs @@ -31,6 +31,8 @@ public AzureDataExplorerCommandActivity(string name, object command) : base(name /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -38,7 +40,7 @@ public AzureDataExplorerCommandActivity(string name, object command) : base(name /// Activity policy. /// A control command, according to the Azure Data Explorer command syntax. Type: string (or Expression with resultType string). /// Control command timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9]))..). - internal AzureDataExplorerCommandActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object command, object commandTimeout) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + internal AzureDataExplorerCommandActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object command, object commandTimeout) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) { Command = command; CommandTimeout = commandTimeout; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerLinkedService.Serialization.cs index fcf281977e2b..5409d5d4a75c 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerLinkedService.Serialization.cs @@ -78,6 +78,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("tenant"u8); writer.WriteObjectValue(Tenant); } + if (Optional.IsDefined(Credential)) + { + writer.WritePropertyName("credential"u8); + writer.WriteObjectValue(Credential); + } writer.WriteEndObject(); foreach (var item in AdditionalProperties) { @@ -103,6 +108,7 @@ internal static AzureDataExplorerLinkedService DeserializeAzureDataExplorerLinke Optional servicePrincipalKey = default; object database = default; Optional tenant = default; + Optional credential = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -207,13 +213,22 @@ internal static AzureDataExplorerLinkedService DeserializeAzureDataExplorerLinke tenant = property0.Value.GetObject(); continue; } + if (property0.NameEquals("credential"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + credential = CredentialReference.DeserializeCredentialReference(property0.Value); + continue; + } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new AzureDataExplorerLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, endpoint, servicePrincipalId.Value, servicePrincipalKey.Value, database, tenant.Value); + return new AzureDataExplorerLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, endpoint, servicePrincipalId.Value, servicePrincipalKey.Value, database, tenant.Value, credential.Value); } internal partial class AzureDataExplorerLinkedServiceConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerLinkedService.cs index bbb9ecf647be..1feaa6b7f553 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataExplorerLinkedService.cs @@ -44,13 +44,15 @@ public AzureDataExplorerLinkedService(object endpoint, object database) /// /// Database name for connection. Type: string (or Expression with resultType string). /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). - internal AzureDataExplorerLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object endpoint, object servicePrincipalId, SecretBase servicePrincipalKey, object database, object tenant) : base(type, connectVia, description, parameters, annotations, additionalProperties) + /// The credential reference containing authentication information. + internal AzureDataExplorerLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object endpoint, object servicePrincipalId, SecretBase servicePrincipalKey, object database, object tenant, CredentialReference credential) : base(type, connectVia, description, parameters, annotations, additionalProperties) { Endpoint = endpoint; ServicePrincipalId = servicePrincipalId; ServicePrincipalKey = servicePrincipalKey; Database = database; Tenant = tenant; + Credential = credential; Type = type ?? "AzureDataExplorer"; } @@ -68,5 +70,7 @@ internal AzureDataExplorerLinkedService(string type, IntegrationRuntimeReference public object Database { get; set; } /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). public object Tenant { get; set; } + /// The credential reference containing authentication information. + public CredentialReference Credential { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeStoreLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeStoreLinkedService.Serialization.cs index 950307ebcd40..d9bfe829c584 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeStoreLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeStoreLinkedService.Serialization.cs @@ -101,6 +101,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("encryptedCredential"u8); writer.WriteObjectValue(EncryptedCredential); } + if (Optional.IsDefined(Credential)) + { + writer.WritePropertyName("credential"u8); + writer.WriteObjectValue(Credential); + } writer.WriteEndObject(); foreach (var item in AdditionalProperties) { @@ -130,6 +135,7 @@ internal static AzureDataLakeStoreLinkedService DeserializeAzureDataLakeStoreLin Optional subscriptionId = default; Optional resourceGroupName = default; Optional encryptedCredential = default; + Optional credential = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -274,13 +280,22 @@ internal static AzureDataLakeStoreLinkedService DeserializeAzureDataLakeStoreLin encryptedCredential = property0.Value.GetObject(); continue; } + if (property0.NameEquals("credential"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + credential = CredentialReference.DeserializeCredentialReference(property0.Value); + continue; + } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new AzureDataLakeStoreLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, dataLakeStoreUri, servicePrincipalId.Value, servicePrincipalKey.Value, tenant.Value, azureCloudType.Value, accountName.Value, subscriptionId.Value, resourceGroupName.Value, encryptedCredential.Value); + return new AzureDataLakeStoreLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, dataLakeStoreUri, servicePrincipalId.Value, servicePrincipalKey.Value, tenant.Value, azureCloudType.Value, accountName.Value, subscriptionId.Value, resourceGroupName.Value, encryptedCredential.Value, credential.Value); } internal partial class AzureDataLakeStoreLinkedServiceConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeStoreLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeStoreLinkedService.cs index a8890b525c1f..0bfbfbd6f46a 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeStoreLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeStoreLinkedService.cs @@ -45,7 +45,8 @@ public AzureDataLakeStoreLinkedService(object dataLakeStoreUri) /// Data Lake Store account subscription ID (if different from Data Factory account). Type: string (or Expression with resultType string). /// Data Lake Store account resource group name (if different from Data Factory account). Type: string (or Expression with resultType string). /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). - internal AzureDataLakeStoreLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object dataLakeStoreUri, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object azureCloudType, object accountName, object subscriptionId, object resourceGroupName, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + /// The credential reference containing authentication information. + internal AzureDataLakeStoreLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object dataLakeStoreUri, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object azureCloudType, object accountName, object subscriptionId, object resourceGroupName, object encryptedCredential, CredentialReference credential) : base(type, connectVia, description, parameters, annotations, additionalProperties) { DataLakeStoreUri = dataLakeStoreUri; ServicePrincipalId = servicePrincipalId; @@ -56,6 +57,7 @@ internal AzureDataLakeStoreLinkedService(string type, IntegrationRuntimeReferenc SubscriptionId = subscriptionId; ResourceGroupName = resourceGroupName; EncryptedCredential = encryptedCredential; + Credential = credential; Type = type ?? "AzureDataLakeStore"; } @@ -81,5 +83,7 @@ internal AzureDataLakeStoreLinkedService(string type, IntegrationRuntimeReferenc public object ResourceGroupName { get; set; } /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). public object EncryptedCredential { get; set; } + /// The credential reference containing authentication information. + public CredentialReference Credential { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeStoreReadSettings.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeStoreReadSettings.Serialization.cs index cf67ef68f71b..58bd11cef635 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeStoreReadSettings.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeStoreReadSettings.Serialization.cs @@ -52,7 +52,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) if (Optional.IsDefined(EnablePartitionDiscovery)) { writer.WritePropertyName("enablePartitionDiscovery"u8); - writer.WriteBooleanValue(EnablePartitionDiscovery.Value); + writer.WriteObjectValue(EnablePartitionDiscovery); } if (Optional.IsDefined(PartitionRootPath)) { @@ -101,7 +101,7 @@ internal static AzureDataLakeStoreReadSettings DeserializeAzureDataLakeStoreRead Optional fileListPath = default; Optional listAfter = default; Optional listBefore = default; - Optional enablePartitionDiscovery = default; + Optional enablePartitionDiscovery = default; Optional partitionRootPath = default; Optional deleteFilesAfterCompletion = default; Optional modifiedDatetimeStart = default; @@ -172,7 +172,7 @@ internal static AzureDataLakeStoreReadSettings DeserializeAzureDataLakeStoreRead { continue; } - enablePartitionDiscovery = property.Value.GetBoolean(); + enablePartitionDiscovery = property.Value.GetObject(); continue; } if (property.NameEquals("partitionRootPath"u8)) @@ -228,7 +228,7 @@ internal static AzureDataLakeStoreReadSettings DeserializeAzureDataLakeStoreRead additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new AzureDataLakeStoreReadSettings(type, maxConcurrentConnections.Value, additionalProperties, recursive.Value, wildcardFolderPath.Value, wildcardFileName.Value, fileListPath.Value, listAfter.Value, listBefore.Value, Optional.ToNullable(enablePartitionDiscovery), partitionRootPath.Value, deleteFilesAfterCompletion.Value, modifiedDatetimeStart.Value, modifiedDatetimeEnd.Value); + return new AzureDataLakeStoreReadSettings(type, maxConcurrentConnections.Value, additionalProperties, recursive.Value, wildcardFolderPath.Value, wildcardFileName.Value, fileListPath.Value, listAfter.Value, listBefore.Value, enablePartitionDiscovery.Value, partitionRootPath.Value, deleteFilesAfterCompletion.Value, modifiedDatetimeStart.Value, modifiedDatetimeEnd.Value); } internal partial class AzureDataLakeStoreReadSettingsConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeStoreReadSettings.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeStoreReadSettings.cs index f9acd0147abb..fc29774dcbd2 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeStoreReadSettings.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeStoreReadSettings.cs @@ -28,12 +28,12 @@ public AzureDataLakeStoreReadSettings() /// Point to a text file that lists each file (relative path to the path configured in the dataset) that you want to copy. Type: string (or Expression with resultType string). /// Lists files after the value (exclusive) based on file/folder names’ lexicographical order. Applies under the folderPath in data set, and filter files/sub-folders under the folderPath. Type: string (or Expression with resultType string). /// Lists files before the value (inclusive) based on file/folder names’ lexicographical order. Applies under the folderPath in data set, and filter files/sub-folders under the folderPath. Type: string (or Expression with resultType string). - /// Indicates whether to enable partition discovery. + /// Indicates whether to enable partition discovery. Type: boolean (or Expression with resultType boolean). /// Specify the root path where partition discovery starts from. Type: string (or Expression with resultType string). /// Indicates whether the source files need to be deleted after copy completion. Default is false. Type: boolean (or Expression with resultType boolean). /// The start of file's modified datetime. Type: string (or Expression with resultType string). /// The end of file's modified datetime. Type: string (or Expression with resultType string). - internal AzureDataLakeStoreReadSettings(string type, object maxConcurrentConnections, IDictionary additionalProperties, object recursive, object wildcardFolderPath, object wildcardFileName, object fileListPath, object listAfter, object listBefore, bool? enablePartitionDiscovery, object partitionRootPath, object deleteFilesAfterCompletion, object modifiedDatetimeStart, object modifiedDatetimeEnd) : base(type, maxConcurrentConnections, additionalProperties) + internal AzureDataLakeStoreReadSettings(string type, object maxConcurrentConnections, IDictionary additionalProperties, object recursive, object wildcardFolderPath, object wildcardFileName, object fileListPath, object listAfter, object listBefore, object enablePartitionDiscovery, object partitionRootPath, object deleteFilesAfterCompletion, object modifiedDatetimeStart, object modifiedDatetimeEnd) : base(type, maxConcurrentConnections, additionalProperties) { Recursive = recursive; WildcardFolderPath = wildcardFolderPath; @@ -61,8 +61,8 @@ internal AzureDataLakeStoreReadSettings(string type, object maxConcurrentConnect public object ListAfter { get; set; } /// Lists files before the value (inclusive) based on file/folder names’ lexicographical order. Applies under the folderPath in data set, and filter files/sub-folders under the folderPath. Type: string (or Expression with resultType string). public object ListBefore { get; set; } - /// Indicates whether to enable partition discovery. - public bool? EnablePartitionDiscovery { get; set; } + /// Indicates whether to enable partition discovery. Type: boolean (or Expression with resultType boolean). + public object EnablePartitionDiscovery { get; set; } /// Specify the root path where partition discovery starts from. Type: string (or Expression with resultType string). public object PartitionRootPath { get; set; } /// Indicates whether the source files need to be deleted after copy completion. Default is false. Type: boolean (or Expression with resultType boolean). diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeStoreSink.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeStoreSink.cs index 1ff8f3fa6171..60135a24820a 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeStoreSink.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeStoreSink.cs @@ -26,7 +26,7 @@ public AzureDataLakeStoreSink() /// Sink retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). /// The maximum concurrent connection count for the sink data store. Type: integer (or Expression with resultType integer). /// Additional Properties. - /// The type of copy behavior for copy sink. + /// The type of copy behavior for copy sink. Type: string (or Expression with resultType string). /// Single File Parallel. internal AzureDataLakeStoreSink(string type, object writeBatchSize, object writeBatchTimeout, object sinkRetryCount, object sinkRetryWait, object maxConcurrentConnections, IDictionary additionalProperties, object copyBehavior, object enableAdlsSingleFileParallel) : base(type, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, additionalProperties) { @@ -35,7 +35,7 @@ internal AzureDataLakeStoreSink(string type, object writeBatchSize, object write Type = type ?? "AzureDataLakeStoreSink"; } - /// The type of copy behavior for copy sink. + /// The type of copy behavior for copy sink. Type: string (or Expression with resultType string). public object CopyBehavior { get; set; } /// Single File Parallel. public object EnableAdlsSingleFileParallel { get; set; } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeStoreWriteSettings.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeStoreWriteSettings.cs index d2b6ad893fea..d6df0c2bf856 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeStoreWriteSettings.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDataLakeStoreWriteSettings.cs @@ -23,14 +23,14 @@ public AzureDataLakeStoreWriteSettings() /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). /// The type of copy behavior for copy sink. /// Additional Properties. - /// Specifies the expiry time of the written files. The time is applied to the UTC time zone in the format of "2018-12-01T05:00:00Z". Default value is NULL. Type: integer (or Expression with resultType integer). + /// Specifies the expiry time of the written files. The time is applied to the UTC time zone in the format of "2018-12-01T05:00:00Z". Default value is NULL. Type: string (or Expression with resultType string). internal AzureDataLakeStoreWriteSettings(string type, object maxConcurrentConnections, object copyBehavior, IDictionary additionalProperties, object expiryDateTime) : base(type, maxConcurrentConnections, copyBehavior, additionalProperties) { ExpiryDateTime = expiryDateTime; Type = type ?? "AzureDataLakeStoreWriteSettings"; } - /// Specifies the expiry time of the written files. The time is applied to the UTC time zone in the format of "2018-12-01T05:00:00Z". Default value is NULL. Type: integer (or Expression with resultType integer). + /// Specifies the expiry time of the written files. The time is applied to the UTC time zone in the format of "2018-12-01T05:00:00Z". Default value is NULL. Type: string (or Expression with resultType string). public object ExpiryDateTime { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDatabricksDeltaLakeLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDatabricksDeltaLakeLinkedService.Serialization.cs index d094e9adb8d5..e72c28a92d75 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDatabricksDeltaLakeLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDatabricksDeltaLakeLinkedService.Serialization.cs @@ -73,6 +73,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("encryptedCredential"u8); writer.WriteObjectValue(EncryptedCredential); } + if (Optional.IsDefined(Credential)) + { + writer.WritePropertyName("credential"u8); + writer.WriteObjectValue(Credential); + } writer.WriteEndObject(); foreach (var item in AdditionalProperties) { @@ -97,6 +102,7 @@ internal static AzureDatabricksDeltaLakeLinkedService DeserializeAzureDatabricks SecretBase accessToken = default; Optional clusterId = default; Optional encryptedCredential = default; + Optional credential = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -192,13 +198,22 @@ internal static AzureDatabricksDeltaLakeLinkedService DeserializeAzureDatabricks encryptedCredential = property0.Value.GetObject(); continue; } + if (property0.NameEquals("credential"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + credential = CredentialReference.DeserializeCredentialReference(property0.Value); + continue; + } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new AzureDatabricksDeltaLakeLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, domain, accessToken, clusterId.Value, encryptedCredential.Value); + return new AzureDatabricksDeltaLakeLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, domain, accessToken, clusterId.Value, encryptedCredential.Value, credential.Value); } internal partial class AzureDatabricksDeltaLakeLinkedServiceConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDatabricksDeltaLakeLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDatabricksDeltaLakeLinkedService.cs index 93c1e36b1951..3bbde27a6c6e 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDatabricksDeltaLakeLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDatabricksDeltaLakeLinkedService.cs @@ -47,12 +47,14 @@ public AzureDatabricksDeltaLakeLinkedService(object domain, SecretBase accessTok /// /// The id of an existing interactive cluster that will be used for all runs of this job. Type: string (or Expression with resultType string). /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). - internal AzureDatabricksDeltaLakeLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object domain, SecretBase accessToken, object clusterId, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + /// The credential reference containing authentication information. + internal AzureDatabricksDeltaLakeLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object domain, SecretBase accessToken, object clusterId, object encryptedCredential, CredentialReference credential) : base(type, connectVia, description, parameters, annotations, additionalProperties) { Domain = domain; AccessToken = accessToken; ClusterId = clusterId; EncryptedCredential = encryptedCredential; + Credential = credential; Type = type ?? "AzureDatabricksDeltaLake"; } @@ -68,5 +70,7 @@ internal AzureDatabricksDeltaLakeLinkedService(string type, IntegrationRuntimeRe public object ClusterId { get; set; } /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). public object EncryptedCredential { get; set; } + /// The credential reference containing authentication information. + public CredentialReference Credential { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDatabricksLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDatabricksLinkedService.Serialization.cs index 22f1b124d154..1e77f95ea5a5 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDatabricksLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDatabricksLinkedService.Serialization.cs @@ -179,6 +179,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("policyId"u8); writer.WriteObjectValue(PolicyId); } + if (Optional.IsDefined(Credential)) + { + writer.WritePropertyName("credential"u8); + writer.WriteObjectValue(Credential); + } writer.WriteEndObject(); foreach (var item in AdditionalProperties) { @@ -217,6 +222,7 @@ internal static AzureDatabricksLinkedService DeserializeAzureDatabricksLinkedSer Optional newClusterEnableElasticDisk = default; Optional encryptedCredential = default; Optional policyId = default; + Optional credential = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -478,13 +484,22 @@ internal static AzureDatabricksLinkedService DeserializeAzureDatabricksLinkedSer policyId = property0.Value.GetObject(); continue; } + if (property0.NameEquals("credential"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + credential = CredentialReference.DeserializeCredentialReference(property0.Value); + continue; + } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new AzureDatabricksLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, domain, accessToken.Value, authentication.Value, workspaceResourceId.Value, existingClusterId.Value, instancePoolId.Value, newClusterVersion.Value, newClusterNumOfWorker.Value, newClusterNodeType.Value, Optional.ToDictionary(newClusterSparkConf), Optional.ToDictionary(newClusterSparkEnvVars), Optional.ToDictionary(newClusterCustomTags), newClusterLogDestination.Value, newClusterDriverNodeType.Value, newClusterInitScripts.Value, newClusterEnableElasticDisk.Value, encryptedCredential.Value, policyId.Value); + return new AzureDatabricksLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, domain, accessToken.Value, authentication.Value, workspaceResourceId.Value, existingClusterId.Value, instancePoolId.Value, newClusterVersion.Value, newClusterNumOfWorker.Value, newClusterNodeType.Value, Optional.ToDictionary(newClusterSparkConf), Optional.ToDictionary(newClusterSparkEnvVars), Optional.ToDictionary(newClusterCustomTags), newClusterLogDestination.Value, newClusterDriverNodeType.Value, newClusterInitScripts.Value, newClusterEnableElasticDisk.Value, encryptedCredential.Value, policyId.Value, credential.Value); } internal partial class AzureDatabricksLinkedServiceConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDatabricksLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDatabricksLinkedService.cs index 3dc56d668493..25ab5b4e4c2b 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDatabricksLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureDatabricksLinkedService.cs @@ -57,7 +57,8 @@ public AzureDatabricksLinkedService(object domain) /// Enable the elastic disk on the new cluster. This property is now ignored, and takes the default elastic disk behavior in Databricks (elastic disks are always enabled). Type: boolean (or Expression with resultType boolean). /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). /// The policy id for limiting the ability to configure clusters based on a user defined set of rules. Type: string (or Expression with resultType string). - internal AzureDatabricksLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object domain, SecretBase accessToken, object authentication, object workspaceResourceId, object existingClusterId, object instancePoolId, object newClusterVersion, object newClusterNumOfWorker, object newClusterNodeType, IDictionary newClusterSparkConf, IDictionary newClusterSparkEnvVars, IDictionary newClusterCustomTags, object newClusterLogDestination, object newClusterDriverNodeType, object newClusterInitScripts, object newClusterEnableElasticDisk, object encryptedCredential, object policyId) : base(type, connectVia, description, parameters, annotations, additionalProperties) + /// The credential reference containing authentication information. + internal AzureDatabricksLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object domain, SecretBase accessToken, object authentication, object workspaceResourceId, object existingClusterId, object instancePoolId, object newClusterVersion, object newClusterNumOfWorker, object newClusterNodeType, IDictionary newClusterSparkConf, IDictionary newClusterSparkEnvVars, IDictionary newClusterCustomTags, object newClusterLogDestination, object newClusterDriverNodeType, object newClusterInitScripts, object newClusterEnableElasticDisk, object encryptedCredential, object policyId, CredentialReference credential) : base(type, connectVia, description, parameters, annotations, additionalProperties) { Domain = domain; AccessToken = accessToken; @@ -77,6 +78,7 @@ internal AzureDatabricksLinkedService(string type, IntegrationRuntimeReference c NewClusterEnableElasticDisk = newClusterEnableElasticDisk; EncryptedCredential = encryptedCredential; PolicyId = policyId; + Credential = credential; Type = type ?? "AzureDatabricks"; } @@ -120,5 +122,7 @@ internal AzureDatabricksLinkedService(string type, IntegrationRuntimeReference c public object EncryptedCredential { get; set; } /// The policy id for limiting the ability to configure clusters based on a user defined set of rules. Type: string (or Expression with resultType string). public object PolicyId { get; set; } + /// The credential reference containing authentication information. + public CredentialReference Credential { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionActivity.Serialization.cs index dce763c9b300..ea34d24d8b0b 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionActivity.Serialization.cs @@ -38,6 +38,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -94,6 +104,8 @@ internal static AzureFunctionActivity DeserializeAzureFunctionActivity(JsonEleme string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; AzureFunctionActivityMethod method = default; @@ -137,6 +149,24 @@ internal static AzureFunctionActivity DeserializeAzureFunctionActivity(JsonEleme description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -208,7 +238,7 @@ internal static AzureFunctionActivity DeserializeAzureFunctionActivity(JsonEleme additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new AzureFunctionActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, method, functionName, headers.Value, body.Value); + return new AzureFunctionActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, method, functionName, headers.Value, body.Value); } internal partial class AzureFunctionActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionActivity.cs index b572dcaa739b..5c51a109a1ff 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionActivity.cs @@ -33,6 +33,8 @@ public AzureFunctionActivity(string name, AzureFunctionActivityMethod method, ob /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -42,7 +44,7 @@ public AzureFunctionActivity(string name, AzureFunctionActivityMethod method, ob /// Name of the Function that the Azure Function Activity will call. Type: string (or Expression with resultType string). /// Represents the headers that will be sent to the request. For example, to set the language and type on a request: "headers" : { "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: string (or Expression with resultType string). /// Represents the payload that will be sent to the endpoint. Required for POST/PUT method, not allowed for GET method Type: string (or Expression with resultType string). - internal AzureFunctionActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, AzureFunctionActivityMethod method, object functionName, object headers, object body) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + internal AzureFunctionActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, AzureFunctionActivityMethod method, object functionName, object headers, object body) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) { Method = method; FunctionName = functionName; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionLinkedService.Serialization.cs index 2ccd410dfc43..46ac328313d1 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionLinkedService.Serialization.cs @@ -71,6 +71,21 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("encryptedCredential"u8); writer.WriteObjectValue(EncryptedCredential); } + if (Optional.IsDefined(Credential)) + { + writer.WritePropertyName("credential"u8); + writer.WriteObjectValue(Credential); + } + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"u8); + writer.WriteObjectValue(ResourceId); + } + if (Optional.IsDefined(Authentication)) + { + writer.WritePropertyName("authentication"u8); + writer.WriteObjectValue(Authentication); + } writer.WriteEndObject(); foreach (var item in AdditionalProperties) { @@ -94,6 +109,9 @@ internal static AzureFunctionLinkedService DeserializeAzureFunctionLinkedService object functionAppUrl = default; Optional functionKey = default; Optional encryptedCredential = default; + Optional credential = default; + Optional resourceId = default; + Optional authentication = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -184,13 +202,40 @@ internal static AzureFunctionLinkedService DeserializeAzureFunctionLinkedService encryptedCredential = property0.Value.GetObject(); continue; } + if (property0.NameEquals("credential"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + credential = CredentialReference.DeserializeCredentialReference(property0.Value); + continue; + } + if (property0.NameEquals("resourceId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceId = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("authentication"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authentication = property0.Value.GetObject(); + continue; + } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new AzureFunctionLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, functionAppUrl, functionKey.Value, encryptedCredential.Value); + return new AzureFunctionLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, functionAppUrl, functionKey.Value, encryptedCredential.Value, credential.Value, resourceId.Value, authentication.Value); } internal partial class AzureFunctionLinkedServiceConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionLinkedService.cs index 9c88ffa6a6a6..d471fb0ed285 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureFunctionLinkedService.cs @@ -39,11 +39,17 @@ public AzureFunctionLinkedService(object functionAppUrl) /// The available derived classes include and . /// /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). - internal AzureFunctionLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object functionAppUrl, SecretBase functionKey, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + /// The credential reference containing authentication information. + /// Allowed token audiences for azure function. + /// Type of authentication (Required to specify MSI) used to connect to AzureFunction. Type: string (or Expression with resultType string). + internal AzureFunctionLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object functionAppUrl, SecretBase functionKey, object encryptedCredential, CredentialReference credential, object resourceId, object authentication) : base(type, connectVia, description, parameters, annotations, additionalProperties) { FunctionAppUrl = functionAppUrl; FunctionKey = functionKey; EncryptedCredential = encryptedCredential; + Credential = credential; + ResourceId = resourceId; + Authentication = authentication; Type = type ?? "AzureFunction"; } @@ -57,5 +63,11 @@ internal AzureFunctionLinkedService(string type, IntegrationRuntimeReference con public SecretBase FunctionKey { get; set; } /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). public object EncryptedCredential { get; set; } + /// The credential reference containing authentication information. + public CredentialReference Credential { get; set; } + /// Allowed token audiences for azure function. + public object ResourceId { get; set; } + /// Type of authentication (Required to specify MSI) used to connect to AzureFunction. Type: string (or Expression with resultType string). + public object Authentication { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureKeyVaultLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureKeyVaultLinkedService.Serialization.cs index c53e540d89d1..03ec038dac49 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureKeyVaultLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureKeyVaultLinkedService.Serialization.cs @@ -61,6 +61,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartObject(); writer.WritePropertyName("baseUrl"u8); writer.WriteObjectValue(BaseUrl); + if (Optional.IsDefined(Credential)) + { + writer.WritePropertyName("credential"u8); + writer.WriteObjectValue(Credential); + } writer.WriteEndObject(); foreach (var item in AdditionalProperties) { @@ -82,6 +87,7 @@ internal static AzureKeyVaultLinkedService DeserializeAzureKeyVaultLinkedService Optional> parameters = default; Optional> annotations = default; object baseUrl = default; + Optional credential = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -154,13 +160,22 @@ internal static AzureKeyVaultLinkedService DeserializeAzureKeyVaultLinkedService baseUrl = property0.Value.GetObject(); continue; } + if (property0.NameEquals("credential"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + credential = CredentialReference.DeserializeCredentialReference(property0.Value); + continue; + } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new AzureKeyVaultLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, baseUrl); + return new AzureKeyVaultLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, baseUrl, credential.Value); } internal partial class AzureKeyVaultLinkedServiceConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureKeyVaultLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureKeyVaultLinkedService.cs index 2c07c62674fe..839a889bbff2 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureKeyVaultLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureKeyVaultLinkedService.cs @@ -33,13 +33,17 @@ public AzureKeyVaultLinkedService(object baseUrl) /// List of tags that can be used for describing the linked service. /// Additional Properties. /// The base URL of the Azure Key Vault. e.g. https://myakv.vault.azure.net Type: string (or Expression with resultType string). - internal AzureKeyVaultLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object baseUrl) : base(type, connectVia, description, parameters, annotations, additionalProperties) + /// The credential reference containing authentication information. + internal AzureKeyVaultLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object baseUrl, CredentialReference credential) : base(type, connectVia, description, parameters, annotations, additionalProperties) { BaseUrl = baseUrl; + Credential = credential; Type = type ?? "AzureKeyVault"; } /// The base URL of the Azure Key Vault. e.g. https://myakv.vault.azure.net Type: string (or Expression with resultType string). public object BaseUrl { get; set; } + /// The credential reference containing authentication information. + public CredentialReference Credential { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLBatchExecutionActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLBatchExecutionActivity.Serialization.cs index ca9ee00e418f..195771f6f8ed 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLBatchExecutionActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLBatchExecutionActivity.Serialization.cs @@ -38,6 +38,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -118,6 +128,8 @@ internal static AzureMLBatchExecutionActivity DeserializeAzureMLBatchExecutionAc string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; Optional> globalParameters = default; @@ -160,6 +172,24 @@ internal static AzureMLBatchExecutionActivity DeserializeAzureMLBatchExecutionAc description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -252,7 +282,7 @@ internal static AzureMLBatchExecutionActivity DeserializeAzureMLBatchExecutionAc additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new AzureMLBatchExecutionActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, Optional.ToDictionary(globalParameters), Optional.ToDictionary(webServiceOutputs), Optional.ToDictionary(webServiceInputs)); + return new AzureMLBatchExecutionActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, Optional.ToDictionary(globalParameters), Optional.ToDictionary(webServiceOutputs), Optional.ToDictionary(webServiceInputs)); } internal partial class AzureMLBatchExecutionActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLBatchExecutionActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLBatchExecutionActivity.cs index ba4ebf402158..476eca8ccb51 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLBatchExecutionActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLBatchExecutionActivity.cs @@ -31,6 +31,8 @@ public AzureMLBatchExecutionActivity(string name) : base(name) /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -39,7 +41,7 @@ public AzureMLBatchExecutionActivity(string name) : base(name) /// Key,Value pairs to be passed to the Azure ML Batch Execution Service endpoint. Keys must match the names of web service parameters defined in the published Azure ML web service. Values will be passed in the GlobalParameters property of the Azure ML batch execution request. /// Key,Value pairs, mapping the names of Azure ML endpoint's Web Service Outputs to AzureMLWebServiceFile objects specifying the output Blob locations. This information will be passed in the WebServiceOutputs property of the Azure ML batch execution request. /// Key,Value pairs, mapping the names of Azure ML endpoint's Web Service Inputs to AzureMLWebServiceFile objects specifying the input Blob locations.. This information will be passed in the WebServiceInputs property of the Azure ML batch execution request. - internal AzureMLBatchExecutionActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, IDictionary globalParameters, IDictionary webServiceOutputs, IDictionary webServiceInputs) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + internal AzureMLBatchExecutionActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, IDictionary globalParameters, IDictionary webServiceOutputs, IDictionary webServiceInputs) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) { GlobalParameters = globalParameters; WebServiceOutputs = webServiceOutputs; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLExecutePipelineActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLExecutePipelineActivity.Serialization.cs index 533756c0aa7b..58df1391d881 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLExecutePipelineActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLExecutePipelineActivity.Serialization.cs @@ -38,6 +38,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -102,6 +112,8 @@ internal static AzureMLExecutePipelineActivity DeserializeAzureMLExecutePipeline string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; object mlPipelineId = default; @@ -146,6 +158,24 @@ internal static AzureMLExecutePipelineActivity DeserializeAzureMLExecutePipeline description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -230,7 +260,7 @@ internal static AzureMLExecutePipelineActivity DeserializeAzureMLExecutePipeline additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new AzureMLExecutePipelineActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, mlPipelineId, experimentName.Value, mlPipelineParameters.Value, mlParentRunId.Value, continueOnStepFailure.Value); + return new AzureMLExecutePipelineActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, mlPipelineId, experimentName.Value, mlPipelineParameters.Value, mlParentRunId.Value, continueOnStepFailure.Value); } internal partial class AzureMLExecutePipelineActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLExecutePipelineActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLExecutePipelineActivity.cs index facb3b9d52bb..fd12f4d826ab 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLExecutePipelineActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLExecutePipelineActivity.cs @@ -31,6 +31,8 @@ public AzureMLExecutePipelineActivity(string name, object mlPipelineId) : base(n /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -41,7 +43,7 @@ public AzureMLExecutePipelineActivity(string name, object mlPipelineId) : base(n /// Key,Value pairs to be passed to the published Azure ML pipeline endpoint. Keys must match the names of pipeline parameters defined in the published pipeline. Values will be passed in the ParameterAssignments property of the published pipeline execution request. Type: object with key value pairs (or Expression with resultType object). /// The parent Azure ML Service pipeline run id. This information will be passed in the ParentRunId property of the published pipeline execution request. Type: string (or Expression with resultType string). /// Whether to continue execution of other steps in the PipelineRun if a step fails. This information will be passed in the continueOnStepFailure property of the published pipeline execution request. Type: boolean (or Expression with resultType boolean). - internal AzureMLExecutePipelineActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object mlPipelineId, object experimentName, object mlPipelineParameters, object mlParentRunId, object continueOnStepFailure) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + internal AzureMLExecutePipelineActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object mlPipelineId, object experimentName, object mlPipelineParameters, object mlParentRunId, object continueOnStepFailure) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) { MlPipelineId = mlPipelineId; ExperimentName = experimentName; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLLinkedService.Serialization.cs index 7df2dbb84b16..72a779a19ddf 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLLinkedService.Serialization.cs @@ -88,6 +88,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("encryptedCredential"u8); writer.WriteObjectValue(EncryptedCredential); } + if (Optional.IsDefined(Authentication)) + { + writer.WritePropertyName("authentication"u8); + writer.WriteObjectValue(Authentication); + } writer.WriteEndObject(); foreach (var item in AdditionalProperties) { @@ -115,6 +120,7 @@ internal static AzureMLLinkedService DeserializeAzureMLLinkedService(JsonElement Optional servicePrincipalKey = default; Optional tenant = default; Optional encryptedCredential = default; + Optional authentication = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -237,13 +243,22 @@ internal static AzureMLLinkedService DeserializeAzureMLLinkedService(JsonElement encryptedCredential = property0.Value.GetObject(); continue; } + if (property0.NameEquals("authentication"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authentication = property0.Value.GetObject(); + continue; + } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new AzureMLLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, mlEndpoint, apiKey, updateResourceEndpoint.Value, servicePrincipalId.Value, servicePrincipalKey.Value, tenant.Value, encryptedCredential.Value); + return new AzureMLLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, mlEndpoint, apiKey, updateResourceEndpoint.Value, servicePrincipalId.Value, servicePrincipalKey.Value, tenant.Value, encryptedCredential.Value, authentication.Value); } internal partial class AzureMLLinkedServiceConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLLinkedService.cs index 96c3df2021d1..a87bdc13c4d3 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLLinkedService.cs @@ -54,7 +54,8 @@ public AzureMLLinkedService(object mlEndpoint, SecretBase apiKey) /// /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). - internal AzureMLLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object mlEndpoint, SecretBase apiKey, object updateResourceEndpoint, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + /// Type of authentication (Required to specify MSI) used to connect to AzureML. Type: string (or Expression with resultType string). + internal AzureMLLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object mlEndpoint, SecretBase apiKey, object updateResourceEndpoint, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object encryptedCredential, object authentication) : base(type, connectVia, description, parameters, annotations, additionalProperties) { MlEndpoint = mlEndpoint; ApiKey = apiKey; @@ -63,6 +64,7 @@ internal AzureMLLinkedService(string type, IntegrationRuntimeReference connectVi ServicePrincipalKey = servicePrincipalKey; Tenant = tenant; EncryptedCredential = encryptedCredential; + Authentication = authentication; Type = type ?? "AzureML"; } @@ -88,5 +90,7 @@ internal AzureMLLinkedService(string type, IntegrationRuntimeReference connectVi public object Tenant { get; set; } /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). public object EncryptedCredential { get; set; } + /// Type of authentication (Required to specify MSI) used to connect to AzureML. Type: string (or Expression with resultType string). + public object Authentication { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLServiceLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLServiceLinkedService.Serialization.cs index ecb06ae1dc61..fe7547b888c8 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLServiceLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLServiceLinkedService.Serialization.cs @@ -65,6 +65,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteObjectValue(ResourceGroupName); writer.WritePropertyName("mlWorkspaceName"u8); writer.WriteObjectValue(MlWorkspaceName); + if (Optional.IsDefined(Authentication)) + { + writer.WritePropertyName("authentication"u8); + writer.WriteObjectValue(Authentication); + } if (Optional.IsDefined(ServicePrincipalId)) { writer.WritePropertyName("servicePrincipalId"u8); @@ -108,6 +113,7 @@ internal static AzureMLServiceLinkedService DeserializeAzureMLServiceLinkedServi object subscriptionId = default; object resourceGroupName = default; object mlWorkspaceName = default; + Optional authentication = default; Optional servicePrincipalId = default; Optional servicePrincipalKey = default; Optional tenant = default; @@ -194,6 +200,15 @@ internal static AzureMLServiceLinkedService DeserializeAzureMLServiceLinkedServi mlWorkspaceName = property0.Value.GetObject(); continue; } + if (property0.NameEquals("authentication"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authentication = property0.Value.GetObject(); + continue; + } if (property0.NameEquals("servicePrincipalId"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -236,7 +251,7 @@ internal static AzureMLServiceLinkedService DeserializeAzureMLServiceLinkedServi additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new AzureMLServiceLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, subscriptionId, resourceGroupName, mlWorkspaceName, servicePrincipalId.Value, servicePrincipalKey.Value, tenant.Value, encryptedCredential.Value); + return new AzureMLServiceLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, subscriptionId, resourceGroupName, mlWorkspaceName, authentication.Value, servicePrincipalId.Value, servicePrincipalKey.Value, tenant.Value, encryptedCredential.Value); } internal partial class AzureMLServiceLinkedServiceConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLServiceLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLServiceLinkedService.cs index 8862dda96893..1a7d600926ad 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLServiceLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLServiceLinkedService.cs @@ -41,6 +41,7 @@ public AzureMLServiceLinkedService(object subscriptionId, object resourceGroupNa /// Azure ML Service workspace subscription ID. Type: string (or Expression with resultType string). /// Azure ML Service workspace resource group name. Type: string (or Expression with resultType string). /// Azure ML Service workspace name. Type: string (or Expression with resultType string). + /// Type of authentication (Required to specify MSI) used to connect to AzureML. Type: string (or Expression with resultType string). /// The ID of the service principal used to authenticate against the endpoint of a published Azure ML Service pipeline. Type: string (or Expression with resultType string). /// /// The key of the service principal used to authenticate against the endpoint of a published Azure ML Service pipeline. @@ -49,11 +50,12 @@ public AzureMLServiceLinkedService(object subscriptionId, object resourceGroupNa /// /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). - internal AzureMLServiceLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object subscriptionId, object resourceGroupName, object mlWorkspaceName, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + internal AzureMLServiceLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object subscriptionId, object resourceGroupName, object mlWorkspaceName, object authentication, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) { SubscriptionId = subscriptionId; ResourceGroupName = resourceGroupName; MlWorkspaceName = mlWorkspaceName; + Authentication = authentication; ServicePrincipalId = servicePrincipalId; ServicePrincipalKey = servicePrincipalKey; Tenant = tenant; @@ -67,6 +69,8 @@ internal AzureMLServiceLinkedService(string type, IntegrationRuntimeReference co public object ResourceGroupName { get; set; } /// Azure ML Service workspace name. Type: string (or Expression with resultType string). public object MlWorkspaceName { get; set; } + /// Type of authentication (Required to specify MSI) used to connect to AzureML. Type: string (or Expression with resultType string). + public object Authentication { get; set; } /// The ID of the service principal used to authenticate against the endpoint of a published Azure ML Service pipeline. Type: string (or Expression with resultType string). public object ServicePrincipalId { get; set; } /// diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLUpdateResourceActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLUpdateResourceActivity.Serialization.cs index 34533d4c2024..74075adc6c92 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLUpdateResourceActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLUpdateResourceActivity.Serialization.cs @@ -38,6 +38,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -86,6 +96,8 @@ internal static AzureMLUpdateResourceActivity DeserializeAzureMLUpdateResourceAc string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; object trainedModelName = default; @@ -128,6 +140,24 @@ internal static AzureMLUpdateResourceActivity DeserializeAzureMLUpdateResourceAc description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -186,7 +216,7 @@ internal static AzureMLUpdateResourceActivity DeserializeAzureMLUpdateResourceAc additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new AzureMLUpdateResourceActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, trainedModelName, trainedModelLinkedServiceName, trainedModelFilePath); + return new AzureMLUpdateResourceActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, trainedModelName, trainedModelLinkedServiceName, trainedModelFilePath); } internal partial class AzureMLUpdateResourceActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLUpdateResourceActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLUpdateResourceActivity.cs index 3d1ea15a633e..7983d3420d25 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLUpdateResourceActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureMLUpdateResourceActivity.cs @@ -37,6 +37,8 @@ public AzureMLUpdateResourceActivity(string name, object trainedModelName, Linke /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -45,7 +47,7 @@ public AzureMLUpdateResourceActivity(string name, object trainedModelName, Linke /// Name of the Trained Model module in the Web Service experiment to be updated. Type: string (or Expression with resultType string). /// Name of Azure Storage linked service holding the .ilearner file that will be uploaded by the update operation. /// The relative file path in trainedModelLinkedService to represent the .ilearner file that will be uploaded by the update operation. Type: string (or Expression with resultType string). - internal AzureMLUpdateResourceActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object trainedModelName, LinkedServiceReference trainedModelLinkedServiceName, object trainedModelFilePath) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + internal AzureMLUpdateResourceActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object trainedModelName, LinkedServiceReference trainedModelLinkedServiceName, object trainedModelFilePath) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) { TrainedModelName = trainedModelName; TrainedModelLinkedServiceName = trainedModelLinkedServiceName; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDWLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDWLinkedService.Serialization.cs index 3dec9419ea81..ea2ddf3ef935 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDWLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDWLinkedService.Serialization.cs @@ -91,6 +91,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("encryptedCredential"u8); writer.WriteObjectValue(EncryptedCredential); } + if (Optional.IsDefined(Credential)) + { + writer.WritePropertyName("credential"u8); + writer.WriteObjectValue(Credential); + } writer.WriteEndObject(); foreach (var item in AdditionalProperties) { @@ -118,6 +123,7 @@ internal static AzureSqlDWLinkedService DeserializeAzureSqlDWLinkedService(JsonE Optional tenant = default; Optional azureCloudType = default; Optional encryptedCredential = default; + Optional credential = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -244,13 +250,22 @@ internal static AzureSqlDWLinkedService DeserializeAzureSqlDWLinkedService(JsonE encryptedCredential = property0.Value.GetObject(); continue; } + if (property0.NameEquals("credential"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + credential = CredentialReference.DeserializeCredentialReference(property0.Value); + continue; + } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new AzureSqlDWLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, password.Value, servicePrincipalId.Value, servicePrincipalKey.Value, tenant.Value, azureCloudType.Value, encryptedCredential.Value); + return new AzureSqlDWLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, password.Value, servicePrincipalId.Value, servicePrincipalKey.Value, tenant.Value, azureCloudType.Value, encryptedCredential.Value, credential.Value); } internal partial class AzureSqlDWLinkedServiceConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDWLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDWLinkedService.cs index d5fd6302ed69..c5dfe31759b9 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDWLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDWLinkedService.cs @@ -43,7 +43,8 @@ public AzureSqlDWLinkedService(object connectionString) /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). /// Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’ cloud type. Type: string (or Expression with resultType string). /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). - internal AzureSqlDWLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, AzureKeyVaultSecretReference password, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object azureCloudType, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + /// The credential reference containing authentication information. + internal AzureSqlDWLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, AzureKeyVaultSecretReference password, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object azureCloudType, object encryptedCredential, CredentialReference credential) : base(type, connectVia, description, parameters, annotations, additionalProperties) { ConnectionString = connectionString; Password = password; @@ -52,6 +53,7 @@ internal AzureSqlDWLinkedService(string type, IntegrationRuntimeReference connec Tenant = tenant; AzureCloudType = azureCloudType; EncryptedCredential = encryptedCredential; + Credential = credential; Type = type ?? "AzureSqlDW"; } @@ -73,5 +75,7 @@ internal AzureSqlDWLinkedService(string type, IntegrationRuntimeReference connec public object AzureCloudType { get; set; } /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). public object EncryptedCredential { get; set; } + /// The credential reference containing authentication information. + public CredentialReference Credential { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDatabaseLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDatabaseLinkedService.Serialization.cs index bc8d8d916847..b1c7da06eacc 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDatabaseLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDatabaseLinkedService.Serialization.cs @@ -86,11 +86,21 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("azureCloudType"u8); writer.WriteObjectValue(AzureCloudType); } + if (Optional.IsDefined(AlwaysEncryptedSettings)) + { + writer.WritePropertyName("alwaysEncryptedSettings"u8); + writer.WriteObjectValue(AlwaysEncryptedSettings); + } if (Optional.IsDefined(EncryptedCredential)) { writer.WritePropertyName("encryptedCredential"u8); writer.WriteObjectValue(EncryptedCredential); } + if (Optional.IsDefined(Credential)) + { + writer.WritePropertyName("credential"u8); + writer.WriteObjectValue(Credential); + } writer.WriteEndObject(); foreach (var item in AdditionalProperties) { @@ -117,7 +127,9 @@ internal static AzureSqlDatabaseLinkedService DeserializeAzureSqlDatabaseLinkedS Optional servicePrincipalKey = default; Optional tenant = default; Optional azureCloudType = default; + Optional alwaysEncryptedSettings = default; Optional encryptedCredential = default; + Optional credential = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -235,6 +247,15 @@ internal static AzureSqlDatabaseLinkedService DeserializeAzureSqlDatabaseLinkedS azureCloudType = property0.Value.GetObject(); continue; } + if (property0.NameEquals("alwaysEncryptedSettings"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + alwaysEncryptedSettings = SqlAlwaysEncryptedProperties.DeserializeSqlAlwaysEncryptedProperties(property0.Value); + continue; + } if (property0.NameEquals("encryptedCredential"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -244,13 +265,22 @@ internal static AzureSqlDatabaseLinkedService DeserializeAzureSqlDatabaseLinkedS encryptedCredential = property0.Value.GetObject(); continue; } + if (property0.NameEquals("credential"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + credential = CredentialReference.DeserializeCredentialReference(property0.Value); + continue; + } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new AzureSqlDatabaseLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, password.Value, servicePrincipalId.Value, servicePrincipalKey.Value, tenant.Value, azureCloudType.Value, encryptedCredential.Value); + return new AzureSqlDatabaseLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, password.Value, servicePrincipalId.Value, servicePrincipalKey.Value, tenant.Value, azureCloudType.Value, alwaysEncryptedSettings.Value, encryptedCredential.Value, credential.Value); } internal partial class AzureSqlDatabaseLinkedServiceConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDatabaseLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDatabaseLinkedService.cs index ee7361a8a587..93179edb419a 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDatabaseLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlDatabaseLinkedService.cs @@ -42,8 +42,10 @@ public AzureSqlDatabaseLinkedService(object connectionString) /// /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). /// Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’ cloud type. Type: string (or Expression with resultType string). + /// Sql always encrypted properties. /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). - internal AzureSqlDatabaseLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, AzureKeyVaultSecretReference password, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object azureCloudType, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + /// The credential reference containing authentication information. + internal AzureSqlDatabaseLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, AzureKeyVaultSecretReference password, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object azureCloudType, SqlAlwaysEncryptedProperties alwaysEncryptedSettings, object encryptedCredential, CredentialReference credential) : base(type, connectVia, description, parameters, annotations, additionalProperties) { ConnectionString = connectionString; Password = password; @@ -51,7 +53,9 @@ internal AzureSqlDatabaseLinkedService(string type, IntegrationRuntimeReference ServicePrincipalKey = servicePrincipalKey; Tenant = tenant; AzureCloudType = azureCloudType; + AlwaysEncryptedSettings = alwaysEncryptedSettings; EncryptedCredential = encryptedCredential; + Credential = credential; Type = type ?? "AzureSqlDatabase"; } @@ -71,7 +75,11 @@ internal AzureSqlDatabaseLinkedService(string type, IntegrationRuntimeReference public object Tenant { get; set; } /// Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’ cloud type. Type: string (or Expression with resultType string). public object AzureCloudType { get; set; } + /// Sql always encrypted properties. + public SqlAlwaysEncryptedProperties AlwaysEncryptedSettings { get; set; } /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). public object EncryptedCredential { get; set; } + /// The credential reference containing authentication information. + public CredentialReference Credential { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlMILinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlMILinkedService.Serialization.cs index ae78224dc048..72c27e351e76 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlMILinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlMILinkedService.Serialization.cs @@ -86,11 +86,21 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("azureCloudType"u8); writer.WriteObjectValue(AzureCloudType); } + if (Optional.IsDefined(AlwaysEncryptedSettings)) + { + writer.WritePropertyName("alwaysEncryptedSettings"u8); + writer.WriteObjectValue(AlwaysEncryptedSettings); + } if (Optional.IsDefined(EncryptedCredential)) { writer.WritePropertyName("encryptedCredential"u8); writer.WriteObjectValue(EncryptedCredential); } + if (Optional.IsDefined(Credential)) + { + writer.WritePropertyName("credential"u8); + writer.WriteObjectValue(Credential); + } writer.WriteEndObject(); foreach (var item in AdditionalProperties) { @@ -117,7 +127,9 @@ internal static AzureSqlMILinkedService DeserializeAzureSqlMILinkedService(JsonE Optional servicePrincipalKey = default; Optional tenant = default; Optional azureCloudType = default; + Optional alwaysEncryptedSettings = default; Optional encryptedCredential = default; + Optional credential = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -235,6 +247,15 @@ internal static AzureSqlMILinkedService DeserializeAzureSqlMILinkedService(JsonE azureCloudType = property0.Value.GetObject(); continue; } + if (property0.NameEquals("alwaysEncryptedSettings"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + alwaysEncryptedSettings = SqlAlwaysEncryptedProperties.DeserializeSqlAlwaysEncryptedProperties(property0.Value); + continue; + } if (property0.NameEquals("encryptedCredential"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -244,13 +265,22 @@ internal static AzureSqlMILinkedService DeserializeAzureSqlMILinkedService(JsonE encryptedCredential = property0.Value.GetObject(); continue; } + if (property0.NameEquals("credential"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + credential = CredentialReference.DeserializeCredentialReference(property0.Value); + continue; + } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new AzureSqlMILinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, password.Value, servicePrincipalId.Value, servicePrincipalKey.Value, tenant.Value, azureCloudType.Value, encryptedCredential.Value); + return new AzureSqlMILinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, password.Value, servicePrincipalId.Value, servicePrincipalKey.Value, tenant.Value, azureCloudType.Value, alwaysEncryptedSettings.Value, encryptedCredential.Value, credential.Value); } internal partial class AzureSqlMILinkedServiceConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlMILinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlMILinkedService.cs index b434a3b8199f..724bb1f4224c 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlMILinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlMILinkedService.cs @@ -42,8 +42,10 @@ public AzureSqlMILinkedService(object connectionString) /// /// The name or ID of the tenant to which the service principal belongs. Type: string (or Expression with resultType string). /// Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’ cloud type. Type: string (or Expression with resultType string). + /// Sql always encrypted properties. /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). - internal AzureSqlMILinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, AzureKeyVaultSecretReference password, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object azureCloudType, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + /// The credential reference containing authentication information. + internal AzureSqlMILinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, AzureKeyVaultSecretReference password, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object azureCloudType, SqlAlwaysEncryptedProperties alwaysEncryptedSettings, object encryptedCredential, CredentialReference credential) : base(type, connectVia, description, parameters, annotations, additionalProperties) { ConnectionString = connectionString; Password = password; @@ -51,7 +53,9 @@ internal AzureSqlMILinkedService(string type, IntegrationRuntimeReference connec ServicePrincipalKey = servicePrincipalKey; Tenant = tenant; AzureCloudType = azureCloudType; + AlwaysEncryptedSettings = alwaysEncryptedSettings; EncryptedCredential = encryptedCredential; + Credential = credential; Type = type ?? "AzureSqlMI"; } @@ -71,7 +75,11 @@ internal AzureSqlMILinkedService(string type, IntegrationRuntimeReference connec public object Tenant { get; set; } /// Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’ cloud type. Type: string (or Expression with resultType string). public object AzureCloudType { get; set; } + /// Sql always encrypted properties. + public SqlAlwaysEncryptedProperties AlwaysEncryptedSettings { get; set; } /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). public object EncryptedCredential { get; set; } + /// The credential reference containing authentication information. + public CredentialReference Credential { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlSource.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlSource.Serialization.cs index 625eabbc28c3..22f5f01b78f6 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlSource.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlSource.Serialization.cs @@ -40,6 +40,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndObject(); } + if (Optional.IsDefined(IsolationLevel)) + { + writer.WritePropertyName("isolationLevel"u8); + writer.WriteObjectValue(IsolationLevel); + } if (Optional.IsDefined(ProduceAdditionalTypes)) { writer.WritePropertyName("produceAdditionalTypes"u8); @@ -99,6 +104,7 @@ internal static AzureSqlSource DeserializeAzureSqlSource(JsonElement element) Optional sqlReaderQuery = default; Optional sqlReaderStoredProcedureName = default; Optional> storedProcedureParameters = default; + Optional isolationLevel = default; Optional produceAdditionalTypes = default; Optional partitionOption = default; Optional partitionSettings = default; @@ -144,6 +150,15 @@ internal static AzureSqlSource DeserializeAzureSqlSource(JsonElement element) storedProcedureParameters = dictionary; continue; } + if (property.NameEquals("isolationLevel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isolationLevel = property.Value.GetObject(); + continue; + } if (property.NameEquals("produceAdditionalTypes"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -224,7 +239,7 @@ internal static AzureSqlSource DeserializeAzureSqlSource(JsonElement element) additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new AzureSqlSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, sqlReaderQuery.Value, sqlReaderStoredProcedureName.Value, Optional.ToDictionary(storedProcedureParameters), produceAdditionalTypes.Value, partitionOption.Value, partitionSettings.Value); + return new AzureSqlSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, sqlReaderQuery.Value, sqlReaderStoredProcedureName.Value, Optional.ToDictionary(storedProcedureParameters), isolationLevel.Value, produceAdditionalTypes.Value, partitionOption.Value, partitionSettings.Value); } internal partial class AzureSqlSourceConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlSource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlSource.cs index 24aab60d5a01..e357a5178ebf 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlSource.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureSqlSource.cs @@ -31,14 +31,16 @@ public AzureSqlSource() /// SQL reader query. Type: string (or Expression with resultType string). /// Name of the stored procedure for a SQL Database source. This cannot be used at the same time as SqlReaderQuery. Type: string (or Expression with resultType string). /// Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". + /// Specifies the transaction locking behavior for the SQL source. Allowed values: ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. The default value is ReadCommitted. Type: string (or Expression with resultType string). /// Which additional types to produce. /// The partition mechanism that will be used for Sql read in parallel. Possible values include: "None", "PhysicalPartitionsOfTable", "DynamicRange". /// The settings that will be leveraged for Sql source partitioning. - internal AzureSqlSource(string type, object sourceRetryCount, object sourceRetryWait, object maxConcurrentConnections, IDictionary additionalProperties, object queryTimeout, object additionalColumns, object sqlReaderQuery, object sqlReaderStoredProcedureName, IDictionary storedProcedureParameters, object produceAdditionalTypes, object partitionOption, SqlPartitionSettings partitionSettings) : base(type, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, additionalProperties, queryTimeout, additionalColumns) + internal AzureSqlSource(string type, object sourceRetryCount, object sourceRetryWait, object maxConcurrentConnections, IDictionary additionalProperties, object queryTimeout, object additionalColumns, object sqlReaderQuery, object sqlReaderStoredProcedureName, IDictionary storedProcedureParameters, object isolationLevel, object produceAdditionalTypes, object partitionOption, SqlPartitionSettings partitionSettings) : base(type, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, additionalProperties, queryTimeout, additionalColumns) { SqlReaderQuery = sqlReaderQuery; SqlReaderStoredProcedureName = sqlReaderStoredProcedureName; StoredProcedureParameters = storedProcedureParameters; + IsolationLevel = isolationLevel; ProduceAdditionalTypes = produceAdditionalTypes; PartitionOption = partitionOption; PartitionSettings = partitionSettings; @@ -51,6 +53,8 @@ internal AzureSqlSource(string type, object sourceRetryCount, object sourceRetry public object SqlReaderStoredProcedureName { get; set; } /// Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". public IDictionary StoredProcedureParameters { get; } + /// Specifies the transaction locking behavior for the SQL source. Allowed values: ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. The default value is ReadCommitted. Type: string (or Expression with resultType string). + public object IsolationLevel { get; set; } /// Which additional types to produce. public object ProduceAdditionalTypes { get; set; } /// The partition mechanism that will be used for Sql read in parallel. Possible values include: "None", "PhysicalPartitionsOfTable", "DynamicRange". diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureStorageAuthenticationType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureStorageAuthenticationType.cs new file mode 100644 index 000000000000..e075ee116947 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/AzureStorageAuthenticationType.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The type used for authentication. Type: string. + public readonly partial struct AzureStorageAuthenticationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AzureStorageAuthenticationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AnonymousValue = "Anonymous"; + private const string AccountKeyValue = "AccountKey"; + private const string SasUriValue = "SasUri"; + private const string ServicePrincipalValue = "ServicePrincipal"; + private const string MsiValue = "Msi"; + + /// Anonymous. + public static AzureStorageAuthenticationType Anonymous { get; } = new AzureStorageAuthenticationType(AnonymousValue); + /// AccountKey. + public static AzureStorageAuthenticationType AccountKey { get; } = new AzureStorageAuthenticationType(AccountKeyValue); + /// SasUri. + public static AzureStorageAuthenticationType SasUri { get; } = new AzureStorageAuthenticationType(SasUriValue); + /// ServicePrincipal. + public static AzureStorageAuthenticationType ServicePrincipal { get; } = new AzureStorageAuthenticationType(ServicePrincipalValue); + /// Msi. + public static AzureStorageAuthenticationType Msi { get; } = new AzureStorageAuthenticationType(MsiValue); + /// Determines if two values are the same. + public static bool operator ==(AzureStorageAuthenticationType left, AzureStorageAuthenticationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AzureStorageAuthenticationType left, AzureStorageAuthenticationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AzureStorageAuthenticationType(string value) => new AzureStorageAuthenticationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AzureStorageAuthenticationType other && Equals(other); + /// + public bool Equals(AzureStorageAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/BaseNamespace.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/BaseNamespace.Serialization.cs new file mode 100644 index 000000000000..dd76be28b482 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/BaseNamespace.Serialization.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(BaseNamespaceConverter))] + public partial class BaseNamespace : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("databaseName"u8); + writer.WriteStringValue(DatabaseName); + writer.WriteEndObject(); + } + + internal static BaseNamespace DeserializeBaseNamespace(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string databaseName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("databaseName"u8)) + { + databaseName = property.Value.GetString(); + continue; + } + } + return new BaseNamespace(databaseName); + } + + internal partial class BaseNamespaceConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, BaseNamespace model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override BaseNamespace Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeBaseNamespace(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/BaseNamespace.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/BaseNamespace.cs new file mode 100644 index 000000000000..cf10b846dcaf --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/BaseNamespace.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Namespace. + public partial class BaseNamespace + { + /// Initializes a new instance of BaseNamespace. + /// Database name. + /// is null. + public BaseNamespace(string databaseName) + { + Argument.AssertNotNull(databaseName, nameof(databaseName)); + + DatabaseName = databaseName; + } + + /// Database name. + public string DatabaseName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ColumnRelationshipInformation.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ColumnRelationshipInformation.Serialization.cs new file mode 100644 index 000000000000..b84880cc9ac6 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ColumnRelationshipInformation.Serialization.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(ColumnRelationshipInformationConverter))] + public partial class ColumnRelationshipInformation : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("fromColumnName"u8); + writer.WriteStringValue(FromColumnName); + writer.WritePropertyName("toColumnName"u8); + writer.WriteStringValue(ToColumnName); + writer.WriteEndObject(); + } + + internal static ColumnRelationshipInformation DeserializeColumnRelationshipInformation(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string fromColumnName = default; + string toColumnName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("fromColumnName"u8)) + { + fromColumnName = property.Value.GetString(); + continue; + } + if (property.NameEquals("toColumnName"u8)) + { + toColumnName = property.Value.GetString(); + continue; + } + } + return new ColumnRelationshipInformation(fromColumnName, toColumnName); + } + + internal partial class ColumnRelationshipInformationConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, ColumnRelationshipInformation model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override ColumnRelationshipInformation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeColumnRelationshipInformation(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ColumnRelationshipInformation.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ColumnRelationshipInformation.cs new file mode 100644 index 000000000000..068b3914d6fc --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ColumnRelationshipInformation.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Column information for relationship. + public partial class ColumnRelationshipInformation + { + /// Initializes a new instance of ColumnRelationshipInformation. + /// From Column Name. + /// To Column Name. + /// or is null. + public ColumnRelationshipInformation(string fromColumnName, string toColumnName) + { + Argument.AssertNotNull(fromColumnName, nameof(fromColumnName)); + Argument.AssertNotNull(toColumnName, nameof(toColumnName)); + + FromColumnName = fromColumnName; + ToColumnName = toColumnName; + } + + /// From Column Name. + public string FromColumnName { get; set; } + /// To Column Name. + public string ToColumnName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ControlActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ControlActivity.Serialization.cs index bcdf123bc465..1f1fb7b77e09 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ControlActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ControlActivity.Serialization.cs @@ -28,6 +28,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -83,6 +93,8 @@ internal static ControlActivity DeserializeControlActivity(JsonElement element) string name = default; string type = "Container"; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; IDictionary additionalProperties = default; @@ -104,6 +116,24 @@ internal static ControlActivity DeserializeControlActivity(JsonElement element) description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -135,7 +165,7 @@ internal static ControlActivity DeserializeControlActivity(JsonElement element) additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new ControlActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties); + return new ControlActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties); } internal partial class ControlActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ControlActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ControlActivity.cs index aa108e5531de..16a9d64614a1 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ControlActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ControlActivity.cs @@ -32,10 +32,12 @@ public ControlActivity(string name) : base(name) /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. - internal ControlActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties) : base(name, type, description, dependsOn, userProperties, additionalProperties) + internal ControlActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) { Type = type ?? "Container"; } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CopyActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CopyActivity.Serialization.cs index 82df3fe6c2e8..c30b22cd3630 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CopyActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CopyActivity.Serialization.cs @@ -58,6 +58,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -191,6 +201,8 @@ internal static CopyActivity DeserializeCopyActivity(JsonElement element) string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; CopySource source = default; @@ -273,6 +285,24 @@ internal static CopyActivity DeserializeCopyActivity(JsonElement element) description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -467,7 +497,7 @@ internal static CopyActivity DeserializeCopyActivity(JsonElement element) additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new CopyActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, Optional.ToList(inputs), Optional.ToList(outputs), source, sink, translator.Value, enableStaging.Value, stagingSettings.Value, parallelCopies.Value, dataIntegrationUnits.Value, enableSkipIncompatibleRow.Value, redirectIncompatibleRowSettings.Value, logStorageSettings.Value, logSettings.Value, Optional.ToList(preserveRules), Optional.ToList(preserve), validateDataConsistency.Value, skipErrorFile.Value); + return new CopyActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, Optional.ToList(inputs), Optional.ToList(outputs), source, sink, translator.Value, enableStaging.Value, stagingSettings.Value, parallelCopies.Value, dataIntegrationUnits.Value, enableSkipIncompatibleRow.Value, redirectIncompatibleRowSettings.Value, logStorageSettings.Value, logSettings.Value, Optional.ToList(preserveRules), Optional.ToList(preserve), validateDataConsistency.Value, skipErrorFile.Value); } internal partial class CopyActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CopyActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CopyActivity.cs index 2f90f5ccff58..0b970794253b 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CopyActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CopyActivity.cs @@ -46,6 +46,8 @@ public CopyActivity(string name, CopySource source, CopySink sink) : base(name) /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -76,7 +78,7 @@ public CopyActivity(string name, CopySource source, CopySink sink) : base(name) /// Preserve rules. /// Whether to enable Data Consistency validation. Type: boolean (or Expression with resultType boolean). /// Specify the fault tolerance for data consistency. - internal CopyActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, IList inputs, IList outputs, CopySource source, CopySink sink, object translator, object enableStaging, StagingSettings stagingSettings, object parallelCopies, object dataIntegrationUnits, object enableSkipIncompatibleRow, RedirectIncompatibleRowSettings redirectIncompatibleRowSettings, LogStorageSettings logStorageSettings, LogSettings logSettings, IList preserveRules, IList preserve, object validateDataConsistency, SkipErrorFile skipErrorFile) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + internal CopyActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, IList inputs, IList outputs, CopySource source, CopySink sink, object translator, object enableStaging, StagingSettings stagingSettings, object parallelCopies, object dataIntegrationUnits, object enableSkipIncompatibleRow, RedirectIncompatibleRowSettings redirectIncompatibleRowSettings, LogStorageSettings logStorageSettings, LogSettings logSettings, IList preserveRules, IList preserve, object validateDataConsistency, SkipErrorFile skipErrorFile) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) { Inputs = inputs; Outputs = outputs; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbLinkedService.Serialization.cs index a71049393351..2cbb6046c5ab 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbLinkedService.Serialization.cs @@ -84,6 +84,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("encryptedCredential"u8); writer.WriteObjectValue(EncryptedCredential); } + if (Optional.IsDefined(Credential)) + { + writer.WritePropertyName("credential"u8); + writer.WriteObjectValue(Credential); + } writer.WriteEndObject(); foreach (var item in AdditionalProperties) { @@ -109,6 +114,7 @@ internal static CosmosDbLinkedService DeserializeCosmosDbLinkedService(JsonEleme Optional database = default; Optional accountKey = default; Optional encryptedCredential = default; + Optional credential = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -221,13 +227,22 @@ internal static CosmosDbLinkedService DeserializeCosmosDbLinkedService(JsonEleme encryptedCredential = property0.Value.GetObject(); continue; } + if (property0.NameEquals("credential"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + credential = CredentialReference.DeserializeCredentialReference(property0.Value); + continue; + } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new CosmosDbLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString.Value, accountEndpoint.Value, database.Value, accountKey.Value, encryptedCredential.Value); + return new CosmosDbLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString.Value, accountEndpoint.Value, database.Value, accountKey.Value, encryptedCredential.Value, credential.Value); } internal partial class CosmosDbLinkedServiceConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbLinkedService.cs index 0af10a2d32c2..b2b74c2b8748 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CosmosDbLinkedService.cs @@ -34,13 +34,15 @@ public CosmosDbLinkedService() /// The available derived classes include and . /// /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). - internal CosmosDbLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, object accountEndpoint, object database, SecretBase accountKey, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + /// The credential reference containing authentication information. + internal CosmosDbLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, object accountEndpoint, object database, SecretBase accountKey, object encryptedCredential, CredentialReference credential) : base(type, connectVia, description, parameters, annotations, additionalProperties) { ConnectionString = connectionString; AccountEndpoint = accountEndpoint; Database = database; AccountKey = accountKey; EncryptedCredential = encryptedCredential; + Credential = credential; Type = type ?? "CosmosDb"; } @@ -58,5 +60,7 @@ internal CosmosDbLinkedService(string type, IntegrationRuntimeReference connectV public SecretBase AccountKey { get; set; } /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). public object EncryptedCredential { get; set; } + /// The credential reference containing authentication information. + public CredentialReference Credential { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CredentialReference.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CredentialReference.Serialization.cs new file mode 100644 index 000000000000..b995745ef447 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CredentialReference.Serialization.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(CredentialReferenceConverter))] + public partial class CredentialReference : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + writer.WritePropertyName("referenceName"u8); + writer.WriteStringValue(ReferenceName); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + + internal static CredentialReference DeserializeCredentialReference(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CredentialReferenceType type = default; + string referenceName = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new CredentialReferenceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("referenceName"u8)) + { + referenceName = property.Value.GetString(); + continue; + } + additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); + } + additionalProperties = additionalPropertiesDictionary; + return new CredentialReference(type, referenceName, additionalProperties); + } + + internal partial class CredentialReferenceConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, CredentialReference model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override CredentialReference Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeCredentialReference(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CredentialReference.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CredentialReference.cs new file mode 100644 index 000000000000..667f1d7d537e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CredentialReference.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Credential reference type. + public partial class CredentialReference + { + /// Initializes a new instance of CredentialReference. + /// Credential reference type. + /// Reference credential name. + /// is null. + public CredentialReference(CredentialReferenceType type, string referenceName) + { + Argument.AssertNotNull(referenceName, nameof(referenceName)); + + Type = type; + ReferenceName = referenceName; + AdditionalProperties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of CredentialReference. + /// Credential reference type. + /// Reference credential name. + /// Additional Properties. + internal CredentialReference(CredentialReferenceType type, string referenceName, IDictionary additionalProperties) + { + Type = type; + ReferenceName = referenceName; + AdditionalProperties = additionalProperties; + } + + /// Credential reference type. + public CredentialReferenceType Type { get; set; } + /// Reference credential name. + public string ReferenceName { get; set; } + /// Additional Properties. + public IDictionary AdditionalProperties { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CredentialReferenceType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CredentialReferenceType.cs new file mode 100644 index 000000000000..06c7093705fa --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CredentialReferenceType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Credential reference type. + public readonly partial struct CredentialReferenceType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CredentialReferenceType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CredentialReferenceValue = "CredentialReference"; + + /// CredentialReference. + public static CredentialReferenceType CredentialReference { get; } = new CredentialReferenceType(CredentialReferenceValue); + /// Determines if two values are the same. + public static bool operator ==(CredentialReferenceType left, CredentialReferenceType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CredentialReferenceType left, CredentialReferenceType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator CredentialReferenceType(string value) => new CredentialReferenceType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CredentialReferenceType other && Equals(other); + /// + public bool Equals(CredentialReferenceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CustomActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CustomActivity.Serialization.cs index e5b72f0a4967..b35020a3ec0f 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CustomActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CustomActivity.Serialization.cs @@ -38,6 +38,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -123,6 +133,8 @@ internal static CustomActivity DeserializeCustomActivity(JsonElement element) string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; object command = default; @@ -169,6 +181,24 @@ internal static CustomActivity DeserializeCustomActivity(JsonElement element) description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -283,7 +313,7 @@ internal static CustomActivity DeserializeCustomActivity(JsonElement element) additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new CustomActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, command, resourceLinkedService.Value, folderPath.Value, referenceObjects.Value, Optional.ToDictionary(extendedProperties), retentionTimeInDays.Value, autoUserSpecification.Value); + return new CustomActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, command, resourceLinkedService.Value, folderPath.Value, referenceObjects.Value, Optional.ToDictionary(extendedProperties), retentionTimeInDays.Value, autoUserSpecification.Value); } internal partial class CustomActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CustomActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CustomActivity.cs index 4c02ea9aec68..a32d89550c0e 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CustomActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/CustomActivity.cs @@ -32,6 +32,8 @@ public CustomActivity(string name, object command) : base(name) /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -44,7 +46,7 @@ public CustomActivity(string name, object command) : base(name) /// User defined property bag. There is no restriction on the keys or values that can be used. The user specified custom activity has the full responsibility to consume and interpret the content defined. /// The retention time for the files submitted for custom activity. Type: double (or Expression with resultType double). /// Elevation level and scope for the user, default is nonadmin task. Type: string (or Expression with resultType double). - internal CustomActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object command, LinkedServiceReference resourceLinkedService, object folderPath, CustomActivityReferenceObject referenceObjects, IDictionary extendedProperties, object retentionTimeInDays, object autoUserSpecification) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + internal CustomActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object command, LinkedServiceReference resourceLinkedService, object folderPath, CustomActivityReferenceObject referenceObjects, IDictionary extendedProperties, object retentionTimeInDays, object autoUserSpecification) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) { Command = command; ResourceLinkedService = resourceLinkedService; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLBatch.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLBatch.Serialization.cs new file mode 100644 index 000000000000..b893bbbd3585 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLBatch.Serialization.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(DDLBatchConverter))] + public partial class DDLBatch : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("ddls"u8); + writer.WriteStartArray(); + foreach (var item in Ddls) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + } + + internal partial class DDLBatchConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, DDLBatch model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override DDLBatch Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLBatch.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLBatch.cs new file mode 100644 index 000000000000..48214cd14dcb --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLBatch.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// DDL batch. + public partial class DDLBatch + { + /// Initializes a new instance of DDLBatch. + /// + /// is null. + public DDLBatch(IEnumerable ddls) + { + Argument.AssertNotNull(ddls, nameof(ddls)); + + Ddls = ddls.ToList(); + } + + /// Gets the ddls. + public IList Ddls { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLPayload.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLPayload.Serialization.cs new file mode 100644 index 000000000000..b0ce7bc09b48 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLPayload.Serialization.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(DDLPayloadConverter))] + public partial class DDLPayload : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("actionType"u8); + writer.WriteStringValue(ActionType.ToSerialString()); + if (Optional.IsDefined(OldEntity)) + { + writer.WritePropertyName("oldEntity"u8); + writer.WriteObjectValue(OldEntity); + } + if (Optional.IsDefined(NewEntity)) + { + writer.WritePropertyName("newEntity"u8); + writer.WriteObjectValue(NewEntity); + } + writer.WriteEndObject(); + } + + internal partial class DDLPayloadConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, DDLPayload model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override DDLPayload Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLPayload.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLPayload.cs new file mode 100644 index 000000000000..1b8a3867aaf0 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLPayload.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// DDL payload. + public partial class DDLPayload + { + /// Initializes a new instance of DDLPayload. + /// DDL type. + public DDLPayload(DDLType actionType) + { + ActionType = actionType; + } + + /// DDL type. + public DDLType ActionType { get; } + /// MD Entity. + public MDEntity OldEntity { get; set; } + /// MD Entity. + public MDEntity NewEntity { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLType.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLType.Serialization.cs new file mode 100644 index 000000000000..b91a3f012d4e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLType.Serialization.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + internal static partial class DDLTypeExtensions + { + public static string ToSerialString(this DDLType value) => value switch + { + DDLType.Create => "CREATE", + DDLType.Alter => "ALTER", + DDLType.Drop => "DROP", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown DDLType value.") + }; + + public static DDLType ToDDLType(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "CREATE")) return DDLType.Create; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "ALTER")) return DDLType.Alter; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "DROP")) return DDLType.Drop; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown DDLType value."); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLType.cs new file mode 100644 index 000000000000..f84d0806ca39 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLType.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// DDL type. + public enum DDLType + { + /// CREATE. + Create, + /// ALTER. + Alter, + /// DROP. + Drop + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataColumn.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataColumn.Serialization.cs new file mode 100644 index 000000000000..038404b826a6 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataColumn.Serialization.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(DataColumnConverter))] + public partial class DataColumn : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("originDataTypeName"u8); + writer.WriteObjectValue(OriginDataTypeName); + writer.WriteEndObject(); + } + + internal static DataColumn DeserializeDataColumn(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + TypeInfo originDataTypeName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("originDataTypeName"u8)) + { + originDataTypeName = TypeInfo.DeserializeTypeInfo(property.Value); + continue; + } + } + return new DataColumn(name, originDataTypeName); + } + + internal partial class DataColumnConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, DataColumn model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override DataColumn Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeDataColumn(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataColumn.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataColumn.cs new file mode 100644 index 000000000000..f7ac617473e3 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataColumn.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Data column. + public partial class DataColumn + { + /// Initializes a new instance of DataColumn. + /// Column name. + /// Type information. + /// or is null. + public DataColumn(string name, TypeInfo originDataTypeName) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(originDataTypeName, nameof(originDataTypeName)); + + Name = name; + OriginDataTypeName = originDataTypeName; + } + + /// Column name. + public string Name { get; set; } + /// Type information. + public TypeInfo OriginDataTypeName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataLakeAnalyticsUsqlActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataLakeAnalyticsUsqlActivity.Serialization.cs index 4dc1e4fde1f9..f03f9a5336b7 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataLakeAnalyticsUsqlActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataLakeAnalyticsUsqlActivity.Serialization.cs @@ -38,6 +38,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -120,6 +130,8 @@ internal static DataLakeAnalyticsUsqlActivity DeserializeDataLakeAnalyticsUsqlAc string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; object scriptPath = default; @@ -166,6 +178,24 @@ internal static DataLakeAnalyticsUsqlActivity DeserializeDataLakeAnalyticsUsqlAc description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -276,7 +306,7 @@ internal static DataLakeAnalyticsUsqlActivity DeserializeDataLakeAnalyticsUsqlAc additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new DataLakeAnalyticsUsqlActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, scriptPath, scriptLinkedService, degreeOfParallelism.Value, priority.Value, Optional.ToDictionary(parameters), runtimeVersion.Value, compilationMode.Value); + return new DataLakeAnalyticsUsqlActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, scriptPath, scriptLinkedService, degreeOfParallelism.Value, priority.Value, Optional.ToDictionary(parameters), runtimeVersion.Value, compilationMode.Value); } internal partial class DataLakeAnalyticsUsqlActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataLakeAnalyticsUsqlActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataLakeAnalyticsUsqlActivity.cs index 1e623049c5cb..e87584b2a288 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataLakeAnalyticsUsqlActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataLakeAnalyticsUsqlActivity.cs @@ -35,6 +35,8 @@ public DataLakeAnalyticsUsqlActivity(string name, object scriptPath, LinkedServi /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -47,7 +49,7 @@ public DataLakeAnalyticsUsqlActivity(string name, object scriptPath, LinkedServi /// Parameters for U-SQL job request. /// Runtime version of the U-SQL engine to use. Type: string (or Expression with resultType string). /// Compilation mode of U-SQL. Must be one of these values : Semantic, Full and SingleBox. Type: string (or Expression with resultType string). - internal DataLakeAnalyticsUsqlActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object scriptPath, LinkedServiceReference scriptLinkedService, object degreeOfParallelism, object priority, IDictionary parameters, object runtimeVersion, object compilationMode) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + internal DataLakeAnalyticsUsqlActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object scriptPath, LinkedServiceReference scriptLinkedService, object degreeOfParallelism, object priority, IDictionary parameters, object runtimeVersion, object compilationMode) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) { ScriptPath = scriptPath; ScriptLinkedService = scriptLinkedService; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataSource.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataSource.Serialization.cs new file mode 100644 index 000000000000..fc3acc860c65 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataSource.Serialization.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(DataSourceConverter))] + public partial class DataSource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Provider)) + { + writer.WritePropertyName("provider"u8); + writer.WriteStringValue(Provider); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static DataSource DeserializeDataSource(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional provider = default; + string location = default; + Optional> properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provider"u8)) + { + provider = property.Value.GetString(); + continue; + } + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetObject()); + } + } + properties = dictionary; + continue; + } + } + return new DataSource(provider.Value, location, Optional.ToDictionary(properties)); + } + + internal partial class DataSourceConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, DataSource model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override DataSource Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeDataSource(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataSource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataSource.cs new file mode 100644 index 000000000000..cfdcdac41295 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataSource.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Data source properties. + public partial class DataSource + { + /// Initializes a new instance of DataSource. + /// Data source location. + /// is null. + public DataSource(string location) + { + Argument.AssertNotNull(location, nameof(location)); + + Location = location; + Properties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of DataSource. + /// Data source provider information. + /// Data source location. + /// Property bag. + internal DataSource(string provider, string location, IDictionary properties) + { + Provider = provider; + Location = location; + Properties = properties; + } + + /// Data source provider information. + public string Provider { get; set; } + /// Data source location. + public string Location { get; set; } + /// Property bag. + public IDictionary Properties { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseEntity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseEntity.Serialization.cs new file mode 100644 index 000000000000..0907b2841b7c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseEntity.Serialization.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(DatabaseEntityConverter))] + public partial class DatabaseEntity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToSerialString()); + writer.WriteEndObject(); + } + + internal static DatabaseEntity DeserializeDatabaseEntity(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DatabaseProperties properties = default; + string name = default; + SASEntityType type = default; + Optional id = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + properties = DatabaseProperties.DeserializeDatabaseProperties(property.Value); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString().ToSASEntityType(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + } + return new DatabaseEntity(name, type, id.Value, properties); + } + + internal partial class DatabaseEntityConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, DatabaseEntity model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override DatabaseEntity Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeDatabaseEntity(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseEntity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseEntity.cs new file mode 100644 index 000000000000..145802601222 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseEntity.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Database entity. + public partial class DatabaseEntity : MDEntity + { + /// Initializes a new instance of DatabaseEntity. + /// Entity Name. + /// Artifact type. + /// Database properties. + /// or is null. + public DatabaseEntity(string name, SASEntityType type, DatabaseProperties properties) : base(name, type) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of DatabaseEntity. + /// Entity Name. + /// Artifact type. + /// Entity Resource Id. + /// Database properties. + internal DatabaseEntity(string name, SASEntityType type, string id, DatabaseProperties properties) : base(name, type, id) + { + Properties = properties; + } + + /// Database properties. + public DatabaseProperties Properties { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseProperties.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseProperties.Serialization.cs new file mode 100644 index 000000000000..1cb0f9b5219a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseProperties.Serialization.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(DatabasePropertiesConverter))] + public partial class DatabaseProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("source"u8); + writer.WriteObjectValue(Source); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(OriginObjectId)) + { + writer.WritePropertyName("originObjectId"u8); + writer.WriteStringValue(OriginObjectId); + } + if (Optional.IsDefined(PublishStatus)) + { + writer.WritePropertyName("publishStatus"u8); + writer.WriteStringValue(PublishStatus.Value.ToString()); + } + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static DatabaseProperties DeserializeDatabaseProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataSource source = default; + Optional description = default; + Optional originObjectId = default; + Optional objectId = default; + Optional objectVersion = default; + Optional publishStatus = default; + Optional> properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("source"u8)) + { + source = DataSource.DeserializeDataSource(property.Value); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("originObjectId"u8)) + { + originObjectId = property.Value.GetString(); + continue; + } + if (property.NameEquals("objectId"u8)) + { + objectId = property.Value.GetString(); + continue; + } + if (property.NameEquals("objectVersion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + objectVersion = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("publishStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + publishStatus = new PublishStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetObject()); + } + } + properties = dictionary; + continue; + } + } + return new DatabaseProperties(originObjectId.Value, objectId.Value, Optional.ToNullable(objectVersion), Optional.ToNullable(publishStatus), Optional.ToDictionary(properties), source, description.Value); + } + + internal partial class DatabasePropertiesConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, DatabaseProperties model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override DatabaseProperties Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeDatabaseProperties(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseProperties.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseProperties.cs new file mode 100644 index 000000000000..1176a9d7e399 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseProperties.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Database properties. + public partial class DatabaseProperties : MDEntityProperties + { + /// Initializes a new instance of DatabaseProperties. + /// Data source properties. + /// is null. + public DatabaseProperties(DataSource source) + { + Argument.AssertNotNull(source, nameof(source)); + + Source = source; + } + + /// Initializes a new instance of DatabaseProperties. + /// Entity object id maintained by the caller. + /// Entity object id maintained by SyMS. + /// Entity object version maintained by SyMS. + /// Publish status. + /// Property bag. + /// Data source properties. + /// Description of the database. + internal DatabaseProperties(string originObjectId, string objectId, long? objectVersion, PublishStatus? publishStatus, IDictionary properties, DataSource source, string description) : base(originObjectId, objectId, objectVersion, publishStatus, properties) + { + Source = source; + Description = description; + } + + /// Data source properties. + public DataSource Source { get; set; } + /// Description of the database. + public string Description { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksNotebookActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksNotebookActivity.Serialization.cs index 39fd40ab3ed1..e02b49c0dd5c 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksNotebookActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksNotebookActivity.Serialization.cs @@ -38,6 +38,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -124,6 +134,8 @@ internal static DatabricksNotebookActivity DeserializeDatabricksNotebookActivity string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; object notebookPath = default; @@ -166,6 +178,24 @@ internal static DatabricksNotebookActivity DeserializeDatabricksNotebookActivity description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -268,7 +298,7 @@ internal static DatabricksNotebookActivity DeserializeDatabricksNotebookActivity additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new DatabricksNotebookActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, notebookPath, Optional.ToDictionary(baseParameters), Optional.ToList(libraries)); + return new DatabricksNotebookActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, notebookPath, Optional.ToDictionary(baseParameters), Optional.ToList(libraries)); } internal partial class DatabricksNotebookActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksNotebookActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksNotebookActivity.cs index a41889ff5b29..0995bbc58b11 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksNotebookActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksNotebookActivity.cs @@ -33,6 +33,8 @@ public DatabricksNotebookActivity(string name, object notebookPath) : base(name) /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -41,7 +43,7 @@ public DatabricksNotebookActivity(string name, object notebookPath) : base(name) /// The absolute path of the notebook to be run in the Databricks Workspace. This path must begin with a slash. Type: string (or Expression with resultType string). /// Base parameters to be used for each run of this job.If the notebook takes a parameter that is not specified, the default value from the notebook will be used. /// A list of libraries to be installed on the cluster that will execute the job. - internal DatabricksNotebookActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object notebookPath, IDictionary baseParameters, IList> libraries) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + internal DatabricksNotebookActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object notebookPath, IDictionary baseParameters, IList> libraries) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) { NotebookPath = notebookPath; BaseParameters = baseParameters; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksSparkJarActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksSparkJarActivity.Serialization.cs index 74c8f8a6b4ec..c369777acd1e 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksSparkJarActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksSparkJarActivity.Serialization.cs @@ -38,6 +38,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -123,6 +133,8 @@ internal static DatabricksSparkJarActivity DeserializeDatabricksSparkJarActivity string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; object mainClassName = default; @@ -165,6 +177,24 @@ internal static DatabricksSparkJarActivity DeserializeDatabricksSparkJarActivity description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -267,7 +297,7 @@ internal static DatabricksSparkJarActivity DeserializeDatabricksSparkJarActivity additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new DatabricksSparkJarActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, mainClassName, Optional.ToList(parameters), Optional.ToList(libraries)); + return new DatabricksSparkJarActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, mainClassName, Optional.ToList(parameters), Optional.ToList(libraries)); } internal partial class DatabricksSparkJarActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksSparkJarActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksSparkJarActivity.cs index d83437ea9f97..05838d3bcf4b 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksSparkJarActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksSparkJarActivity.cs @@ -33,6 +33,8 @@ public DatabricksSparkJarActivity(string name, object mainClassName) : base(name /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -41,7 +43,7 @@ public DatabricksSparkJarActivity(string name, object mainClassName) : base(name /// The full name of the class containing the main method to be executed. This class must be contained in a JAR provided as a library. Type: string (or Expression with resultType string). /// Parameters that will be passed to the main method. /// A list of libraries to be installed on the cluster that will execute the job. - internal DatabricksSparkJarActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object mainClassName, IList parameters, IList> libraries) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + internal DatabricksSparkJarActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object mainClassName, IList parameters, IList> libraries) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) { MainClassName = mainClassName; Parameters = parameters; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksSparkPythonActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksSparkPythonActivity.Serialization.cs index 225a0719b925..aa12aa90662e 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksSparkPythonActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksSparkPythonActivity.Serialization.cs @@ -38,6 +38,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -123,6 +133,8 @@ internal static DatabricksSparkPythonActivity DeserializeDatabricksSparkPythonAc string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; object pythonFile = default; @@ -165,6 +177,24 @@ internal static DatabricksSparkPythonActivity DeserializeDatabricksSparkPythonAc description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -267,7 +297,7 @@ internal static DatabricksSparkPythonActivity DeserializeDatabricksSparkPythonAc additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new DatabricksSparkPythonActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, pythonFile, Optional.ToList(parameters), Optional.ToList(libraries)); + return new DatabricksSparkPythonActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, pythonFile, Optional.ToList(parameters), Optional.ToList(libraries)); } internal partial class DatabricksSparkPythonActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksSparkPythonActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksSparkPythonActivity.cs index 86bb44187f21..5dc12f7a312a 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksSparkPythonActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabricksSparkPythonActivity.cs @@ -33,6 +33,8 @@ public DatabricksSparkPythonActivity(string name, object pythonFile) : base(name /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -41,7 +43,7 @@ public DatabricksSparkPythonActivity(string name, object pythonFile) : base(name /// The URI of the Python file to be executed. DBFS paths are supported. Type: string (or Expression with resultType string). /// Command line parameters that will be passed to the Python file. /// A list of libraries to be installed on the cluster that will execute the job. - internal DatabricksSparkPythonActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object pythonFile, IList parameters, IList> libraries) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + internal DatabricksSparkPythonActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object pythonFile, IList parameters, IList> libraries) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) { PythonFile = pythonFile; Parameters = parameters; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DeleteActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DeleteActivity.Serialization.cs index 58fb24b51064..af4265f86b09 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DeleteActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DeleteActivity.Serialization.cs @@ -38,6 +38,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -107,6 +117,8 @@ internal static DeleteActivity DeserializeDeleteActivity(JsonElement element) string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; Optional recursive = default; @@ -152,6 +164,24 @@ internal static DeleteActivity DeserializeDeleteActivity(JsonElement element) description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -245,7 +275,7 @@ internal static DeleteActivity DeserializeDeleteActivity(JsonElement element) additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new DeleteActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, recursive.Value, Optional.ToNullable(maxConcurrentConnections), enableLogging.Value, logStorageSettings.Value, dataset, storeSettings.Value); + return new DeleteActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, recursive.Value, Optional.ToNullable(maxConcurrentConnections), enableLogging.Value, logStorageSettings.Value, dataset, storeSettings.Value); } internal partial class DeleteActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DeleteActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DeleteActivity.cs index a0928c3f985c..4e8918bc8c09 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DeleteActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DeleteActivity.cs @@ -31,6 +31,8 @@ public DeleteActivity(string name, DatasetReference dataset) : base(name) /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -46,7 +48,7 @@ public DeleteActivity(string name, DatasetReference dataset) : base(name) /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , , , , , , , and . /// - internal DeleteActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object recursive, int? maxConcurrentConnections, object enableLogging, LogStorageSettings logStorageSettings, DatasetReference dataset, StoreReadSettings storeSettings) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + internal DeleteActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object recursive, int? maxConcurrentConnections, object enableLogging, LogStorageSettings logStorageSettings, DatasetReference dataset, StoreReadSettings storeSettings) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) { Recursive = recursive; MaxConcurrentConnections = maxConcurrentConnections; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DistributionInfo.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DistributionInfo.Serialization.cs new file mode 100644 index 000000000000..7d4a600ad677 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DistributionInfo.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(DistributionInfoConverter))] + public partial class DistributionInfo : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + } + if (Optional.IsCollectionDefined(Keys)) + { + writer.WritePropertyName("keys"u8); + writer.WriteStartArray(); + foreach (var item in Keys) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Count)) + { + writer.WritePropertyName("count"u8); + writer.WriteNumberValue(Count.Value); + } + if (Optional.IsCollectionDefined(SortKeys)) + { + writer.WritePropertyName("sortKeys"u8); + writer.WriteStartArray(); + foreach (var item in SortKeys) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static DistributionInfo DeserializeDistributionInfo(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional type = default; + Optional> keys = default; + Optional count = default; + Optional> sortKeys = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("keys"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + keys = array; + continue; + } + if (property.NameEquals("count"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + count = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("sortKeys"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SortingItem.DeserializeSortingItem(item)); + } + sortKeys = array; + continue; + } + } + return new DistributionInfo(type.Value, Optional.ToList(keys), Optional.ToNullable(count), Optional.ToList(sortKeys)); + } + + internal partial class DistributionInfoConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, DistributionInfo model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override DistributionInfo Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeDistributionInfo(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DistributionInfo.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DistributionInfo.cs new file mode 100644 index 000000000000..f7eaf2b15190 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DistributionInfo.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Distribution information. + public partial class DistributionInfo + { + /// Initializes a new instance of DistributionInfo. + public DistributionInfo() + { + Keys = new ChangeTrackingList(); + SortKeys = new ChangeTrackingList(); + } + + /// Initializes a new instance of DistributionInfo. + /// Distribution type. + /// Distribution keys. + /// Distribution count. + /// Distribution sort keys. + internal DistributionInfo(string type, IList keys, int? count, IList sortKeys) + { + Type = type; + Keys = keys; + Count = count; + SortKeys = sortKeys; + } + + /// Distribution type. + public string Type { get; set; } + /// Distribution keys. + public IList Keys { get; } + /// Distribution count. + public int? Count { get; set; } + /// Distribution sort keys. + public IList SortKeys { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsLinkedService.Serialization.cs index 77a5ff5a38c7..f04915098278 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsLinkedService.Serialization.cs @@ -113,6 +113,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("encryptedCredential"u8); writer.WriteObjectValue(EncryptedCredential); } + if (Optional.IsDefined(Credential)) + { + writer.WritePropertyName("credential"u8); + writer.WriteObjectValue(Credential); + } writer.WriteEndObject(); foreach (var item in AdditionalProperties) { @@ -145,6 +150,7 @@ internal static DynamicsLinkedService DeserializeDynamicsLinkedService(JsonEleme Optional servicePrincipalCredentialType = default; Optional servicePrincipalCredential = default; Optional encryptedCredential = default; + Optional credential = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -312,13 +318,22 @@ internal static DynamicsLinkedService DeserializeDynamicsLinkedService(JsonEleme encryptedCredential = property0.Value.GetObject(); continue; } + if (property0.NameEquals("credential"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + credential = CredentialReference.DeserializeCredentialReference(property0.Value); + continue; + } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new DynamicsLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, deploymentType, hostName.Value, port.Value, serviceUri.Value, organizationName.Value, authenticationType, username.Value, password.Value, servicePrincipalId.Value, servicePrincipalCredentialType.Value, servicePrincipalCredential.Value, encryptedCredential.Value); + return new DynamicsLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, deploymentType, hostName.Value, port.Value, serviceUri.Value, organizationName.Value, authenticationType, username.Value, password.Value, servicePrincipalId.Value, servicePrincipalCredentialType.Value, servicePrincipalCredential.Value, encryptedCredential.Value, credential.Value); } internal partial class DynamicsLinkedServiceConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsLinkedService.cs index 2f7c158ad3bc..81c7e46f9fea 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DynamicsLinkedService.cs @@ -55,7 +55,8 @@ public DynamicsLinkedService(object deploymentType, object authenticationType) /// The available derived classes include and . /// /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). - internal DynamicsLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object deploymentType, object hostName, object port, object serviceUri, object organizationName, object authenticationType, object username, SecretBase password, object servicePrincipalId, object servicePrincipalCredentialType, SecretBase servicePrincipalCredential, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + /// The credential reference containing authentication information. + internal DynamicsLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object deploymentType, object hostName, object port, object serviceUri, object organizationName, object authenticationType, object username, SecretBase password, object servicePrincipalId, object servicePrincipalCredentialType, SecretBase servicePrincipalCredential, object encryptedCredential, CredentialReference credential) : base(type, connectVia, description, parameters, annotations, additionalProperties) { DeploymentType = deploymentType; HostName = hostName; @@ -69,6 +70,7 @@ internal DynamicsLinkedService(string type, IntegrationRuntimeReference connectV ServicePrincipalCredentialType = servicePrincipalCredentialType; ServicePrincipalCredential = servicePrincipalCredential; EncryptedCredential = encryptedCredential; + Credential = credential; Type = type ?? "Dynamics"; } @@ -104,5 +106,7 @@ internal DynamicsLinkedService(string type, IntegrationRuntimeReference connectV public SecretBase ServicePrincipalCredential { get; set; } /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). public object EncryptedCredential { get; set; } + /// The credential reference containing authentication information. + public CredentialReference Credential { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteDataFlowActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteDataFlowActivity.Serialization.cs index 14121aaf6e10..1839f1a18203 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteDataFlowActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteDataFlowActivity.Serialization.cs @@ -38,6 +38,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -117,6 +127,8 @@ internal static ExecuteDataFlowActivity DeserializeExecuteDataFlowActivity(JsonE string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; DataFlowReference dataflow = default; @@ -164,6 +176,24 @@ internal static ExecuteDataFlowActivity DeserializeExecuteDataFlowActivity(JsonE description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -275,7 +305,7 @@ internal static ExecuteDataFlowActivity DeserializeExecuteDataFlowActivity(JsonE additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new ExecuteDataFlowActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, dataflow, staging.Value, integrationRuntime.Value, compute.Value, traceLevel.Value, continueOnError.Value, runConcurrently.Value, sourceStagingConcurrency.Value); + return new ExecuteDataFlowActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, dataflow, staging.Value, integrationRuntime.Value, compute.Value, traceLevel.Value, continueOnError.Value, runConcurrently.Value, sourceStagingConcurrency.Value); } internal partial class ExecuteDataFlowActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteDataFlowActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteDataFlowActivity.cs index 59d8bef7212a..576554a60dc9 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteDataFlowActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteDataFlowActivity.cs @@ -31,6 +31,8 @@ public ExecuteDataFlowActivity(string name, DataFlowReference dataflow) : base(n /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -44,7 +46,7 @@ public ExecuteDataFlowActivity(string name, DataFlowReference dataflow) : base(n /// Continue on error setting used for data flow execution. Enables processing to continue if a sink fails. Type: boolean (or Expression with resultType boolean). /// Concurrent run setting used for data flow execution. Allows sinks with the same save order to be processed concurrently. Type: boolean (or Expression with resultType boolean). /// Specify number of parallel staging for sources applicable to the sink. Type: integer (or Expression with resultType integer). - internal ExecuteDataFlowActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, DataFlowReference dataflow, DataFlowStagingInfo staging, IntegrationRuntimeReference integrationRuntime, ExecuteDataFlowActivityTypePropertiesCompute compute, object traceLevel, object continueOnError, object runConcurrently, object sourceStagingConcurrency) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + internal ExecuteDataFlowActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, DataFlowReference dataflow, DataFlowStagingInfo staging, IntegrationRuntimeReference integrationRuntime, ExecuteDataFlowActivityTypePropertiesCompute compute, object traceLevel, object continueOnError, object runConcurrently, object sourceStagingConcurrency) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) { Dataflow = dataflow; Staging = staging; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecutePipelineActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecutePipelineActivity.Serialization.cs index e8fe6587bfc8..1efeb5791c66 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecutePipelineActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecutePipelineActivity.Serialization.cs @@ -28,6 +28,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -91,6 +101,8 @@ internal static ExecutePipelineActivity DeserializeExecutePipelineActivity(JsonE string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; PipelineReference pipeline = default; @@ -115,6 +127,24 @@ internal static ExecutePipelineActivity DeserializeExecutePipelineActivity(JsonE description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -193,7 +223,7 @@ internal static ExecutePipelineActivity DeserializeExecutePipelineActivity(JsonE additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new ExecutePipelineActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, pipeline, Optional.ToDictionary(parameters), Optional.ToNullable(waitOnCompletion)); + return new ExecutePipelineActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, pipeline, Optional.ToDictionary(parameters), Optional.ToNullable(waitOnCompletion)); } internal partial class ExecutePipelineActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecutePipelineActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecutePipelineActivity.cs index 9290d1660fe4..d9fc9f65ff6b 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecutePipelineActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecutePipelineActivity.cs @@ -32,13 +32,15 @@ public ExecutePipelineActivity(string name, PipelineReference pipeline) : base(n /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. /// Pipeline reference. /// Pipeline parameters. /// Defines whether activity execution will wait for the dependent pipeline execution to finish. Default is false. - internal ExecutePipelineActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, PipelineReference pipeline, IDictionary parameters, bool? waitOnCompletion) : base(name, type, description, dependsOn, userProperties, additionalProperties) + internal ExecutePipelineActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, PipelineReference pipeline, IDictionary parameters, bool? waitOnCompletion) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) { Pipeline = pipeline; Parameters = parameters; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteSsisPackageActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteSsisPackageActivity.Serialization.cs index 7e6a9453c6f1..89f7b87511fd 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteSsisPackageActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteSsisPackageActivity.Serialization.cs @@ -38,6 +38,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -186,6 +196,8 @@ internal static ExecuteSsisPackageActivity DeserializeExecuteSsisPackageActivity string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; SsisPackageLocation packageLocation = default; @@ -237,6 +249,24 @@ internal static ExecuteSsisPackageActivity DeserializeExecuteSsisPackageActivity description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -429,7 +459,7 @@ internal static ExecuteSsisPackageActivity DeserializeExecuteSsisPackageActivity additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new ExecuteSsisPackageActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, packageLocation, runtime.Value, loggingLevel.Value, environmentPath.Value, executionCredential.Value, connectVia, Optional.ToDictionary(projectParameters), Optional.ToDictionary(packageParameters), Optional.ToDictionary(projectConnectionManagers), Optional.ToDictionary(packageConnectionManagers), Optional.ToDictionary(propertyOverrides), logLocation.Value); + return new ExecuteSsisPackageActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, packageLocation, runtime.Value, loggingLevel.Value, environmentPath.Value, executionCredential.Value, connectVia, Optional.ToDictionary(projectParameters), Optional.ToDictionary(packageParameters), Optional.ToDictionary(projectConnectionManagers), Optional.ToDictionary(packageConnectionManagers), Optional.ToDictionary(propertyOverrides), logLocation.Value); } internal partial class ExecuteSsisPackageActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteSsisPackageActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteSsisPackageActivity.cs index 1e2023ebe765..759c7ce38905 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteSsisPackageActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecuteSsisPackageActivity.cs @@ -39,6 +39,8 @@ public ExecuteSsisPackageActivity(string name, SsisPackageLocation packageLocati /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -56,7 +58,7 @@ public ExecuteSsisPackageActivity(string name, SsisPackageLocation packageLocati /// The package level connection managers to execute the SSIS package. /// The property overrides to execute the SSIS package. /// SSIS package execution log location. - internal ExecuteSsisPackageActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, SsisPackageLocation packageLocation, object runtime, object loggingLevel, object environmentPath, SsisExecutionCredential executionCredential, IntegrationRuntimeReference connectVia, IDictionary projectParameters, IDictionary packageParameters, IDictionary> projectConnectionManagers, IDictionary> packageConnectionManagers, IDictionary propertyOverrides, SsisLogLocation logLocation) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + internal ExecuteSsisPackageActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, SsisPackageLocation packageLocation, object runtime, object loggingLevel, object environmentPath, SsisExecutionCredential executionCredential, IntegrationRuntimeReference connectVia, IDictionary projectParameters, IDictionary packageParameters, IDictionary> projectConnectionManagers, IDictionary> packageConnectionManagers, IDictionary propertyOverrides, SsisLogLocation logLocation) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) { PackageLocation = packageLocation; Runtime = runtime; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecutionActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecutionActivity.Serialization.cs index 99c491aa8c06..3ce8ba6af0b3 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecutionActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecutionActivity.Serialization.cs @@ -38,6 +38,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -109,6 +119,8 @@ internal static ExecutionActivity DeserializeExecutionActivity(JsonElement eleme string name = default; string type = "Execution"; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; IDictionary additionalProperties = default; @@ -148,6 +160,24 @@ internal static ExecutionActivity DeserializeExecutionActivity(JsonElement eleme description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -179,7 +209,7 @@ internal static ExecutionActivity DeserializeExecutionActivity(JsonElement eleme additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new ExecutionActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value); + return new ExecutionActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value); } internal partial class ExecutionActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecutionActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecutionActivity.cs index 6f0aa887e44f..9fb0b851eb75 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecutionActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ExecutionActivity.cs @@ -32,12 +32,14 @@ public ExecutionActivity(string name) : base(name) /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. /// Linked service reference. /// Activity policy. - internal ExecutionActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy) : base(name, type, description, dependsOn, userProperties, additionalProperties) + internal ExecutionActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) { LinkedServiceName = linkedServiceName; Policy = policy; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FailActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FailActivity.Serialization.cs index d208681372bf..b2704ed4d866 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FailActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FailActivity.Serialization.cs @@ -28,6 +28,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -72,6 +82,8 @@ internal static FailActivity DeserializeFailActivity(JsonElement element) string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; object message = default; @@ -95,6 +107,24 @@ internal static FailActivity DeserializeFailActivity(JsonElement element) description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -148,7 +178,7 @@ internal static FailActivity DeserializeFailActivity(JsonElement element) additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new FailActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, message, errorCode); + return new FailActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, message, errorCode); } internal partial class FailActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FailActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FailActivity.cs index ff643e27b402..e405de93b31a 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FailActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FailActivity.cs @@ -34,12 +34,14 @@ public FailActivity(string name, object message, object errorCode) : base(name) /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. /// The error message that surfaced in the Fail activity. It can be dynamic content that's evaluated to a non empty/blank string at runtime. Type: string (or Expression with resultType string). /// The error code that categorizes the error type of the Fail activity. It can be dynamic content that's evaluated to a non empty/blank string at runtime. Type: string (or Expression with resultType string). - internal FailActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, object message, object errorCode) : base(name, type, description, dependsOn, userProperties, additionalProperties) + internal FailActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, object message, object errorCode) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) { Message = message; ErrorCode = errorCode; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FilterActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FilterActivity.Serialization.cs index 586cc87c48fb..b0ce464f5057 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FilterActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FilterActivity.Serialization.cs @@ -28,6 +28,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -72,6 +82,8 @@ internal static FilterActivity DeserializeFilterActivity(JsonElement element) string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; Expression items = default; @@ -95,6 +107,24 @@ internal static FilterActivity DeserializeFilterActivity(JsonElement element) description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -148,7 +178,7 @@ internal static FilterActivity DeserializeFilterActivity(JsonElement element) additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new FilterActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, items, condition); + return new FilterActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, items, condition); } internal partial class FilterActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FilterActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FilterActivity.cs index 0da264e592e3..64d89a7fb8bd 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FilterActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FilterActivity.cs @@ -34,12 +34,14 @@ public FilterActivity(string name, Expression items, Expression condition) : bas /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. /// Input array on which filter should be applied. /// Condition to be used for filtering the input. - internal FilterActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, Expression items, Expression condition) : base(name, type, description, dependsOn, userProperties, additionalProperties) + internal FilterActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, Expression items, Expression condition) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) { Items = items; Condition = condition; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ForEachActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ForEachActivity.Serialization.cs index 771085079959..3f80761decb6 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ForEachActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ForEachActivity.Serialization.cs @@ -28,6 +28,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -87,6 +97,8 @@ internal static ForEachActivity DeserializeForEachActivity(JsonElement element) string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; Optional isSequential = default; @@ -112,6 +124,24 @@ internal static ForEachActivity DeserializeForEachActivity(JsonElement element) description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -188,7 +218,7 @@ internal static ForEachActivity DeserializeForEachActivity(JsonElement element) additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new ForEachActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, Optional.ToNullable(isSequential), Optional.ToNullable(batchCount), items, activities); + return new ForEachActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, Optional.ToNullable(isSequential), Optional.ToNullable(batchCount), items, activities); } internal partial class ForEachActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ForEachActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ForEachActivity.cs index 545db12011e3..d26e7aa1fd44 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ForEachActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ForEachActivity.cs @@ -39,6 +39,8 @@ public ForEachActivity(string name, Expression items, IEnumerable acti /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -50,7 +52,7 @@ public ForEachActivity(string name, Expression items, IEnumerable acti /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . /// - internal ForEachActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, bool? isSequential, int? batchCount, Expression items, IList activities) : base(name, type, description, dependsOn, userProperties, additionalProperties) + internal ForEachActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, bool? isSequential, int? batchCount, Expression items, IList activities) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) { IsSequential = isSequential; BatchCount = batchCount; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FormatInfo.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FormatInfo.Serialization.cs new file mode 100644 index 000000000000..3f6812d28983 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FormatInfo.Serialization.cs @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(FormatInfoConverter))] + public partial class FormatInfo : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("inputFormat"u8); + writer.WriteStringValue(InputFormat); + writer.WritePropertyName("outputFormat"u8); + writer.WriteStringValue(OutputFormat); + writer.WritePropertyName("formatType"u8); + writer.WriteStringValue(FormatType); + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(SerDeName)) + { + writer.WritePropertyName("serDeName"u8); + writer.WriteStringValue(SerDeName); + } + writer.WritePropertyName("serializeLib"u8); + writer.WriteStringValue(SerializeLib); + writer.WriteEndObject(); + } + + internal static FormatInfo DeserializeFormatInfo(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string inputFormat = default; + string outputFormat = default; + string formatType = default; + Optional> properties = default; + Optional serDeName = default; + string serializeLib = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("inputFormat"u8)) + { + inputFormat = property.Value.GetString(); + continue; + } + if (property.NameEquals("outputFormat"u8)) + { + outputFormat = property.Value.GetString(); + continue; + } + if (property.NameEquals("formatType"u8)) + { + formatType = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetObject()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("serDeName"u8)) + { + serDeName = property.Value.GetString(); + continue; + } + if (property.NameEquals("serializeLib"u8)) + { + serializeLib = property.Value.GetString(); + continue; + } + } + return new FormatInfo(inputFormat, outputFormat, formatType, Optional.ToDictionary(properties), serDeName.Value, serializeLib); + } + + internal partial class FormatInfoConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, FormatInfo model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override FormatInfo Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeFormatInfo(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FormatInfo.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FormatInfo.cs new file mode 100644 index 000000000000..5fc80c1bfc72 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FormatInfo.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Format information. + public partial class FormatInfo + { + /// Initializes a new instance of FormatInfo. + /// Input Format to be used. + /// Output Format to be used. + /// Format Type to be used to be used (csv, parquet, etc.). + /// Serialization Library to be used by Spark (org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe). + /// , , or is null. + public FormatInfo(string inputFormat, string outputFormat, string formatType, string serializeLib) + { + Argument.AssertNotNull(inputFormat, nameof(inputFormat)); + Argument.AssertNotNull(outputFormat, nameof(outputFormat)); + Argument.AssertNotNull(formatType, nameof(formatType)); + Argument.AssertNotNull(serializeLib, nameof(serializeLib)); + + InputFormat = inputFormat; + OutputFormat = outputFormat; + FormatType = formatType; + Properties = new ChangeTrackingDictionary(); + SerializeLib = serializeLib; + } + + /// Initializes a new instance of FormatInfo. + /// Input Format to be used. + /// Output Format to be used. + /// Format Type to be used to be used (csv, parquet, etc.). + /// Property bag. + /// SerDe name. + /// Serialization Library to be used by Spark (org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe). + internal FormatInfo(string inputFormat, string outputFormat, string formatType, IDictionary properties, string serDeName, string serializeLib) + { + InputFormat = inputFormat; + OutputFormat = outputFormat; + FormatType = formatType; + Properties = properties; + SerDeName = serDeName; + SerializeLib = serializeLib; + } + + /// Input Format to be used. + public string InputFormat { get; set; } + /// Output Format to be used. + public string OutputFormat { get; set; } + /// Format Type to be used to be used (csv, parquet, etc.). + public string FormatType { get; set; } + /// Property bag. + public IDictionary Properties { get; } + /// SerDe name. + public string SerDeName { get; set; } + /// Serialization Library to be used by Spark (org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe). + public string SerializeLib { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GetMetadataActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GetMetadataActivity.Serialization.cs index 7475121c2884..2a19e283dff2 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GetMetadataActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GetMetadataActivity.Serialization.cs @@ -38,6 +38,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -107,6 +117,8 @@ internal static GetMetadataActivity DeserializeGetMetadataActivity(JsonElement e string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; DatasetReference dataset = default; @@ -150,6 +162,24 @@ internal static GetMetadataActivity DeserializeGetMetadataActivity(JsonElement e description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -237,7 +267,7 @@ internal static GetMetadataActivity DeserializeGetMetadataActivity(JsonElement e additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new GetMetadataActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, dataset, Optional.ToList(fieldList), storeSettings.Value, formatSettings.Value); + return new GetMetadataActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, dataset, Optional.ToList(fieldList), storeSettings.Value, formatSettings.Value); } internal partial class GetMetadataActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GetMetadataActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GetMetadataActivity.cs index 1f2bed5766c7..5d49393bb5a8 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GetMetadataActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/GetMetadataActivity.cs @@ -32,6 +32,8 @@ public GetMetadataActivity(string name, DatasetReference dataset) : base(name) /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -49,7 +51,7 @@ public GetMetadataActivity(string name, DatasetReference dataset) : base(name) /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , and . /// - internal GetMetadataActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, DatasetReference dataset, IList fieldList, StoreReadSettings storeSettings, FormatReadSettings formatSettings) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + internal GetMetadataActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, DatasetReference dataset, IList fieldList, StoreReadSettings storeSettings, FormatReadSettings formatSettings) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) { Dataset = dataset; FieldList = fieldList; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightHiveActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightHiveActivity.Serialization.cs index 401397af7164..97e1dc86081b 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightHiveActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightHiveActivity.Serialization.cs @@ -38,6 +38,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -156,6 +166,8 @@ internal static HDInsightHiveActivity DeserializeHDInsightHiveActivity(JsonEleme string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; Optional> storageLinkedServices = default; @@ -203,6 +215,24 @@ internal static HDInsightHiveActivity DeserializeHDInsightHiveActivity(JsonEleme description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -359,7 +389,7 @@ internal static HDInsightHiveActivity DeserializeHDInsightHiveActivity(JsonEleme additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new HDInsightHiveActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, Optional.ToList(storageLinkedServices), Optional.ToList(arguments), Optional.ToNullable(getDebugInfo), scriptPath.Value, scriptLinkedService.Value, Optional.ToDictionary(defines), Optional.ToList(variables), Optional.ToNullable(queryTimeout)); + return new HDInsightHiveActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, Optional.ToList(storageLinkedServices), Optional.ToList(arguments), Optional.ToNullable(getDebugInfo), scriptPath.Value, scriptLinkedService.Value, Optional.ToDictionary(defines), Optional.ToList(variables), Optional.ToNullable(queryTimeout)); } internal partial class HDInsightHiveActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightHiveActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightHiveActivity.cs index f4615b61babd..fe86237f4dac 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightHiveActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightHiveActivity.cs @@ -32,6 +32,8 @@ public HDInsightHiveActivity(string name) : base(name) /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -45,7 +47,7 @@ public HDInsightHiveActivity(string name) : base(name) /// Allows user to specify defines for Hive job request. /// User specified arguments under hivevar namespace. /// Query timeout value (in minutes). Effective when the HDInsight cluster is with ESP (Enterprise Security Package). - internal HDInsightHiveActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, IList storageLinkedServices, IList arguments, HDInsightActivityDebugInfoOption? getDebugInfo, object scriptPath, LinkedServiceReference scriptLinkedService, IDictionary defines, IList variables, int? queryTimeout) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + internal HDInsightHiveActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, IList storageLinkedServices, IList arguments, HDInsightActivityDebugInfoOption? getDebugInfo, object scriptPath, LinkedServiceReference scriptLinkedService, IDictionary defines, IList variables, int? queryTimeout) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) { StorageLinkedServices = storageLinkedServices; Arguments = arguments; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightMapReduceActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightMapReduceActivity.Serialization.cs index 5070862cd3b8..da3a1542af90 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightMapReduceActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightMapReduceActivity.Serialization.cs @@ -38,6 +38,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -150,6 +160,8 @@ internal static HDInsightMapReduceActivity DeserializeHDInsightMapReduceActivity string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; Optional> storageLinkedServices = default; @@ -197,6 +209,24 @@ internal static HDInsightMapReduceActivity DeserializeHDInsightMapReduceActivity description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -345,7 +375,7 @@ internal static HDInsightMapReduceActivity DeserializeHDInsightMapReduceActivity additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new HDInsightMapReduceActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, Optional.ToList(storageLinkedServices), Optional.ToList(arguments), Optional.ToNullable(getDebugInfo), className, jarFilePath, jarLinkedService.Value, Optional.ToList(jarLibs), Optional.ToDictionary(defines)); + return new HDInsightMapReduceActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, Optional.ToList(storageLinkedServices), Optional.ToList(arguments), Optional.ToNullable(getDebugInfo), className, jarFilePath, jarLinkedService.Value, Optional.ToList(jarLibs), Optional.ToDictionary(defines)); } internal partial class HDInsightMapReduceActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightMapReduceActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightMapReduceActivity.cs index 754d02ad0213..6de4ffba1f7f 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightMapReduceActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightMapReduceActivity.cs @@ -38,6 +38,8 @@ public HDInsightMapReduceActivity(string name, object className, object jarFileP /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -51,7 +53,7 @@ public HDInsightMapReduceActivity(string name, object className, object jarFileP /// Jar linked service reference. /// Jar libs. /// Allows user to specify defines for the MapReduce job request. - internal HDInsightMapReduceActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, IList storageLinkedServices, IList arguments, HDInsightActivityDebugInfoOption? getDebugInfo, object className, object jarFilePath, LinkedServiceReference jarLinkedService, IList jarLibs, IDictionary defines) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + internal HDInsightMapReduceActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, IList storageLinkedServices, IList arguments, HDInsightActivityDebugInfoOption? getDebugInfo, object className, object jarFilePath, LinkedServiceReference jarLinkedService, IList jarLibs, IDictionary defines) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) { StorageLinkedServices = storageLinkedServices; Arguments = arguments; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightOnDemandLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightOnDemandLinkedService.Serialization.cs index 28076e0cf10d..fcf9b503ba19 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightOnDemandLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightOnDemandLinkedService.Serialization.cs @@ -213,6 +213,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("subnetName"u8); writer.WriteObjectValue(SubnetName); } + if (Optional.IsDefined(Credential)) + { + writer.WritePropertyName("credential"u8); + writer.WriteObjectValue(Credential); + } writer.WriteEndObject(); foreach (var item in AdditionalProperties) { @@ -266,6 +271,7 @@ internal static HDInsightOnDemandLinkedService DeserializeHDInsightOnDemandLinke Optional> scriptActions = default; Optional virtualNetworkId = default; Optional subnetName = default; + Optional credential = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -612,13 +618,22 @@ internal static HDInsightOnDemandLinkedService DeserializeHDInsightOnDemandLinke subnetName = property0.Value.GetObject(); continue; } + if (property0.NameEquals("credential"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + credential = CredentialReference.DeserializeCredentialReference(property0.Value); + continue; + } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new HDInsightOnDemandLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, clusterSize, timeToLive, version, linkedServiceName, hostSubscriptionId, servicePrincipalId.Value, servicePrincipalKey.Value, tenant, clusterResourceGroup, clusterNamePrefix.Value, clusterUserName.Value, clusterPassword.Value, clusterSshUserName.Value, clusterSshPassword.Value, Optional.ToList(additionalLinkedServiceNames), hcatalogLinkedServiceName.Value, clusterType.Value, sparkVersion.Value, coreConfiguration.Value, hBaseConfiguration.Value, hdfsConfiguration.Value, hiveConfiguration.Value, mapReduceConfiguration.Value, oozieConfiguration.Value, stormConfiguration.Value, yarnConfiguration.Value, encryptedCredential.Value, headNodeSize.Value, dataNodeSize.Value, zookeeperNodeSize.Value, Optional.ToList(scriptActions), virtualNetworkId.Value, subnetName.Value); + return new HDInsightOnDemandLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, clusterSize, timeToLive, version, linkedServiceName, hostSubscriptionId, servicePrincipalId.Value, servicePrincipalKey.Value, tenant, clusterResourceGroup, clusterNamePrefix.Value, clusterUserName.Value, clusterPassword.Value, clusterSshUserName.Value, clusterSshPassword.Value, Optional.ToList(additionalLinkedServiceNames), hcatalogLinkedServiceName.Value, clusterType.Value, sparkVersion.Value, coreConfiguration.Value, hBaseConfiguration.Value, hdfsConfiguration.Value, hiveConfiguration.Value, mapReduceConfiguration.Value, oozieConfiguration.Value, stormConfiguration.Value, yarnConfiguration.Value, encryptedCredential.Value, headNodeSize.Value, dataNodeSize.Value, zookeeperNodeSize.Value, Optional.ToList(scriptActions), virtualNetworkId.Value, subnetName.Value, credential.Value); } internal partial class HDInsightOnDemandLinkedServiceConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightOnDemandLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightOnDemandLinkedService.cs index cca168a90742..3440d0ec7897 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightOnDemandLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightOnDemandLinkedService.cs @@ -97,7 +97,8 @@ public HDInsightOnDemandLinkedService(object clusterSize, object timeToLive, obj /// Custom script actions to run on HDI ondemand cluster once it's up. Please refer to https://docs.microsoft.com/en-us/azure/hdinsight/hdinsight-hadoop-customize-cluster-linux?toc=%2Fen-us%2Fazure%2Fhdinsight%2Fr-server%2FTOC.json&bc=%2Fen-us%2Fazure%2Fbread%2Ftoc.json#understanding-script-actions. /// The ARM resource ID for the vNet to which the cluster should be joined after creation. Type: string (or Expression with resultType string). /// The ARM resource ID for the subnet in the vNet. If virtualNetworkId was specified, then this property is required. Type: string (or Expression with resultType string). - internal HDInsightOnDemandLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object clusterSize, object timeToLive, object version, LinkedServiceReference linkedServiceName, object hostSubscriptionId, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object clusterResourceGroup, object clusterNamePrefix, object clusterUserName, SecretBase clusterPassword, object clusterSshUserName, SecretBase clusterSshPassword, IList additionalLinkedServiceNames, LinkedServiceReference hcatalogLinkedServiceName, object clusterType, object sparkVersion, object coreConfiguration, object hBaseConfiguration, object hdfsConfiguration, object hiveConfiguration, object mapReduceConfiguration, object oozieConfiguration, object stormConfiguration, object yarnConfiguration, object encryptedCredential, object headNodeSize, object dataNodeSize, object zookeeperNodeSize, IList scriptActions, object virtualNetworkId, object subnetName) : base(type, connectVia, description, parameters, annotations, additionalProperties) + /// The credential reference containing authentication information. + internal HDInsightOnDemandLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object clusterSize, object timeToLive, object version, LinkedServiceReference linkedServiceName, object hostSubscriptionId, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object clusterResourceGroup, object clusterNamePrefix, object clusterUserName, SecretBase clusterPassword, object clusterSshUserName, SecretBase clusterSshPassword, IList additionalLinkedServiceNames, LinkedServiceReference hcatalogLinkedServiceName, object clusterType, object sparkVersion, object coreConfiguration, object hBaseConfiguration, object hdfsConfiguration, object hiveConfiguration, object mapReduceConfiguration, object oozieConfiguration, object stormConfiguration, object yarnConfiguration, object encryptedCredential, object headNodeSize, object dataNodeSize, object zookeeperNodeSize, IList scriptActions, object virtualNetworkId, object subnetName, CredentialReference credential) : base(type, connectVia, description, parameters, annotations, additionalProperties) { ClusterSize = clusterSize; TimeToLive = timeToLive; @@ -132,6 +133,7 @@ internal HDInsightOnDemandLinkedService(string type, IntegrationRuntimeReference ScriptActions = scriptActions; VirtualNetworkId = virtualNetworkId; SubnetName = subnetName; + Credential = credential; Type = type ?? "HDInsightOnDemand"; } @@ -213,5 +215,7 @@ internal HDInsightOnDemandLinkedService(string type, IntegrationRuntimeReference public object VirtualNetworkId { get; set; } /// The ARM resource ID for the subnet in the vNet. If virtualNetworkId was specified, then this property is required. Type: string (or Expression with resultType string). public object SubnetName { get; set; } + /// The credential reference containing authentication information. + public CredentialReference Credential { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightPigActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightPigActivity.Serialization.cs index 14fbdb14985a..18031742d207 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightPigActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightPigActivity.Serialization.cs @@ -38,6 +38,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -126,6 +136,8 @@ internal static HDInsightPigActivity DeserializeHDInsightPigActivity(JsonElement string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; Optional> storageLinkedServices = default; @@ -171,6 +183,24 @@ internal static HDInsightPigActivity DeserializeHDInsightPigActivity(JsonElement description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -285,7 +315,7 @@ internal static HDInsightPigActivity DeserializeHDInsightPigActivity(JsonElement additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new HDInsightPigActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, Optional.ToList(storageLinkedServices), arguments.Value, Optional.ToNullable(getDebugInfo), scriptPath.Value, scriptLinkedService.Value, Optional.ToDictionary(defines)); + return new HDInsightPigActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, Optional.ToList(storageLinkedServices), arguments.Value, Optional.ToNullable(getDebugInfo), scriptPath.Value, scriptLinkedService.Value, Optional.ToDictionary(defines)); } internal partial class HDInsightPigActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightPigActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightPigActivity.cs index a0972f1147d8..1a09247fd0d3 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightPigActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightPigActivity.cs @@ -30,6 +30,8 @@ public HDInsightPigActivity(string name) : base(name) /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -41,7 +43,7 @@ public HDInsightPigActivity(string name) : base(name) /// Script path. Type: string (or Expression with resultType string). /// Script linked service reference. /// Allows user to specify defines for Pig job request. - internal HDInsightPigActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, IList storageLinkedServices, object arguments, HDInsightActivityDebugInfoOption? getDebugInfo, object scriptPath, LinkedServiceReference scriptLinkedService, IDictionary defines) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + internal HDInsightPigActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, IList storageLinkedServices, object arguments, HDInsightActivityDebugInfoOption? getDebugInfo, object scriptPath, LinkedServiceReference scriptLinkedService, IDictionary defines) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) { StorageLinkedServices = storageLinkedServices; Arguments = arguments; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightSparkActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightSparkActivity.Serialization.cs index 5d995e87770c..882b8e78c9bf 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightSparkActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightSparkActivity.Serialization.cs @@ -38,6 +38,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -135,6 +145,8 @@ internal static HDInsightSparkActivity DeserializeHDInsightSparkActivity(JsonEle string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; object rootPath = default; @@ -182,6 +194,24 @@ internal static HDInsightSparkActivity DeserializeHDInsightSparkActivity(JsonEle description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -309,7 +339,7 @@ internal static HDInsightSparkActivity DeserializeHDInsightSparkActivity(JsonEle additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new HDInsightSparkActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, rootPath, entryFilePath, Optional.ToList(arguments), Optional.ToNullable(getDebugInfo), sparkJobLinkedService.Value, className.Value, proxyUser.Value, Optional.ToDictionary(sparkConfig)); + return new HDInsightSparkActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, rootPath, entryFilePath, Optional.ToList(arguments), Optional.ToNullable(getDebugInfo), sparkJobLinkedService.Value, className.Value, proxyUser.Value, Optional.ToDictionary(sparkConfig)); } internal partial class HDInsightSparkActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightSparkActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightSparkActivity.cs index 6b27ab1e11cd..8928028746e3 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightSparkActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightSparkActivity.cs @@ -36,6 +36,8 @@ public HDInsightSparkActivity(string name, object rootPath, object entryFilePath /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -49,7 +51,7 @@ public HDInsightSparkActivity(string name, object rootPath, object entryFilePath /// The application's Java/Spark main class. /// The user to impersonate that will execute the job. Type: string (or Expression with resultType string). /// Spark configuration property. - internal HDInsightSparkActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object rootPath, object entryFilePath, IList arguments, HDInsightActivityDebugInfoOption? getDebugInfo, LinkedServiceReference sparkJobLinkedService, string className, object proxyUser, IDictionary sparkConfig) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + internal HDInsightSparkActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object rootPath, object entryFilePath, IList arguments, HDInsightActivityDebugInfoOption? getDebugInfo, LinkedServiceReference sparkJobLinkedService, string className, object proxyUser, IDictionary sparkConfig) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) { RootPath = rootPath; EntryFilePath = entryFilePath; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightStreamingActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightStreamingActivity.Serialization.cs index 74195bd792a1..e92a61c58d79 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightStreamingActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightStreamingActivity.Serialization.cs @@ -38,6 +38,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -171,6 +181,8 @@ internal static HDInsightStreamingActivity DeserializeHDInsightStreamingActivity string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; Optional> storageLinkedServices = default; @@ -222,6 +234,24 @@ internal static HDInsightStreamingActivity DeserializeHDInsightStreamingActivity description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -406,7 +436,7 @@ internal static HDInsightStreamingActivity DeserializeHDInsightStreamingActivity additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new HDInsightStreamingActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, Optional.ToList(storageLinkedServices), Optional.ToList(arguments), Optional.ToNullable(getDebugInfo), mapper, reducer, input, output, filePaths, fileLinkedService.Value, combiner.Value, Optional.ToList(commandEnvironment), Optional.ToDictionary(defines)); + return new HDInsightStreamingActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, Optional.ToList(storageLinkedServices), Optional.ToList(arguments), Optional.ToNullable(getDebugInfo), mapper, reducer, input, output, filePaths, fileLinkedService.Value, combiner.Value, Optional.ToList(commandEnvironment), Optional.ToDictionary(defines)); } internal partial class HDInsightStreamingActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightStreamingActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightStreamingActivity.cs index 2498356712d6..325dbe0307d5 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightStreamingActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightStreamingActivity.cs @@ -48,6 +48,8 @@ public HDInsightStreamingActivity(string name, object mapper, object reducer, ob /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -65,7 +67,7 @@ public HDInsightStreamingActivity(string name, object mapper, object reducer, ob /// Combiner executable name. Type: string (or Expression with resultType string). /// Command line environment values. /// Allows user to specify defines for streaming job request. - internal HDInsightStreamingActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, IList storageLinkedServices, IList arguments, HDInsightActivityDebugInfoOption? getDebugInfo, object mapper, object reducer, object input, object output, IList filePaths, LinkedServiceReference fileLinkedService, object combiner, IList commandEnvironment, IDictionary defines) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + internal HDInsightStreamingActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, IList storageLinkedServices, IList arguments, HDInsightActivityDebugInfoOption? getDebugInfo, object mapper, object reducer, object input, object output, IList filePaths, LinkedServiceReference fileLinkedService, object combiner, IList commandEnvironment, IDictionary defines) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) { StorageLinkedServices = storageLinkedServices; Arguments = arguments; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/IfConditionActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/IfConditionActivity.Serialization.cs index 8821f3e0f1c6..8f47268675ba 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/IfConditionActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/IfConditionActivity.Serialization.cs @@ -28,6 +28,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -90,6 +100,8 @@ internal static IfConditionActivity DeserializeIfConditionActivity(JsonElement e string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; Expression expression = default; @@ -114,6 +126,24 @@ internal static IfConditionActivity DeserializeIfConditionActivity(JsonElement e description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -190,7 +220,7 @@ internal static IfConditionActivity DeserializeIfConditionActivity(JsonElement e additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new IfConditionActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, expression, Optional.ToList(ifTrueActivities), Optional.ToList(ifFalseActivities)); + return new IfConditionActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, expression, Optional.ToList(ifTrueActivities), Optional.ToList(ifFalseActivities)); } internal partial class IfConditionActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/IfConditionActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/IfConditionActivity.cs index cfbe686648d4..68e8751eeba4 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/IfConditionActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/IfConditionActivity.cs @@ -33,6 +33,8 @@ public IfConditionActivity(string name, Expression expression) : base(name) /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -47,7 +49,7 @@ public IfConditionActivity(string name, Expression expression) : base(name) /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . /// - internal IfConditionActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, Expression expression, IList ifTrueActivities, IList ifFalseActivities) : base(name, type, description, dependsOn, userProperties, additionalProperties) + internal IfConditionActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, Expression expression, IList ifTrueActivities, IList ifFalseActivities) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) { Expression = expression; IfTrueActivities = ifTrueActivities; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkConnectionTargetDatabaseTypeProperties.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkConnectionTargetDatabaseTypeProperties.Serialization.cs index fbcd6a88cfad..3d0c9eb13a5a 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkConnectionTargetDatabaseTypeProperties.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkConnectionTargetDatabaseTypeProperties.Serialization.cs @@ -28,6 +28,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("dropExistingTargetTableOnStart"u8); writer.WriteBooleanValue(DropExistingTargetTableOnStart.Value); } + if (Optional.IsDefined(ActionOnExistingTargetTable)) + { + writer.WritePropertyName("actionOnExistingTargetTable"u8); + writer.WriteStringValue(ActionOnExistingTargetTable.Value.ToString()); + } writer.WriteEndObject(); } @@ -39,6 +44,7 @@ internal static LinkConnectionTargetDatabaseTypeProperties DeserializeLinkConnec } Optional crossTableTransaction = default; Optional dropExistingTargetTableOnStart = default; + Optional actionOnExistingTargetTable = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("crossTableTransaction"u8)) @@ -59,8 +65,17 @@ internal static LinkConnectionTargetDatabaseTypeProperties DeserializeLinkConnec dropExistingTargetTableOnStart = property.Value.GetBoolean(); continue; } + if (property.NameEquals("actionOnExistingTargetTable"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + actionOnExistingTargetTable = new ActionOnExistingTargetTable(property.Value.GetString()); + continue; + } } - return new LinkConnectionTargetDatabaseTypeProperties(Optional.ToNullable(crossTableTransaction), Optional.ToNullable(dropExistingTargetTableOnStart)); + return new LinkConnectionTargetDatabaseTypeProperties(Optional.ToNullable(crossTableTransaction), Optional.ToNullable(dropExistingTargetTableOnStart), Optional.ToNullable(actionOnExistingTargetTable)); } internal partial class LinkConnectionTargetDatabaseTypePropertiesConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkConnectionTargetDatabaseTypeProperties.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkConnectionTargetDatabaseTypeProperties.cs index 7bfa3870899b..2f4e076abfbc 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkConnectionTargetDatabaseTypeProperties.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LinkConnectionTargetDatabaseTypeProperties.cs @@ -18,15 +18,19 @@ public LinkConnectionTargetDatabaseTypeProperties() /// Initializes a new instance of LinkConnectionTargetDatabaseTypeProperties. /// Enable cross table transaction consistency on target database. /// Drop and recreate same existing target table on link connection target database. - internal LinkConnectionTargetDatabaseTypeProperties(bool? crossTableTransaction, bool? dropExistingTargetTableOnStart) + /// Action on existing target table. If not specified, 'FailOnNonEmptyTable' action is used. + internal LinkConnectionTargetDatabaseTypeProperties(bool? crossTableTransaction, bool? dropExistingTargetTableOnStart, ActionOnExistingTargetTable? actionOnExistingTargetTable) { CrossTableTransaction = crossTableTransaction; DropExistingTargetTableOnStart = dropExistingTargetTableOnStart; + ActionOnExistingTargetTable = actionOnExistingTargetTable; } /// Enable cross table transaction consistency on target database. public bool? CrossTableTransaction { get; set; } /// Drop and recreate same existing target table on link connection target database. public bool? DropExistingTargetTableOnStart { get; set; } + /// Action on existing target table. If not specified, 'FailOnNonEmptyTable' action is used. + public ActionOnExistingTargetTable? ActionOnExistingTargetTable { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LookupActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LookupActivity.Serialization.cs index 8f0d29d51ae0..2cf8109f9d0a 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LookupActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LookupActivity.Serialization.cs @@ -38,6 +38,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -89,6 +99,8 @@ internal static LookupActivity DeserializeLookupActivity(JsonElement element) string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; CopySource source = default; @@ -131,6 +143,24 @@ internal static LookupActivity DeserializeLookupActivity(JsonElement element) description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -193,7 +223,7 @@ internal static LookupActivity DeserializeLookupActivity(JsonElement element) additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new LookupActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, source, dataset, firstRowOnly.Value); + return new LookupActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, source, dataset, firstRowOnly.Value); } internal partial class LookupActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LookupActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LookupActivity.cs index 35391c385f20..8e6f2f4410fe 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LookupActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/LookupActivity.cs @@ -38,6 +38,8 @@ public LookupActivity(string name, CopySource source, DatasetReference dataset) /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -50,7 +52,7 @@ public LookupActivity(string name, CopySource source, DatasetReference dataset) /// /// Lookup activity dataset reference. /// Whether to return first row or all rows. Default value is true. Type: boolean (or Expression with resultType boolean). - internal LookupActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, CopySource source, DatasetReference dataset, object firstRowOnly) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + internal LookupActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, CopySource source, DatasetReference dataset, object firstRowOnly) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) { Source = source; Dataset = dataset; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntity.Serialization.cs new file mode 100644 index 000000000000..fd97d7120c69 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntity.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(MDEntityConverter))] + public partial class MDEntity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToSerialString()); + writer.WriteEndObject(); + } + + internal static MDEntity DeserializeMDEntity(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + SASEntityType type = default; + Optional id = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString().ToSASEntityType(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + } + return new MDEntity(name, type, id.Value); + } + + internal partial class MDEntityConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, MDEntity model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override MDEntity Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeMDEntity(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntity.cs new file mode 100644 index 000000000000..db823986ad5d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntity.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// MD Entity. + public partial class MDEntity + { + /// Initializes a new instance of MDEntity. + /// Entity Name. + /// Artifact type. + /// is null. + public MDEntity(string name, SASEntityType type) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + Type = type; + } + + /// Initializes a new instance of MDEntity. + /// Entity Name. + /// Artifact type. + /// Entity Resource Id. + internal MDEntity(string name, SASEntityType type, string id) + { + Name = name; + Type = type; + Id = id; + } + + /// Entity Name. + public string Name { get; set; } + /// Artifact type. + public SASEntityType Type { get; set; } + /// Entity Resource Id. + public string Id { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntityProperties.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntityProperties.Serialization.cs new file mode 100644 index 000000000000..c06dde512442 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntityProperties.Serialization.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(MDEntityPropertiesConverter))] + public partial class MDEntityProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(OriginObjectId)) + { + writer.WritePropertyName("originObjectId"u8); + writer.WriteStringValue(OriginObjectId); + } + if (Optional.IsDefined(PublishStatus)) + { + writer.WritePropertyName("publishStatus"u8); + writer.WriteStringValue(PublishStatus.Value.ToString()); + } + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static MDEntityProperties DeserializeMDEntityProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional originObjectId = default; + Optional objectId = default; + Optional objectVersion = default; + Optional publishStatus = default; + Optional> properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("originObjectId"u8)) + { + originObjectId = property.Value.GetString(); + continue; + } + if (property.NameEquals("objectId"u8)) + { + objectId = property.Value.GetString(); + continue; + } + if (property.NameEquals("objectVersion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + objectVersion = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("publishStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + publishStatus = new PublishStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetObject()); + } + } + properties = dictionary; + continue; + } + } + return new MDEntityProperties(originObjectId.Value, objectId.Value, Optional.ToNullable(objectVersion), Optional.ToNullable(publishStatus), Optional.ToDictionary(properties)); + } + + internal partial class MDEntityPropertiesConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, MDEntityProperties model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override MDEntityProperties Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeMDEntityProperties(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntityProperties.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntityProperties.cs new file mode 100644 index 000000000000..402298086e6b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntityProperties.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Defines the artifact entity. + public partial class MDEntityProperties + { + /// Initializes a new instance of MDEntityProperties. + public MDEntityProperties() + { + Properties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of MDEntityProperties. + /// Entity object id maintained by the caller. + /// Entity object id maintained by SyMS. + /// Entity object version maintained by SyMS. + /// Publish status. + /// Property bag. + internal MDEntityProperties(string originObjectId, string objectId, long? objectVersion, PublishStatus? publishStatus, IDictionary properties) + { + OriginObjectId = originObjectId; + ObjectId = objectId; + ObjectVersion = objectVersion; + PublishStatus = publishStatus; + Properties = properties; + } + + /// Entity object id maintained by the caller. + public string OriginObjectId { get; set; } + /// Entity object id maintained by SyMS. + public string ObjectId { get; } + /// Entity object version maintained by SyMS. + public long? ObjectVersion { get; } + /// Publish status. + public PublishStatus? PublishStatus { get; set; } + /// Property bag. + public IDictionary Properties { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbAtlasLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbAtlasLinkedService.Serialization.cs index 6e07c28eb8cb..35251da8855a 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbAtlasLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbAtlasLinkedService.Serialization.cs @@ -63,6 +63,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteObjectValue(ConnectionString); writer.WritePropertyName("database"u8); writer.WriteObjectValue(Database); + if (Optional.IsDefined(MongoDbAtlasDriverVersion)) + { + writer.WritePropertyName("mongoDbAtlasDriverVersion"u8); + writer.WriteObjectValue(MongoDbAtlasDriverVersion); + } writer.WriteEndObject(); foreach (var item in AdditionalProperties) { @@ -85,6 +90,7 @@ internal static MongoDbAtlasLinkedService DeserializeMongoDbAtlasLinkedService(J Optional> annotations = default; object connectionString = default; object database = default; + Optional mongoDbAtlasDriverVersion = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -162,13 +168,22 @@ internal static MongoDbAtlasLinkedService DeserializeMongoDbAtlasLinkedService(J database = property0.Value.GetObject(); continue; } + if (property0.NameEquals("mongoDbAtlasDriverVersion"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mongoDbAtlasDriverVersion = property0.Value.GetObject(); + continue; + } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new MongoDbAtlasLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, database); + return new MongoDbAtlasLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, database, mongoDbAtlasDriverVersion.Value); } internal partial class MongoDbAtlasLinkedServiceConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbAtlasLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbAtlasLinkedService.cs index 44adf65e587c..43a876b17f09 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbAtlasLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbAtlasLinkedService.cs @@ -37,10 +37,12 @@ public MongoDbAtlasLinkedService(object connectionString, object database) /// Additional Properties. /// The MongoDB Atlas connection string. Type: string, SecureString or AzureKeyVaultSecretReference. Type: string, SecureString or AzureKeyVaultSecretReference. /// The name of the MongoDB Atlas database that you want to access. Type: string (or Expression with resultType string). - internal MongoDbAtlasLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, object database) : base(type, connectVia, description, parameters, annotations, additionalProperties) + /// The MongoDB Atlas Driver version that you want to choose. Allowed value are 2.10.4 and 2.19.0. Type: string (or Expression with resultType string). + internal MongoDbAtlasLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, object database, object mongoDbAtlasDriverVersion) : base(type, connectVia, description, parameters, annotations, additionalProperties) { ConnectionString = connectionString; Database = database; + MongoDbAtlasDriverVersion = mongoDbAtlasDriverVersion; Type = type ?? "MongoDbAtlas"; } @@ -48,5 +50,7 @@ internal MongoDbAtlasLinkedService(string type, IntegrationRuntimeReference conn public object ConnectionString { get; set; } /// The name of the MongoDB Atlas database that you want to access. Type: string (or Expression with resultType string). public object Database { get; set; } + /// The MongoDB Atlas Driver version that you want to choose. Allowed value are 2.10.4 and 2.19.0. Type: string (or Expression with resultType string). + public object MongoDbAtlasDriverVersion { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Office365Source.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Office365Source.cs index 8f0bf6baac86..6ec8a9a9e396 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Office365Source.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/Office365Source.cs @@ -29,7 +29,7 @@ public Office365Source() /// The Column to apply the <paramref name="StartTime"/> and <paramref name="EndTime"/>. Type: string (or Expression with resultType string). /// Start time of the requested range for this dataset. Type: string (or Expression with resultType string). /// End time of the requested range for this dataset. Type: string (or Expression with resultType string). - /// The columns to be read out from the Office 365 table. Type: array of objects (or Expression with resultType array of objects). Example: [ { "name": "Id" }, { "name": "CreatedDateTime" } ]. + /// The columns to be read out from the Office 365 table. Type: array of objects (or Expression with resultType array of objects). itemType: OutputColumn. Example: [ { "name": "Id" }, { "name": "CreatedDateTime" } ]. internal Office365Source(string type, object sourceRetryCount, object sourceRetryWait, object maxConcurrentConnections, IDictionary additionalProperties, object allowedGroups, object userScopeFilterUri, object dateFilterColumn, object startTime, object endTime, object outputColumns) : base(type, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, additionalProperties) { AllowedGroups = allowedGroups; @@ -51,7 +51,7 @@ internal Office365Source(string type, object sourceRetryCount, object sourceRetr public object StartTime { get; set; } /// End time of the requested range for this dataset. Type: string (or Expression with resultType string). public object EndTime { get; set; } - /// The columns to be read out from the Office 365 table. Type: array of objects (or Expression with resultType array of objects). Example: [ { "name": "Id" }, { "name": "CreatedDateTime" } ]. + /// The columns to be read out from the Office 365 table. Type: array of objects (or Expression with resultType array of objects). itemType: OutputColumn. Example: [ { "name": "Id" }, { "name": "CreatedDateTime" } ]. public object OutputColumns { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OutputColumn.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OutputColumn.cs new file mode 100644 index 000000000000..c7e75dbb288e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/OutputColumn.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The columns to be read out from the Office 365 table. + internal partial class OutputColumn + { + /// Initializes a new instance of OutputColumn. + internal OutputColumn() + { + } + + /// Name of the table column. Type: string. + public string Name { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfo.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfo.Serialization.cs new file mode 100644 index 000000000000..61104dbef96c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfo.Serialization.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(PartitionInfoConverter))] + public partial class PartitionInfo : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + } + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToSerialString()); + writer.WriteEndObject(); + } + + internal static PartitionInfo DeserializePartitionInfo(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional properties = default; + string name = default; + SASEntityType type = default; + Optional id = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = PartitionInfoProperties.DeserializePartitionInfoProperties(property.Value); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString().ToSASEntityType(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + } + return new PartitionInfo(name, type, id.Value, properties.Value); + } + + internal partial class PartitionInfoConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, PartitionInfo model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override PartitionInfo Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializePartitionInfo(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfo.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfo.cs new file mode 100644 index 000000000000..5dab8979a3a2 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfo.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// partition information. + public partial class PartitionInfo : MDEntity + { + /// Initializes a new instance of PartitionInfo. + /// Entity Name. + /// Artifact type. + /// is null. + public PartitionInfo(string name, SASEntityType type) : base(name, type) + { + Argument.AssertNotNull(name, nameof(name)); + } + + /// Initializes a new instance of PartitionInfo. + /// Entity Name. + /// Artifact type. + /// Entity Resource Id. + /// Database properties. + internal PartitionInfo(string name, SASEntityType type, string id, PartitionInfoProperties properties) : base(name, type, id) + { + Properties = properties; + } + + /// Database properties. + public PartitionInfoProperties Properties { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoNamespace.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoNamespace.Serialization.cs new file mode 100644 index 000000000000..8e0aefd781fc --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoNamespace.Serialization.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(PartitionInfoNamespaceConverter))] + public partial class PartitionInfoNamespace : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("tableName"u8); + writer.WriteStringValue(TableName); + if (Optional.IsDefined(SchemaName)) + { + writer.WritePropertyName("schemaName"u8); + writer.WriteStringValue(SchemaName); + } + writer.WritePropertyName("databaseName"u8); + writer.WriteStringValue(DatabaseName); + writer.WriteEndObject(); + } + + internal static PartitionInfoNamespace DeserializePartitionInfoNamespace(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string tableName = default; + Optional schemaName = default; + string databaseName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tableName"u8)) + { + tableName = property.Value.GetString(); + continue; + } + if (property.NameEquals("schemaName"u8)) + { + schemaName = property.Value.GetString(); + continue; + } + if (property.NameEquals("databaseName"u8)) + { + databaseName = property.Value.GetString(); + continue; + } + } + return new PartitionInfoNamespace(databaseName, schemaName.Value, tableName); + } + + internal partial class PartitionInfoNamespaceConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, PartitionInfoNamespace model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override PartitionInfoNamespace Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializePartitionInfoNamespace(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoNamespace.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoNamespace.cs new file mode 100644 index 000000000000..107f794305d1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoNamespace.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Partition information namespace. + public partial class PartitionInfoNamespace : TableNamespace + { + /// Initializes a new instance of PartitionInfoNamespace. + /// Database name. + /// Table name. + /// or is null. + public PartitionInfoNamespace(string databaseName, string tableName) : base(databaseName) + { + Argument.AssertNotNull(databaseName, nameof(databaseName)); + Argument.AssertNotNull(tableName, nameof(tableName)); + + TableName = tableName; + } + + /// Initializes a new instance of PartitionInfoNamespace. + /// Database name. + /// Schema name. + /// Table name. + /// is null. + internal PartitionInfoNamespace(string databaseName, string schemaName, string tableName) : base(databaseName, schemaName) + { + Argument.AssertNotNull(databaseName, nameof(databaseName)); + + TableName = tableName; + } + + /// Table name. + public string TableName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoProperties.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoProperties.Serialization.cs new file mode 100644 index 000000000000..c836061e6cd3 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoProperties.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(PartitionInfoPropertiesConverter))] + public partial class PartitionInfoProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("namespace"u8); + writer.WriteObjectValue(Namespace); + writer.WritePropertyName("storageDescriptor"u8); + writer.WriteObjectValue(StorageDescriptor); + writer.WritePropertyName("partitionKeyValues"u8); + writer.WriteStartArray(); + foreach (var item in PartitionKeyValues) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + if (Optional.IsDefined(OriginObjectId)) + { + writer.WritePropertyName("originObjectId"u8); + writer.WriteStringValue(OriginObjectId); + } + if (Optional.IsDefined(PublishStatus)) + { + writer.WritePropertyName("publishStatus"u8); + writer.WriteStringValue(PublishStatus.Value.ToString()); + } + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static PartitionInfoProperties DeserializePartitionInfoProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PartitionInfoNamespace @namespace = default; + StorageDescriptor storageDescriptor = default; + IList partitionKeyValues = default; + Optional originObjectId = default; + Optional objectId = default; + Optional objectVersion = default; + Optional publishStatus = default; + Optional> properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("namespace"u8)) + { + @namespace = PartitionInfoNamespace.DeserializePartitionInfoNamespace(property.Value); + continue; + } + if (property.NameEquals("storageDescriptor"u8)) + { + storageDescriptor = StorageDescriptor.DeserializeStorageDescriptor(property.Value); + continue; + } + if (property.NameEquals("partitionKeyValues"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + partitionKeyValues = array; + continue; + } + if (property.NameEquals("originObjectId"u8)) + { + originObjectId = property.Value.GetString(); + continue; + } + if (property.NameEquals("objectId"u8)) + { + objectId = property.Value.GetString(); + continue; + } + if (property.NameEquals("objectVersion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + objectVersion = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("publishStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + publishStatus = new PublishStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetObject()); + } + } + properties = dictionary; + continue; + } + } + return new PartitionInfoProperties(originObjectId.Value, objectId.Value, Optional.ToNullable(objectVersion), Optional.ToNullable(publishStatus), Optional.ToDictionary(properties), @namespace, storageDescriptor, partitionKeyValues); + } + + internal partial class PartitionInfoPropertiesConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, PartitionInfoProperties model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override PartitionInfoProperties Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializePartitionInfoProperties(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoProperties.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoProperties.cs new file mode 100644 index 000000000000..3f743c0ae487 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoProperties.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Database properties. + public partial class PartitionInfoProperties : MDEntityProperties + { + /// Initializes a new instance of PartitionInfoProperties. + /// Partition information namespace. + /// Storage descriptor. + /// Partition key values. + /// , or is null. + public PartitionInfoProperties(PartitionInfoNamespace @namespace, StorageDescriptor storageDescriptor, IEnumerable partitionKeyValues) + { + Argument.AssertNotNull(@namespace, nameof(@namespace)); + Argument.AssertNotNull(storageDescriptor, nameof(storageDescriptor)); + Argument.AssertNotNull(partitionKeyValues, nameof(partitionKeyValues)); + + Namespace = @namespace; + StorageDescriptor = storageDescriptor; + PartitionKeyValues = partitionKeyValues.ToList(); + } + + /// Initializes a new instance of PartitionInfoProperties. + /// Entity object id maintained by the caller. + /// Entity object id maintained by SyMS. + /// Entity object version maintained by SyMS. + /// Publish status. + /// Property bag. + /// Partition information namespace. + /// Storage descriptor. + /// Partition key values. + internal PartitionInfoProperties(string originObjectId, string objectId, long? objectVersion, PublishStatus? publishStatus, IDictionary properties, PartitionInfoNamespace @namespace, StorageDescriptor storageDescriptor, IList partitionKeyValues) : base(originObjectId, objectId, objectVersion, publishStatus, properties) + { + Namespace = @namespace; + StorageDescriptor = storageDescriptor; + PartitionKeyValues = partitionKeyValues; + } + + /// Partition information namespace. + public PartitionInfoNamespace Namespace { get; set; } + /// Storage descriptor. + public StorageDescriptor StorageDescriptor { get; set; } + /// Partition key values. + public IList PartitionKeyValues { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PublishStatus.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PublishStatus.cs new file mode 100644 index 000000000000..3d4c5a5628d9 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PublishStatus.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Publish status. + public readonly partial struct PublishStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PublishStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PUBLISHEDValue = "PUBLISHED"; + + /// PUBLISHED. + public static PublishStatus PUBLISHED { get; } = new PublishStatus(PUBLISHEDValue); + /// Determines if two values are the same. + public static bool operator ==(PublishStatus left, PublishStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PublishStatus left, PublishStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PublishStatus(string value) => new PublishStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PublishStatus other && Equals(other); + /// + public bool Equals(PublishStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QueryArtifactsResponse.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QueryArtifactsResponse.Serialization.cs new file mode 100644 index 000000000000..904b438a61b4 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QueryArtifactsResponse.Serialization.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(QueryArtifactsResponseConverter))] + public partial class QueryArtifactsResponse + { + internal static QueryArtifactsResponse DeserializeQueryArtifactsResponse(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> items = default; + Optional continuationToken = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("items"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetObject()); + } + } + items = array; + continue; + } + if (property.NameEquals("continuationToken"u8)) + { + continuationToken = property.Value.GetString(); + continue; + } + } + return new QueryArtifactsResponse(Optional.ToList(items), continuationToken.Value); + } + + internal partial class QueryArtifactsResponseConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, QueryArtifactsResponse model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override QueryArtifactsResponse Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeQueryArtifactsResponse(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QueryArtifactsResponse.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QueryArtifactsResponse.cs new file mode 100644 index 000000000000..f4d211bbef6d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QueryArtifactsResponse.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Query artifacts response. + public partial class QueryArtifactsResponse + { + /// Initializes a new instance of QueryArtifactsResponse. + internal QueryArtifactsResponse() + { + Items = new ChangeTrackingList(); + } + + /// Initializes a new instance of QueryArtifactsResponse. + /// + /// Continuation token to get next page. + internal QueryArtifactsResponse(IReadOnlyList items, string continuationToken) + { + Items = items; + ContinuationToken = continuationToken; + } + + /// Gets the items. + public IReadOnlyList Items { get; } + /// Continuation token to get next page. + public string ContinuationToken { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipEntity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipEntity.Serialization.cs new file mode 100644 index 000000000000..561790012737 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipEntity.Serialization.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(RelationshipEntityConverter))] + public partial class RelationshipEntity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToSerialString()); + writer.WriteEndObject(); + } + + internal static RelationshipEntity DeserializeRelationshipEntity(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RelationshipProperties properties = default; + string name = default; + SASEntityType type = default; + Optional id = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + properties = RelationshipProperties.DeserializeRelationshipProperties(property.Value); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString().ToSASEntityType(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + } + return new RelationshipEntity(name, type, id.Value, properties); + } + + internal partial class RelationshipEntityConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, RelationshipEntity model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override RelationshipEntity Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeRelationshipEntity(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipEntity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipEntity.cs new file mode 100644 index 000000000000..1f09b84c545f --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipEntity.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Relationship Entity. + public partial class RelationshipEntity : MDEntity + { + /// Initializes a new instance of RelationshipEntity. + /// Entity Name. + /// Artifact type. + /// Database properties. + /// or is null. + public RelationshipEntity(string name, SASEntityType type, RelationshipProperties properties) : base(name, type) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of RelationshipEntity. + /// Entity Name. + /// Artifact type. + /// Entity Resource Id. + /// Database properties. + internal RelationshipEntity(string name, SASEntityType type, string id, RelationshipProperties properties) : base(name, type, id) + { + Properties = properties; + } + + /// Database properties. + public RelationshipProperties Properties { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipProperties.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipProperties.Serialization.cs new file mode 100644 index 000000000000..797c67d75515 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipProperties.Serialization.cs @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(RelationshipPropertiesConverter))] + public partial class RelationshipProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("namespace"u8); + writer.WriteObjectValue(Namespace); + writer.WritePropertyName("fromTableName"u8); + writer.WriteStringValue(FromTableName); + writer.WritePropertyName("toTableName"u8); + writer.WriteStringValue(ToTableName); + if (Optional.IsDefined(RelationshipType)) + { + writer.WritePropertyName("relationshipType"u8); + writer.WriteStringValue(RelationshipType.Value.ToSerialString()); + } + writer.WritePropertyName("columnRelationshipInformations"u8); + writer.WriteStartArray(); + foreach (var item in ColumnRelationshipInformations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + if (Optional.IsDefined(OriginObjectId)) + { + writer.WritePropertyName("originObjectId"u8); + writer.WriteStringValue(OriginObjectId); + } + if (Optional.IsDefined(PublishStatus)) + { + writer.WritePropertyName("publishStatus"u8); + writer.WriteStringValue(PublishStatus.Value.ToString()); + } + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static RelationshipProperties DeserializeRelationshipProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BaseNamespace @namespace = default; + Optional fromTableId = default; + string fromTableName = default; + Optional toTableId = default; + string toTableName = default; + Optional relationshipType = default; + IList columnRelationshipInformations = default; + Optional originObjectId = default; + Optional objectId = default; + Optional objectVersion = default; + Optional publishStatus = default; + Optional> properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("namespace"u8)) + { + @namespace = BaseNamespace.DeserializeBaseNamespace(property.Value); + continue; + } + if (property.NameEquals("fromTableId"u8)) + { + fromTableId = property.Value.GetString(); + continue; + } + if (property.NameEquals("fromTableName"u8)) + { + fromTableName = property.Value.GetString(); + continue; + } + if (property.NameEquals("toTableId"u8)) + { + toTableId = property.Value.GetString(); + continue; + } + if (property.NameEquals("toTableName"u8)) + { + toTableName = property.Value.GetString(); + continue; + } + if (property.NameEquals("relationshipType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + relationshipType = property.Value.GetString().ToRelationshipType(); + continue; + } + if (property.NameEquals("columnRelationshipInformations"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ColumnRelationshipInformation.DeserializeColumnRelationshipInformation(item)); + } + columnRelationshipInformations = array; + continue; + } + if (property.NameEquals("originObjectId"u8)) + { + originObjectId = property.Value.GetString(); + continue; + } + if (property.NameEquals("objectId"u8)) + { + objectId = property.Value.GetString(); + continue; + } + if (property.NameEquals("objectVersion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + objectVersion = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("publishStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + publishStatus = new PublishStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetObject()); + } + } + properties = dictionary; + continue; + } + } + return new RelationshipProperties(originObjectId.Value, objectId.Value, Optional.ToNullable(objectVersion), Optional.ToNullable(publishStatus), Optional.ToDictionary(properties), @namespace, fromTableId.Value, fromTableName, toTableId.Value, toTableName, Optional.ToNullable(relationshipType), columnRelationshipInformations); + } + + internal partial class RelationshipPropertiesConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, RelationshipProperties model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override RelationshipProperties Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeRelationshipProperties(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipProperties.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipProperties.cs new file mode 100644 index 000000000000..2ca2a608e8bc --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipProperties.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Database properties. + public partial class RelationshipProperties : MDEntityProperties + { + /// Initializes a new instance of RelationshipProperties. + /// Namespace. + /// From Table Name. + /// To Table Name. + /// List of Column Relationships. + /// , , or is null. + public RelationshipProperties(BaseNamespace @namespace, string fromTableName, string toTableName, IEnumerable columnRelationshipInformations) + { + Argument.AssertNotNull(@namespace, nameof(@namespace)); + Argument.AssertNotNull(fromTableName, nameof(fromTableName)); + Argument.AssertNotNull(toTableName, nameof(toTableName)); + Argument.AssertNotNull(columnRelationshipInformations, nameof(columnRelationshipInformations)); + + Namespace = @namespace; + FromTableName = fromTableName; + ToTableName = toTableName; + ColumnRelationshipInformations = columnRelationshipInformations.ToList(); + } + + /// Initializes a new instance of RelationshipProperties. + /// Entity object id maintained by the caller. + /// Entity object id maintained by SyMS. + /// Entity object version maintained by SyMS. + /// Publish status. + /// Property bag. + /// Namespace. + /// From Table Id. + /// From Table Name. + /// To Table Id. + /// To Table Name. + /// Relation Type. + /// List of Column Relationships. + internal RelationshipProperties(string originObjectId, string objectId, long? objectVersion, PublishStatus? publishStatus, IDictionary properties, BaseNamespace @namespace, string fromTableId, string fromTableName, string toTableId, string toTableName, RelationshipType? relationshipType, IList columnRelationshipInformations) : base(originObjectId, objectId, objectVersion, publishStatus, properties) + { + Namespace = @namespace; + FromTableId = fromTableId; + FromTableName = fromTableName; + ToTableId = toTableId; + ToTableName = toTableName; + RelationshipType = relationshipType; + ColumnRelationshipInformations = columnRelationshipInformations; + } + + /// Namespace. + public BaseNamespace Namespace { get; set; } + /// From Table Id. + public string FromTableId { get; } + /// From Table Name. + public string FromTableName { get; set; } + /// To Table Id. + public string ToTableId { get; } + /// To Table Name. + public string ToTableName { get; set; } + /// Relation Type. + public RelationshipType? RelationshipType { get; set; } + /// List of Column Relationships. + public IList ColumnRelationshipInformations { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipType.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipType.Serialization.cs new file mode 100644 index 000000000000..430ddeaa911a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipType.Serialization.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + internal static partial class RelationshipTypeExtensions + { + public static string ToSerialString(this RelationshipType value) => value switch + { + RelationshipType.Onetoone => "ONETOONE", + RelationshipType.Onetomany => "ONETOMANY", + RelationshipType.Manytoone => "MANYTOONE", + RelationshipType.Manytomany => "MANYTOMANY", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown RelationshipType value.") + }; + + public static RelationshipType ToRelationshipType(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "ONETOONE")) return RelationshipType.Onetoone; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "ONETOMANY")) return RelationshipType.Onetomany; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "MANYTOONE")) return RelationshipType.Manytoone; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "MANYTOMANY")) return RelationshipType.Manytomany; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown RelationshipType value."); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipType.cs new file mode 100644 index 000000000000..af4681e56cec --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipType.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Relation Type. + public enum RelationshipType + { + /// ONETOONE. + Onetoone, + /// ONETOMANY. + Onetomany, + /// MANYTOONE. + Manytoone, + /// MANYTOMANY. + Manytomany + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RestServiceLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RestServiceLinkedService.Serialization.cs index d2db8ba08a23..fc3d6b5e0647 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RestServiceLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RestServiceLinkedService.Serialization.cs @@ -113,6 +113,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("encryptedCredential"u8); writer.WriteObjectValue(EncryptedCredential); } + if (Optional.IsDefined(Credential)) + { + writer.WritePropertyName("credential"u8); + writer.WriteObjectValue(Credential); + } if (Optional.IsDefined(ClientId)) { writer.WritePropertyName("clientId"u8); @@ -170,6 +175,7 @@ internal static RestServiceLinkedService DeserializeRestServiceLinkedService(Jso Optional azureCloudType = default; Optional aadResourceId = default; Optional encryptedCredential = default; + Optional credential = default; Optional clientId = default; Optional clientSecret = default; Optional tokenEndpoint = default; @@ -342,6 +348,15 @@ internal static RestServiceLinkedService DeserializeRestServiceLinkedService(Jso encryptedCredential = property0.Value.GetObject(); continue; } + if (property0.NameEquals("credential"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + credential = CredentialReference.DeserializeCredentialReference(property0.Value); + continue; + } if (property0.NameEquals("clientId"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -393,7 +408,7 @@ internal static RestServiceLinkedService DeserializeRestServiceLinkedService(Jso additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new RestServiceLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, url, enableServerCertificateValidation.Value, authenticationType, userName.Value, password.Value, authHeaders.Value, servicePrincipalId.Value, servicePrincipalKey.Value, tenant.Value, azureCloudType.Value, aadResourceId.Value, encryptedCredential.Value, clientId.Value, clientSecret.Value, tokenEndpoint.Value, resource.Value, scope.Value); + return new RestServiceLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, url, enableServerCertificateValidation.Value, authenticationType, userName.Value, password.Value, authHeaders.Value, servicePrincipalId.Value, servicePrincipalKey.Value, tenant.Value, azureCloudType.Value, aadResourceId.Value, encryptedCredential.Value, credential.Value, clientId.Value, clientSecret.Value, tokenEndpoint.Value, resource.Value, scope.Value); } internal partial class RestServiceLinkedServiceConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RestServiceLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RestServiceLinkedService.cs index 1a70cb3ab00b..6ae4d343b03d 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RestServiceLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RestServiceLinkedService.cs @@ -54,6 +54,7 @@ public RestServiceLinkedService(object url, RestServiceAuthenticationType authen /// Indicates the azure cloud type of the service principle auth. Allowed values are AzurePublic, AzureChina, AzureUsGovernment, AzureGermany. Default value is the data factory regions’ cloud type. Type: string (or Expression with resultType string). /// The resource you are requesting authorization to use. /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). + /// The credential reference containing authentication information. /// The client ID associated with your application. Type: string (or Expression with resultType string). /// /// The client secret associated with your application. @@ -63,7 +64,7 @@ public RestServiceLinkedService(object url, RestServiceAuthenticationType authen /// The token endpoint of the authorization server to acquire access token. Type: string (or Expression with resultType string). /// The target service or resource to which the access will be requested. Type: string (or Expression with resultType string). /// The scope of the access required. It describes what kind of access will be requested. Type: string (or Expression with resultType string). - internal RestServiceLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object url, object enableServerCertificateValidation, RestServiceAuthenticationType authenticationType, object userName, SecretBase password, object authHeaders, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object azureCloudType, object aadResourceId, object encryptedCredential, object clientId, SecretBase clientSecret, object tokenEndpoint, object resource, object scope) : base(type, connectVia, description, parameters, annotations, additionalProperties) + internal RestServiceLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object url, object enableServerCertificateValidation, RestServiceAuthenticationType authenticationType, object userName, SecretBase password, object authHeaders, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object azureCloudType, object aadResourceId, object encryptedCredential, CredentialReference credential, object clientId, SecretBase clientSecret, object tokenEndpoint, object resource, object scope) : base(type, connectVia, description, parameters, annotations, additionalProperties) { Url = url; EnableServerCertificateValidation = enableServerCertificateValidation; @@ -77,6 +78,7 @@ internal RestServiceLinkedService(string type, IntegrationRuntimeReference conne AzureCloudType = azureCloudType; AadResourceId = aadResourceId; EncryptedCredential = encryptedCredential; + Credential = credential; ClientId = clientId; ClientSecret = clientSecret; TokenEndpoint = tokenEndpoint; @@ -117,6 +119,8 @@ internal RestServiceLinkedService(string type, IntegrationRuntimeReference conne public object AadResourceId { get; set; } /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). public object EncryptedCredential { get; set; } + /// The credential reference containing authentication information. + public CredentialReference Credential { get; set; } /// The client ID associated with your application. Type: string (or Expression with resultType string). public object ClientId { get; set; } /// diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookError.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookError.Serialization.cs new file mode 100644 index 000000000000..165345684133 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookError.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(RunNotebookErrorConverter))] + public partial class RunNotebookError + { + internal static RunNotebookError DeserializeRunNotebookError(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional ename = default; + Optional evalue = default; + Optional> traceback = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ename"u8)) + { + ename = property.Value.GetString(); + continue; + } + if (property.NameEquals("evalue"u8)) + { + evalue = property.Value.GetString(); + continue; + } + if (property.NameEquals("traceback"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + traceback = array; + continue; + } + } + return new RunNotebookError(ename.Value, evalue.Value, Optional.ToList(traceback)); + } + + internal partial class RunNotebookErrorConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, RunNotebookError model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override RunNotebookError Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeRunNotebookError(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookError.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookError.cs new file mode 100644 index 000000000000..78e342a22c2e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookError.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Run notebook error. + public partial class RunNotebookError + { + /// Initializes a new instance of RunNotebookError. + internal RunNotebookError() + { + Traceback = new ChangeTrackingList(); + } + + /// Initializes a new instance of RunNotebookError. + /// Error name. + /// Error message. + /// Error trace. + internal RunNotebookError(string ename, string evalue, IReadOnlyList traceback) + { + Ename = ename; + Evalue = evalue; + Traceback = traceback; + } + + /// Error name. + public string Ename { get; } + /// Error message. + public string Evalue { get; } + /// Error trace. + public IReadOnlyList Traceback { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookParameter.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookParameter.Serialization.cs new file mode 100644 index 000000000000..2009c1971522 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookParameter.Serialization.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(RunNotebookParameterConverter))] + public partial class RunNotebookParameter : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteObjectValue(Value); + } + writer.WriteEndObject(); + } + + internal static RunNotebookParameter DeserializeRunNotebookParameter(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional type = default; + Optional value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + value = property.Value.GetObject(); + continue; + } + } + return new RunNotebookParameter(type.Value, value.Value); + } + + internal partial class RunNotebookParameterConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, RunNotebookParameter model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override RunNotebookParameter Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeRunNotebookParameter(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookParameter.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookParameter.cs new file mode 100644 index 000000000000..ff54ac3783d5 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookParameter.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Run notebook parameter. + public partial class RunNotebookParameter + { + /// Initializes a new instance of RunNotebookParameter. + public RunNotebookParameter() + { + } + + /// Initializes a new instance of RunNotebookParameter. + /// Parameter type. + /// Parameter value. + internal RunNotebookParameter(string type, object value) + { + Type = type; + Value = value; + } + + /// Parameter type. + public string Type { get; set; } + /// Parameter value. + public object Value { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookRequest.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookRequest.Serialization.cs new file mode 100644 index 000000000000..ff316c0847b4 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookRequest.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(RunNotebookRequestConverter))] + public partial class RunNotebookRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Notebook)) + { + writer.WritePropertyName("notebook"u8); + writer.WriteStringValue(Notebook); + } + if (Optional.IsDefined(SparkPool)) + { + writer.WritePropertyName("sparkPool"u8); + writer.WriteStringValue(SparkPool); + } + if (Optional.IsDefined(SessionOptions)) + { + writer.WritePropertyName("sessionOptions"u8); + writer.WriteObjectValue(SessionOptions); + } + if (Optional.IsDefined(HonorSessionTimeToLive)) + { + writer.WritePropertyName("honorSessionTimeToLive"u8); + writer.WriteBooleanValue(HonorSessionTimeToLive.Value); + } + if (Optional.IsCollectionDefined(Parameters)) + { + writer.WritePropertyName("parameters"u8); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal partial class RunNotebookRequestConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, RunNotebookRequest model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override RunNotebookRequest Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookRequest.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookRequest.cs new file mode 100644 index 000000000000..f562769947ac --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookRequest.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Run notebook request. + public partial class RunNotebookRequest + { + /// Initializes a new instance of RunNotebookRequest. + public RunNotebookRequest() + { + Parameters = new ChangeTrackingDictionary(); + } + + /// Notebook name. + public string Notebook { get; set; } + /// SparkPool name. + public string SparkPool { get; set; } + /// Session properties. + public RunNotebookSparkSessionOptions SessionOptions { get; set; } + /// Whether session should run till time to live after run completes. + public bool? HonorSessionTimeToLive { get; set; } + /// Run notebook parameters. + public IDictionary Parameters { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookResponse.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookResponse.Serialization.cs new file mode 100644 index 000000000000..d4b7afcccd55 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookResponse.Serialization.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(RunNotebookResponseConverter))] + public partial class RunNotebookResponse + { + internal static RunNotebookResponse DeserializeRunNotebookResponse(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional message = default; + Optional result = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("result"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + result = RunNotebookResult.DeserializeRunNotebookResult(property.Value); + continue; + } + } + return new RunNotebookResponse(message.Value, result.Value); + } + + internal partial class RunNotebookResponseConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, RunNotebookResponse model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override RunNotebookResponse Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeRunNotebookResponse(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookResponse.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookResponse.cs new file mode 100644 index 000000000000..92fcc61afd8c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookResponse.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Run notebook response. + public partial class RunNotebookResponse + { + /// Initializes a new instance of RunNotebookResponse. + internal RunNotebookResponse() + { + } + + /// Initializes a new instance of RunNotebookResponse. + /// Response message. + /// Result of run notebook. + internal RunNotebookResponse(string message, RunNotebookResult result) + { + Message = message; + Result = result; + } + + /// Response message. + public string Message { get; } + /// Result of run notebook. + public RunNotebookResult Result { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookResult.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookResult.Serialization.cs new file mode 100644 index 000000000000..ca7d4e63349e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookResult.Serialization.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(RunNotebookResultConverter))] + public partial class RunNotebookResult + { + internal static RunNotebookResult DeserializeRunNotebookResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional runId = default; + Optional runStatus = default; + Optional lastCheckedOn = default; + Optional sessionId = default; + Optional sparkPool = default; + Optional sessionDetail = default; + Optional exitValue = default; + Optional error = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("runId"u8)) + { + runId = property.Value.GetString(); + continue; + } + if (property.NameEquals("runStatus"u8)) + { + runStatus = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastCheckedOn"u8)) + { + lastCheckedOn = property.Value.GetString(); + continue; + } + if (property.NameEquals("sessionId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sessionId = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("sparkPool"u8)) + { + sparkPool = property.Value.GetString(); + continue; + } + if (property.NameEquals("sessionDetail"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sessionDetail = property.Value.GetObject(); + continue; + } + if (property.NameEquals("exitValue"u8)) + { + exitValue = property.Value.GetString(); + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = RunNotebookError.DeserializeRunNotebookError(property.Value); + continue; + } + } + return new RunNotebookResult(runId.Value, runStatus.Value, lastCheckedOn.Value, Optional.ToNullable(sessionId), sparkPool.Value, sessionDetail.Value, exitValue.Value, error.Value); + } + + internal partial class RunNotebookResultConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, RunNotebookResult model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override RunNotebookResult Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeRunNotebookResult(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookResult.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookResult.cs new file mode 100644 index 000000000000..15d3bcdb15ab --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookResult.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Result of run notebook. + public partial class RunNotebookResult + { + /// Initializes a new instance of RunNotebookResult. + internal RunNotebookResult() + { + } + + /// Initializes a new instance of RunNotebookResult. + /// Run id. + /// Status of the run notebook. + /// Timestamp of last update. + /// Livy session id. + /// SparkPool name. + /// Run notebook session details. + /// Output of exit command. + /// Run notebook error. + internal RunNotebookResult(string runId, string runStatus, string lastCheckedOn, long? sessionId, string sparkPool, object sessionDetail, string exitValue, RunNotebookError error) + { + RunId = runId; + RunStatus = runStatus; + LastCheckedOn = lastCheckedOn; + SessionId = sessionId; + SparkPool = sparkPool; + SessionDetail = sessionDetail; + ExitValue = exitValue; + Error = error; + } + + /// Run id. + public string RunId { get; } + /// Status of the run notebook. + public string RunStatus { get; } + /// Timestamp of last update. + public string LastCheckedOn { get; } + /// Livy session id. + public long? SessionId { get; } + /// SparkPool name. + public string SparkPool { get; } + /// Run notebook session details. + public object SessionDetail { get; } + /// Output of exit command. + public string ExitValue { get; } + /// Run notebook error. + public RunNotebookError Error { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSnapshot.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSnapshot.Serialization.cs new file mode 100644 index 000000000000..c43071812cba --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSnapshot.Serialization.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(RunNotebookSnapshotConverter))] + public partial class RunNotebookSnapshot + { + internal static RunNotebookSnapshot DeserializeRunNotebookSnapshot(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional exitValue = default; + string id = default; + string notebook = default; + Optional sessionOptions = default; + Optional honorSessionTimeToLive = default; + Optional sessionId = default; + Optional sparkPool = default; + Optional> parameters = default; + Optional notebookContent = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("exitValue"u8)) + { + exitValue = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("notebook"u8)) + { + notebook = property.Value.GetString(); + continue; + } + if (property.NameEquals("sessionOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sessionOptions = RunNotebookSparkSessionOptions.DeserializeRunNotebookSparkSessionOptions(property.Value); + continue; + } + if (property.NameEquals("honorSessionTimeToLive"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + honorSessionTimeToLive = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("sessionId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sessionId = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("sparkPool"u8)) + { + sparkPool = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, RunNotebookParameter.DeserializeRunNotebookParameter(property0.Value)); + } + parameters = dictionary; + continue; + } + if (property.NameEquals("notebookContent"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + notebookContent = NotebookResource.DeserializeNotebookResource(property.Value); + continue; + } + } + return new RunNotebookSnapshot(exitValue.Value, id, notebook, sessionOptions.Value, Optional.ToNullable(honorSessionTimeToLive), Optional.ToNullable(sessionId), sparkPool.Value, Optional.ToDictionary(parameters), notebookContent.Value); + } + + internal partial class RunNotebookSnapshotConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, RunNotebookSnapshot model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override RunNotebookSnapshot Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeRunNotebookSnapshot(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSnapshot.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSnapshot.cs new file mode 100644 index 000000000000..2434f587b6bd --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSnapshot.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Run notebook snapshot. + public partial class RunNotebookSnapshot + { + /// Initializes a new instance of RunNotebookSnapshot. + /// Run notebook runId. + /// Notebook name. + /// or is null. + internal RunNotebookSnapshot(string id, string notebook) + { + Argument.AssertNotNull(id, nameof(id)); + Argument.AssertNotNull(notebook, nameof(notebook)); + + Id = id; + Notebook = notebook; + Parameters = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of RunNotebookSnapshot. + /// Output of exit command. + /// Run notebook runId. + /// Notebook name. + /// Session properties. + /// Whether session should run till time to live after run completes. + /// Livy session id. + /// SparkPool name. + /// Run notebook parameters. + /// Notebook resource type. + internal RunNotebookSnapshot(string exitValue, string id, string notebook, RunNotebookSparkSessionOptions sessionOptions, bool? honorSessionTimeToLive, long? sessionId, string sparkPool, IReadOnlyDictionary parameters, NotebookResource notebookContent) + { + ExitValue = exitValue; + Id = id; + Notebook = notebook; + SessionOptions = sessionOptions; + HonorSessionTimeToLive = honorSessionTimeToLive; + SessionId = sessionId; + SparkPool = sparkPool; + Parameters = parameters; + NotebookContent = notebookContent; + } + + /// Output of exit command. + public string ExitValue { get; } + /// Run notebook runId. + public string Id { get; } + /// Notebook name. + public string Notebook { get; } + /// Session properties. + public RunNotebookSparkSessionOptions SessionOptions { get; } + /// Whether session should run till time to live after run completes. + public bool? HonorSessionTimeToLive { get; } + /// Livy session id. + public long? SessionId { get; } + /// SparkPool name. + public string SparkPool { get; } + /// Run notebook parameters. + public IReadOnlyDictionary Parameters { get; } + /// Notebook resource type. + public NotebookResource NotebookContent { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSnapshotResponse.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSnapshotResponse.Serialization.cs new file mode 100644 index 000000000000..5c2d21c77b97 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSnapshotResponse.Serialization.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(RunNotebookSnapshotResponseConverter))] + public partial class RunNotebookSnapshotResponse + { + internal static RunNotebookSnapshotResponse DeserializeRunNotebookSnapshotResponse(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional message = default; + Optional result = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("result"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + result = RunNotebookSnapshotResult.DeserializeRunNotebookSnapshotResult(property.Value); + continue; + } + } + return new RunNotebookSnapshotResponse(message.Value, result.Value); + } + + internal partial class RunNotebookSnapshotResponseConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, RunNotebookSnapshotResponse model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override RunNotebookSnapshotResponse Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeRunNotebookSnapshotResponse(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSnapshotResponse.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSnapshotResponse.cs new file mode 100644 index 000000000000..78f1a40c00ca --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSnapshotResponse.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Run notebook snapshot response. + public partial class RunNotebookSnapshotResponse + { + /// Initializes a new instance of RunNotebookSnapshotResponse. + internal RunNotebookSnapshotResponse() + { + } + + /// Initializes a new instance of RunNotebookSnapshotResponse. + /// Response message. + /// Run notebook snapshot result. + internal RunNotebookSnapshotResponse(string message, RunNotebookSnapshotResult result) + { + Message = message; + Result = result; + } + + /// Response message. + public string Message { get; } + /// Run notebook snapshot result. + public RunNotebookSnapshotResult Result { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSnapshotResult.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSnapshotResult.Serialization.cs new file mode 100644 index 000000000000..183d3f66f1c3 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSnapshotResult.Serialization.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(RunNotebookSnapshotResultConverter))] + public partial class RunNotebookSnapshotResult + { + internal static RunNotebookSnapshotResult DeserializeRunNotebookSnapshotResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RunNotebookSnapshot snapshot = default; + Optional error = default; + string runId = default; + string runStatus = default; + Optional lastCheckedOn = default; + Optional sessionId = default; + Optional sparkPool = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("snapshot"u8)) + { + snapshot = RunNotebookSnapshot.DeserializeRunNotebookSnapshot(property.Value); + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = RunNotebookError.DeserializeRunNotebookError(property.Value); + continue; + } + if (property.NameEquals("runId"u8)) + { + runId = property.Value.GetString(); + continue; + } + if (property.NameEquals("runStatus"u8)) + { + runStatus = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastCheckedOn"u8)) + { + lastCheckedOn = property.Value.GetString(); + continue; + } + if (property.NameEquals("sessionId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sessionId = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("sparkPool"u8)) + { + sparkPool = property.Value.GetString(); + continue; + } + } + return new RunNotebookSnapshotResult(snapshot, error.Value, runId, runStatus, lastCheckedOn.Value, Optional.ToNullable(sessionId), sparkPool.Value); + } + + internal partial class RunNotebookSnapshotResultConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, RunNotebookSnapshotResult model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override RunNotebookSnapshotResult Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeRunNotebookSnapshotResult(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSnapshotResult.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSnapshotResult.cs new file mode 100644 index 000000000000..7e9ec0e6a5be --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSnapshotResult.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Run notebook snapshot result. + public partial class RunNotebookSnapshotResult + { + /// Initializes a new instance of RunNotebookSnapshotResult. + /// Run notebook snapshot. + /// Run id. + /// Status of the run notebook. + /// , or is null. + internal RunNotebookSnapshotResult(RunNotebookSnapshot snapshot, string runId, string runStatus) + { + Argument.AssertNotNull(snapshot, nameof(snapshot)); + Argument.AssertNotNull(runId, nameof(runId)); + Argument.AssertNotNull(runStatus, nameof(runStatus)); + + Snapshot = snapshot; + RunId = runId; + RunStatus = runStatus; + } + + /// Initializes a new instance of RunNotebookSnapshotResult. + /// Run notebook snapshot. + /// Run notebook error. + /// Run id. + /// Status of the run notebook. + /// Timestamp of last update. + /// Livy session id. + /// SparkPool name. + internal RunNotebookSnapshotResult(RunNotebookSnapshot snapshot, RunNotebookError error, string runId, string runStatus, string lastCheckedOn, long? sessionId, string sparkPool) + { + Snapshot = snapshot; + Error = error; + RunId = runId; + RunStatus = runStatus; + LastCheckedOn = lastCheckedOn; + SessionId = sessionId; + SparkPool = sparkPool; + } + + /// Run notebook snapshot. + public RunNotebookSnapshot Snapshot { get; } + /// Run notebook error. + public RunNotebookError Error { get; } + /// Run id. + public string RunId { get; } + /// Status of the run notebook. + public string RunStatus { get; } + /// Timestamp of last update. + public string LastCheckedOn { get; } + /// Livy session id. + public long? SessionId { get; } + /// SparkPool name. + public string SparkPool { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSparkSessionOptions.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSparkSessionOptions.Serialization.cs new file mode 100644 index 000000000000..032579da9096 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSparkSessionOptions.Serialization.cs @@ -0,0 +1,347 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(RunNotebookSparkSessionOptionsConverter))] + public partial class RunNotebookSparkSessionOptions : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + } + if (Optional.IsDefined(ProxyUser)) + { + writer.WritePropertyName("proxyUser"u8); + writer.WriteStringValue(ProxyUser); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsCollectionDefined(Jars)) + { + writer.WritePropertyName("jars"u8); + writer.WriteStartArray(); + foreach (var item in Jars) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(PythonFiles)) + { + writer.WritePropertyName("pyFiles"u8); + writer.WriteStartArray(); + foreach (var item in PythonFiles) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Files)) + { + writer.WritePropertyName("files"u8); + writer.WriteStartArray(); + foreach (var item in Files) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Archives)) + { + writer.WritePropertyName("archives"u8); + writer.WriteStartArray(); + foreach (var item in Archives) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Queue)) + { + writer.WritePropertyName("queue"u8); + writer.WriteObjectValue(Queue); + } + if (Optional.IsCollectionDefined(Configuration)) + { + writer.WritePropertyName("conf"u8); + writer.WriteStartObject(); + foreach (var item in Configuration) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(DriverMemory)) + { + writer.WritePropertyName("driverMemory"u8); + writer.WriteStringValue(DriverMemory); + } + if (Optional.IsDefined(DriverCores)) + { + writer.WritePropertyName("driverCores"u8); + writer.WriteNumberValue(DriverCores.Value); + } + if (Optional.IsDefined(ExecutorMemory)) + { + writer.WritePropertyName("executorMemory"u8); + writer.WriteStringValue(ExecutorMemory); + } + if (Optional.IsDefined(ExecutorCores)) + { + writer.WritePropertyName("executorCores"u8); + writer.WriteNumberValue(ExecutorCores.Value); + } + if (Optional.IsDefined(ExecutorCount)) + { + writer.WritePropertyName("numExecutors"u8); + writer.WriteNumberValue(ExecutorCount.Value); + } + if (Optional.IsDefined(IsQueueable)) + { + writer.WritePropertyName("isQueueable"u8); + writer.WriteBooleanValue(IsQueueable.Value); + } + if (Optional.IsDefined(HeartbeatTimeoutInSecond)) + { + writer.WritePropertyName("heartbeatTimeoutInSecond"u8); + writer.WriteNumberValue(HeartbeatTimeoutInSecond.Value); + } + writer.WriteEndObject(); + } + + internal static RunNotebookSparkSessionOptions DeserializeRunNotebookSparkSessionOptions(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> tags = default; + Optional kind = default; + Optional proxyUser = default; + Optional name = default; + Optional> jars = default; + Optional> pyFiles = default; + Optional> files = default; + Optional> archives = default; + Optional queue = default; + Optional> conf = default; + Optional driverMemory = default; + Optional driverCores = default; + Optional executorMemory = default; + Optional executorCores = default; + Optional numExecutors = default; + Optional isQueueable = default; + Optional heartbeatTimeoutInSecond = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("kind"u8)) + { + kind = property.Value.GetString(); + continue; + } + if (property.NameEquals("proxyUser"u8)) + { + proxyUser = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("jars"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + jars = array; + continue; + } + if (property.NameEquals("pyFiles"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + pyFiles = array; + continue; + } + if (property.NameEquals("files"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + files = array; + continue; + } + if (property.NameEquals("archives"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + archives = array; + continue; + } + if (property.NameEquals("queue"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + queue = property.Value.GetObject(); + continue; + } + if (property.NameEquals("conf"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + conf = dictionary; + continue; + } + if (property.NameEquals("driverMemory"u8)) + { + driverMemory = property.Value.GetString(); + continue; + } + if (property.NameEquals("driverCores"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + driverCores = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("executorMemory"u8)) + { + executorMemory = property.Value.GetString(); + continue; + } + if (property.NameEquals("executorCores"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + executorCores = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("numExecutors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + numExecutors = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("isQueueable"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isQueueable = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("heartbeatTimeoutInSecond"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + heartbeatTimeoutInSecond = property.Value.GetInt32(); + continue; + } + } + return new RunNotebookSparkSessionOptions(Optional.ToDictionary(tags), kind.Value, proxyUser.Value, name.Value, Optional.ToList(jars), Optional.ToList(pyFiles), Optional.ToList(files), Optional.ToList(archives), queue.Value, Optional.ToDictionary(conf), driverMemory.Value, Optional.ToNullable(driverCores), executorMemory.Value, Optional.ToNullable(executorCores), Optional.ToNullable(numExecutors), Optional.ToNullable(isQueueable), Optional.ToNullable(heartbeatTimeoutInSecond)); + } + + internal partial class RunNotebookSparkSessionOptionsConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, RunNotebookSparkSessionOptions model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override RunNotebookSparkSessionOptions Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeRunNotebookSparkSessionOptions(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSparkSessionOptions.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSparkSessionOptions.cs new file mode 100644 index 000000000000..bdb091d632ee --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RunNotebookSparkSessionOptions.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// The RunNotebookSparkSessionOptions. + public partial class RunNotebookSparkSessionOptions + { + /// Initializes a new instance of RunNotebookSparkSessionOptions. + public RunNotebookSparkSessionOptions() + { + Tags = new ChangeTrackingDictionary(); + Jars = new ChangeTrackingList(); + PythonFiles = new ChangeTrackingList(); + Files = new ChangeTrackingList(); + Archives = new ChangeTrackingList(); + Configuration = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of RunNotebookSparkSessionOptions. + /// Dictionary of <string>. + /// The session kind. + /// User to impersonate when starting the session. + /// The name of this session. + /// jars to be used in this session. + /// Python files to be used in this session. + /// files to be used in this session. + /// Archives to be used in this session. + /// The name of the YARN queue to which submitted. + /// Spark configuration properties. + /// Amount of memory to use for the driver process. + /// Number of cores to use for the driver process. + /// Amount of memory to use per executor process. + /// Number of cores to use for each executor. + /// Number of executors to launch for this session. + /// Whether to queue session creation if Spark pool doesn't have enough capacity. Default value is true in notebook runs API. + /// Timeout in second to which session be orphaned. + internal RunNotebookSparkSessionOptions(IDictionary tags, string kind, string proxyUser, string name, IList jars, IList pythonFiles, IList files, IList archives, object queue, IDictionary configuration, string driverMemory, int? driverCores, string executorMemory, int? executorCores, int? executorCount, bool? isQueueable, int? heartbeatTimeoutInSecond) + { + Tags = tags; + Kind = kind; + ProxyUser = proxyUser; + Name = name; + Jars = jars; + PythonFiles = pythonFiles; + Files = files; + Archives = archives; + Queue = queue; + Configuration = configuration; + DriverMemory = driverMemory; + DriverCores = driverCores; + ExecutorMemory = executorMemory; + ExecutorCores = executorCores; + ExecutorCount = executorCount; + IsQueueable = isQueueable; + HeartbeatTimeoutInSecond = heartbeatTimeoutInSecond; + } + + /// Dictionary of <string>. + public IDictionary Tags { get; } + /// The session kind. + public string Kind { get; set; } + /// User to impersonate when starting the session. + public string ProxyUser { get; set; } + /// The name of this session. + public string Name { get; set; } + /// jars to be used in this session. + public IList Jars { get; } + /// Python files to be used in this session. + public IList PythonFiles { get; } + /// files to be used in this session. + public IList Files { get; } + /// Archives to be used in this session. + public IList Archives { get; } + /// The name of the YARN queue to which submitted. + public object Queue { get; set; } + /// Spark configuration properties. + public IDictionary Configuration { get; } + /// Amount of memory to use for the driver process. + public string DriverMemory { get; set; } + /// Number of cores to use for the driver process. + public int? DriverCores { get; set; } + /// Amount of memory to use per executor process. + public string ExecutorMemory { get; set; } + /// Number of cores to use for each executor. + public int? ExecutorCores { get; set; } + /// Number of executors to launch for this session. + public int? ExecutorCount { get; set; } + /// Whether to queue session creation if Spark pool doesn't have enough capacity. Default value is true in notebook runs API. + public bool? IsQueueable { get; set; } + /// Timeout in second to which session be orphaned. + public int? HeartbeatTimeoutInSecond { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SASEntityType.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SASEntityType.Serialization.cs new file mode 100644 index 000000000000..c5aee3afc60d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SASEntityType.Serialization.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + internal static partial class SASEntityTypeExtensions + { + public static string ToSerialString(this SASEntityType value) => value switch + { + SASEntityType.Database => "DATABASE", + SASEntityType.Table => "TABLE", + SASEntityType.Schema => "SCHEMA", + SASEntityType.View => "VIEW", + SASEntityType.Function => "FUNCTION", + SASEntityType.Partitioninfo => "PARTITIONINFO", + SASEntityType.Relationship => "RELATIONSHIP", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SASEntityType value.") + }; + + public static SASEntityType ToSASEntityType(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "DATABASE")) return SASEntityType.Database; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "TABLE")) return SASEntityType.Table; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "SCHEMA")) return SASEntityType.Schema; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "VIEW")) return SASEntityType.View; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "FUNCTION")) return SASEntityType.Function; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "PARTITIONINFO")) return SASEntityType.Partitioninfo; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "RELATIONSHIP")) return SASEntityType.Relationship; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SASEntityType value."); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SASEntityType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SASEntityType.cs new file mode 100644 index 000000000000..ff8469d3430b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SASEntityType.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Artifact type. + public enum SASEntityType + { + /// DATABASE. + Database, + /// TABLE. + Table, + /// SCHEMA. + Schema, + /// VIEW. + View, + /// FUNCTION. + Function, + /// PARTITIONINFO. + Partitioninfo, + /// RELATIONSHIP. + Relationship + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceServiceCloudSource.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceServiceCloudSource.Serialization.cs index 33212f1cdad0..31d41fd9d690 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceServiceCloudSource.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceServiceCloudSource.Serialization.cs @@ -27,7 +27,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) if (Optional.IsDefined(ReadBehavior)) { writer.WritePropertyName("readBehavior"u8); - writer.WriteStringValue(ReadBehavior.Value.ToString()); + writer.WriteObjectValue(ReadBehavior); } if (Optional.IsDefined(AdditionalColumns)) { @@ -66,7 +66,7 @@ internal static SalesforceServiceCloudSource DeserializeSalesforceServiceCloudSo return null; } Optional query = default; - Optional readBehavior = default; + Optional readBehavior = default; Optional additionalColumns = default; string type = default; Optional sourceRetryCount = default; @@ -91,7 +91,7 @@ internal static SalesforceServiceCloudSource DeserializeSalesforceServiceCloudSo { continue; } - readBehavior = new SalesforceSourceReadBehavior(property.Value.GetString()); + readBehavior = property.Value.GetObject(); continue; } if (property.NameEquals("additionalColumns"u8)) @@ -138,7 +138,7 @@ internal static SalesforceServiceCloudSource DeserializeSalesforceServiceCloudSo additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new SalesforceServiceCloudSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, additionalProperties, query.Value, Optional.ToNullable(readBehavior), additionalColumns.Value); + return new SalesforceServiceCloudSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, additionalProperties, query.Value, readBehavior.Value, additionalColumns.Value); } internal partial class SalesforceServiceCloudSourceConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceServiceCloudSource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceServiceCloudSource.cs index e8bcbf997289..4da8e2ecc962 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceServiceCloudSource.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceServiceCloudSource.cs @@ -25,9 +25,9 @@ public SalesforceServiceCloudSource() /// The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer). /// Additional Properties. /// Database query. Type: string (or Expression with resultType string). - /// The read behavior for the operation. Default is Query. + /// The read behavior for the operation. Default is Query. Allowed values: Query/QueryAll. Type: string (or Expression with resultType string). /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). - internal SalesforceServiceCloudSource(string type, object sourceRetryCount, object sourceRetryWait, object maxConcurrentConnections, IDictionary additionalProperties, object query, SalesforceSourceReadBehavior? readBehavior, object additionalColumns) : base(type, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, additionalProperties) + internal SalesforceServiceCloudSource(string type, object sourceRetryCount, object sourceRetryWait, object maxConcurrentConnections, IDictionary additionalProperties, object query, object readBehavior, object additionalColumns) : base(type, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, additionalProperties) { Query = query; ReadBehavior = readBehavior; @@ -37,8 +37,8 @@ internal SalesforceServiceCloudSource(string type, object sourceRetryCount, obje /// Database query. Type: string (or Expression with resultType string). public object Query { get; set; } - /// The read behavior for the operation. Default is Query. - public SalesforceSourceReadBehavior? ReadBehavior { get; set; } + /// The read behavior for the operation. Default is Query. Allowed values: Query/QueryAll. Type: string (or Expression with resultType string). + public object ReadBehavior { get; set; } /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). public object AdditionalColumns { get; set; } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceSource.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceSource.Serialization.cs index 86c543bd2091..1ad22e611ece 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceSource.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceSource.Serialization.cs @@ -27,7 +27,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) if (Optional.IsDefined(ReadBehavior)) { writer.WritePropertyName("readBehavior"u8); - writer.WriteStringValue(ReadBehavior.Value.ToString()); + writer.WriteObjectValue(ReadBehavior); } if (Optional.IsDefined(QueryTimeout)) { @@ -71,7 +71,7 @@ internal static SalesforceSource DeserializeSalesforceSource(JsonElement element return null; } Optional query = default; - Optional readBehavior = default; + Optional readBehavior = default; Optional queryTimeout = default; Optional additionalColumns = default; string type = default; @@ -97,7 +97,7 @@ internal static SalesforceSource DeserializeSalesforceSource(JsonElement element { continue; } - readBehavior = new SalesforceSourceReadBehavior(property.Value.GetString()); + readBehavior = property.Value.GetObject(); continue; } if (property.NameEquals("queryTimeout"u8)) @@ -153,7 +153,7 @@ internal static SalesforceSource DeserializeSalesforceSource(JsonElement element additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new SalesforceSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value, Optional.ToNullable(readBehavior)); + return new SalesforceSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value, readBehavior.Value); } internal partial class SalesforceSourceConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceSource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceSource.cs index 2fa51092a4c6..774d3b23544e 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceSource.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceSource.cs @@ -27,8 +27,8 @@ public SalesforceSource() /// Query timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). /// Database query. Type: string (or Expression with resultType string). - /// The read behavior for the operation. Default is Query. - internal SalesforceSource(string type, object sourceRetryCount, object sourceRetryWait, object maxConcurrentConnections, IDictionary additionalProperties, object queryTimeout, object additionalColumns, object query, SalesforceSourceReadBehavior? readBehavior) : base(type, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, additionalProperties, queryTimeout, additionalColumns) + /// The read behavior for the operation. Default is Query. Allowed values: Query/QueryAll. Type: string (or Expression with resultType string). + internal SalesforceSource(string type, object sourceRetryCount, object sourceRetryWait, object maxConcurrentConnections, IDictionary additionalProperties, object queryTimeout, object additionalColumns, object query, object readBehavior) : base(type, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, additionalProperties, queryTimeout, additionalColumns) { Query = query; ReadBehavior = readBehavior; @@ -37,7 +37,7 @@ internal SalesforceSource(string type, object sourceRetryCount, object sourceRet /// Database query. Type: string (or Expression with resultType string). public object Query { get; set; } - /// The read behavior for the operation. Default is Query. - public SalesforceSourceReadBehavior? ReadBehavior { get; set; } + /// The read behavior for the operation. Default is Query. Allowed values: Query/QueryAll. Type: string (or Expression with resultType string). + public object ReadBehavior { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceSourceReadBehavior.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceSourceReadBehavior.cs index b841a4ea3870..3fb8044241cb 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceSourceReadBehavior.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SalesforceSourceReadBehavior.cs @@ -10,8 +10,8 @@ namespace Azure.Analytics.Synapse.Artifacts.Models { - /// The read behavior for the operation. Default is Query. - public readonly partial struct SalesforceSourceReadBehavior : IEquatable + /// The Salesforce read behavior for the operation. + internal readonly partial struct SalesforceSourceReadBehavior : IEquatable { private readonly string _value; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ScalarTypeInfo.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ScalarTypeInfo.Serialization.cs new file mode 100644 index 000000000000..058c2874ddea --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ScalarTypeInfo.Serialization.cs @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(ScalarTypeInfoConverter))] + public partial class ScalarTypeInfo : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(TypeFamily)) + { + writer.WritePropertyName("typeFamily"u8); + writer.WriteStringValue(TypeFamily); + } + writer.WritePropertyName("typeName"u8); + writer.WriteStringValue(TypeName); + if (Optional.IsDefined(IsTableType)) + { + writer.WritePropertyName("isTableType"u8); + writer.WriteBooleanValue(IsTableType.Value); + } + if (Optional.IsDefined(IsComplexType)) + { + writer.WritePropertyName("isComplexType"u8); + writer.WriteBooleanValue(IsComplexType.Value); + } + if (Optional.IsDefined(IsNullable)) + { + writer.WritePropertyName("isNullable"u8); + writer.WriteBooleanValue(IsNullable.Value); + } + if (Optional.IsDefined(Length)) + { + writer.WritePropertyName("length"u8); + writer.WriteNumberValue(Length.Value); + } + if (Optional.IsDefined(Precision)) + { + writer.WritePropertyName("precision"u8); + writer.WriteNumberValue(Precision.Value); + } + if (Optional.IsDefined(Scale)) + { + writer.WritePropertyName("scale"u8); + writer.WriteNumberValue(Scale.Value); + } + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static ScalarTypeInfo DeserializeScalarTypeInfo(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional typeFamily = default; + string typeName = default; + Optional isTableType = default; + Optional isComplexType = default; + Optional isNullable = default; + Optional length = default; + Optional precision = default; + Optional scale = default; + Optional> properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("typeFamily"u8)) + { + typeFamily = property.Value.GetString(); + continue; + } + if (property.NameEquals("typeName"u8)) + { + typeName = property.Value.GetString(); + continue; + } + if (property.NameEquals("isTableType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTableType = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isComplexType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isComplexType = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isNullable"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isNullable = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("length"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + length = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("precision"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + precision = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("scale"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scale = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetObject()); + } + } + properties = dictionary; + continue; + } + } + return new ScalarTypeInfo(typeFamily.Value, typeName, Optional.ToNullable(isTableType), Optional.ToNullable(isComplexType), Optional.ToNullable(isNullable), Optional.ToNullable(length), Optional.ToNullable(precision), Optional.ToNullable(scale), Optional.ToDictionary(properties)); + } + + internal partial class ScalarTypeInfoConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, ScalarTypeInfo model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override ScalarTypeInfo Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeScalarTypeInfo(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ScalarTypeInfo.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ScalarTypeInfo.cs new file mode 100644 index 000000000000..351c273b4f0c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ScalarTypeInfo.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Scalar type information. + public partial class ScalarTypeInfo : TypeInfo + { + /// Initializes a new instance of ScalarTypeInfo. + /// Type name. + /// is null. + public ScalarTypeInfo(string typeName) : base(typeName) + { + Argument.AssertNotNull(typeName, nameof(typeName)); + } + + /// Initializes a new instance of ScalarTypeInfo. + /// Type family. + /// Type name. + /// Is Table type. + /// Is Complex type. + /// Is Nullable. + /// Length. + /// Precision. + /// Scale. + /// Property bag. + internal ScalarTypeInfo(string typeFamily, string typeName, bool? isTableType, bool? isComplexType, bool? isNullable, int? length, int? precision, int? scale, IDictionary properties) : base(typeFamily, typeName, isTableType, isComplexType, isNullable, length, precision, scale, properties) + { + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaEntity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaEntity.Serialization.cs new file mode 100644 index 000000000000..c5c67a1243fc --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaEntity.Serialization.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(SchemaEntityConverter))] + public partial class SchemaEntity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToSerialString()); + writer.WriteEndObject(); + } + + internal static SchemaEntity DeserializeSchemaEntity(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SchemaProperties properties = default; + string name = default; + SASEntityType type = default; + Optional id = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + properties = SchemaProperties.DeserializeSchemaProperties(property.Value); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString().ToSASEntityType(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + } + return new SchemaEntity(name, type, id.Value, properties); + } + + internal partial class SchemaEntityConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, SchemaEntity model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override SchemaEntity Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeSchemaEntity(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaEntity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaEntity.cs new file mode 100644 index 000000000000..b57e336b0bda --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaEntity.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// schema entity. + public partial class SchemaEntity : MDEntity + { + /// Initializes a new instance of SchemaEntity. + /// Entity Name. + /// Artifact type. + /// Database properties. + /// or is null. + public SchemaEntity(string name, SASEntityType type, SchemaProperties properties) : base(name, type) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of SchemaEntity. + /// Entity Name. + /// Artifact type. + /// Entity Resource Id. + /// Database properties. + internal SchemaEntity(string name, SASEntityType type, string id, SchemaProperties properties) : base(name, type, id) + { + Properties = properties; + } + + /// Database properties. + public SchemaProperties Properties { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaProperties.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaProperties.Serialization.cs new file mode 100644 index 000000000000..1c0be484688c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaProperties.Serialization.cs @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(SchemaPropertiesConverter))] + public partial class SchemaProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("namespace"u8); + writer.WriteObjectValue(Namespace); + if (Optional.IsDefined(OriginObjectId)) + { + writer.WritePropertyName("originObjectId"u8); + writer.WriteStringValue(OriginObjectId); + } + if (Optional.IsDefined(PublishStatus)) + { + writer.WritePropertyName("publishStatus"u8); + writer.WriteStringValue(PublishStatus.Value.ToString()); + } + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static SchemaProperties DeserializeSchemaProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BaseNamespace @namespace = default; + Optional originObjectId = default; + Optional objectId = default; + Optional objectVersion = default; + Optional publishStatus = default; + Optional> properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("namespace"u8)) + { + @namespace = BaseNamespace.DeserializeBaseNamespace(property.Value); + continue; + } + if (property.NameEquals("originObjectId"u8)) + { + originObjectId = property.Value.GetString(); + continue; + } + if (property.NameEquals("objectId"u8)) + { + objectId = property.Value.GetString(); + continue; + } + if (property.NameEquals("objectVersion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + objectVersion = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("publishStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + publishStatus = new PublishStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetObject()); + } + } + properties = dictionary; + continue; + } + } + return new SchemaProperties(originObjectId.Value, objectId.Value, Optional.ToNullable(objectVersion), Optional.ToNullable(publishStatus), Optional.ToDictionary(properties), @namespace); + } + + internal partial class SchemaPropertiesConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, SchemaProperties model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override SchemaProperties Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeSchemaProperties(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaProperties.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaProperties.cs new file mode 100644 index 000000000000..d27fae0bb595 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaProperties.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Database properties. + public partial class SchemaProperties : MDEntityProperties + { + /// Initializes a new instance of SchemaProperties. + /// Namespace. + /// is null. + public SchemaProperties(BaseNamespace @namespace) + { + Argument.AssertNotNull(@namespace, nameof(@namespace)); + + Namespace = @namespace; + } + + /// Initializes a new instance of SchemaProperties. + /// Entity object id maintained by the caller. + /// Entity object id maintained by SyMS. + /// Entity object version maintained by SyMS. + /// Publish status. + /// Property bag. + /// Namespace. + internal SchemaProperties(string originObjectId, string objectId, long? objectVersion, PublishStatus? publishStatus, IDictionary properties, BaseNamespace @namespace) : base(originObjectId, objectId, objectVersion, publishStatus, properties) + { + Namespace = @namespace; + } + + /// Namespace. + public BaseNamespace Namespace { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ScriptActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ScriptActivity.Serialization.cs index ab18225c57e8..5f2e459ac7c2 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ScriptActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ScriptActivity.Serialization.cs @@ -38,6 +38,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -95,6 +105,8 @@ internal static ScriptActivity DeserializeScriptActivity(JsonElement element) string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; Optional> scripts = default; @@ -136,6 +148,24 @@ internal static ScriptActivity DeserializeScriptActivity(JsonElement element) description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -202,7 +232,7 @@ internal static ScriptActivity DeserializeScriptActivity(JsonElement element) additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new ScriptActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, Optional.ToList(scripts), logSettings.Value); + return new ScriptActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, Optional.ToList(scripts), logSettings.Value); } internal partial class ScriptActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ScriptActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ScriptActivity.cs index feafdb1e67b4..ef43906b292c 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ScriptActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ScriptActivity.cs @@ -29,6 +29,8 @@ public ScriptActivity(string name) : base(name) /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -36,7 +38,7 @@ public ScriptActivity(string name) : base(name) /// Activity policy. /// Array of script blocks. Type: array. /// Log settings of script activity. - internal ScriptActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, IList scripts, ScriptActivityTypePropertiesLogSettings logSettings) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + internal ScriptActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, IList scripts, ScriptActivityTypePropertiesLogSettings logSettings) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) { Scripts = scripts; LogSettings = logSettings; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SecureInputOutputPolicy.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SecureInputOutputPolicy.Serialization.cs new file mode 100644 index 000000000000..a539408ec280 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SecureInputOutputPolicy.Serialization.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(SecureInputOutputPolicyConverter))] + public partial class SecureInputOutputPolicy : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(SecureInput)) + { + writer.WritePropertyName("secureInput"u8); + writer.WriteBooleanValue(SecureInput.Value); + } + if (Optional.IsDefined(SecureOutput)) + { + writer.WritePropertyName("secureOutput"u8); + writer.WriteBooleanValue(SecureOutput.Value); + } + writer.WriteEndObject(); + } + + internal static SecureInputOutputPolicy DeserializeSecureInputOutputPolicy(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional secureInput = default; + Optional secureOutput = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("secureInput"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + secureInput = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("secureOutput"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + secureOutput = property.Value.GetBoolean(); + continue; + } + } + return new SecureInputOutputPolicy(Optional.ToNullable(secureInput), Optional.ToNullable(secureOutput)); + } + + internal partial class SecureInputOutputPolicyConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, SecureInputOutputPolicy model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override SecureInputOutputPolicy Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeSecureInputOutputPolicy(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SecureInputOutputPolicy.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SecureInputOutputPolicy.cs new file mode 100644 index 000000000000..d5057d1c9080 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SecureInputOutputPolicy.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Execution policy for an activity that supports secure input and output. + public partial class SecureInputOutputPolicy + { + /// Initializes a new instance of SecureInputOutputPolicy. + public SecureInputOutputPolicy() + { + } + + /// Initializes a new instance of SecureInputOutputPolicy. + /// When set to true, Input from activity is considered as secure and will not be logged to monitoring. + /// When set to true, Output from activity is considered as secure and will not be logged to monitoring. + internal SecureInputOutputPolicy(bool? secureInput, bool? secureOutput) + { + SecureInput = secureInput; + SecureOutput = secureOutput; + } + + /// When set to true, Input from activity is considered as secure and will not be logged to monitoring. + public bool? SecureInput { get; set; } + /// When set to true, Output from activity is considered as secure and will not be logged to monitoring. + public bool? SecureOutput { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SetVariableActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SetVariableActivity.Serialization.cs index 4113a6b625d9..e4878e775cfc 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SetVariableActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SetVariableActivity.Serialization.cs @@ -19,6 +19,11 @@ public partial class SetVariableActivity : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); + if (Optional.IsDefined(Policy)) + { + writer.WritePropertyName("policy"u8); + writer.WriteObjectValue(Policy); + } writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("type"u8); @@ -28,6 +33,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -60,6 +75,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("value"u8); writer.WriteObjectValue(Value); } + if (Optional.IsDefined(SetSystemVariable)) + { + writer.WritePropertyName("setSystemVariable"u8); + writer.WriteBooleanValue(SetSystemVariable.Value); + } writer.WriteEndObject(); foreach (var item in AdditionalProperties) { @@ -75,17 +95,30 @@ internal static SetVariableActivity DeserializeSetVariableActivity(JsonElement e { return null; } + Optional policy = default; string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; Optional variableName = default; Optional value = default; + Optional setSystemVariable = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("policy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policy = SecureInputOutputPolicy.DeserializeSecureInputOutputPolicy(property.Value); + continue; + } if (property.NameEquals("name"u8)) { name = property.Value.GetString(); @@ -101,6 +134,24 @@ internal static SetVariableActivity DeserializeSetVariableActivity(JsonElement e description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -152,13 +203,22 @@ internal static SetVariableActivity DeserializeSetVariableActivity(JsonElement e value = property0.Value.GetObject(); continue; } + if (property0.NameEquals("setSystemVariable"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + setSystemVariable = property0.Value.GetBoolean(); + continue; + } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new SetVariableActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, variableName.Value, value.Value); + return new SetVariableActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, policy.Value, variableName.Value, value.Value, Optional.ToNullable(setSystemVariable)); } internal partial class SetVariableActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SetVariableActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SetVariableActivity.cs index 77da657f7b4f..43cba4c50bf8 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SetVariableActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SetVariableActivity.cs @@ -28,21 +28,31 @@ public SetVariableActivity(string name) : base(name) /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. + /// Activity policy. /// Name of the variable whose value needs to be set. /// Value to be set. Could be a static value or Expression. - internal SetVariableActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, string variableName, object value) : base(name, type, description, dependsOn, userProperties, additionalProperties) + /// If set to true, it sets the pipeline run return value. + internal SetVariableActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, SecureInputOutputPolicy policy, string variableName, object value, bool? setSystemVariable) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) { + Policy = policy; VariableName = variableName; Value = value; + SetSystemVariable = setSystemVariable; Type = type ?? "SetVariable"; } + /// Activity policy. + public SecureInputOutputPolicy Policy { get; set; } /// Name of the variable whose value needs to be set. public string VariableName { get; set; } /// Value to be set. Could be a static value or Expression. public object Value { get; set; } + /// If set to true, it sets the pipeline run return value. + public bool? SetSystemVariable { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortOrder.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortOrder.Serialization.cs new file mode 100644 index 000000000000..06edb0d91b90 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortOrder.Serialization.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + internal static partial class SortOrderExtensions + { + public static string ToSerialString(this SortOrder value) => value switch + { + SortOrder.Desc => "DESC", + SortOrder.ASC => "ASC", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SortOrder value.") + }; + + public static SortOrder ToSortOrder(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "DESC")) return SortOrder.Desc; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "ASC")) return SortOrder.ASC; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SortOrder value."); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortOrder.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortOrder.cs new file mode 100644 index 000000000000..a8777c47725a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortOrder.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Sorting order. + public enum SortOrder + { + /// DESC. + Desc, + /// ASC. + ASC + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortingItem.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortingItem.Serialization.cs new file mode 100644 index 000000000000..cc50684e13b5 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortingItem.Serialization.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(SortingItemConverter))] + public partial class SortingItem : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("keyName"u8); + writer.WriteStringValue(KeyName); + writer.WritePropertyName("sortOrder"u8); + writer.WriteStringValue(SortOrder.ToSerialString()); + writer.WriteEndObject(); + } + + internal static SortingItem DeserializeSortingItem(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string keyName = default; + SortOrder sortOrder = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keyName"u8)) + { + keyName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sortOrder"u8)) + { + sortOrder = property.Value.GetString().ToSortOrder(); + continue; + } + } + return new SortingItem(keyName, sortOrder); + } + + internal partial class SortingItemConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, SortingItem model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override SortingItem Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeSortingItem(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortingItem.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortingItem.cs new file mode 100644 index 000000000000..35daf3fbd64b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortingItem.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Column sorting. + public partial class SortingItem + { + /// Initializes a new instance of SortingItem. + /// Name of column. + /// Sorting order. + /// is null. + public SortingItem(string keyName, SortOrder sortOrder) + { + Argument.AssertNotNull(keyName, nameof(keyName)); + + KeyName = keyName; + SortOrder = sortOrder; + } + + /// Name of column. + public string KeyName { get; set; } + /// Sorting order. + public SortOrder SortOrder { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlAlwaysEncryptedAkvAuthType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlAlwaysEncryptedAkvAuthType.cs new file mode 100644 index 000000000000..806d4dd6948b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlAlwaysEncryptedAkvAuthType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Sql always encrypted AKV authentication type. Type: string. + public readonly partial struct SqlAlwaysEncryptedAkvAuthType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SqlAlwaysEncryptedAkvAuthType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ServicePrincipalValue = "ServicePrincipal"; + private const string ManagedIdentityValue = "ManagedIdentity"; + private const string UserAssignedManagedIdentityValue = "UserAssignedManagedIdentity"; + + /// ServicePrincipal. + public static SqlAlwaysEncryptedAkvAuthType ServicePrincipal { get; } = new SqlAlwaysEncryptedAkvAuthType(ServicePrincipalValue); + /// ManagedIdentity. + public static SqlAlwaysEncryptedAkvAuthType ManagedIdentity { get; } = new SqlAlwaysEncryptedAkvAuthType(ManagedIdentityValue); + /// UserAssignedManagedIdentity. + public static SqlAlwaysEncryptedAkvAuthType UserAssignedManagedIdentity { get; } = new SqlAlwaysEncryptedAkvAuthType(UserAssignedManagedIdentityValue); + /// Determines if two values are the same. + public static bool operator ==(SqlAlwaysEncryptedAkvAuthType left, SqlAlwaysEncryptedAkvAuthType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SqlAlwaysEncryptedAkvAuthType left, SqlAlwaysEncryptedAkvAuthType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SqlAlwaysEncryptedAkvAuthType(string value) => new SqlAlwaysEncryptedAkvAuthType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SqlAlwaysEncryptedAkvAuthType other && Equals(other); + /// + public bool Equals(SqlAlwaysEncryptedAkvAuthType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlAlwaysEncryptedProperties.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlAlwaysEncryptedProperties.Serialization.cs new file mode 100644 index 000000000000..089c1f23db70 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlAlwaysEncryptedProperties.Serialization.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(SqlAlwaysEncryptedPropertiesConverter))] + public partial class SqlAlwaysEncryptedProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("alwaysEncryptedAkvAuthType"u8); + writer.WriteStringValue(AlwaysEncryptedAkvAuthType.ToString()); + if (Optional.IsDefined(ServicePrincipalId)) + { + writer.WritePropertyName("servicePrincipalId"u8); + writer.WriteObjectValue(ServicePrincipalId); + } + if (Optional.IsDefined(ServicePrincipalKey)) + { + writer.WritePropertyName("servicePrincipalKey"u8); + writer.WriteObjectValue(ServicePrincipalKey); + } + if (Optional.IsDefined(Credential)) + { + writer.WritePropertyName("credential"u8); + writer.WriteObjectValue(Credential); + } + writer.WriteEndObject(); + } + + internal static SqlAlwaysEncryptedProperties DeserializeSqlAlwaysEncryptedProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SqlAlwaysEncryptedAkvAuthType alwaysEncryptedAkvAuthType = default; + Optional servicePrincipalId = default; + Optional servicePrincipalKey = default; + Optional credential = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("alwaysEncryptedAkvAuthType"u8)) + { + alwaysEncryptedAkvAuthType = new SqlAlwaysEncryptedAkvAuthType(property.Value.GetString()); + continue; + } + if (property.NameEquals("servicePrincipalId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalId = property.Value.GetObject(); + continue; + } + if (property.NameEquals("servicePrincipalKey"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + servicePrincipalKey = SecretBase.DeserializeSecretBase(property.Value); + continue; + } + if (property.NameEquals("credential"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + credential = CredentialReference.DeserializeCredentialReference(property.Value); + continue; + } + } + return new SqlAlwaysEncryptedProperties(alwaysEncryptedAkvAuthType, servicePrincipalId.Value, servicePrincipalKey.Value, credential.Value); + } + + internal partial class SqlAlwaysEncryptedPropertiesConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, SqlAlwaysEncryptedProperties model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override SqlAlwaysEncryptedProperties Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeSqlAlwaysEncryptedProperties(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlAlwaysEncryptedProperties.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlAlwaysEncryptedProperties.cs new file mode 100644 index 000000000000..fe35cdb55079 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlAlwaysEncryptedProperties.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Sql always encrypted properties. + public partial class SqlAlwaysEncryptedProperties + { + /// Initializes a new instance of SqlAlwaysEncryptedProperties. + /// Sql always encrypted AKV authentication type. Type: string. + public SqlAlwaysEncryptedProperties(SqlAlwaysEncryptedAkvAuthType alwaysEncryptedAkvAuthType) + { + AlwaysEncryptedAkvAuthType = alwaysEncryptedAkvAuthType; + } + + /// Initializes a new instance of SqlAlwaysEncryptedProperties. + /// Sql always encrypted AKV authentication type. Type: string. + /// The client ID of the application in Azure Active Directory used for Azure Key Vault authentication. Type: string (or Expression with resultType string). + /// + /// The key of the service principal used to authenticate against Azure Key Vault. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// The credential reference containing authentication information. + internal SqlAlwaysEncryptedProperties(SqlAlwaysEncryptedAkvAuthType alwaysEncryptedAkvAuthType, object servicePrincipalId, SecretBase servicePrincipalKey, CredentialReference credential) + { + AlwaysEncryptedAkvAuthType = alwaysEncryptedAkvAuthType; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Credential = credential; + } + + /// Sql always encrypted AKV authentication type. Type: string. + public SqlAlwaysEncryptedAkvAuthType AlwaysEncryptedAkvAuthType { get; set; } + /// The client ID of the application in Azure Active Directory used for Azure Key Vault authentication. Type: string (or Expression with resultType string). + public object ServicePrincipalId { get; set; } + /// + /// The key of the service principal used to authenticate against Azure Key Vault. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public SecretBase ServicePrincipalKey { get; set; } + /// The credential reference containing authentication information. + public CredentialReference Credential { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlDWSource.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlDWSource.Serialization.cs index 24ec4dcf4c82..58e76c1b19b6 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlDWSource.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlDWSource.Serialization.cs @@ -34,6 +34,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("storedProcedureParameters"u8); writer.WriteObjectValue(StoredProcedureParameters); } + if (Optional.IsDefined(IsolationLevel)) + { + writer.WritePropertyName("isolationLevel"u8); + writer.WriteObjectValue(IsolationLevel); + } if (Optional.IsDefined(PartitionOption)) { writer.WritePropertyName("partitionOption"u8); @@ -88,6 +93,7 @@ internal static SqlDWSource DeserializeSqlDWSource(JsonElement element) Optional sqlReaderQuery = default; Optional sqlReaderStoredProcedureName = default; Optional storedProcedureParameters = default; + Optional isolationLevel = default; Optional partitionOption = default; Optional partitionSettings = default; Optional queryTimeout = default; @@ -127,6 +133,15 @@ internal static SqlDWSource DeserializeSqlDWSource(JsonElement element) storedProcedureParameters = property.Value.GetObject(); continue; } + if (property.NameEquals("isolationLevel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isolationLevel = property.Value.GetObject(); + continue; + } if (property.NameEquals("partitionOption"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -198,7 +213,7 @@ internal static SqlDWSource DeserializeSqlDWSource(JsonElement element) additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new SqlDWSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, sqlReaderQuery.Value, sqlReaderStoredProcedureName.Value, storedProcedureParameters.Value, partitionOption.Value, partitionSettings.Value); + return new SqlDWSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, sqlReaderQuery.Value, sqlReaderStoredProcedureName.Value, storedProcedureParameters.Value, isolationLevel.Value, partitionOption.Value, partitionSettings.Value); } internal partial class SqlDWSourceConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlDWSource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlDWSource.cs index 4e7da2c891c5..a3184c76a943 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlDWSource.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlDWSource.cs @@ -29,13 +29,15 @@ public SqlDWSource() /// SQL Data Warehouse reader query. Type: string (or Expression with resultType string). /// Name of the stored procedure for a SQL Data Warehouse source. This cannot be used at the same time as SqlReaderQuery. Type: string (or Expression with resultType string). /// Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". Type: object (or Expression with resultType object), itemType: StoredProcedureParameter. + /// Specifies the transaction locking behavior for the SQL source. Allowed values: ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. The default value is ReadCommitted. Type: string (or Expression with resultType string). /// The partition mechanism that will be used for Sql read in parallel. Possible values include: "None", "PhysicalPartitionsOfTable", "DynamicRange". /// The settings that will be leveraged for Sql source partitioning. - internal SqlDWSource(string type, object sourceRetryCount, object sourceRetryWait, object maxConcurrentConnections, IDictionary additionalProperties, object queryTimeout, object additionalColumns, object sqlReaderQuery, object sqlReaderStoredProcedureName, object storedProcedureParameters, object partitionOption, SqlPartitionSettings partitionSettings) : base(type, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, additionalProperties, queryTimeout, additionalColumns) + internal SqlDWSource(string type, object sourceRetryCount, object sourceRetryWait, object maxConcurrentConnections, IDictionary additionalProperties, object queryTimeout, object additionalColumns, object sqlReaderQuery, object sqlReaderStoredProcedureName, object storedProcedureParameters, object isolationLevel, object partitionOption, SqlPartitionSettings partitionSettings) : base(type, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, additionalProperties, queryTimeout, additionalColumns) { SqlReaderQuery = sqlReaderQuery; SqlReaderStoredProcedureName = sqlReaderStoredProcedureName; StoredProcedureParameters = storedProcedureParameters; + IsolationLevel = isolationLevel; PartitionOption = partitionOption; PartitionSettings = partitionSettings; Type = type ?? "SqlDWSource"; @@ -47,6 +49,8 @@ internal SqlDWSource(string type, object sourceRetryCount, object sourceRetryWai public object SqlReaderStoredProcedureName { get; set; } /// Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". Type: object (or Expression with resultType object), itemType: StoredProcedureParameter. public object StoredProcedureParameters { get; set; } + /// Specifies the transaction locking behavior for the SQL source. Allowed values: ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. The default value is ReadCommitted. Type: string (or Expression with resultType string). + public object IsolationLevel { get; set; } /// The partition mechanism that will be used for Sql read in parallel. Possible values include: "None", "PhysicalPartitionsOfTable", "DynamicRange". public object PartitionOption { get; set; } /// The settings that will be leveraged for Sql source partitioning. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlMISource.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlMISource.Serialization.cs index d391e76366ee..a9b25bc09a3d 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlMISource.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlMISource.Serialization.cs @@ -40,6 +40,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndObject(); } + if (Optional.IsDefined(IsolationLevel)) + { + writer.WritePropertyName("isolationLevel"u8); + writer.WriteObjectValue(IsolationLevel); + } if (Optional.IsDefined(ProduceAdditionalTypes)) { writer.WritePropertyName("produceAdditionalTypes"u8); @@ -99,6 +104,7 @@ internal static SqlMISource DeserializeSqlMISource(JsonElement element) Optional sqlReaderQuery = default; Optional sqlReaderStoredProcedureName = default; Optional> storedProcedureParameters = default; + Optional isolationLevel = default; Optional produceAdditionalTypes = default; Optional partitionOption = default; Optional partitionSettings = default; @@ -144,6 +150,15 @@ internal static SqlMISource DeserializeSqlMISource(JsonElement element) storedProcedureParameters = dictionary; continue; } + if (property.NameEquals("isolationLevel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isolationLevel = property.Value.GetObject(); + continue; + } if (property.NameEquals("produceAdditionalTypes"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -224,7 +239,7 @@ internal static SqlMISource DeserializeSqlMISource(JsonElement element) additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new SqlMISource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, sqlReaderQuery.Value, sqlReaderStoredProcedureName.Value, Optional.ToDictionary(storedProcedureParameters), produceAdditionalTypes.Value, partitionOption.Value, partitionSettings.Value); + return new SqlMISource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, sqlReaderQuery.Value, sqlReaderStoredProcedureName.Value, Optional.ToDictionary(storedProcedureParameters), isolationLevel.Value, produceAdditionalTypes.Value, partitionOption.Value, partitionSettings.Value); } internal partial class SqlMISourceConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlMISource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlMISource.cs index ab8f92cf683b..6b7e4a4c8c99 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlMISource.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlMISource.cs @@ -31,14 +31,16 @@ public SqlMISource() /// SQL reader query. Type: string (or Expression with resultType string). /// Name of the stored procedure for a Azure SQL Managed Instance source. This cannot be used at the same time as SqlReaderQuery. Type: string (or Expression with resultType string). /// Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". + /// Specifies the transaction locking behavior for the SQL source. Allowed values: ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. The default value is ReadCommitted. Type: string (or Expression with resultType string). /// Which additional types to produce. /// The partition mechanism that will be used for Sql read in parallel. Possible values include: "None", "PhysicalPartitionsOfTable", "DynamicRange". /// The settings that will be leveraged for Sql source partitioning. - internal SqlMISource(string type, object sourceRetryCount, object sourceRetryWait, object maxConcurrentConnections, IDictionary additionalProperties, object queryTimeout, object additionalColumns, object sqlReaderQuery, object sqlReaderStoredProcedureName, IDictionary storedProcedureParameters, object produceAdditionalTypes, object partitionOption, SqlPartitionSettings partitionSettings) : base(type, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, additionalProperties, queryTimeout, additionalColumns) + internal SqlMISource(string type, object sourceRetryCount, object sourceRetryWait, object maxConcurrentConnections, IDictionary additionalProperties, object queryTimeout, object additionalColumns, object sqlReaderQuery, object sqlReaderStoredProcedureName, IDictionary storedProcedureParameters, object isolationLevel, object produceAdditionalTypes, object partitionOption, SqlPartitionSettings partitionSettings) : base(type, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, additionalProperties, queryTimeout, additionalColumns) { SqlReaderQuery = sqlReaderQuery; SqlReaderStoredProcedureName = sqlReaderStoredProcedureName; StoredProcedureParameters = storedProcedureParameters; + IsolationLevel = isolationLevel; ProduceAdditionalTypes = produceAdditionalTypes; PartitionOption = partitionOption; PartitionSettings = partitionSettings; @@ -51,6 +53,8 @@ internal SqlMISource(string type, object sourceRetryCount, object sourceRetryWai public object SqlReaderStoredProcedureName { get; set; } /// Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". public IDictionary StoredProcedureParameters { get; } + /// Specifies the transaction locking behavior for the SQL source. Allowed values: ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. The default value is ReadCommitted. Type: string (or Expression with resultType string). + public object IsolationLevel { get; set; } /// Which additional types to produce. public object ProduceAdditionalTypes { get; set; } /// The partition mechanism that will be used for Sql read in parallel. Possible values include: "None", "PhysicalPartitionsOfTable", "DynamicRange". diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlPoolStoredProcedureActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlPoolStoredProcedureActivity.Serialization.cs index 65de43eaa8f4..0ea4799d0e4d 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlPoolStoredProcedureActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlPoolStoredProcedureActivity.Serialization.cs @@ -30,6 +30,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -84,6 +94,8 @@ internal static SqlPoolStoredProcedureActivity DeserializeSqlPoolStoredProcedure string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; object storedProcedureName = default; @@ -112,6 +124,24 @@ internal static SqlPoolStoredProcedureActivity DeserializeSqlPoolStoredProcedure description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -174,7 +204,7 @@ internal static SqlPoolStoredProcedureActivity DeserializeSqlPoolStoredProcedure additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new SqlPoolStoredProcedureActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, sqlPool, storedProcedureName, Optional.ToDictionary(storedProcedureParameters)); + return new SqlPoolStoredProcedureActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, sqlPool, storedProcedureName, Optional.ToDictionary(storedProcedureParameters)); } internal partial class SqlPoolStoredProcedureActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlPoolStoredProcedureActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlPoolStoredProcedureActivity.cs index 467209037417..a0d1b1c1c04f 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlPoolStoredProcedureActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlPoolStoredProcedureActivity.cs @@ -35,13 +35,15 @@ public SqlPoolStoredProcedureActivity(string name, SqlPoolReference sqlPool, obj /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. /// SQL pool stored procedure reference. /// Stored procedure name. Type: string (or Expression with resultType string). /// Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". - internal SqlPoolStoredProcedureActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, SqlPoolReference sqlPool, object storedProcedureName, IDictionary storedProcedureParameters) : base(name, type, description, dependsOn, userProperties, additionalProperties) + internal SqlPoolStoredProcedureActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, SqlPoolReference sqlPool, object storedProcedureName, IDictionary storedProcedureParameters) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) { SqlPool = sqlPool; StoredProcedureName = storedProcedureName; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerLinkedService.Serialization.cs index 09c41f7b60fb..49e5cea21b2c 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerLinkedService.Serialization.cs @@ -76,6 +76,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("encryptedCredential"u8); writer.WriteObjectValue(EncryptedCredential); } + if (Optional.IsDefined(AlwaysEncryptedSettings)) + { + writer.WritePropertyName("alwaysEncryptedSettings"u8); + writer.WriteObjectValue(AlwaysEncryptedSettings); + } writer.WriteEndObject(); foreach (var item in AdditionalProperties) { @@ -100,6 +105,7 @@ internal static SqlServerLinkedService DeserializeSqlServerLinkedService(JsonEle Optional userName = default; Optional password = default; Optional encryptedCredential = default; + Optional alwaysEncryptedSettings = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -199,13 +205,22 @@ internal static SqlServerLinkedService DeserializeSqlServerLinkedService(JsonEle encryptedCredential = property0.Value.GetObject(); continue; } + if (property0.NameEquals("alwaysEncryptedSettings"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + alwaysEncryptedSettings = SqlAlwaysEncryptedProperties.DeserializeSqlAlwaysEncryptedProperties(property0.Value); + continue; + } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new SqlServerLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, userName.Value, password.Value, encryptedCredential.Value); + return new SqlServerLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, userName.Value, password.Value, encryptedCredential.Value, alwaysEncryptedSettings.Value); } internal partial class SqlServerLinkedServiceConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerLinkedService.cs index bba02a3312a2..03332212b03d 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerLinkedService.cs @@ -40,12 +40,14 @@ public SqlServerLinkedService(object connectionString) /// The available derived classes include and . /// /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). - internal SqlServerLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, object userName, SecretBase password, object encryptedCredential) : base(type, connectVia, description, parameters, annotations, additionalProperties) + /// Sql always encrypted properties. + internal SqlServerLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, object userName, SecretBase password, object encryptedCredential, SqlAlwaysEncryptedProperties alwaysEncryptedSettings) : base(type, connectVia, description, parameters, annotations, additionalProperties) { ConnectionString = connectionString; UserName = userName; Password = password; EncryptedCredential = encryptedCredential; + AlwaysEncryptedSettings = alwaysEncryptedSettings; Type = type ?? "SqlServer"; } @@ -61,5 +63,7 @@ internal SqlServerLinkedService(string type, IntegrationRuntimeReference connect public SecretBase Password { get; set; } /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). public object EncryptedCredential { get; set; } + /// Sql always encrypted properties. + public SqlAlwaysEncryptedProperties AlwaysEncryptedSettings { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerSource.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerSource.Serialization.cs index 702a7f69e15c..47438d1687fd 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerSource.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerSource.Serialization.cs @@ -40,6 +40,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndObject(); } + if (Optional.IsDefined(IsolationLevel)) + { + writer.WritePropertyName("isolationLevel"u8); + writer.WriteObjectValue(IsolationLevel); + } if (Optional.IsDefined(ProduceAdditionalTypes)) { writer.WritePropertyName("produceAdditionalTypes"u8); @@ -99,6 +104,7 @@ internal static SqlServerSource DeserializeSqlServerSource(JsonElement element) Optional sqlReaderQuery = default; Optional sqlReaderStoredProcedureName = default; Optional> storedProcedureParameters = default; + Optional isolationLevel = default; Optional produceAdditionalTypes = default; Optional partitionOption = default; Optional partitionSettings = default; @@ -144,6 +150,15 @@ internal static SqlServerSource DeserializeSqlServerSource(JsonElement element) storedProcedureParameters = dictionary; continue; } + if (property.NameEquals("isolationLevel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isolationLevel = property.Value.GetObject(); + continue; + } if (property.NameEquals("produceAdditionalTypes"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -224,7 +239,7 @@ internal static SqlServerSource DeserializeSqlServerSource(JsonElement element) additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new SqlServerSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, sqlReaderQuery.Value, sqlReaderStoredProcedureName.Value, Optional.ToDictionary(storedProcedureParameters), produceAdditionalTypes.Value, partitionOption.Value, partitionSettings.Value); + return new SqlServerSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, sqlReaderQuery.Value, sqlReaderStoredProcedureName.Value, Optional.ToDictionary(storedProcedureParameters), isolationLevel.Value, produceAdditionalTypes.Value, partitionOption.Value, partitionSettings.Value); } internal partial class SqlServerSourceConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerSource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerSource.cs index 3b2d678e1baf..26a9d55a0f0f 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerSource.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerSource.cs @@ -31,14 +31,16 @@ public SqlServerSource() /// SQL reader query. Type: string (or Expression with resultType string). /// Name of the stored procedure for a SQL Database source. This cannot be used at the same time as SqlReaderQuery. Type: string (or Expression with resultType string). /// Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". + /// Specifies the transaction locking behavior for the SQL source. Allowed values: ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. The default value is ReadCommitted. Type: string (or Expression with resultType string). /// Which additional types to produce. /// The partition mechanism that will be used for Sql read in parallel. Possible values include: "None", "PhysicalPartitionsOfTable", "DynamicRange". /// The settings that will be leveraged for Sql source partitioning. - internal SqlServerSource(string type, object sourceRetryCount, object sourceRetryWait, object maxConcurrentConnections, IDictionary additionalProperties, object queryTimeout, object additionalColumns, object sqlReaderQuery, object sqlReaderStoredProcedureName, IDictionary storedProcedureParameters, object produceAdditionalTypes, object partitionOption, SqlPartitionSettings partitionSettings) : base(type, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, additionalProperties, queryTimeout, additionalColumns) + internal SqlServerSource(string type, object sourceRetryCount, object sourceRetryWait, object maxConcurrentConnections, IDictionary additionalProperties, object queryTimeout, object additionalColumns, object sqlReaderQuery, object sqlReaderStoredProcedureName, IDictionary storedProcedureParameters, object isolationLevel, object produceAdditionalTypes, object partitionOption, SqlPartitionSettings partitionSettings) : base(type, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, additionalProperties, queryTimeout, additionalColumns) { SqlReaderQuery = sqlReaderQuery; SqlReaderStoredProcedureName = sqlReaderStoredProcedureName; StoredProcedureParameters = storedProcedureParameters; + IsolationLevel = isolationLevel; ProduceAdditionalTypes = produceAdditionalTypes; PartitionOption = partitionOption; PartitionSettings = partitionSettings; @@ -51,6 +53,8 @@ internal SqlServerSource(string type, object sourceRetryCount, object sourceRetr public object SqlReaderStoredProcedureName { get; set; } /// Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". public IDictionary StoredProcedureParameters { get; } + /// Specifies the transaction locking behavior for the SQL source. Allowed values: ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. The default value is ReadCommitted. Type: string (or Expression with resultType string). + public object IsolationLevel { get; set; } /// Which additional types to produce. public object ProduceAdditionalTypes { get; set; } /// The partition mechanism that will be used for Sql read in parallel. Possible values include: "None", "PhysicalPartitionsOfTable", "DynamicRange". diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerStoredProcedureActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerStoredProcedureActivity.Serialization.cs index 1619fd6ef0b3..a156eeb07237 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerStoredProcedureActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerStoredProcedureActivity.Serialization.cs @@ -38,6 +38,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -87,6 +97,8 @@ internal static SqlServerStoredProcedureActivity DeserializeSqlServerStoredProce string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; object storedProcedureName = default; @@ -128,6 +140,24 @@ internal static SqlServerStoredProcedureActivity DeserializeSqlServerStoredProce description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -185,7 +215,7 @@ internal static SqlServerStoredProcedureActivity DeserializeSqlServerStoredProce additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new SqlServerStoredProcedureActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, storedProcedureName, storedProcedureParameters.Value); + return new SqlServerStoredProcedureActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, storedProcedureName, storedProcedureParameters.Value); } internal partial class SqlServerStoredProcedureActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerStoredProcedureActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerStoredProcedureActivity.cs index e97953078df5..a342a23cb748 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerStoredProcedureActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlServerStoredProcedureActivity.cs @@ -31,6 +31,8 @@ public SqlServerStoredProcedureActivity(string name, object storedProcedureName) /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -38,7 +40,7 @@ public SqlServerStoredProcedureActivity(string name, object storedProcedureName) /// Activity policy. /// Stored procedure name. Type: string (or Expression with resultType string). /// Value and type setting for stored procedure parameters. Example: "{Parameter1: {value: "1", type: "int"}}". - internal SqlServerStoredProcedureActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object storedProcedureName, object storedProcedureParameters) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + internal SqlServerStoredProcedureActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, object storedProcedureName, object storedProcedureParameters) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) { StoredProcedureName = storedProcedureName; StoredProcedureParameters = storedProcedureParameters; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StorageDescriptor.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StorageDescriptor.Serialization.cs new file mode 100644 index 000000000000..63c715a536c1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StorageDescriptor.Serialization.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(StorageDescriptorConverter))] + public partial class StorageDescriptor : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Distribution)) + { + writer.WritePropertyName("distribution"u8); + writer.WriteObjectValue(Distribution); + } + writer.WritePropertyName("columns"u8); + writer.WriteStartArray(); + foreach (var item in Columns) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("format"u8); + writer.WriteObjectValue(Format); + writer.WritePropertyName("source"u8); + writer.WriteObjectValue(Source); + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(SerDeInfo)) + { + writer.WritePropertyName("serDeInfo"u8); + writer.WriteObjectValue(SerDeInfo); + } + writer.WriteEndObject(); + } + + internal static StorageDescriptor DeserializeStorageDescriptor(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional distribution = default; + IList columns = default; + FormatInfo format = default; + DataSource source = default; + Optional> properties = default; + Optional serDeInfo = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("distribution"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + distribution = DistributionInfo.DeserializeDistributionInfo(property.Value); + continue; + } + if (property.NameEquals("columns"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataColumn.DeserializeDataColumn(item)); + } + columns = array; + continue; + } + if (property.NameEquals("format"u8)) + { + format = FormatInfo.DeserializeFormatInfo(property.Value); + continue; + } + if (property.NameEquals("source"u8)) + { + source = DataSource.DeserializeDataSource(property.Value); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetObject()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("serDeInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serDeInfo = property.Value.GetObject(); + continue; + } + } + return new StorageDescriptor(distribution.Value, columns, format, source, Optional.ToDictionary(properties), serDeInfo.Value); + } + + internal partial class StorageDescriptorConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, StorageDescriptor model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override StorageDescriptor Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeStorageDescriptor(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StorageDescriptor.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StorageDescriptor.cs new file mode 100644 index 000000000000..7324d9fe09e0 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StorageDescriptor.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Storage descriptor. + public partial class StorageDescriptor + { + /// Initializes a new instance of StorageDescriptor. + /// Column information. + /// Storage descriptor format information. + /// Storage descriptor data source information. + /// , or is null. + public StorageDescriptor(IEnumerable columns, FormatInfo format, DataSource source) + { + Argument.AssertNotNull(columns, nameof(columns)); + Argument.AssertNotNull(format, nameof(format)); + Argument.AssertNotNull(source, nameof(source)); + + Columns = columns.ToList(); + Format = format; + Source = source; + Properties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of StorageDescriptor. + /// Storage descriptor information. + /// Column information. + /// Storage descriptor format information. + /// Storage descriptor data source information. + /// Property bag. + /// SerDe information. + internal StorageDescriptor(DistributionInfo distribution, IList columns, FormatInfo format, DataSource source, IDictionary properties, object serDeInfo) + { + Distribution = distribution; + Columns = columns; + Format = format; + Source = source; + Properties = properties; + SerDeInfo = serDeInfo; + } + + /// Storage descriptor information. + public DistributionInfo Distribution { get; set; } + /// Column information. + public IList Columns { get; } + /// Storage descriptor format information. + public FormatInfo Format { get; set; } + /// Storage descriptor data source information. + public DataSource Source { get; set; } + /// Property bag. + public IDictionary Properties { get; } + /// SerDe information. + public object SerDeInfo { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SwitchActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SwitchActivity.Serialization.cs index 0a5b8c27754f..7e02dbb525cd 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SwitchActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SwitchActivity.Serialization.cs @@ -28,6 +28,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -90,6 +100,8 @@ internal static SwitchActivity DeserializeSwitchActivity(JsonElement element) string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; Expression @on = default; @@ -114,6 +126,24 @@ internal static SwitchActivity DeserializeSwitchActivity(JsonElement element) description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -190,7 +220,7 @@ internal static SwitchActivity DeserializeSwitchActivity(JsonElement element) additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new SwitchActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, @on, Optional.ToList(cases), Optional.ToList(defaultActivities)); + return new SwitchActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, @on, Optional.ToList(cases), Optional.ToList(defaultActivities)); } internal partial class SwitchActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SwitchActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SwitchActivity.cs index 041da3a8c22b..e0fd59b67796 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SwitchActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SwitchActivity.cs @@ -33,6 +33,8 @@ public SwitchActivity(string name, Expression @on) : base(name) /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -43,7 +45,7 @@ public SwitchActivity(string name, Expression @on) : base(name) /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . /// - internal SwitchActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, Expression @on, IList cases, IList defaultActivities) : base(name, type, description, dependsOn, userProperties, additionalProperties) + internal SwitchActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, Expression @on, IList cases, IList defaultActivities) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) { On = @on; Cases = cases; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponse.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponse.Serialization.cs new file mode 100644 index 000000000000..ad9fa7e302a5 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponse.Serialization.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(SyMsapiddlResponseConverter))] + public partial class SyMsapiddlResponse + { + internal static SyMsapiddlResponse DeserializeSyMsapiddlResponse(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DDLType ddlType = default; + string entityName = default; + SASEntityType entityType = default; + PublishStatus publishStatus = default; + string originObjectId = default; + string objectId = default; + long objectVersion = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ddlType"u8)) + { + ddlType = property.Value.GetString().ToDDLType(); + continue; + } + if (property.NameEquals("entityName"u8)) + { + entityName = property.Value.GetString(); + continue; + } + if (property.NameEquals("entityType"u8)) + { + entityType = property.Value.GetString().ToSASEntityType(); + continue; + } + if (property.NameEquals("publishStatus"u8)) + { + publishStatus = new PublishStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("originObjectId"u8)) + { + originObjectId = property.Value.GetString(); + continue; + } + if (property.NameEquals("objectId"u8)) + { + objectId = property.Value.GetString(); + continue; + } + if (property.NameEquals("objectVersion"u8)) + { + objectVersion = property.Value.GetInt64(); + continue; + } + } + return new SyMsapiddlResponse(ddlType, entityName, entityType, publishStatus, originObjectId, objectId, objectVersion); + } + + internal partial class SyMsapiddlResponseConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, SyMsapiddlResponse model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override SyMsapiddlResponse Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeSyMsapiddlResponse(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponse.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponse.cs new file mode 100644 index 000000000000..fb9ce9de8a72 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponse.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Defines the response for create/publish operation on DDL payload. + public partial class SyMsapiddlResponse + { + /// Initializes a new instance of SyMsapiddlResponse. + /// DDL type. + /// Entity name. + /// Artifact type. + /// Object id maintained by Origin Catalog. + /// Object id maintained by SyMS. + /// Object version maintained by SyMS. + /// , or is null. + internal SyMsapiddlResponse(DDLType ddlType, string entityName, SASEntityType entityType, string originObjectId, string objectId, long objectVersion) + { + Argument.AssertNotNull(entityName, nameof(entityName)); + Argument.AssertNotNull(originObjectId, nameof(originObjectId)); + Argument.AssertNotNull(objectId, nameof(objectId)); + + DdlType = ddlType; + EntityName = entityName; + EntityType = entityType; + PublishStatus = PublishStatus.PUBLISHED; + OriginObjectId = originObjectId; + ObjectId = objectId; + ObjectVersion = objectVersion; + } + + /// Initializes a new instance of SyMsapiddlResponse. + /// DDL type. + /// Entity name. + /// Artifact type. + /// Publish status. + /// Object id maintained by Origin Catalog. + /// Object id maintained by SyMS. + /// Object version maintained by SyMS. + internal SyMsapiddlResponse(DDLType ddlType, string entityName, SASEntityType entityType, PublishStatus publishStatus, string originObjectId, string objectId, long objectVersion) + { + DdlType = ddlType; + EntityName = entityName; + EntityType = entityType; + PublishStatus = publishStatus; + OriginObjectId = originObjectId; + ObjectId = objectId; + ObjectVersion = objectVersion; + } + + /// DDL type. + public DDLType DdlType { get; } + /// Entity name. + public string EntityName { get; } + /// Artifact type. + public SASEntityType EntityType { get; } + /// Publish status. + public PublishStatus PublishStatus { get; } + /// Object id maintained by Origin Catalog. + public string OriginObjectId { get; } + /// Object id maintained by SyMS. + public string ObjectId { get; } + /// Object version maintained by SyMS. + public long ObjectVersion { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponses.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponses.Serialization.cs new file mode 100644 index 000000000000..6d1e80397a89 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponses.Serialization.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(SyMsapiddlResponsesConverter))] + public partial class SyMsapiddlResponses + { + internal static SyMsapiddlResponses DeserializeSyMsapiddlResponses(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList syMsApiDdlResponse = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("syMsApiDdlResponse"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SyMsapiddlResponse.DeserializeSyMsapiddlResponse(item)); + } + syMsApiDdlResponse = array; + continue; + } + } + return new SyMsapiddlResponses(syMsApiDdlResponse); + } + + internal partial class SyMsapiddlResponsesConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, SyMsapiddlResponses model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + public override SyMsapiddlResponses Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeSyMsapiddlResponses(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponses.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponses.cs new file mode 100644 index 000000000000..c1af99516809 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponses.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Defines the publish response. + public partial class SyMsapiddlResponses + { + /// Initializes a new instance of SyMsapiddlResponses. + /// List of DDL response. + /// is null. + internal SyMsapiddlResponses(IEnumerable syMsApiDdlResponse) + { + Argument.AssertNotNull(syMsApiDdlResponse, nameof(syMsApiDdlResponse)); + + SyMsApiDdlResponse = syMsApiDdlResponse.ToList(); + } + + /// Initializes a new instance of SyMsapiddlResponses. + /// List of DDL response. + internal SyMsapiddlResponses(IReadOnlyList syMsApiDdlResponse) + { + SyMsApiDdlResponse = syMsApiDdlResponse; + } + + /// List of DDL response. + public IReadOnlyList SyMsApiDdlResponse { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SynapseNotebookActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SynapseNotebookActivity.Serialization.cs index 54100cfb7967..3b13cb29cb7e 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SynapseNotebookActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SynapseNotebookActivity.Serialization.cs @@ -38,6 +38,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -96,7 +106,33 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) if (Optional.IsDefined(NumExecutors)) { writer.WritePropertyName("numExecutors"u8); - writer.WriteNumberValue(NumExecutors.Value); + writer.WriteObjectValue(NumExecutors); + } + if (Optional.IsDefined(ConfigurationType)) + { + writer.WritePropertyName("configurationType"u8); + writer.WriteStringValue(ConfigurationType.Value.ToString()); + } + if (Optional.IsDefined(TargetSparkConfiguration)) + { + writer.WritePropertyName("targetSparkConfiguration"u8); + writer.WriteObjectValue(TargetSparkConfiguration); + } + if (Optional.IsCollectionDefined(SparkConfig)) + { + writer.WritePropertyName("sparkConfig"u8); + writer.WriteStartObject(); + foreach (var item in SparkConfig) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); } writer.WriteEndObject(); foreach (var item in AdditionalProperties) @@ -118,6 +154,8 @@ internal static SynapseNotebookActivity DeserializeSynapseNotebookActivity(JsonE string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; SynapseNotebookReference notebook = default; @@ -126,7 +164,10 @@ internal static SynapseNotebookActivity DeserializeSynapseNotebookActivity(JsonE Optional executorSize = default; Optional conf = default; Optional driverSize = default; - Optional numExecutors = default; + Optional numExecutors = default; + Optional configurationType = default; + Optional targetSparkConfiguration = default; + Optional> sparkConfig = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -164,6 +205,24 @@ internal static SynapseNotebookActivity DeserializeSynapseNotebookActivity(JsonE description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -262,7 +321,46 @@ internal static SynapseNotebookActivity DeserializeSynapseNotebookActivity(JsonE { continue; } - numExecutors = property0.Value.GetInt32(); + numExecutors = property0.Value.GetObject(); + continue; + } + if (property0.NameEquals("configurationType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + configurationType = new ConfigurationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("targetSparkConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetSparkConfiguration = SparkConfigurationParametrizationReference.DeserializeSparkConfigurationParametrizationReference(property0.Value); + continue; + } + if (property0.NameEquals("sparkConfig"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property1.Name, null); + } + else + { + dictionary.Add(property1.Name, property1.Value.GetObject()); + } + } + sparkConfig = dictionary; continue; } } @@ -271,7 +369,7 @@ internal static SynapseNotebookActivity DeserializeSynapseNotebookActivity(JsonE additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new SynapseNotebookActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, notebook, sparkPool.Value, Optional.ToDictionary(parameters), executorSize.Value, conf.Value, driverSize.Value, Optional.ToNullable(numExecutors)); + return new SynapseNotebookActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, notebook, sparkPool.Value, Optional.ToDictionary(parameters), executorSize.Value, conf.Value, driverSize.Value, numExecutors.Value, Optional.ToNullable(configurationType), targetSparkConfiguration.Value, Optional.ToDictionary(sparkConfig)); } internal partial class SynapseNotebookActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SynapseNotebookActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SynapseNotebookActivity.cs index b508e4c7bbf6..97fec619db23 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SynapseNotebookActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SynapseNotebookActivity.cs @@ -25,6 +25,7 @@ public SynapseNotebookActivity(string name, SynapseNotebookReference notebook) : Notebook = notebook; Parameters = new ChangeTrackingDictionary(); + SparkConfig = new ChangeTrackingDictionary(); Type = "SynapseNotebook"; } @@ -32,6 +33,8 @@ public SynapseNotebookActivity(string name, SynapseNotebookReference notebook) : /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -43,8 +46,11 @@ public SynapseNotebookActivity(string name, SynapseNotebookReference notebook) : /// Number of core and memory to be used for executors allocated in the specified Spark pool for the session, which will be used for overriding 'executorCores' and 'executorMemory' of the notebook you provide. Type: string (or Expression with resultType string). /// Spark configuration properties, which will override the 'conf' of the notebook you provide. /// Number of core and memory to be used for driver allocated in the specified Spark pool for the session, which will be used for overriding 'driverCores' and 'driverMemory' of the notebook you provide. Type: string (or Expression with resultType string). - /// Number of executors to launch for this session, which will override the 'numExecutors' of the notebook you provide. - internal SynapseNotebookActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, SynapseNotebookReference notebook, BigDataPoolParametrizationReference sparkPool, IDictionary parameters, object executorSize, object conf, object driverSize, int? numExecutors) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + /// Number of executors to launch for this session, which will override the 'numExecutors' of the notebook you provide. Type: integer (or Expression with resultType integer). + /// The type of the spark config. + /// The spark configuration of the spark job. + /// Spark configuration property. + internal SynapseNotebookActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, SynapseNotebookReference notebook, BigDataPoolParametrizationReference sparkPool, IDictionary parameters, object executorSize, object conf, object driverSize, object numExecutors, ConfigurationType? configurationType, SparkConfigurationParametrizationReference targetSparkConfiguration, IDictionary sparkConfig) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) { Notebook = notebook; SparkPool = sparkPool; @@ -53,6 +59,9 @@ internal SynapseNotebookActivity(string name, string type, string description, I Conf = conf; DriverSize = driverSize; NumExecutors = numExecutors; + ConfigurationType = configurationType; + TargetSparkConfiguration = targetSparkConfiguration; + SparkConfig = sparkConfig; Type = type ?? "SynapseNotebook"; } @@ -68,7 +77,13 @@ internal SynapseNotebookActivity(string name, string type, string description, I public object Conf { get; set; } /// Number of core and memory to be used for driver allocated in the specified Spark pool for the session, which will be used for overriding 'driverCores' and 'driverMemory' of the notebook you provide. Type: string (or Expression with resultType string). public object DriverSize { get; set; } - /// Number of executors to launch for this session, which will override the 'numExecutors' of the notebook you provide. - public int? NumExecutors { get; set; } + /// Number of executors to launch for this session, which will override the 'numExecutors' of the notebook you provide. Type: integer (or Expression with resultType integer). + public object NumExecutors { get; set; } + /// The type of the spark config. + public ConfigurationType? ConfigurationType { get; set; } + /// The spark configuration of the spark job. + public SparkConfigurationParametrizationReference TargetSparkConfiguration { get; set; } + /// Spark configuration property. + public IDictionary SparkConfig { get; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SynapseSparkJobDefinitionActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SynapseSparkJobDefinitionActivity.Serialization.cs index 50be9c956bd1..31989eb52989 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SynapseSparkJobDefinitionActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SynapseSparkJobDefinitionActivity.Serialization.cs @@ -38,6 +38,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -208,6 +218,8 @@ internal static SynapseSparkJobDefinitionActivity DeserializeSynapseSparkJobDefi string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; SynapseSparkJobReference sparkJob = default; @@ -263,6 +275,24 @@ internal static SynapseSparkJobDefinitionActivity DeserializeSynapseSparkJobDefi description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -506,7 +536,7 @@ internal static SynapseSparkJobDefinitionActivity DeserializeSynapseSparkJobDefi additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new SynapseSparkJobDefinitionActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, sparkJob, Optional.ToList(args), file.Value, scanFolder.Value, className.Value, Optional.ToList(files), Optional.ToList(pythonCodeReference), Optional.ToList(filesV2), targetBigDataPool.Value, executorSize.Value, conf.Value, driverSize.Value, numExecutors.Value, Optional.ToNullable(configurationType), targetSparkConfiguration.Value, Optional.ToDictionary(sparkConfig)); + return new SynapseSparkJobDefinitionActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, sparkJob, Optional.ToList(args), file.Value, scanFolder.Value, className.Value, Optional.ToList(files), Optional.ToList(pythonCodeReference), Optional.ToList(filesV2), targetBigDataPool.Value, executorSize.Value, conf.Value, driverSize.Value, numExecutors.Value, Optional.ToNullable(configurationType), targetSparkConfiguration.Value, Optional.ToDictionary(sparkConfig)); } internal partial class SynapseSparkJobDefinitionActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SynapseSparkJobDefinitionActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SynapseSparkJobDefinitionActivity.cs index 5c5e13849611..c7239d9379fe 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SynapseSparkJobDefinitionActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SynapseSparkJobDefinitionActivity.cs @@ -36,6 +36,8 @@ public SynapseSparkJobDefinitionActivity(string name, SynapseSparkJobReference s /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -57,7 +59,7 @@ public SynapseSparkJobDefinitionActivity(string name, SynapseSparkJobReference s /// The type of the spark config. /// The spark configuration of the spark job. /// Spark configuration property. - internal SynapseSparkJobDefinitionActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, SynapseSparkJobReference sparkJob, IList arguments, object file, object scanFolder, object className, IList files, IList pythonCodeReference, IList filesV2, BigDataPoolParametrizationReference targetBigDataPool, object executorSize, object conf, object driverSize, object numExecutors, ConfigurationType? configurationType, SparkConfigurationParametrizationReference targetSparkConfiguration, IDictionary sparkConfig) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + internal SynapseSparkJobDefinitionActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, SynapseSparkJobReference sparkJob, IList arguments, object file, object scanFolder, object className, IList files, IList pythonCodeReference, IList filesV2, BigDataPoolParametrizationReference targetBigDataPool, object executorSize, object conf, object driverSize, object numExecutors, ConfigurationType? configurationType, SparkConfigurationParametrizationReference targetSparkConfiguration, IDictionary sparkConfig) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) { SparkJob = sparkJob; Arguments = arguments; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableEntity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableEntity.Serialization.cs new file mode 100644 index 000000000000..62b0bf99820e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableEntity.Serialization.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(TableEntityConverter))] + public partial class TableEntity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToSerialString()); + writer.WriteEndObject(); + } + + internal static TableEntity DeserializeTableEntity(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + TableProperties properties = default; + string name = default; + SASEntityType type = default; + Optional id = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + properties = TableProperties.DeserializeTableProperties(property.Value); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString().ToSASEntityType(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + } + return new TableEntity(name, type, id.Value, properties); + } + + internal partial class TableEntityConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, TableEntity model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override TableEntity Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeTableEntity(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableEntity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableEntity.cs new file mode 100644 index 000000000000..912fd12797e2 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableEntity.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Table entity. + public partial class TableEntity : MDEntity + { + /// Initializes a new instance of TableEntity. + /// Entity Name. + /// Artifact type. + /// Database properties. + /// or is null. + public TableEntity(string name, SASEntityType type, TableProperties properties) : base(name, type) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of TableEntity. + /// Entity Name. + /// Artifact type. + /// Entity Resource Id. + /// Database properties. + internal TableEntity(string name, SASEntityType type, string id, TableProperties properties) : base(name, type, id) + { + Properties = properties; + } + + /// Database properties. + public TableProperties Properties { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableNamespace.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableNamespace.Serialization.cs new file mode 100644 index 000000000000..12d2a9947a50 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableNamespace.Serialization.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(TableNamespaceConverter))] + public partial class TableNamespace : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(SchemaName)) + { + writer.WritePropertyName("schemaName"u8); + writer.WriteStringValue(SchemaName); + } + writer.WritePropertyName("databaseName"u8); + writer.WriteStringValue(DatabaseName); + writer.WriteEndObject(); + } + + internal static TableNamespace DeserializeTableNamespace(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional schemaName = default; + string databaseName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("schemaName"u8)) + { + schemaName = property.Value.GetString(); + continue; + } + if (property.NameEquals("databaseName"u8)) + { + databaseName = property.Value.GetString(); + continue; + } + } + return new TableNamespace(databaseName, schemaName.Value); + } + + internal partial class TableNamespaceConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, TableNamespace model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override TableNamespace Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeTableNamespace(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableNamespace.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableNamespace.cs new file mode 100644 index 000000000000..c7b80a6ea7a8 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableNamespace.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Table namespace. + public partial class TableNamespace : BaseNamespace + { + /// Initializes a new instance of TableNamespace. + /// Database name. + /// is null. + public TableNamespace(string databaseName) : base(databaseName) + { + Argument.AssertNotNull(databaseName, nameof(databaseName)); + } + + /// Initializes a new instance of TableNamespace. + /// Database name. + /// Schema name. + /// is null. + internal TableNamespace(string databaseName, string schemaName) : base(databaseName) + { + Argument.AssertNotNull(databaseName, nameof(databaseName)); + + SchemaName = schemaName; + } + + /// Schema name. + public string SchemaName { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TablePartitioning.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TablePartitioning.Serialization.cs new file mode 100644 index 000000000000..ccc7df85e0c5 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TablePartitioning.Serialization.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(TablePartitioningConverter))] + public partial class TablePartitioning : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("keys"u8); + writer.WriteStartArray(); + foreach (var item in Keys) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("partitionFunctionType"u8); + writer.WriteStringValue(PartitionFunctionType); + writer.WriteEndObject(); + } + + internal static TablePartitioning DeserializeTablePartitioning(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList keys = default; + string partitionFunctionType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keys"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + keys = array; + continue; + } + if (property.NameEquals("partitionFunctionType"u8)) + { + partitionFunctionType = property.Value.GetString(); + continue; + } + } + return new TablePartitioning(keys, partitionFunctionType); + } + + internal partial class TablePartitioningConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, TablePartitioning model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override TablePartitioning Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeTablePartitioning(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TablePartitioning.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TablePartitioning.cs new file mode 100644 index 000000000000..ac1f4712a6f8 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TablePartitioning.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Table partitioning information. + public partial class TablePartitioning + { + /// Initializes a new instance of TablePartitioning. + /// Table partitioning keys. + /// Partition Function Type (ex. value). + /// or is null. + public TablePartitioning(IEnumerable keys, string partitionFunctionType) + { + Argument.AssertNotNull(keys, nameof(keys)); + Argument.AssertNotNull(partitionFunctionType, nameof(partitionFunctionType)); + + Keys = keys.ToList(); + PartitionFunctionType = partitionFunctionType; + } + + /// Initializes a new instance of TablePartitioning. + /// Table partitioning keys. + /// Partition Function Type (ex. value). + internal TablePartitioning(IList keys, string partitionFunctionType) + { + Keys = keys; + PartitionFunctionType = partitionFunctionType; + } + + /// Table partitioning keys. + public IList Keys { get; } + /// Partition Function Type (ex. value). + public string PartitionFunctionType { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableProperties.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableProperties.Serialization.cs new file mode 100644 index 000000000000..2935c51b66ad --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableProperties.Serialization.cs @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(TablePropertiesConverter))] + public partial class TableProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("namespace"u8); + writer.WriteObjectValue(Namespace); + if (Optional.IsDefined(Partitioning)) + { + writer.WritePropertyName("partitioning"u8); + writer.WriteObjectValue(Partitioning); + } + writer.WritePropertyName("tableType"u8); + writer.WriteStringValue(TableType.ToSerialString()); + writer.WritePropertyName("storageDescriptor"u8); + writer.WriteObjectValue(StorageDescriptor); + if (Optional.IsDefined(Temporary)) + { + writer.WritePropertyName("temporary"u8); + writer.WriteBooleanValue(Temporary.Value); + } + if (Optional.IsDefined(IsRewriteEnabled)) + { + writer.WritePropertyName("isRewriteEnabled"u8); + writer.WriteBooleanValue(IsRewriteEnabled.Value); + } + if (Optional.IsDefined(OriginObjectId)) + { + writer.WritePropertyName("originObjectId"u8); + writer.WriteStringValue(OriginObjectId); + } + if (Optional.IsDefined(PublishStatus)) + { + writer.WritePropertyName("publishStatus"u8); + writer.WriteStringValue(PublishStatus.Value.ToString()); + } + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static TableProperties DeserializeTableProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + TableNamespace @namespace = default; + Optional partitioning = default; + TableType tableType = default; + StorageDescriptor storageDescriptor = default; + Optional temporary = default; + Optional isRewriteEnabled = default; + Optional originObjectId = default; + Optional objectId = default; + Optional objectVersion = default; + Optional publishStatus = default; + Optional> properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("namespace"u8)) + { + @namespace = TableNamespace.DeserializeTableNamespace(property.Value); + continue; + } + if (property.NameEquals("partitioning"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + partitioning = TablePartitioning.DeserializeTablePartitioning(property.Value); + continue; + } + if (property.NameEquals("tableType"u8)) + { + tableType = property.Value.GetString().ToTableType(); + continue; + } + if (property.NameEquals("storageDescriptor"u8)) + { + storageDescriptor = StorageDescriptor.DeserializeStorageDescriptor(property.Value); + continue; + } + if (property.NameEquals("temporary"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + temporary = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isRewriteEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRewriteEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("originObjectId"u8)) + { + originObjectId = property.Value.GetString(); + continue; + } + if (property.NameEquals("objectId"u8)) + { + objectId = property.Value.GetString(); + continue; + } + if (property.NameEquals("objectVersion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + objectVersion = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("publishStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + publishStatus = new PublishStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetObject()); + } + } + properties = dictionary; + continue; + } + } + return new TableProperties(originObjectId.Value, objectId.Value, Optional.ToNullable(objectVersion), Optional.ToNullable(publishStatus), Optional.ToDictionary(properties), @namespace, partitioning.Value, tableType, storageDescriptor, Optional.ToNullable(temporary), Optional.ToNullable(isRewriteEnabled)); + } + + internal partial class TablePropertiesConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, TableProperties model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override TableProperties Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeTableProperties(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableProperties.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableProperties.cs new file mode 100644 index 000000000000..9e02c2fc45f5 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableProperties.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Database properties. + public partial class TableProperties : MDEntityProperties + { + /// Initializes a new instance of TableProperties. + /// Table namespace. + /// Entity type. + /// Storage descriptor. + /// or is null. + public TableProperties(TableNamespace @namespace, TableType tableType, StorageDescriptor storageDescriptor) + { + Argument.AssertNotNull(@namespace, nameof(@namespace)); + Argument.AssertNotNull(storageDescriptor, nameof(storageDescriptor)); + + Namespace = @namespace; + TableType = tableType; + StorageDescriptor = storageDescriptor; + } + + /// Initializes a new instance of TableProperties. + /// Entity object id maintained by the caller. + /// Entity object id maintained by SyMS. + /// Entity object version maintained by SyMS. + /// Publish status. + /// Property bag. + /// Table namespace. + /// Table partitioning information. + /// Entity type. + /// Storage descriptor. + /// Temporary. + /// Is rewrite enabled. + internal TableProperties(string originObjectId, string objectId, long? objectVersion, PublishStatus? publishStatus, IDictionary properties, TableNamespace @namespace, TablePartitioning partitioning, TableType tableType, StorageDescriptor storageDescriptor, bool? temporary, bool? isRewriteEnabled) : base(originObjectId, objectId, objectVersion, publishStatus, properties) + { + Namespace = @namespace; + Partitioning = partitioning; + TableType = tableType; + StorageDescriptor = storageDescriptor; + Temporary = temporary; + IsRewriteEnabled = isRewriteEnabled; + } + + /// Table namespace. + public TableNamespace Namespace { get; set; } + /// Table partitioning information. + public TablePartitioning Partitioning { get; set; } + /// Entity type. + public TableType TableType { get; set; } + /// Storage descriptor. + public StorageDescriptor StorageDescriptor { get; set; } + /// Temporary. + public bool? Temporary { get; set; } + /// Is rewrite enabled. + public bool? IsRewriteEnabled { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableType.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableType.Serialization.cs new file mode 100644 index 000000000000..de76be8042c6 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableType.Serialization.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + internal static partial class TableTypeExtensions + { + public static string ToSerialString(this TableType value) => value switch + { + TableType.Managed => "MANAGED", + TableType.External => "EXTERNAL", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown TableType value.") + }; + + public static TableType ToTableType(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "MANAGED")) return TableType.Managed; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "EXTERNAL")) return TableType.External; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown TableType value."); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableType.cs new file mode 100644 index 000000000000..a18971ecc67c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableType.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Entity type. + public enum TableType + { + /// MANAGED. + Managed, + /// EXTERNAL. + External + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TypeInfo.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TypeInfo.Serialization.cs new file mode 100644 index 000000000000..c27f25700ef9 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TypeInfo.Serialization.cs @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(TypeInfoConverter))] + public partial class TypeInfo : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(TypeFamily)) + { + writer.WritePropertyName("typeFamily"u8); + writer.WriteStringValue(TypeFamily); + } + writer.WritePropertyName("typeName"u8); + writer.WriteStringValue(TypeName); + if (Optional.IsDefined(IsTableType)) + { + writer.WritePropertyName("isTableType"u8); + writer.WriteBooleanValue(IsTableType.Value); + } + if (Optional.IsDefined(IsComplexType)) + { + writer.WritePropertyName("isComplexType"u8); + writer.WriteBooleanValue(IsComplexType.Value); + } + if (Optional.IsDefined(IsNullable)) + { + writer.WritePropertyName("isNullable"u8); + writer.WriteBooleanValue(IsNullable.Value); + } + if (Optional.IsDefined(Length)) + { + writer.WritePropertyName("length"u8); + writer.WriteNumberValue(Length.Value); + } + if (Optional.IsDefined(Precision)) + { + writer.WritePropertyName("precision"u8); + writer.WriteNumberValue(Precision.Value); + } + if (Optional.IsDefined(Scale)) + { + writer.WritePropertyName("scale"u8); + writer.WriteNumberValue(Scale.Value); + } + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static TypeInfo DeserializeTypeInfo(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional typeFamily = default; + string typeName = default; + Optional isTableType = default; + Optional isComplexType = default; + Optional isNullable = default; + Optional length = default; + Optional precision = default; + Optional scale = default; + Optional> properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("typeFamily"u8)) + { + typeFamily = property.Value.GetString(); + continue; + } + if (property.NameEquals("typeName"u8)) + { + typeName = property.Value.GetString(); + continue; + } + if (property.NameEquals("isTableType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTableType = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isComplexType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isComplexType = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isNullable"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isNullable = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("length"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + length = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("precision"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + precision = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("scale"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scale = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetObject()); + } + } + properties = dictionary; + continue; + } + } + return new TypeInfo(typeFamily.Value, typeName, Optional.ToNullable(isTableType), Optional.ToNullable(isComplexType), Optional.ToNullable(isNullable), Optional.ToNullable(length), Optional.ToNullable(precision), Optional.ToNullable(scale), Optional.ToDictionary(properties)); + } + + internal partial class TypeInfoConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, TypeInfo model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override TypeInfo Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeTypeInfo(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TypeInfo.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TypeInfo.cs new file mode 100644 index 000000000000..9a6332bbca76 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TypeInfo.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Type information. + public partial class TypeInfo + { + /// Initializes a new instance of TypeInfo. + /// Type name. + /// is null. + public TypeInfo(string typeName) + { + Argument.AssertNotNull(typeName, nameof(typeName)); + + TypeName = typeName; + Properties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of TypeInfo. + /// Type family. + /// Type name. + /// Is Table type. + /// Is Complex type. + /// Is Nullable. + /// Length. + /// Precision. + /// Scale. + /// Property bag. + internal TypeInfo(string typeFamily, string typeName, bool? isTableType, bool? isComplexType, bool? isNullable, int? length, int? precision, int? scale, IDictionary properties) + { + TypeFamily = typeFamily; + TypeName = typeName; + IsTableType = isTableType; + IsComplexType = isComplexType; + IsNullable = isNullable; + Length = length; + Precision = precision; + Scale = scale; + Properties = properties; + } + + /// Type family. + public string TypeFamily { get; set; } + /// Type name. + public string TypeName { get; set; } + /// Is Table type. + public bool? IsTableType { get; set; } + /// Is Complex type. + public bool? IsComplexType { get; set; } + /// Is Nullable. + public bool? IsNullable { get; set; } + /// Length. + public int? Length { get; set; } + /// Precision. + public int? Precision { get; set; } + /// Scale. + public int? Scale { get; set; } + /// Property bag. + public IDictionary Properties { get; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/UnknownActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/UnknownActivity.Serialization.cs index abf7bbd4ba1b..1083add98c62 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/UnknownActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/UnknownActivity.Serialization.cs @@ -25,6 +25,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -62,6 +72,8 @@ internal static UnknownActivity DeserializeUnknownActivity(JsonElement element) string name = default; string type = "Unknown"; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; IDictionary additionalProperties = default; @@ -83,6 +95,24 @@ internal static UnknownActivity DeserializeUnknownActivity(JsonElement element) description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -114,7 +144,7 @@ internal static UnknownActivity DeserializeUnknownActivity(JsonElement element) additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new UnknownActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties); + return new UnknownActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties); } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/UnknownActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/UnknownActivity.cs index 861e916664c5..49af6d864a35 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/UnknownActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/UnknownActivity.cs @@ -16,10 +16,12 @@ internal partial class UnknownActivity : Activity /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. - internal UnknownActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties) : base(name, type, description, dependsOn, userProperties, additionalProperties) + internal UnknownActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) { Type = type ?? "Unknown"; } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/UntilActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/UntilActivity.Serialization.cs index ad06975905e4..71c0309555b0 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/UntilActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/UntilActivity.Serialization.cs @@ -28,6 +28,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -82,6 +92,8 @@ internal static UntilActivity DeserializeUntilActivity(JsonElement element) string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; Expression expression = default; @@ -106,6 +118,24 @@ internal static UntilActivity DeserializeUntilActivity(JsonElement element) description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -173,7 +203,7 @@ internal static UntilActivity DeserializeUntilActivity(JsonElement element) additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new UntilActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, expression, timeout.Value, activities); + return new UntilActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, expression, timeout.Value, activities); } internal partial class UntilActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/UntilActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/UntilActivity.cs index 70c9405cef1d..a7f2e94c62fe 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/UntilActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/UntilActivity.cs @@ -39,6 +39,8 @@ public UntilActivity(string name, Expression expression, IEnumerable a /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -49,7 +51,7 @@ public UntilActivity(string name, Expression expression, IEnumerable a /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . /// - internal UntilActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, Expression expression, object timeout, IList activities) : base(name, type, description, dependsOn, userProperties, additionalProperties) + internal UntilActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, Expression expression, object timeout, IList activities) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) { Expression = expression; Timeout = timeout; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValidationActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValidationActivity.Serialization.cs index 39061523ca23..76b536b3473f 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValidationActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValidationActivity.Serialization.cs @@ -28,6 +28,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -90,6 +100,8 @@ internal static ValidationActivity DeserializeValidationActivity(JsonElement ele string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; Optional timeout = default; @@ -116,6 +128,24 @@ internal static ValidationActivity DeserializeValidationActivity(JsonElement ele description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -200,7 +230,7 @@ internal static ValidationActivity DeserializeValidationActivity(JsonElement ele additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new ValidationActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, timeout.Value, sleep.Value, minimumSize.Value, childItems.Value, dataset); + return new ValidationActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, timeout.Value, sleep.Value, minimumSize.Value, childItems.Value, dataset); } internal partial class ValidationActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValidationActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValidationActivity.cs index 8b0d72b740f9..b9656cbb0592 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValidationActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValidationActivity.cs @@ -31,6 +31,8 @@ public ValidationActivity(string name, DatasetReference dataset) : base(name) /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -39,7 +41,7 @@ public ValidationActivity(string name, DatasetReference dataset) : base(name) /// Can be used if dataset points to a file. The file must be greater than or equal in size to the value specified. Type: integer (or Expression with resultType integer). /// Can be used if dataset points to a folder. If set to true, the folder must have at least one file. If set to false, the folder must be empty. Type: boolean (or Expression with resultType boolean). /// Validation activity dataset reference. - internal ValidationActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, object timeout, object sleep, object minimumSize, object childItems, DatasetReference dataset) : base(name, type, description, dependsOn, userProperties, additionalProperties) + internal ValidationActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, object timeout, object sleep, object minimumSize, object childItems, DatasetReference dataset) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) { Timeout = timeout; Sleep = sleep; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValidationStatus.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValidationStatus.Serialization.cs new file mode 100644 index 000000000000..8ed49797fe6d --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValidationStatus.Serialization.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + internal static partial class ValidationStatusExtensions + { + public static string ToSerialString(this ValidationStatus value) => value switch + { + ValidationStatus.Valid => "VALID", + ValidationStatus.Invalid => "INVALID", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ValidationStatus value.") + }; + + public static ValidationStatus ToValidationStatus(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "VALID")) return ValidationStatus.Valid; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "INVALID")) return ValidationStatus.Invalid; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ValidationStatus value."); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValidationStatus.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValidationStatus.cs new file mode 100644 index 000000000000..5cbc67590f6e --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValidationStatus.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Validation Status. + internal enum ValidationStatus + { + /// VALID. + Valid, + /// INVALID. + Invalid + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntity.Serialization.cs new file mode 100644 index 000000000000..cf4f40c26404 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntity.Serialization.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(ViewEntityConverter))] + public partial class ViewEntity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToSerialString()); + writer.WriteEndObject(); + } + + internal static ViewEntity DeserializeViewEntity(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ViewEntityProperties properties = default; + string name = default; + SASEntityType type = default; + Optional id = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + properties = ViewEntityProperties.DeserializeViewEntityProperties(property.Value); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString().ToSASEntityType(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + } + return new ViewEntity(name, type, id.Value, properties); + } + + internal partial class ViewEntityConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, ViewEntity model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override ViewEntity Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeViewEntity(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntity.cs new file mode 100644 index 000000000000..b4e12f8a11d6 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntity.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// View entity. + public partial class ViewEntity : MDEntity + { + /// Initializes a new instance of ViewEntity. + /// Entity Name. + /// Artifact type. + /// Database properties. + /// or is null. + public ViewEntity(string name, SASEntityType type, ViewEntityProperties properties) : base(name, type) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of ViewEntity. + /// Entity Name. + /// Artifact type. + /// Entity Resource Id. + /// Database properties. + internal ViewEntity(string name, SASEntityType type, string id, ViewEntityProperties properties) : base(name, type, id) + { + Properties = properties; + } + + /// Database properties. + public ViewEntityProperties Properties { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntityProperties.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntityProperties.Serialization.cs new file mode 100644 index 000000000000..780f7ee48537 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntityProperties.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + [JsonConverter(typeof(ViewEntityPropertiesConverter))] + public partial class ViewEntityProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("namespace"u8); + writer.WriteObjectValue(Namespace); + if (Optional.IsDefined(Partitioning)) + { + writer.WritePropertyName("partitioning"u8); + writer.WriteObjectValue(Partitioning); + } + writer.WritePropertyName("storageDescriptor"u8); + writer.WriteObjectValue(StorageDescriptor); + if (Optional.IsDefined(ViewOriginalText)) + { + writer.WritePropertyName("viewOriginalText"u8); + writer.WriteStringValue(ViewOriginalText); + } + if (Optional.IsDefined(ViewExpandedText)) + { + writer.WritePropertyName("viewExpandedText"u8); + writer.WriteStringValue(ViewExpandedText); + } + if (Optional.IsDefined(Temporary)) + { + writer.WritePropertyName("temporary"u8); + writer.WriteBooleanValue(Temporary.Value); + } + if (Optional.IsDefined(IsRewriteEnabled)) + { + writer.WritePropertyName("isRewriteEnabled"u8); + writer.WriteBooleanValue(IsRewriteEnabled.Value); + } + if (Optional.IsDefined(OriginObjectId)) + { + writer.WritePropertyName("originObjectId"u8); + writer.WriteStringValue(OriginObjectId); + } + if (Optional.IsDefined(PublishStatus)) + { + writer.WritePropertyName("publishStatus"u8); + writer.WriteStringValue(PublishStatus.Value.ToString()); + } + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static ViewEntityProperties DeserializeViewEntityProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + TableNamespace @namespace = default; + Optional partitioning = default; + StorageDescriptor storageDescriptor = default; + Optional viewOriginalText = default; + Optional viewExpandedText = default; + Optional temporary = default; + Optional isRewriteEnabled = default; + Optional originObjectId = default; + Optional objectId = default; + Optional objectVersion = default; + Optional publishStatus = default; + Optional> properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("namespace"u8)) + { + @namespace = TableNamespace.DeserializeTableNamespace(property.Value); + continue; + } + if (property.NameEquals("partitioning"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + partitioning = TablePartitioning.DeserializeTablePartitioning(property.Value); + continue; + } + if (property.NameEquals("storageDescriptor"u8)) + { + storageDescriptor = StorageDescriptor.DeserializeStorageDescriptor(property.Value); + continue; + } + if (property.NameEquals("viewOriginalText"u8)) + { + viewOriginalText = property.Value.GetString(); + continue; + } + if (property.NameEquals("viewExpandedText"u8)) + { + viewExpandedText = property.Value.GetString(); + continue; + } + if (property.NameEquals("temporary"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + temporary = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isRewriteEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRewriteEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("originObjectId"u8)) + { + originObjectId = property.Value.GetString(); + continue; + } + if (property.NameEquals("objectId"u8)) + { + objectId = property.Value.GetString(); + continue; + } + if (property.NameEquals("objectVersion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + objectVersion = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("publishStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + publishStatus = new PublishStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, property0.Value.GetObject()); + } + } + properties = dictionary; + continue; + } + } + return new ViewEntityProperties(originObjectId.Value, objectId.Value, Optional.ToNullable(objectVersion), Optional.ToNullable(publishStatus), Optional.ToDictionary(properties), @namespace, partitioning.Value, storageDescriptor, viewOriginalText.Value, viewExpandedText.Value, Optional.ToNullable(temporary), Optional.ToNullable(isRewriteEnabled)); + } + + internal partial class ViewEntityPropertiesConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, ViewEntityProperties model, JsonSerializerOptions options) + { + writer.WriteObjectValue(model); + } + public override ViewEntityProperties Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeViewEntityProperties(document.RootElement); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntityProperties.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntityProperties.cs new file mode 100644 index 000000000000..d73e6fd0fa02 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntityProperties.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts.Models +{ + /// Database properties. + public partial class ViewEntityProperties : MDEntityProperties + { + /// Initializes a new instance of ViewEntityProperties. + /// Table namespace. + /// Storage descriptor. + /// or is null. + public ViewEntityProperties(TableNamespace @namespace, StorageDescriptor storageDescriptor) + { + Argument.AssertNotNull(@namespace, nameof(@namespace)); + Argument.AssertNotNull(storageDescriptor, nameof(storageDescriptor)); + + Namespace = @namespace; + StorageDescriptor = storageDescriptor; + } + + /// Initializes a new instance of ViewEntityProperties. + /// Entity object id maintained by the caller. + /// Entity object id maintained by SyMS. + /// Entity object version maintained by SyMS. + /// Publish status. + /// Property bag. + /// Table namespace. + /// Table partitioning information. + /// Storage descriptor. + /// View original text. + /// View expanded text. + /// Temporary. + /// Is rewrite enabled. + internal ViewEntityProperties(string originObjectId, string objectId, long? objectVersion, PublishStatus? publishStatus, IDictionary properties, TableNamespace @namespace, TablePartitioning partitioning, StorageDescriptor storageDescriptor, string viewOriginalText, string viewExpandedText, bool? temporary, bool? isRewriteEnabled) : base(originObjectId, objectId, objectVersion, publishStatus, properties) + { + Namespace = @namespace; + Partitioning = partitioning; + StorageDescriptor = storageDescriptor; + ViewOriginalText = viewOriginalText; + ViewExpandedText = viewExpandedText; + Temporary = temporary; + IsRewriteEnabled = isRewriteEnabled; + } + + /// Table namespace. + public TableNamespace Namespace { get; set; } + /// Table partitioning information. + public TablePartitioning Partitioning { get; set; } + /// Storage descriptor. + public StorageDescriptor StorageDescriptor { get; set; } + /// View original text. + public string ViewOriginalText { get; set; } + /// View expanded text. + public string ViewExpandedText { get; set; } + /// Temporary. + public bool? Temporary { get; set; } + /// Is rewrite enabled. + public bool? IsRewriteEnabled { get; set; } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WaitActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WaitActivity.Serialization.cs index 7e3decab389b..be7ed13e8f45 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WaitActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WaitActivity.Serialization.cs @@ -28,6 +28,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -70,6 +80,8 @@ internal static WaitActivity DeserializeWaitActivity(JsonElement element) string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; object waitTimeInSeconds = default; @@ -92,6 +104,24 @@ internal static WaitActivity DeserializeWaitActivity(JsonElement element) description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -140,7 +170,7 @@ internal static WaitActivity DeserializeWaitActivity(JsonElement element) additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new WaitActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, waitTimeInSeconds); + return new WaitActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, waitTimeInSeconds); } internal partial class WaitActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WaitActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WaitActivity.cs index d44c109535e2..84dc51a89c36 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WaitActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WaitActivity.cs @@ -31,11 +31,13 @@ public WaitActivity(string name, object waitTimeInSeconds) : base(name) /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. /// Duration in seconds. - internal WaitActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, object waitTimeInSeconds) : base(name, type, description, dependsOn, userProperties, additionalProperties) + internal WaitActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, object waitTimeInSeconds) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) { WaitTimeInSeconds = waitTimeInSeconds; Type = type ?? "Wait"; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivity.Serialization.cs index a67ae7490aca..9f5be731526f 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivity.Serialization.cs @@ -38,6 +38,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -124,6 +134,8 @@ internal static WebActivity DeserializeWebActivity(JsonElement element) string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; WebActivityMethod method = default; @@ -171,6 +183,24 @@ internal static WebActivity DeserializeWebActivity(JsonElement element) description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -288,7 +318,7 @@ internal static WebActivity DeserializeWebActivity(JsonElement element) additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new WebActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, method, url, headers.Value, body.Value, authentication.Value, Optional.ToList(datasets), Optional.ToList(linkedServices), connectVia.Value); + return new WebActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, method, url, headers.Value, body.Value, authentication.Value, Optional.ToList(datasets), Optional.ToList(linkedServices), connectVia.Value); } internal partial class WebActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivity.cs index 5c9afe81f8a7..adc9b1e56aa3 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivity.cs @@ -35,6 +35,8 @@ public WebActivity(string name, WebActivityMethod method, object url) : base(nam /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -48,7 +50,7 @@ public WebActivity(string name, WebActivityMethod method, object url) : base(nam /// List of datasets passed to web endpoint. /// List of linked services passed to web endpoint. /// The integration runtime reference. - internal WebActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, WebActivityMethod method, object url, object headers, object body, WebActivityAuthentication authentication, IList datasets, IList linkedServices, IntegrationRuntimeReference connectVia) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) + internal WebActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, WebActivityMethod method, object url, object headers, object body, WebActivityAuthentication authentication, IList datasets, IList linkedServices, IntegrationRuntimeReference connectVia) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy) { Method = method; Url = url; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivityAuthentication.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivityAuthentication.Serialization.cs index 1e6c5bfb77f0..23c94ab735fc 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivityAuthentication.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivityAuthentication.Serialization.cs @@ -38,7 +38,17 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) if (Optional.IsDefined(Resource)) { writer.WritePropertyName("resource"u8); - writer.WriteStringValue(Resource); + writer.WriteObjectValue(Resource); + } + if (Optional.IsDefined(UserTenant)) + { + writer.WritePropertyName("userTenant"u8); + writer.WriteObjectValue(UserTenant); + } + if (Optional.IsDefined(Credential)) + { + writer.WritePropertyName("credential"u8); + writer.WriteObjectValue(Credential); } writer.WriteEndObject(); } @@ -53,7 +63,9 @@ internal static WebActivityAuthentication DeserializeWebActivityAuthentication(J Optional pfx = default; Optional username = default; Optional password = default; - Optional resource = default; + Optional resource = default; + Optional userTenant = default; + Optional credential = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type"u8)) @@ -86,11 +98,33 @@ internal static WebActivityAuthentication DeserializeWebActivityAuthentication(J } if (property.NameEquals("resource"u8)) { - resource = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resource = property.Value.GetObject(); + continue; + } + if (property.NameEquals("userTenant"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userTenant = property.Value.GetObject(); + continue; + } + if (property.NameEquals("credential"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + credential = CredentialReference.DeserializeCredentialReference(property.Value); continue; } } - return new WebActivityAuthentication(type, pfx.Value, username.Value, password.Value, resource.Value); + return new WebActivityAuthentication(type, pfx.Value, username.Value, password.Value, resource.Value, userTenant.Value, credential.Value); } internal partial class WebActivityAuthenticationConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivityAuthentication.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivityAuthentication.cs index aee39ce5f768..b71d540b2326 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivityAuthentication.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebActivityAuthentication.cs @@ -36,14 +36,18 @@ public WebActivityAuthentication(string type) /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// - /// Resource for which Azure Auth token will be requested when using MSI Authentication. - internal WebActivityAuthentication(string type, SecretBase pfx, string username, SecretBase password, string resource) + /// Resource for which Azure Auth token will be requested when using MSI Authentication. Type: string (or Expression with resultType string). + /// TenantId for which Azure Auth token will be requested when using ServicePrincipal Authentication. Type: string (or Expression with resultType string). + /// The credential reference containing authentication information. + internal WebActivityAuthentication(string type, SecretBase pfx, string username, SecretBase password, object resource, object userTenant, CredentialReference credential) { Type = type; Pfx = pfx; Username = username; Password = password; Resource = resource; + UserTenant = userTenant; + Credential = credential; } /// Web activity authentication (Basic/ClientCertificate/MSI). @@ -62,7 +66,11 @@ internal WebActivityAuthentication(string type, SecretBase pfx, string username, /// The available derived classes include and . /// public SecretBase Password { get; set; } - /// Resource for which Azure Auth token will be requested when using MSI Authentication. - public string Resource { get; set; } + /// Resource for which Azure Auth token will be requested when using MSI Authentication. Type: string (or Expression with resultType string). + public object Resource { get; set; } + /// TenantId for which Azure Auth token will be requested when using ServicePrincipal Authentication. Type: string (or Expression with resultType string). + public object UserTenant { get; set; } + /// The credential reference containing authentication information. + public CredentialReference Credential { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebHookActivity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebHookActivity.Serialization.cs index 2e86f8b3e9d8..07203cde04e9 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebHookActivity.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebHookActivity.Serialization.cs @@ -28,6 +28,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(OnInactiveMarkAs)) + { + writer.WritePropertyName("onInactiveMarkAs"u8); + writer.WriteStringValue(OnInactiveMarkAs.Value.ToString()); + } if (Optional.IsCollectionDefined(DependsOn)) { writer.WritePropertyName("dependsOn"u8); @@ -97,6 +107,8 @@ internal static WebHookActivity DeserializeWebHookActivity(JsonElement element) string name = default; string type = default; Optional description = default; + Optional state = default; + Optional onInactiveMarkAs = default; Optional> dependsOn = default; Optional> userProperties = default; WebHookActivityMethod method = default; @@ -125,6 +137,24 @@ internal static WebHookActivity DeserializeWebHookActivity(JsonElement element) description = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ActivityState(property.Value.GetString()); + continue; + } + if (property.NameEquals("onInactiveMarkAs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onInactiveMarkAs = new ActivityOnInactiveMarkAs(property.Value.GetString()); + continue; + } if (property.NameEquals("dependsOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -219,7 +249,7 @@ internal static WebHookActivity DeserializeWebHookActivity(JsonElement element) additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new WebHookActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, method, url, timeout.Value, headers.Value, body.Value, authentication.Value, reportStatusOnCallBack.Value); + return new WebHookActivity(name, type, description.Value, Optional.ToNullable(state), Optional.ToNullable(onInactiveMarkAs), Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, method, url, timeout.Value, headers.Value, body.Value, authentication.Value, reportStatusOnCallBack.Value); } internal partial class WebHookActivityConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebHookActivity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebHookActivity.cs index 06774cdb98de..03b57c48bbcd 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebHookActivity.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/WebHookActivity.cs @@ -33,6 +33,8 @@ public WebHookActivity(string name, WebHookActivityMethod method, object url) : /// Activity name. /// Type of activity. /// Activity description. + /// Activity state. This is an optional property and if not provided, the state will be Active by default. + /// Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. /// Activity depends on condition. /// Activity user properties. /// Additional Properties. @@ -43,7 +45,7 @@ public WebHookActivity(string name, WebHookActivityMethod method, object url) : /// Represents the payload that will be sent to the endpoint. Required for POST/PUT method, not allowed for GET method Type: string (or Expression with resultType string). /// Authentication method used for calling the endpoint. /// When set to true, statusCode, output and error in callback request body will be consumed by activity. The activity can be marked as failed by setting statusCode >= 400 in callback request. Default is false. Type: boolean (or Expression with resultType boolean). - internal WebHookActivity(string name, string type, string description, IList dependsOn, IList userProperties, IDictionary additionalProperties, WebHookActivityMethod method, object url, string timeout, object headers, object body, WebActivityAuthentication authentication, object reportStatusOnCallBack) : base(name, type, description, dependsOn, userProperties, additionalProperties) + internal WebHookActivity(string name, string type, string description, ActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList dependsOn, IList userProperties, IDictionary additionalProperties, WebHookActivityMethod method, object url, string timeout, object headers, object body, WebActivityAuthentication authentication, object reportStatusOnCallBack) : base(name, type, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties) { Method = method; Url = url; diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/RunNotebookClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/RunNotebookClient.cs new file mode 100644 index 000000000000..c5666dc22a2b --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/RunNotebookClient.cs @@ -0,0 +1,232 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + /// The RunNotebook service client. + public partial class RunNotebookClient + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal RunNotebookRestClient RestClient { get; } + + /// Initializes a new instance of RunNotebookClient for mocking. + protected RunNotebookClient() + { + } + + /// Initializes a new instance of RunNotebookClient. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + public RunNotebookClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (credential == null) + { + throw new ArgumentNullException(nameof(credential)); + } + + options ??= new ArtifactsClientOptions(); + _clientDiagnostics = new ClientDiagnostics(options); + string[] scopes = { "https://dev.azuresynapse.net/.default" }; + _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); + RestClient = new RunNotebookRestClient(_clientDiagnostics, _pipeline, endpoint); + } + + /// Initializes a new instance of RunNotebookClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// , or is null. + internal RunNotebookClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint) + { + RestClient = new RunNotebookRestClient(clientDiagnostics, pipeline, endpoint); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Get RunNotebook Status for run id. + /// Notebook run id. + /// The cancellation token to use. + public virtual async Task> GetStatusAsync(string runId, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("RunNotebookClient.GetStatus"); + scope.Start(); + try + { + return await RestClient.GetStatusAsync(runId, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get RunNotebook Status for run id. + /// Notebook run id. + /// The cancellation token to use. + public virtual Response GetStatus(string runId, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("RunNotebookClient.GetStatus"); + scope.Start(); + try + { + return RestClient.GetStatus(runId, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Cancel notebook run. + /// Notebook run id. + /// The cancellation token to use. + public virtual async Task> CancelRunAsync(string runId, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("RunNotebookClient.CancelRun"); + scope.Start(); + try + { + return await RestClient.CancelRunAsync(runId, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Cancel notebook run. + /// Notebook run id. + /// The cancellation token to use. + public virtual Response CancelRun(string runId, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("RunNotebookClient.CancelRun"); + scope.Start(); + try + { + return RestClient.CancelRun(runId, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get RunNotebook Snapshot for run id. + /// Notebook run id. + /// The cancellation token to use. + public virtual async Task> GetSnapshotAsync(string runId, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("RunNotebookClient.GetSnapshot"); + scope.Start(); + try + { + return await RestClient.GetSnapshotAsync(runId, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get RunNotebook Snapshot for run id. + /// Notebook run id. + /// The cancellation token to use. + public virtual Response GetSnapshot(string runId, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("RunNotebookClient.GetSnapshot"); + scope.Start(); + try + { + return RestClient.GetSnapshot(runId, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Run notebook. + /// Notebook run id. + /// Run notebook request payload. + /// The cancellation token to use. + /// or is null. + public virtual async Task StartCreateRunAsync(string runId, RunNotebookRequest runNotebookRequest, CancellationToken cancellationToken = default) + { + if (runId == null) + { + throw new ArgumentNullException(nameof(runId)); + } + if (runNotebookRequest == null) + { + throw new ArgumentNullException(nameof(runNotebookRequest)); + } + + using var scope = _clientDiagnostics.CreateScope("RunNotebookClient.StartCreateRun"); + scope.Start(); + try + { + var originalResponse = await RestClient.CreateRunAsync(runId, runNotebookRequest, cancellationToken).ConfigureAwait(false); + return new RunNotebookCreateRunOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreateRunRequest(runId, runNotebookRequest).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Run notebook. + /// Notebook run id. + /// Run notebook request payload. + /// The cancellation token to use. + /// or is null. + public virtual RunNotebookCreateRunOperation StartCreateRun(string runId, RunNotebookRequest runNotebookRequest, CancellationToken cancellationToken = default) + { + if (runId == null) + { + throw new ArgumentNullException(nameof(runId)); + } + if (runNotebookRequest == null) + { + throw new ArgumentNullException(nameof(runNotebookRequest)); + } + + using var scope = _clientDiagnostics.CreateScope("RunNotebookClient.StartCreateRun"); + scope.Start(); + try + { + var originalResponse = RestClient.CreateRun(runId, runNotebookRequest, cancellationToken); + return new RunNotebookCreateRunOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreateRunRequest(runId, runNotebookRequest).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/RunNotebookCreateRunHeaders.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/RunNotebookCreateRunHeaders.cs new file mode 100644 index 000000000000..fb79e0b7c26a --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/RunNotebookCreateRunHeaders.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure; +using Azure.Core; + +namespace Azure.Analytics.Synapse.Artifacts +{ + internal partial class RunNotebookCreateRunHeaders + { + private readonly Response _response; + public RunNotebookCreateRunHeaders(Response response) + { + _response = response; + } + /// URI to poll for asynchronous operation status. + public string Location => _response.Headers.TryGetValue("location", out string value) ? value : null; + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/RunNotebookCreateRunOperation.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/RunNotebookCreateRunOperation.cs new file mode 100644 index 000000000000..2a116302547f --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/RunNotebookCreateRunOperation.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + /// Run notebook. + public partial class RunNotebookCreateRunOperation : Operation, IOperationSource + { + private readonly OperationInternal _operation; + + /// Initializes a new instance of RunNotebookCreateRunOperation for mocking. + protected RunNotebookCreateRunOperation() + { + } + + internal RunNotebookCreateRunOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) + { + IOperation nextLinkOperation = NextLinkOperationImplementation.Create(this, pipeline, request.Method, request.Uri.ToUri(), response, OperationFinalStateVia.Location); + _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "RunNotebookCreateRunOperation"); + } + + /// +#pragma warning disable CA1822 + public override string Id => throw new NotImplementedException(); +#pragma warning restore CA1822 + + /// + public override RunNotebookResponse Value => _operation.Value; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override bool HasValue => _operation.HasValue; + + /// + public override Response GetRawResponse() => _operation.RawResponse; + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override Response WaitForCompletion(CancellationToken cancellationToken = default) => _operation.WaitForCompletion(cancellationToken); + + /// + public override Response WaitForCompletion(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletion(pollingInterval, cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); + + RunNotebookResponse IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return RunNotebookResponse.DeserializeRunNotebookResponse(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return RunNotebookResponse.DeserializeRunNotebookResponse(document.RootElement); + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/RunNotebookRestClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/RunNotebookRestClient.cs new file mode 100644 index 000000000000..3a9fef1d5d84 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/RunNotebookRestClient.cs @@ -0,0 +1,323 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + internal partial class RunNotebookRestClient + { + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// Initializes a new instance of RunNotebookRestClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// , or is null. + public RunNotebookRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint) + { + ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? throw new ArgumentNullException(nameof(endpoint)); + } + + internal HttpMessage CreateCreateRunRequest(string runId, RunNotebookRequest runNotebookRequest) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/notebooks/runs/", false); + uri.AppendPath(runId, true); + uri.AppendQuery("api-version", "2022-03-01-preview", true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(runNotebookRequest); + request.Content = content; + return message; + } + + /// Run notebook. + /// Notebook run id. + /// Run notebook request payload. + /// The cancellation token to use. + /// or is null. + public async Task> CreateRunAsync(string runId, RunNotebookRequest runNotebookRequest, CancellationToken cancellationToken = default) + { + if (runId == null) + { + throw new ArgumentNullException(nameof(runId)); + } + if (runNotebookRequest == null) + { + throw new ArgumentNullException(nameof(runNotebookRequest)); + } + + using var message = CreateCreateRunRequest(runId, runNotebookRequest); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + var headers = new RunNotebookCreateRunHeaders(message.Response); + switch (message.Response.Status) + { + case 202: + return ResponseWithHeaders.FromValue(headers, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Run notebook. + /// Notebook run id. + /// Run notebook request payload. + /// The cancellation token to use. + /// or is null. + public ResponseWithHeaders CreateRun(string runId, RunNotebookRequest runNotebookRequest, CancellationToken cancellationToken = default) + { + if (runId == null) + { + throw new ArgumentNullException(nameof(runId)); + } + if (runNotebookRequest == null) + { + throw new ArgumentNullException(nameof(runNotebookRequest)); + } + + using var message = CreateCreateRunRequest(runId, runNotebookRequest); + _pipeline.Send(message, cancellationToken); + var headers = new RunNotebookCreateRunHeaders(message.Response); + switch (message.Response.Status) + { + case 202: + return ResponseWithHeaders.FromValue(headers, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetStatusRequest(string runId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/notebooks/runs/", false); + uri.AppendPath(runId, true); + uri.AppendQuery("api-version", "2022-03-01-preview", true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Get RunNotebook Status for run id. + /// Notebook run id. + /// The cancellation token to use. + /// is null. + public async Task> GetStatusAsync(string runId, CancellationToken cancellationToken = default) + { + if (runId == null) + { + throw new ArgumentNullException(nameof(runId)); + } + + using var message = CreateGetStatusRequest(runId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RunNotebookResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = RunNotebookResponse.DeserializeRunNotebookResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get RunNotebook Status for run id. + /// Notebook run id. + /// The cancellation token to use. + /// is null. + public Response GetStatus(string runId, CancellationToken cancellationToken = default) + { + if (runId == null) + { + throw new ArgumentNullException(nameof(runId)); + } + + using var message = CreateGetStatusRequest(runId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RunNotebookResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = RunNotebookResponse.DeserializeRunNotebookResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCancelRunRequest(string runId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/notebooks/runs/", false); + uri.AppendPath(runId, true); + uri.AppendPath("/cancel", false); + uri.AppendQuery("api-version", "2022-03-01-preview", true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Cancel notebook run. + /// Notebook run id. + /// The cancellation token to use. + /// is null. + public async Task> CancelRunAsync(string runId, CancellationToken cancellationToken = default) + { + if (runId == null) + { + throw new ArgumentNullException(nameof(runId)); + } + + using var message = CreateCancelRunRequest(runId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RunNotebookResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = RunNotebookResponse.DeserializeRunNotebookResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Cancel notebook run. + /// Notebook run id. + /// The cancellation token to use. + /// is null. + public Response CancelRun(string runId, CancellationToken cancellationToken = default) + { + if (runId == null) + { + throw new ArgumentNullException(nameof(runId)); + } + + using var message = CreateCancelRunRequest(runId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RunNotebookResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = RunNotebookResponse.DeserializeRunNotebookResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetSnapshotRequest(string runId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/notebooks/runs/", false); + uri.AppendPath(runId, true); + uri.AppendPath("/snapshot", false); + uri.AppendQuery("api-version", "2022-03-01-preview", true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Get RunNotebook Snapshot for run id. + /// Notebook run id. + /// The cancellation token to use. + /// is null. + public async Task> GetSnapshotAsync(string runId, CancellationToken cancellationToken = default) + { + if (runId == null) + { + throw new ArgumentNullException(nameof(runId)); + } + + using var message = CreateGetSnapshotRequest(runId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RunNotebookSnapshotResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = RunNotebookSnapshotResponse.DeserializeRunNotebookSnapshotResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get RunNotebook Snapshot for run id. + /// Notebook run id. + /// The cancellation token to use. + /// is null. + public Response GetSnapshot(string runId, CancellationToken cancellationToken = default) + { + if (runId == null) + { + throw new ArgumentNullException(nameof(runId)); + } + + using var message = CreateGetSnapshotRequest(runId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RunNotebookSnapshotResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = RunNotebookSnapshotResponse.DeserializeRunNotebookSnapshotResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SynapseMetadataClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SynapseMetadataClient.cs new file mode 100644 index 000000000000..ef891de4fa80 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SynapseMetadataClient.cs @@ -0,0 +1,894 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + /// The SynapseMetadata service client. + public partial class SynapseMetadataClient + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal SynapseMetadataRestClient RestClient { get; } + + /// Initializes a new instance of SynapseMetadataClient for mocking. + protected SynapseMetadataClient() + { + } + + /// Initializes a new instance of SynapseMetadataClient. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + public SynapseMetadataClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (credential == null) + { + throw new ArgumentNullException(nameof(credential)); + } + + options ??= new ArtifactsClientOptions(); + _clientDiagnostics = new ClientDiagnostics(options); + string[] scopes = { "https://dev.azuresynapse.net/.default" }; + _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); + RestClient = new SynapseMetadataRestClient(_clientDiagnostics, _pipeline, endpoint); + } + + /// Initializes a new instance of SynapseMetadataClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// , or is null. + internal SynapseMetadataClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint) + { + RestClient = new SynapseMetadataRestClient(clientDiagnostics, pipeline, endpoint); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Batch execution of DDL Payload. + /// DDLBatch payload containing artifact drafts to be created or deleted or modified. + /// The cancellation token to use. + /// Batch execution of DDL Payload. + public virtual async Task> ExecuteChangeAsync(DDLBatch createArtifactsPayload, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ExecuteChange"); + scope.Start(); + try + { + return await RestClient.ExecuteChangeAsync(createArtifactsPayload, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Batch execution of DDL Payload. + /// DDLBatch payload containing artifact drafts to be created or deleted or modified. + /// The cancellation token to use. + /// Batch execution of DDL Payload. + public virtual Response ExecuteChange(DDLBatch createArtifactsPayload, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ExecuteChange"); + scope.Start(); + try + { + return RestClient.ExecuteChange(createArtifactsPayload, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get all databases in a workspace. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// Get all databases in a workspace. + public virtual async Task> ListDatabasesAsync(string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ListDatabases"); + scope.Start(); + try + { + return await RestClient.ListDatabasesAsync(continuationToken, maxPageSize, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get all databases in a workspace. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// Get all databases in a workspace. + public virtual Response ListDatabases(string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ListDatabases"); + scope.Start(); + try + { + return RestClient.ListDatabases(continuationToken, maxPageSize, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List all Artifacts of a type in a database. + /// Database name. + /// Artifact type. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// List all Artifacts of a type in a database. + public virtual async Task> ListArtifactsAsync(string databaseName, SASEntityType artifactType, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ListArtifacts"); + scope.Start(); + try + { + return await RestClient.ListArtifactsAsync(databaseName, artifactType, continuationToken, maxPageSize, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List all Artifacts of a type in a database. + /// Database name. + /// Artifact type. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// List all Artifacts of a type in a database. + public virtual Response ListArtifacts(string databaseName, SASEntityType artifactType, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ListArtifacts"); + scope.Start(); + try + { + return RestClient.ListArtifacts(databaseName, artifactType, continuationToken, maxPageSize, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List all artifacts in schema by type. + /// Database name. + /// Schema name. + /// Artifact type. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// List all Artifacts in schema by type. + public virtual async Task> ListArtifactsInSchemaByTypeAsync(string databaseName, string schemaName, SASEntityType artifactType, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ListArtifactsInSchemaByType"); + scope.Start(); + try + { + return await RestClient.ListArtifactsInSchemaByTypeAsync(databaseName, schemaName, artifactType, continuationToken, maxPageSize, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List all artifacts in schema by type. + /// Database name. + /// Schema name. + /// Artifact type. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// List all Artifacts in schema by type. + public virtual Response ListArtifactsInSchemaByType(string databaseName, string schemaName, SASEntityType artifactType, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ListArtifactsInSchemaByType"); + scope.Start(); + try + { + return RestClient.ListArtifactsInSchemaByType(databaseName, schemaName, artifactType, continuationToken, maxPageSize, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List all partition information for a table. + /// Database name. + /// Table name. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// List all partition information for a table. + public virtual async Task> ListPartitionInfosForTableAsync(string databaseName, string tableName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ListPartitionInfosForTable"); + scope.Start(); + try + { + return await RestClient.ListPartitionInfosForTableAsync(databaseName, tableName, continuationToken, maxPageSize, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List all partition information for a table. + /// Database name. + /// Table name. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// List all partition information for a table. + public virtual Response ListPartitionInfosForTable(string databaseName, string tableName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ListPartitionInfosForTable"); + scope.Start(); + try + { + return RestClient.ListPartitionInfosForTable(databaseName, tableName, continuationToken, maxPageSize, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List all partition information for a view. + /// Database name. + /// View name. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// List all partition information for a view. + public virtual async Task> ListPartitionInfosForViewAsync(string databaseName, string viewName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ListPartitionInfosForView"); + scope.Start(); + try + { + return await RestClient.ListPartitionInfosForViewAsync(databaseName, viewName, continuationToken, maxPageSize, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List all partition information for a view. + /// Database name. + /// View name. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// List all partition information for a view. + public virtual Response ListPartitionInfosForView(string databaseName, string viewName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ListPartitionInfosForView"); + scope.Start(); + try + { + return RestClient.ListPartitionInfosForView(databaseName, viewName, continuationToken, maxPageSize, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List all partition information for table in schema. + /// Database name. + /// Schema name. + /// Table name. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// List all partition information for a table in schema. + public virtual async Task> ListPartitionInfosForSchemaAndTableAsync(string databaseName, string schemaName, string tableName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ListPartitionInfosForSchemaAndTable"); + scope.Start(); + try + { + return await RestClient.ListPartitionInfosForSchemaAndTableAsync(databaseName, schemaName, tableName, continuationToken, maxPageSize, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List all partition information for table in schema. + /// Database name. + /// Schema name. + /// Table name. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// List all partition information for a table in schema. + public virtual Response ListPartitionInfosForSchemaAndTable(string databaseName, string schemaName, string tableName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ListPartitionInfosForSchemaAndTable"); + scope.Start(); + try + { + return RestClient.ListPartitionInfosForSchemaAndTable(databaseName, schemaName, tableName, continuationToken, maxPageSize, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List all partition information for a view in schema. + /// Database name. + /// Schema name. + /// View name. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// List all partition information for a view in schema. + public virtual async Task> ListPartitionInfosForSchemaAndViewAsync(string databaseName, string schemaName, string viewName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ListPartitionInfosForSchemaAndView"); + scope.Start(); + try + { + return await RestClient.ListPartitionInfosForSchemaAndViewAsync(databaseName, schemaName, viewName, continuationToken, maxPageSize, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List all partition information for a view in schema. + /// Database name. + /// Schema name. + /// View name. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// List all partition information for a view in schema. + public virtual Response ListPartitionInfosForSchemaAndView(string databaseName, string schemaName, string viewName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ListPartitionInfosForSchemaAndView"); + scope.Start(); + try + { + return RestClient.ListPartitionInfosForSchemaAndView(databaseName, schemaName, viewName, continuationToken, maxPageSize, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get details about a database. + /// Database name. + /// The cancellation token to use. + /// Get details about a database. + public virtual async Task> GetDatabaseAsync(string databaseName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.GetDatabase"); + scope.Start(); + try + { + return await RestClient.GetDatabaseAsync(databaseName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get details about a database. + /// Database name. + /// The cancellation token to use. + /// Get details about a database. + public virtual Response GetDatabase(string databaseName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.GetDatabase"); + scope.Start(); + try + { + return RestClient.GetDatabase(databaseName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Put a database. + /// Database name. + /// Database entity payload to create or update a Database. + /// The cancellation token to use. + /// Put a database. + public virtual async Task> PutDatabaseAsync(string databaseName, DatabaseEntity createArtifactsPayload, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.PutDatabase"); + scope.Start(); + try + { + return await RestClient.PutDatabaseAsync(databaseName, createArtifactsPayload, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Put a database. + /// Database name. + /// Database entity payload to create or update a Database. + /// The cancellation token to use. + /// Put a database. + public virtual Response PutDatabase(string databaseName, DatabaseEntity createArtifactsPayload, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.PutDatabase"); + scope.Start(); + try + { + return RestClient.PutDatabase(databaseName, createArtifactsPayload, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete a database. + /// Database name. + /// The cancellation token to use. + /// Delete a database. + public virtual async Task DeleteDatabaseAsync(string databaseName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.DeleteDatabase"); + scope.Start(); + try + { + return await RestClient.DeleteDatabaseAsync(databaseName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete a database. + /// Database name. + /// The cancellation token to use. + /// Delete a database. + public virtual Response DeleteDatabase(string databaseName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.DeleteDatabase"); + scope.Start(); + try + { + return RestClient.DeleteDatabase(databaseName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get an artifact from database. + /// Database name. + /// Artifact type. + /// Artifact name. + /// The cancellation token to use. + /// Get an artifact from database. + public virtual async Task> GetArtifactFromDBAsync(string databaseName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.GetArtifactFromDB"); + scope.Start(); + try + { + return await RestClient.GetArtifactFromDBAsync(databaseName, artifactType, artifactName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get an artifact from database. + /// Database name. + /// Artifact type. + /// Artifact name. + /// The cancellation token to use. + /// Get an artifact from database. + public virtual Response GetArtifactFromDB(string databaseName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.GetArtifactFromDB"); + scope.Start(); + try + { + return RestClient.GetArtifactFromDB(databaseName, artifactType, artifactName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Put an artifact in a Database. + /// Database name. + /// Artifact type. + /// Artifact name. + /// Payload containing artifact entity to be created/modified. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// Put an artifact in a Database. + public virtual async Task> PutArtifactInDBAsync(string databaseName, SASEntityType artifactType, string artifactName, MDEntity createArtifactsPayload, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.PutArtifactInDB"); + scope.Start(); + try + { + return await RestClient.PutArtifactInDBAsync(databaseName, artifactType, artifactName, createArtifactsPayload, continuationToken, maxPageSize, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Put an artifact in a Database. + /// Database name. + /// Artifact type. + /// Artifact name. + /// Payload containing artifact entity to be created/modified. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// Put an artifact in a Database. + public virtual Response PutArtifactInDB(string databaseName, SASEntityType artifactType, string artifactName, MDEntity createArtifactsPayload, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.PutArtifactInDB"); + scope.Start(); + try + { + return RestClient.PutArtifactInDB(databaseName, artifactType, artifactName, createArtifactsPayload, continuationToken, maxPageSize, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete an artifact in a Database. + /// Database name. + /// Artifact type. + /// Artifact name. + /// The cancellation token to use. + /// Delete an artifact in a Database. + public virtual async Task DeleteArtifactForDBAsync(string databaseName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.DeleteArtifactForDB"); + scope.Start(); + try + { + return await RestClient.DeleteArtifactForDBAsync(databaseName, artifactType, artifactName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete an artifact in a Database. + /// Database name. + /// Artifact type. + /// Artifact name. + /// The cancellation token to use. + /// Delete an artifact in a Database. + public virtual Response DeleteArtifactForDB(string databaseName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.DeleteArtifactForDB"); + scope.Start(); + try + { + return RestClient.DeleteArtifactForDB(databaseName, artifactType, artifactName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get an artifact from schema. + /// Database name. + /// Schema name. + /// Artifact type. + /// Artifact name. + /// The cancellation token to use. + /// Get an artifact from schema. + public virtual async Task> GetArtifactFromSchemaAsync(string databaseName, string schemaName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.GetArtifactFromSchema"); + scope.Start(); + try + { + return await RestClient.GetArtifactFromSchemaAsync(databaseName, schemaName, artifactType, artifactName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get an artifact from schema. + /// Database name. + /// Schema name. + /// Artifact type. + /// Artifact name. + /// The cancellation token to use. + /// Get an artifact from schema. + public virtual Response GetArtifactFromSchema(string databaseName, string schemaName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.GetArtifactFromSchema"); + scope.Start(); + try + { + return RestClient.GetArtifactFromSchema(databaseName, schemaName, artifactType, artifactName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Create or Update an artifact in a schema. + /// Database name. + /// Schema name. + /// Artifact type. + /// Artifact name. + /// Payload containing artifact object to be create/updated. + /// The cancellation token to use. + /// Create or Update an artifact in a schema. + public virtual async Task> PutArtifactInSchemaAsync(string databaseName, string schemaName, SASEntityType artifactType, string artifactName, MDEntity createArtifactsPayload, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.PutArtifactInSchema"); + scope.Start(); + try + { + return await RestClient.PutArtifactInSchemaAsync(databaseName, schemaName, artifactType, artifactName, createArtifactsPayload, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Create or Update an artifact in a schema. + /// Database name. + /// Schema name. + /// Artifact type. + /// Artifact name. + /// Payload containing artifact object to be create/updated. + /// The cancellation token to use. + /// Create or Update an artifact in a schema. + public virtual Response PutArtifactInSchema(string databaseName, string schemaName, SASEntityType artifactType, string artifactName, MDEntity createArtifactsPayload, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.PutArtifactInSchema"); + scope.Start(); + try + { + return RestClient.PutArtifactInSchema(databaseName, schemaName, artifactType, artifactName, createArtifactsPayload, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete an artifact from Schema. + /// Database name. + /// Schema name. + /// Artifact type. + /// Artifact name. + /// The cancellation token to use. + /// Delete an artifact from Schema. + public virtual async Task DeleteArtifactFromSchemaAsync(string databaseName, string schemaName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.DeleteArtifactFromSchema"); + scope.Start(); + try + { + return await RestClient.DeleteArtifactFromSchemaAsync(databaseName, schemaName, artifactType, artifactName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete an artifact from Schema. + /// Database name. + /// Schema name. + /// Artifact type. + /// Artifact name. + /// The cancellation token to use. + /// Delete an artifact from Schema. + public virtual Response DeleteArtifactFromSchema(string databaseName, string schemaName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.DeleteArtifactFromSchema"); + scope.Start(); + try + { + return RestClient.DeleteArtifactFromSchema(databaseName, schemaName, artifactType, artifactName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get the status of validation by operation Id. + /// Operation Id. + /// The cancellation token to use. + /// Get the status of validation by operation Id. + public virtual async Task> GetSyMSOperationStatusAsync(string operationId, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.GetSyMSOperationStatus"); + scope.Start(); + try + { + return await RestClient.GetSyMSOperationStatusAsync(operationId, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get the status of validation by operation Id. + /// Operation Id. + /// The cancellation token to use. + /// Get the status of validation by operation Id. + public virtual Response GetSyMSOperationStatus(string operationId, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.GetSyMSOperationStatus"); + scope.Start(); + try + { + return RestClient.GetSyMSOperationStatus(operationId, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Batch execution of DDL Payload. + /// Validation Type - Currently only IDWValidation is supported. + /// DDLBatch containing artifacts to be Created or Deleted or Modified. + /// The cancellation token to use. + /// or is null. + /// Batch execution of DDL Payload. + public virtual async Task StartExecuteChangeWithValidationAsync(string validationType, DDLBatch createArtifactsPayload, CancellationToken cancellationToken = default) + { + if (validationType == null) + { + throw new ArgumentNullException(nameof(validationType)); + } + if (createArtifactsPayload == null) + { + throw new ArgumentNullException(nameof(createArtifactsPayload)); + } + + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.StartExecuteChangeWithValidation"); + scope.Start(); + try + { + var originalResponse = await RestClient.ExecuteChangeWithValidationAsync(validationType, createArtifactsPayload, cancellationToken).ConfigureAwait(false); + return new SynapseMetadataExecuteChangeWithValidationOperation(_clientDiagnostics, _pipeline, RestClient.CreateExecuteChangeWithValidationRequest(validationType, createArtifactsPayload).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Batch execution of DDL Payload. + /// Validation Type - Currently only IDWValidation is supported. + /// DDLBatch containing artifacts to be Created or Deleted or Modified. + /// The cancellation token to use. + /// or is null. + /// Batch execution of DDL Payload. + public virtual SynapseMetadataExecuteChangeWithValidationOperation StartExecuteChangeWithValidation(string validationType, DDLBatch createArtifactsPayload, CancellationToken cancellationToken = default) + { + if (validationType == null) + { + throw new ArgumentNullException(nameof(validationType)); + } + if (createArtifactsPayload == null) + { + throw new ArgumentNullException(nameof(createArtifactsPayload)); + } + + using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.StartExecuteChangeWithValidation"); + scope.Start(); + try + { + var originalResponse = RestClient.ExecuteChangeWithValidation(validationType, createArtifactsPayload, cancellationToken); + return new SynapseMetadataExecuteChangeWithValidationOperation(_clientDiagnostics, _pipeline, RestClient.CreateExecuteChangeWithValidationRequest(validationType, createArtifactsPayload).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SynapseMetadataExecuteChangeWithValidationOperation.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SynapseMetadataExecuteChangeWithValidationOperation.cs new file mode 100644 index 000000000000..80269a74d1b1 --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SynapseMetadataExecuteChangeWithValidationOperation.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + /// Batch execution of DDL Payload. + public partial class SynapseMetadataExecuteChangeWithValidationOperation : Operation + { + private readonly OperationInternal _operation; + + /// Initializes a new instance of SynapseMetadataExecuteChangeWithValidationOperation for mocking. + protected SynapseMetadataExecuteChangeWithValidationOperation() + { + } + + internal SynapseMetadataExecuteChangeWithValidationOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) + { + IOperation nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, OperationFinalStateVia.Location); + _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "SynapseMetadataExecuteChangeWithValidationOperation"); + } + + /// +#pragma warning disable CA1822 + public override string Id => throw new NotImplementedException(); +#pragma warning restore CA1822 + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override Response GetRawResponse() => _operation.RawResponse; + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override Response WaitForCompletionResponse(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(cancellationToken); + + /// + public override Response WaitForCompletionResponse(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(pollingInterval, cancellationToken); + + /// + public override ValueTask WaitForCompletionResponseAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(cancellationToken); + + /// + public override ValueTask WaitForCompletionResponseAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(pollingInterval, cancellationToken); + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SynapseMetadataRestClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SynapseMetadataRestClient.cs new file mode 100644 index 000000000000..c7bbe4d84e8c --- /dev/null +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SynapseMetadataRestClient.cs @@ -0,0 +1,1718 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Analytics.Synapse.Artifacts +{ + internal partial class SynapseMetadataRestClient + { + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// Initializes a new instance of SynapseMetadataRestClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// , or is null. + public SynapseMetadataRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint) + { + ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? throw new ArgumentNullException(nameof(endpoint)); + } + + internal HttpMessage CreateExecuteChangeRequest(DDLBatch createArtifactsPayload) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/databases/ExecuteChange", false); + uri.AppendQuery("api-version", "2021-04-01", true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(createArtifactsPayload); + request.Content = content; + return message; + } + + /// Batch execution of DDL Payload. + /// DDLBatch payload containing artifact drafts to be created or deleted or modified. + /// The cancellation token to use. + /// is null. + /// Batch execution of DDL Payload. + public async Task> ExecuteChangeAsync(DDLBatch createArtifactsPayload, CancellationToken cancellationToken = default) + { + if (createArtifactsPayload == null) + { + throw new ArgumentNullException(nameof(createArtifactsPayload)); + } + + using var message = CreateExecuteChangeRequest(createArtifactsPayload); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SyMsapiddlResponses value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SyMsapiddlResponses.DeserializeSyMsapiddlResponses(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Batch execution of DDL Payload. + /// DDLBatch payload containing artifact drafts to be created or deleted or modified. + /// The cancellation token to use. + /// is null. + /// Batch execution of DDL Payload. + public Response ExecuteChange(DDLBatch createArtifactsPayload, CancellationToken cancellationToken = default) + { + if (createArtifactsPayload == null) + { + throw new ArgumentNullException(nameof(createArtifactsPayload)); + } + + using var message = CreateExecuteChangeRequest(createArtifactsPayload); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SyMsapiddlResponses value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SyMsapiddlResponses.DeserializeSyMsapiddlResponses(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateExecuteChangeWithValidationRequest(string validationType, DDLBatch createArtifactsPayload) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/databases/ExecuteChangeWithValidation", false); + uri.AppendQuery("validationType", validationType, true); + uri.AppendQuery("api-version", "2021-04-01", true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(createArtifactsPayload); + request.Content = content; + return message; + } + + /// Batch execution of DDL Payload. + /// Validation Type - Currently only IDWValidation is supported. + /// DDLBatch containing artifacts to be Created or Deleted or Modified. + /// The cancellation token to use. + /// or is null. + /// Batch execution of DDL Payload. + public async Task ExecuteChangeWithValidationAsync(string validationType, DDLBatch createArtifactsPayload, CancellationToken cancellationToken = default) + { + if (validationType == null) + { + throw new ArgumentNullException(nameof(validationType)); + } + if (createArtifactsPayload == null) + { + throw new ArgumentNullException(nameof(createArtifactsPayload)); + } + + using var message = CreateExecuteChangeWithValidationRequest(validationType, createArtifactsPayload); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Batch execution of DDL Payload. + /// Validation Type - Currently only IDWValidation is supported. + /// DDLBatch containing artifacts to be Created or Deleted or Modified. + /// The cancellation token to use. + /// or is null. + /// Batch execution of DDL Payload. + public Response ExecuteChangeWithValidation(string validationType, DDLBatch createArtifactsPayload, CancellationToken cancellationToken = default) + { + if (validationType == null) + { + throw new ArgumentNullException(nameof(validationType)); + } + if (createArtifactsPayload == null) + { + throw new ArgumentNullException(nameof(createArtifactsPayload)); + } + + using var message = CreateExecuteChangeWithValidationRequest(validationType, createArtifactsPayload); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListDatabasesRequest(string continuationToken, long? maxPageSize) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/databases", false); + uri.AppendQuery("api-version", "2021-04-01", true); + if (continuationToken != null) + { + uri.AppendQuery("continuationToken", continuationToken, true); + } + if (maxPageSize != null) + { + uri.AppendQuery("maxPageSize", maxPageSize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Get all databases in a workspace. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// Get all databases in a workspace. + public async Task> ListDatabasesAsync(string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + using var message = CreateListDatabasesRequest(continuationToken, maxPageSize); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + QueryArtifactsResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get all databases in a workspace. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// Get all databases in a workspace. + public Response ListDatabases(string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + using var message = CreateListDatabasesRequest(continuationToken, maxPageSize); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + QueryArtifactsResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListArtifactsRequest(string databaseName, SASEntityType artifactType, string continuationToken, long? maxPageSize) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendPath("/", false); + uri.AppendPath(artifactType.ToSerialString(), true); + uri.AppendPath("s", false); + uri.AppendQuery("api-version", "2021-04-01", true); + if (continuationToken != null) + { + uri.AppendQuery("continuationToken", continuationToken, true); + } + if (maxPageSize != null) + { + uri.AppendQuery("maxPageSize", maxPageSize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// List all Artifacts of a type in a database. + /// Database name. + /// Artifact type. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// is null. + /// List all Artifacts of a type in a database. + public async Task> ListArtifactsAsync(string databaseName, SASEntityType artifactType, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + + using var message = CreateListArtifactsRequest(databaseName, artifactType, continuationToken, maxPageSize); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + QueryArtifactsResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all Artifacts of a type in a database. + /// Database name. + /// Artifact type. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// is null. + /// List all Artifacts of a type in a database. + public Response ListArtifacts(string databaseName, SASEntityType artifactType, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + + using var message = CreateListArtifactsRequest(databaseName, artifactType, continuationToken, maxPageSize); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + QueryArtifactsResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListArtifactsInSchemaByTypeRequest(string databaseName, string schemaName, SASEntityType artifactType, string continuationToken, long? maxPageSize) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendPath("/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/", false); + uri.AppendPath(artifactType.ToSerialString(), true); + uri.AppendPath("s", false); + uri.AppendQuery("api-version", "2021-04-01", true); + if (continuationToken != null) + { + uri.AppendQuery("continuationToken", continuationToken, true); + } + if (maxPageSize != null) + { + uri.AppendQuery("maxPageSize", maxPageSize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// List all artifacts in schema by type. + /// Database name. + /// Schema name. + /// Artifact type. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// or is null. + /// List all Artifacts in schema by type. + public async Task> ListArtifactsInSchemaByTypeAsync(string databaseName, string schemaName, SASEntityType artifactType, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + if (schemaName == null) + { + throw new ArgumentNullException(nameof(schemaName)); + } + + using var message = CreateListArtifactsInSchemaByTypeRequest(databaseName, schemaName, artifactType, continuationToken, maxPageSize); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + QueryArtifactsResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all artifacts in schema by type. + /// Database name. + /// Schema name. + /// Artifact type. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// or is null. + /// List all Artifacts in schema by type. + public Response ListArtifactsInSchemaByType(string databaseName, string schemaName, SASEntityType artifactType, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + if (schemaName == null) + { + throw new ArgumentNullException(nameof(schemaName)); + } + + using var message = CreateListArtifactsInSchemaByTypeRequest(databaseName, schemaName, artifactType, continuationToken, maxPageSize); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + QueryArtifactsResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListPartitionInfosForTableRequest(string databaseName, string tableName, string continuationToken, long? maxPageSize) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendPath("/tables/", false); + uri.AppendPath(tableName, true); + uri.AppendPath("/partitionInfos", false); + uri.AppendQuery("api-version", "2021-04-01", true); + if (continuationToken != null) + { + uri.AppendQuery("continuationToken", continuationToken, true); + } + if (maxPageSize != null) + { + uri.AppendQuery("maxPageSize", maxPageSize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// List all partition information for a table. + /// Database name. + /// Table name. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// or is null. + /// List all partition information for a table. + public async Task> ListPartitionInfosForTableAsync(string databaseName, string tableName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + if (tableName == null) + { + throw new ArgumentNullException(nameof(tableName)); + } + + using var message = CreateListPartitionInfosForTableRequest(databaseName, tableName, continuationToken, maxPageSize); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + QueryArtifactsResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all partition information for a table. + /// Database name. + /// Table name. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// or is null. + /// List all partition information for a table. + public Response ListPartitionInfosForTable(string databaseName, string tableName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + if (tableName == null) + { + throw new ArgumentNullException(nameof(tableName)); + } + + using var message = CreateListPartitionInfosForTableRequest(databaseName, tableName, continuationToken, maxPageSize); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + QueryArtifactsResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListPartitionInfosForViewRequest(string databaseName, string viewName, string continuationToken, long? maxPageSize) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendPath("/views/", false); + uri.AppendPath(viewName, true); + uri.AppendPath("/partitionInfos", false); + uri.AppendQuery("api-version", "2021-04-01", true); + if (continuationToken != null) + { + uri.AppendQuery("continuationToken", continuationToken, true); + } + if (maxPageSize != null) + { + uri.AppendQuery("maxPageSize", maxPageSize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// List all partition information for a view. + /// Database name. + /// View name. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// or is null. + /// List all partition information for a view. + public async Task> ListPartitionInfosForViewAsync(string databaseName, string viewName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + if (viewName == null) + { + throw new ArgumentNullException(nameof(viewName)); + } + + using var message = CreateListPartitionInfosForViewRequest(databaseName, viewName, continuationToken, maxPageSize); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + QueryArtifactsResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all partition information for a view. + /// Database name. + /// View name. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// or is null. + /// List all partition information for a view. + public Response ListPartitionInfosForView(string databaseName, string viewName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + if (viewName == null) + { + throw new ArgumentNullException(nameof(viewName)); + } + + using var message = CreateListPartitionInfosForViewRequest(databaseName, viewName, continuationToken, maxPageSize); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + QueryArtifactsResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListPartitionInfosForSchemaAndTableRequest(string databaseName, string schemaName, string tableName, string continuationToken, long? maxPageSize) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendPath("/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/tables/", false); + uri.AppendPath(tableName, true); + uri.AppendPath("/partitionInfos", false); + uri.AppendQuery("api-version", "2021-04-01", true); + if (continuationToken != null) + { + uri.AppendQuery("continuationToken", continuationToken, true); + } + if (maxPageSize != null) + { + uri.AppendQuery("maxPageSize", maxPageSize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// List all partition information for table in schema. + /// Database name. + /// Schema name. + /// Table name. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// , or is null. + /// List all partition information for a table in schema. + public async Task> ListPartitionInfosForSchemaAndTableAsync(string databaseName, string schemaName, string tableName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + if (schemaName == null) + { + throw new ArgumentNullException(nameof(schemaName)); + } + if (tableName == null) + { + throw new ArgumentNullException(nameof(tableName)); + } + + using var message = CreateListPartitionInfosForSchemaAndTableRequest(databaseName, schemaName, tableName, continuationToken, maxPageSize); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + QueryArtifactsResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all partition information for table in schema. + /// Database name. + /// Schema name. + /// Table name. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// , or is null. + /// List all partition information for a table in schema. + public Response ListPartitionInfosForSchemaAndTable(string databaseName, string schemaName, string tableName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + if (schemaName == null) + { + throw new ArgumentNullException(nameof(schemaName)); + } + if (tableName == null) + { + throw new ArgumentNullException(nameof(tableName)); + } + + using var message = CreateListPartitionInfosForSchemaAndTableRequest(databaseName, schemaName, tableName, continuationToken, maxPageSize); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + QueryArtifactsResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListPartitionInfosForSchemaAndViewRequest(string databaseName, string schemaName, string viewName, string continuationToken, long? maxPageSize) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendPath("/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/views/", false); + uri.AppendPath(viewName, true); + uri.AppendPath("/partitionInfos", false); + uri.AppendQuery("api-version", "2021-04-01", true); + if (continuationToken != null) + { + uri.AppendQuery("continuationToken", continuationToken, true); + } + if (maxPageSize != null) + { + uri.AppendQuery("maxPageSize", maxPageSize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// List all partition information for a view in schema. + /// Database name. + /// Schema name. + /// View name. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// , or is null. + /// List all partition information for a view in schema. + public async Task> ListPartitionInfosForSchemaAndViewAsync(string databaseName, string schemaName, string viewName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + if (schemaName == null) + { + throw new ArgumentNullException(nameof(schemaName)); + } + if (viewName == null) + { + throw new ArgumentNullException(nameof(viewName)); + } + + using var message = CreateListPartitionInfosForSchemaAndViewRequest(databaseName, schemaName, viewName, continuationToken, maxPageSize); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + QueryArtifactsResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all partition information for a view in schema. + /// Database name. + /// Schema name. + /// View name. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// , or is null. + /// List all partition information for a view in schema. + public Response ListPartitionInfosForSchemaAndView(string databaseName, string schemaName, string viewName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + if (schemaName == null) + { + throw new ArgumentNullException(nameof(schemaName)); + } + if (viewName == null) + { + throw new ArgumentNullException(nameof(viewName)); + } + + using var message = CreateListPartitionInfosForSchemaAndViewRequest(databaseName, schemaName, viewName, continuationToken, maxPageSize); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + QueryArtifactsResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetDatabaseRequest(string databaseName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendQuery("api-version", "2021-04-01", true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Get details about a database. + /// Database name. + /// The cancellation token to use. + /// is null. + /// Get details about a database. + public async Task> GetDatabaseAsync(string databaseName, CancellationToken cancellationToken = default) + { + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + + using var message = CreateGetDatabaseRequest(databaseName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DatabaseEntity value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DatabaseEntity.DeserializeDatabaseEntity(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get details about a database. + /// Database name. + /// The cancellation token to use. + /// is null. + /// Get details about a database. + public Response GetDatabase(string databaseName, CancellationToken cancellationToken = default) + { + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + + using var message = CreateGetDatabaseRequest(databaseName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DatabaseEntity value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DatabaseEntity.DeserializeDatabaseEntity(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreatePutDatabaseRequest(string databaseName, DatabaseEntity createArtifactsPayload) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendQuery("api-version", "2021-04-01", true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(createArtifactsPayload); + request.Content = content; + return message; + } + + /// Put a database. + /// Database name. + /// Database entity payload to create or update a Database. + /// The cancellation token to use. + /// or is null. + /// Put a database. + public async Task> PutDatabaseAsync(string databaseName, DatabaseEntity createArtifactsPayload, CancellationToken cancellationToken = default) + { + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + if (createArtifactsPayload == null) + { + throw new ArgumentNullException(nameof(createArtifactsPayload)); + } + + using var message = CreatePutDatabaseRequest(databaseName, createArtifactsPayload); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SyMsapiddlResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SyMsapiddlResponse.DeserializeSyMsapiddlResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Put a database. + /// Database name. + /// Database entity payload to create or update a Database. + /// The cancellation token to use. + /// or is null. + /// Put a database. + public Response PutDatabase(string databaseName, DatabaseEntity createArtifactsPayload, CancellationToken cancellationToken = default) + { + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + if (createArtifactsPayload == null) + { + throw new ArgumentNullException(nameof(createArtifactsPayload)); + } + + using var message = CreatePutDatabaseRequest(databaseName, createArtifactsPayload); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SyMsapiddlResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SyMsapiddlResponse.DeserializeSyMsapiddlResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteDatabaseRequest(string databaseName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendQuery("api-version", "2021-04-01", true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Delete a database. + /// Database name. + /// The cancellation token to use. + /// is null. + /// Delete a database. + public async Task DeleteDatabaseAsync(string databaseName, CancellationToken cancellationToken = default) + { + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + + using var message = CreateDeleteDatabaseRequest(databaseName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a database. + /// Database name. + /// The cancellation token to use. + /// is null. + /// Delete a database. + public Response DeleteDatabase(string databaseName, CancellationToken cancellationToken = default) + { + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + + using var message = CreateDeleteDatabaseRequest(databaseName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetArtifactFromDBRequest(string databaseName, SASEntityType artifactType, string artifactName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendPath("/", false); + uri.AppendPath(artifactType.ToSerialString(), true); + uri.AppendPath("s/", false); + uri.AppendPath(artifactName, true); + uri.AppendQuery("api-version", "2021-04-01", true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Get an artifact from database. + /// Database name. + /// Artifact type. + /// Artifact name. + /// The cancellation token to use. + /// or is null. + /// Get an artifact from database. + public async Task> GetArtifactFromDBAsync(string databaseName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) + { + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + if (artifactName == null) + { + throw new ArgumentNullException(nameof(artifactName)); + } + + using var message = CreateGetArtifactFromDBRequest(databaseName, artifactType, artifactName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MDEntity value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MDEntity.DeserializeMDEntity(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get an artifact from database. + /// Database name. + /// Artifact type. + /// Artifact name. + /// The cancellation token to use. + /// or is null. + /// Get an artifact from database. + public Response GetArtifactFromDB(string databaseName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) + { + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + if (artifactName == null) + { + throw new ArgumentNullException(nameof(artifactName)); + } + + using var message = CreateGetArtifactFromDBRequest(databaseName, artifactType, artifactName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MDEntity value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MDEntity.DeserializeMDEntity(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreatePutArtifactInDBRequest(string databaseName, SASEntityType artifactType, string artifactName, MDEntity createArtifactsPayload, string continuationToken, long? maxPageSize) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendPath("/", false); + uri.AppendPath(artifactType.ToSerialString(), true); + uri.AppendPath("s/", false); + uri.AppendPath(artifactName, true); + uri.AppendQuery("api-version", "2021-04-01", true); + if (continuationToken != null) + { + uri.AppendQuery("continuationToken", continuationToken, true); + } + if (maxPageSize != null) + { + uri.AppendQuery("maxPageSize", maxPageSize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(createArtifactsPayload); + request.Content = content; + return message; + } + + /// Put an artifact in a Database. + /// Database name. + /// Artifact type. + /// Artifact name. + /// Payload containing artifact entity to be created/modified. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// , or is null. + /// Put an artifact in a Database. + public async Task> PutArtifactInDBAsync(string databaseName, SASEntityType artifactType, string artifactName, MDEntity createArtifactsPayload, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + if (artifactName == null) + { + throw new ArgumentNullException(nameof(artifactName)); + } + if (createArtifactsPayload == null) + { + throw new ArgumentNullException(nameof(createArtifactsPayload)); + } + + using var message = CreatePutArtifactInDBRequest(databaseName, artifactType, artifactName, createArtifactsPayload, continuationToken, maxPageSize); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SyMsapiddlResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SyMsapiddlResponse.DeserializeSyMsapiddlResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Put an artifact in a Database. + /// Database name. + /// Artifact type. + /// Artifact name. + /// Payload containing artifact entity to be created/modified. + /// Continuation token to get next page. + /// Max page size. + /// The cancellation token to use. + /// , or is null. + /// Put an artifact in a Database. + public Response PutArtifactInDB(string databaseName, SASEntityType artifactType, string artifactName, MDEntity createArtifactsPayload, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) + { + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + if (artifactName == null) + { + throw new ArgumentNullException(nameof(artifactName)); + } + if (createArtifactsPayload == null) + { + throw new ArgumentNullException(nameof(createArtifactsPayload)); + } + + using var message = CreatePutArtifactInDBRequest(databaseName, artifactType, artifactName, createArtifactsPayload, continuationToken, maxPageSize); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SyMsapiddlResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SyMsapiddlResponse.DeserializeSyMsapiddlResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteArtifactForDBRequest(string databaseName, SASEntityType artifactType, string artifactName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendPath("/", false); + uri.AppendPath(artifactType.ToSerialString(), true); + uri.AppendPath("s/", false); + uri.AppendPath(artifactName, true); + uri.AppendQuery("api-version", "2021-04-01", true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Delete an artifact in a Database. + /// Database name. + /// Artifact type. + /// Artifact name. + /// The cancellation token to use. + /// or is null. + /// Delete an artifact in a Database. + public async Task DeleteArtifactForDBAsync(string databaseName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) + { + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + if (artifactName == null) + { + throw new ArgumentNullException(nameof(artifactName)); + } + + using var message = CreateDeleteArtifactForDBRequest(databaseName, artifactType, artifactName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete an artifact in a Database. + /// Database name. + /// Artifact type. + /// Artifact name. + /// The cancellation token to use. + /// or is null. + /// Delete an artifact in a Database. + public Response DeleteArtifactForDB(string databaseName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) + { + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + if (artifactName == null) + { + throw new ArgumentNullException(nameof(artifactName)); + } + + using var message = CreateDeleteArtifactForDBRequest(databaseName, artifactType, artifactName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetArtifactFromSchemaRequest(string databaseName, string schemaName, SASEntityType artifactType, string artifactName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendPath("/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/", false); + uri.AppendPath(artifactType.ToSerialString(), true); + uri.AppendPath("s/", false); + uri.AppendPath(artifactName, true); + uri.AppendQuery("api-version", "2021-04-01", true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Get an artifact from schema. + /// Database name. + /// Schema name. + /// Artifact type. + /// Artifact name. + /// The cancellation token to use. + /// , or is null. + /// Get an artifact from schema. + public async Task> GetArtifactFromSchemaAsync(string databaseName, string schemaName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) + { + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + if (schemaName == null) + { + throw new ArgumentNullException(nameof(schemaName)); + } + if (artifactName == null) + { + throw new ArgumentNullException(nameof(artifactName)); + } + + using var message = CreateGetArtifactFromSchemaRequest(databaseName, schemaName, artifactType, artifactName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MDEntity value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MDEntity.DeserializeMDEntity(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get an artifact from schema. + /// Database name. + /// Schema name. + /// Artifact type. + /// Artifact name. + /// The cancellation token to use. + /// , or is null. + /// Get an artifact from schema. + public Response GetArtifactFromSchema(string databaseName, string schemaName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) + { + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + if (schemaName == null) + { + throw new ArgumentNullException(nameof(schemaName)); + } + if (artifactName == null) + { + throw new ArgumentNullException(nameof(artifactName)); + } + + using var message = CreateGetArtifactFromSchemaRequest(databaseName, schemaName, artifactType, artifactName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MDEntity value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MDEntity.DeserializeMDEntity(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreatePutArtifactInSchemaRequest(string databaseName, string schemaName, SASEntityType artifactType, string artifactName, MDEntity createArtifactsPayload) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendPath("/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/", false); + uri.AppendPath(artifactType.ToSerialString(), true); + uri.AppendPath("s/", false); + uri.AppendPath(artifactName, true); + uri.AppendQuery("api-version", "2021-04-01", true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(createArtifactsPayload); + request.Content = content; + return message; + } + + /// Create or Update an artifact in a schema. + /// Database name. + /// Schema name. + /// Artifact type. + /// Artifact name. + /// Payload containing artifact object to be create/updated. + /// The cancellation token to use. + /// , , or is null. + /// Create or Update an artifact in a schema. + public async Task> PutArtifactInSchemaAsync(string databaseName, string schemaName, SASEntityType artifactType, string artifactName, MDEntity createArtifactsPayload, CancellationToken cancellationToken = default) + { + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + if (schemaName == null) + { + throw new ArgumentNullException(nameof(schemaName)); + } + if (artifactName == null) + { + throw new ArgumentNullException(nameof(artifactName)); + } + if (createArtifactsPayload == null) + { + throw new ArgumentNullException(nameof(createArtifactsPayload)); + } + + using var message = CreatePutArtifactInSchemaRequest(databaseName, schemaName, artifactType, artifactName, createArtifactsPayload); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SyMsapiddlResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SyMsapiddlResponse.DeserializeSyMsapiddlResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or Update an artifact in a schema. + /// Database name. + /// Schema name. + /// Artifact type. + /// Artifact name. + /// Payload containing artifact object to be create/updated. + /// The cancellation token to use. + /// , , or is null. + /// Create or Update an artifact in a schema. + public Response PutArtifactInSchema(string databaseName, string schemaName, SASEntityType artifactType, string artifactName, MDEntity createArtifactsPayload, CancellationToken cancellationToken = default) + { + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + if (schemaName == null) + { + throw new ArgumentNullException(nameof(schemaName)); + } + if (artifactName == null) + { + throw new ArgumentNullException(nameof(artifactName)); + } + if (createArtifactsPayload == null) + { + throw new ArgumentNullException(nameof(createArtifactsPayload)); + } + + using var message = CreatePutArtifactInSchemaRequest(databaseName, schemaName, artifactType, artifactName, createArtifactsPayload); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SyMsapiddlResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SyMsapiddlResponse.DeserializeSyMsapiddlResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteArtifactFromSchemaRequest(string databaseName, string schemaName, SASEntityType artifactType, string artifactName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendPath("/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/", false); + uri.AppendPath(artifactType.ToSerialString(), true); + uri.AppendPath("s/", false); + uri.AppendPath(artifactName, true); + uri.AppendQuery("api-version", "2021-04-01", true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Delete an artifact from Schema. + /// Database name. + /// Schema name. + /// Artifact type. + /// Artifact name. + /// The cancellation token to use. + /// , or is null. + /// Delete an artifact from Schema. + public async Task DeleteArtifactFromSchemaAsync(string databaseName, string schemaName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) + { + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + if (schemaName == null) + { + throw new ArgumentNullException(nameof(schemaName)); + } + if (artifactName == null) + { + throw new ArgumentNullException(nameof(artifactName)); + } + + using var message = CreateDeleteArtifactFromSchemaRequest(databaseName, schemaName, artifactType, artifactName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete an artifact from Schema. + /// Database name. + /// Schema name. + /// Artifact type. + /// Artifact name. + /// The cancellation token to use. + /// , or is null. + /// Delete an artifact from Schema. + public Response DeleteArtifactFromSchema(string databaseName, string schemaName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) + { + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + if (schemaName == null) + { + throw new ArgumentNullException(nameof(schemaName)); + } + if (artifactName == null) + { + throw new ArgumentNullException(nameof(artifactName)); + } + + using var message = CreateDeleteArtifactFromSchemaRequest(databaseName, schemaName, artifactType, artifactName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetSyMSOperationStatusRequest(string operationId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/databases/operations/", false); + uri.AppendPath(operationId, true); + uri.AppendQuery("api-version", "2021-04-01", true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Get the status of validation by operation Id. + /// Operation Id. + /// The cancellation token to use. + /// is null. + /// Get the status of validation by operation Id. + public async Task> GetSyMSOperationStatusAsync(string operationId, CancellationToken cancellationToken = default) + { + if (operationId == null) + { + throw new ArgumentNullException(nameof(operationId)); + } + + using var message = CreateGetSyMSOperationStatusRequest(operationId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + QueryArtifactsResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the status of validation by operation Id. + /// Operation Id. + /// The cancellation token to use. + /// is null. + /// Get the status of validation by operation Id. + public Response GetSyMSOperationStatus(string operationId, CancellationToken cancellationToken = default) + { + if (operationId == null) + { + throw new ArgumentNullException(nameof(operationId)); + } + + using var message = CreateGetSyMSOperationStatusRequest(operationId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + QueryArtifactsResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/autorest.md b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/autorest.md index d6e43f8e63d0..ee5e38b4efe1 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/autorest.md +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/autorest.md @@ -6,9 +6,9 @@ Run `dotnet build /t:GenerateCode` to generate code. > see https://aka.ms/autorest ``` yaml -tag: package-artifacts-composite-v6 +tag: package-artifacts-composite-v7 require: - - https://github.com/Azure/azure-rest-api-specs/blob/61a8b1a62420c393fe5276c47373ea8dce74a985/specification/synapse/data-plane/readme.md + - https://github.com/Azure/azure-rest-api-specs/blob/6f34f95365ecb16f52f9b94f5cc664bfd1499173/specification/synapse/data-plane/readme.md namespace: Azure.Analytics.Synapse.Artifacts generation1-convenience-client: true public-clients: true @@ -29,6 +29,23 @@ directive: where: $.parameters.Endpoint transform: $.format = "url" ``` +### Handle name conflict with BLC type + +``` yaml +directive: + from: swagger-document + where: $.definitions.Sorting + transform: > + $['x-ms-client-name'] = "SortingItem"; +``` + +``` yaml +directive: + from: swagger-document + where: $.definitions.Namespace + transform: > + $['x-ms-client-name'] = "BaseNamespace"; +``` ### Add nullable annotations From 5774dee8da8866563a2e5486fa7e29b9e96bcb79 Mon Sep 17 00:00:00 2001 From: pshao25 <97225342+pshao25@users.noreply.github.com> Date: Thu, 29 Jun 2023 14:42:07 +0800 Subject: [PATCH 2/6] Update --- .vscode/cspell.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 98a46277bfd1..a402e2de5a23 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -1017,8 +1017,11 @@ "adla", "adls", "byoa", + "ddls", "distcp", "eloqua", + "ename", + "evalue", "exfiltration", "fqdns", "hana", @@ -1040,6 +1043,13 @@ "vertica", "xero", "Asana", + "Ddls", + "Ename", + "Evalue", + "Informations", + "Manytoone", + "Msapiddl", + "Onetoone", "Twilio" ] }, From cf0213674e0952c7cc4a7ec6b6e9496a2f951cd9 Mon Sep 17 00:00:00 2001 From: pshao25 <97225342+pshao25@users.noreply.github.com> Date: Thu, 20 Jul 2023 18:18:05 +0800 Subject: [PATCH 3/6] update --- ...lytics.Synapse.Artifacts.netstandard2.0.cs | 357 +--- .../src/Generated/ArtifactsClientOptions.cs | 13 +- .../src/Generated/ArtifactsModelFactory.cs | 237 --- .../Models/BaseNamespace.Serialization.cs | 57 - .../src/Generated/Models/BaseNamespace.cs | 29 - ...mnRelationshipInformation.Serialization.cs | 65 - .../Models/ColumnRelationshipInformation.cs | 34 - .../Models/DDLBatch.Serialization.cs | 43 - .../src/Generated/Models/DDLBatch.cs | 31 - .../Models/DDLPayload.Serialization.cs | 48 - .../src/Generated/Models/DDLPayload.cs | 27 - .../Generated/Models/DDLType.Serialization.cs | 30 - .../src/Generated/Models/DDLType.cs | 20 - .../Models/DataColumn.Serialization.cs | 65 - .../src/Generated/Models/DataColumn.cs | 34 - .../Models/DataSource.Serialization.cs | 107 - .../src/Generated/Models/DataSource.cs | 46 - .../Models/DatabaseEntity.Serialization.cs | 79 - .../src/Generated/Models/DatabaseEntity.cs | 42 - .../DatabaseProperties.Serialization.cs | 149 -- .../Generated/Models/DatabaseProperties.cs | 46 - .../Models/DistributionInfo.Serialization.cs | 126 -- .../src/Generated/Models/DistributionInfo.cs | 45 - .../Models/FormatInfo.Serialization.cs | 131 -- .../src/Generated/Models/FormatInfo.cs | 67 - .../Models/MDEntity.Serialization.cs | 71 - .../src/Generated/Models/MDEntity.cs | 46 - .../MDEntityProperties.Serialization.cs | 130 -- .../Generated/Models/MDEntityProperties.cs | 48 - ...MongoDbAtlasLinkedService.Serialization.cs | 14 +- .../Models/MongoDbAtlasLinkedService.cs | 10 +- .../Models/PartitionInfo.Serialization.cs | 86 - .../src/Generated/Models/PartitionInfo.cs | 38 - .../PartitionInfoNamespace.Serialization.cs | 76 - .../Models/PartitionInfoNamespace.cs | 43 - .../PartitionInfoProperties.Serialization.cs | 176 -- .../Models/PartitionInfoProperties.cs | 57 - .../src/Generated/Models/PublishStatus.cs | 48 - .../QueryArtifactsResponse.Serialization.cs | 72 - .../Models/QueryArtifactsResponse.cs | 36 - .../RelationshipEntity.Serialization.cs | 79 - .../Generated/Models/RelationshipEntity.cs | 42 - .../RelationshipProperties.Serialization.cs | 199 -- .../Models/RelationshipProperties.cs | 76 - .../Models/RelationshipType.Serialization.cs | 32 - .../src/Generated/Models/RelationshipType.cs | 22 - .../Models/SASEntityType.Serialization.cs | 38 - .../src/Generated/Models/SASEntityType.cs | 28 - .../Models/ScalarTypeInfo.Serialization.cs | 197 -- .../src/Generated/Models/ScalarTypeInfo.cs | 39 - .../Models/SchemaEntity.Serialization.cs | 79 - .../src/Generated/Models/SchemaEntity.cs | 42 - .../Models/SchemaProperties.Serialization.cs | 138 -- .../src/Generated/Models/SchemaProperties.cs | 42 - .../Models/SortOrder.Serialization.cs | 28 - .../src/Generated/Models/SortOrder.cs | 18 - .../Models/SortingItem.Serialization.cs | 65 - .../src/Generated/Models/SortingItem.cs | 33 - .../Models/StorageDescriptor.Serialization.cs | 152 -- .../src/Generated/Models/StorageDescriptor.cs | 65 - .../SyMsapiddlResponse.Serialization.cs | 85 - .../Generated/Models/SyMsapiddlResponse.cs | 73 - .../SyMsapiddlResponses.Serialization.cs | 55 - .../Generated/Models/SyMsapiddlResponses.cs | 38 - .../Models/TableEntity.Serialization.cs | 79 - .../src/Generated/Models/TableEntity.cs | 42 - .../Models/TableNamespace.Serialization.cs | 68 - .../src/Generated/Models/TableNamespace.cs | 38 - .../Models/TablePartitioning.Serialization.cs | 76 - .../src/Generated/Models/TablePartitioning.cs | 45 - .../Models/TableProperties.Serialization.cs | 199 -- .../src/Generated/Models/TableProperties.cs | 67 - .../Models/TableType.Serialization.cs | 28 - .../src/Generated/Models/TableType.cs | 18 - .../Models/TypeInfo.Serialization.cs | 197 -- .../src/Generated/Models/TypeInfo.cs | 70 - .../Models/ValidationStatus.Serialization.cs | 28 - .../src/Generated/Models/ValidationStatus.cs | 18 - .../Models/ViewEntity.Serialization.cs | 79 - .../src/Generated/Models/ViewEntity.cs | 42 - .../ViewEntityProperties.Serialization.cs | 213 -- .../Generated/Models/ViewEntityProperties.cs | 69 - .../src/Generated/SynapseMetadataClient.cs | 894 --------- ...ataExecuteChangeWithValidationOperation.cs | 62 - .../Generated/SynapseMetadataRestClient.cs | 1718 ----------------- .../src/autorest.md | 2 +- 86 files changed, 24 insertions(+), 8572 deletions(-) delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/BaseNamespace.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/BaseNamespace.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ColumnRelationshipInformation.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ColumnRelationshipInformation.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLBatch.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLBatch.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLPayload.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLPayload.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLType.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLType.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataColumn.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataColumn.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataSource.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataSource.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseEntity.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseEntity.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseProperties.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseProperties.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DistributionInfo.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DistributionInfo.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FormatInfo.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FormatInfo.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntity.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntity.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntityProperties.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntityProperties.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfo.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfo.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoNamespace.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoNamespace.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoProperties.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoProperties.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PublishStatus.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QueryArtifactsResponse.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QueryArtifactsResponse.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipEntity.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipEntity.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipProperties.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipProperties.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipType.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipType.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SASEntityType.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SASEntityType.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ScalarTypeInfo.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ScalarTypeInfo.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaEntity.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaEntity.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaProperties.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaProperties.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortOrder.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortOrder.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortingItem.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortingItem.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StorageDescriptor.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StorageDescriptor.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponse.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponse.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponses.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponses.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableEntity.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableEntity.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableNamespace.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableNamespace.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TablePartitioning.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TablePartitioning.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableProperties.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableProperties.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableType.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableType.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TypeInfo.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TypeInfo.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValidationStatus.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValidationStatus.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntity.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntity.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntityProperties.Serialization.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntityProperties.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SynapseMetadataClient.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SynapseMetadataExecuteChangeWithValidationOperation.cs delete mode 100644 sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SynapseMetadataRestClient.cs diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/api/Azure.Analytics.Synapse.Artifacts.netstandard2.0.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/api/Azure.Analytics.Synapse.Artifacts.netstandard2.0.cs index 1785a5d83f5f..556d9c30f425 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/api/Azure.Analytics.Synapse.Artifacts.netstandard2.0.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/api/Azure.Analytics.Synapse.Artifacts.netstandard2.0.cs @@ -6,12 +6,11 @@ public ArtifactsClientOptions(Azure.Analytics.Synapse.Artifacts.ArtifactsClientO public enum ServiceVersion { V2020_12_01 = 1, - V2021_04_01 = 2, - V2021_06_01_Preview = 3, - V2021_07_01_Preview = 4, - V2021_11_01_Preview = 5, - V2022_03_01_Preview = 6, - V2023_04_18_Preview = 7, + V2021_06_01_Preview = 2, + V2021_07_01_Preview = 3, + V2021_11_01_Preview = 4, + V2022_03_01_Preview = 5, + V2023_04_18_Preview = 6, } } public partial class BigDataPoolsClient @@ -800,62 +799,6 @@ protected SqlScriptRenameSqlScriptOperation() { } public override System.Threading.Tasks.ValueTask WaitForCompletionResponseAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public override System.Threading.Tasks.ValueTask WaitForCompletionResponseAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class SynapseMetadataClient - { - protected SynapseMetadataClient() { } - public SynapseMetadataClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.Analytics.Synapse.Artifacts.ArtifactsClientOptions options = null) { } - public virtual Azure.Response DeleteArtifactForDB(string databaseName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string artifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteArtifactForDBAsync(string databaseName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string artifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response DeleteArtifactFromSchema(string databaseName, string schemaName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string artifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteArtifactFromSchemaAsync(string databaseName, string schemaName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string artifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response DeleteDatabase(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteDatabaseAsync(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response ExecuteChange(Azure.Analytics.Synapse.Artifacts.Models.DDLBatch createArtifactsPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExecuteChangeAsync(Azure.Analytics.Synapse.Artifacts.Models.DDLBatch createArtifactsPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetArtifactFromDB(string databaseName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string artifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetArtifactFromDBAsync(string databaseName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string artifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetArtifactFromSchema(string databaseName, string schemaName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string artifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetArtifactFromSchemaAsync(string databaseName, string schemaName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string artifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetDatabase(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetDatabaseAsync(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetSyMSOperationStatus(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetSyMSOperationStatusAsync(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response ListArtifacts(string databaseName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ListArtifactsAsync(string databaseName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response ListArtifactsInSchemaByType(string databaseName, string schemaName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ListArtifactsInSchemaByTypeAsync(string databaseName, string schemaName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response ListDatabases(string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ListDatabasesAsync(string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response ListPartitionInfosForSchemaAndTable(string databaseName, string schemaName, string tableName, string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ListPartitionInfosForSchemaAndTableAsync(string databaseName, string schemaName, string tableName, string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response ListPartitionInfosForSchemaAndView(string databaseName, string schemaName, string viewName, string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ListPartitionInfosForSchemaAndViewAsync(string databaseName, string schemaName, string viewName, string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response ListPartitionInfosForTable(string databaseName, string tableName, string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ListPartitionInfosForTableAsync(string databaseName, string tableName, string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response ListPartitionInfosForView(string databaseName, string viewName, string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ListPartitionInfosForViewAsync(string databaseName, string viewName, string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response PutArtifactInDB(string databaseName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string artifactName, Azure.Analytics.Synapse.Artifacts.Models.MDEntity createArtifactsPayload, string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> PutArtifactInDBAsync(string databaseName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string artifactName, Azure.Analytics.Synapse.Artifacts.Models.MDEntity createArtifactsPayload, string continuationToken = null, long? maxPageSize = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response PutArtifactInSchema(string databaseName, string schemaName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string artifactName, Azure.Analytics.Synapse.Artifacts.Models.MDEntity createArtifactsPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> PutArtifactInSchemaAsync(string databaseName, string schemaName, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType artifactType, string artifactName, Azure.Analytics.Synapse.Artifacts.Models.MDEntity createArtifactsPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response PutDatabase(string databaseName, Azure.Analytics.Synapse.Artifacts.Models.DatabaseEntity createArtifactsPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> PutDatabaseAsync(string databaseName, Azure.Analytics.Synapse.Artifacts.Models.DatabaseEntity createArtifactsPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Analytics.Synapse.Artifacts.SynapseMetadataExecuteChangeWithValidationOperation StartExecuteChangeWithValidation(string validationType, Azure.Analytics.Synapse.Artifacts.Models.DDLBatch createArtifactsPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task StartExecuteChangeWithValidationAsync(string validationType, Azure.Analytics.Synapse.Artifacts.Models.DDLBatch createArtifactsPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class SynapseMetadataExecuteChangeWithValidationOperation : Azure.Operation - { - protected SynapseMetadataExecuteChangeWithValidationOperation() { } - public override bool HasCompleted { get { throw null; } } - public override string Id { get { throw null; } } - public override Azure.Response GetRawResponse() { throw null; } - public override Azure.Response UpdateStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.ValueTask UpdateStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override Azure.Response WaitForCompletionResponse(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override Azure.Response WaitForCompletionResponse(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.ValueTask WaitForCompletionResponseAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.ValueTask WaitForCompletionResponseAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } public partial class TriggerClient { protected TriggerClient() { } @@ -1283,8 +1226,6 @@ public static partial class ArtifactsModelFactory public static Azure.Analytics.Synapse.Artifacts.Models.CreateRunResponse CreateRunResponse(string runId = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.CustomerManagedKeyDetails CustomerManagedKeyDetails(string status = null, Azure.Analytics.Synapse.Artifacts.Models.WorkspaceKeyDetails key = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.CustomEventsTrigger CustomEventsTrigger(string description = null, Azure.Analytics.Synapse.Artifacts.Models.TriggerRuntimeState? runtimeState = default(Azure.Analytics.Synapse.Artifacts.Models.TriggerRuntimeState?), System.Collections.Generic.IEnumerable annotations = null, System.Collections.Generic.IDictionary additionalProperties = null, System.Collections.Generic.IEnumerable pipelines = null, string subjectBeginsWith = null, string subjectEndsWith = null, System.Collections.Generic.IEnumerable events = null, string scope = null) { throw null; } - public static Azure.Analytics.Synapse.Artifacts.Models.DatabaseEntity DatabaseEntity(string name = null, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType type = Azure.Analytics.Synapse.Artifacts.Models.SASEntityType.Database, string id = null, Azure.Analytics.Synapse.Artifacts.Models.DatabaseProperties properties = null) { throw null; } - public static Azure.Analytics.Synapse.Artifacts.Models.DatabaseProperties DatabaseProperties(string originObjectId = null, string objectId = null, long? objectVersion = default(long?), Azure.Analytics.Synapse.Artifacts.Models.PublishStatus? publishStatus = default(Azure.Analytics.Synapse.Artifacts.Models.PublishStatus?), System.Collections.Generic.IDictionary properties = null, Azure.Analytics.Synapse.Artifacts.Models.DataSource source = null, string description = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.DataFlowDebugCommandResponse DataFlowDebugCommandResponse(string status = null, string data = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.DataFlowDebugSessionInfo DataFlowDebugSessionInfo(string dataFlowName = null, string computeType = null, int? coreCount = default(int?), int? nodeCount = default(int?), string integrationRuntimeName = null, string sessionId = null, string startTime = null, int? timeToLiveInMinutes = default(int?), string lastActivityTime = null, System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.DataFlowResource DataFlowResource(string id = null, string name = null, string type = null, string etag = null, Azure.Analytics.Synapse.Artifacts.Models.DataFlow properties = null) { throw null; } @@ -1309,16 +1250,12 @@ public static partial class ArtifactsModelFactory public static Azure.Analytics.Synapse.Artifacts.Models.ManagedIdentity ManagedIdentity(string principalId = null, System.Guid? tenantId = default(System.Guid?), Azure.Analytics.Synapse.Artifacts.Models.ResourceIdentityType? type = default(Azure.Analytics.Synapse.Artifacts.Models.ResourceIdentityType?)) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.ManagedIntegrationRuntime ManagedIntegrationRuntime(Azure.Analytics.Synapse.Artifacts.Models.IntegrationRuntimeType type = default(Azure.Analytics.Synapse.Artifacts.Models.IntegrationRuntimeType), string description = null, System.Collections.Generic.IDictionary additionalProperties = null, Azure.Analytics.Synapse.Artifacts.Models.IntegrationRuntimeState? state = default(Azure.Analytics.Synapse.Artifacts.Models.IntegrationRuntimeState?), Azure.Analytics.Synapse.Artifacts.Models.ManagedVirtualNetworkReference managedVirtualNetwork = null, Azure.Analytics.Synapse.Artifacts.Models.IntegrationRuntimeComputeProperties computeProperties = null, Azure.Analytics.Synapse.Artifacts.Models.IntegrationRuntimeSsisProperties ssisProperties = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.ManagedVirtualNetworkReference ManagedVirtualNetworkReference(Azure.Analytics.Synapse.Artifacts.Models.ManagedVirtualNetworkReferenceType type = default(Azure.Analytics.Synapse.Artifacts.Models.ManagedVirtualNetworkReferenceType), string referenceName = null) { throw null; } - public static Azure.Analytics.Synapse.Artifacts.Models.MDEntity MDEntity(string name = null, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType type = Azure.Analytics.Synapse.Artifacts.Models.SASEntityType.Database, string id = null) { throw null; } - public static Azure.Analytics.Synapse.Artifacts.Models.MDEntityProperties MDEntityProperties(string originObjectId = null, string objectId = null, long? objectVersion = default(long?), Azure.Analytics.Synapse.Artifacts.Models.PublishStatus? publishStatus = default(Azure.Analytics.Synapse.Artifacts.Models.PublishStatus?), System.Collections.Generic.IDictionary properties = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.MetastoreRegistrationResponse MetastoreRegistrationResponse(Azure.Analytics.Synapse.Artifacts.Models.RequestStatus? status = default(Azure.Analytics.Synapse.Artifacts.Models.RequestStatus?)) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.MetastoreRequestSuccessResponse MetastoreRequestSuccessResponse(Azure.Analytics.Synapse.Artifacts.Models.ResourceStatus? status = default(Azure.Analytics.Synapse.Artifacts.Models.ResourceStatus?)) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.MetastoreUpdationResponse MetastoreUpdationResponse(Azure.Analytics.Synapse.Artifacts.Models.RequestStatus? status = default(Azure.Analytics.Synapse.Artifacts.Models.RequestStatus?)) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.MultiplePipelineTrigger MultiplePipelineTrigger(string description = null, Azure.Analytics.Synapse.Artifacts.Models.TriggerRuntimeState? runtimeState = default(Azure.Analytics.Synapse.Artifacts.Models.TriggerRuntimeState?), System.Collections.Generic.IEnumerable annotations = null, System.Collections.Generic.IDictionary additionalProperties = null, System.Collections.Generic.IEnumerable pipelines = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.NotebookResource NotebookResource(string id = null, string name = null, string type = null, string etag = null, Azure.Analytics.Synapse.Artifacts.Models.Notebook properties = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.OperationResult OperationResult(string status = null, string code = null, string message = null, string target = null, System.Collections.Generic.IEnumerable details = null) { throw null; } - public static Azure.Analytics.Synapse.Artifacts.Models.PartitionInfo PartitionInfo(string name = null, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType type = Azure.Analytics.Synapse.Artifacts.Models.SASEntityType.Database, string id = null, Azure.Analytics.Synapse.Artifacts.Models.PartitionInfoProperties properties = null) { throw null; } - public static Azure.Analytics.Synapse.Artifacts.Models.PartitionInfoProperties PartitionInfoProperties(string originObjectId = null, string objectId = null, long? objectVersion = default(long?), Azure.Analytics.Synapse.Artifacts.Models.PublishStatus? publishStatus = default(Azure.Analytics.Synapse.Artifacts.Models.PublishStatus?), System.Collections.Generic.IDictionary properties = null, Azure.Analytics.Synapse.Artifacts.Models.PartitionInfoNamespace @namespace = null, Azure.Analytics.Synapse.Artifacts.Models.StorageDescriptor storageDescriptor = null, System.Collections.Generic.IEnumerable partitionKeyValues = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.PipelineResource PipelineResource(string id = null, string name = null, string type = null, string etag = null, string description = null, System.Collections.Generic.IEnumerable activities = null, System.Collections.Generic.IDictionary parameters = null, System.Collections.Generic.IDictionary variables = null, int? concurrency = default(int?), System.Collections.Generic.IEnumerable annotations = null, System.Collections.Generic.IDictionary runDimensions = null, Azure.Analytics.Synapse.Artifacts.Models.PipelineFolder folder = null, System.Collections.Generic.IDictionary additionalProperties = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.PipelineRun PipelineRun(string runId = null, string runGroupId = null, bool? isLatest = default(bool?), string pipelineName = null, System.Collections.Generic.IReadOnlyDictionary parameters = null, Azure.Analytics.Synapse.Artifacts.Models.PipelineRunInvokedBy invokedBy = null, System.DateTimeOffset? lastUpdated = default(System.DateTimeOffset?), System.DateTimeOffset? runStart = default(System.DateTimeOffset?), System.DateTimeOffset? runEnd = default(System.DateTimeOffset?), int? durationInMs = default(int?), string status = null, string message = null, System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.PipelineRunInvokedBy PipelineRunInvokedBy(string name = null, string id = null, string invokedByType = null) { throw null; } @@ -1327,9 +1264,6 @@ public static partial class ArtifactsModelFactory public static Azure.Analytics.Synapse.Artifacts.Models.PrivateEndpointConnection PrivateEndpointConnection(string id = null, string name = null, string type = null, Azure.Analytics.Synapse.Artifacts.Models.PrivateEndpoint privateEndpoint = null, Azure.Analytics.Synapse.Artifacts.Models.PrivateLinkServiceConnectionState connectionState = null, string provisioningState = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState(string status = null, string description = null, string actionsRequired = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.ProxyResource ProxyResource(string id = null, string name = null, string type = null) { throw null; } - public static Azure.Analytics.Synapse.Artifacts.Models.QueryArtifactsResponse QueryArtifactsResponse(System.Collections.Generic.IEnumerable items = null, string continuationToken = null) { throw null; } - public static Azure.Analytics.Synapse.Artifacts.Models.RelationshipEntity RelationshipEntity(string name = null, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType type = Azure.Analytics.Synapse.Artifacts.Models.SASEntityType.Database, string id = null, Azure.Analytics.Synapse.Artifacts.Models.RelationshipProperties properties = null) { throw null; } - public static Azure.Analytics.Synapse.Artifacts.Models.RelationshipProperties RelationshipProperties(string originObjectId = null, string objectId = null, long? objectVersion = default(long?), Azure.Analytics.Synapse.Artifacts.Models.PublishStatus? publishStatus = default(Azure.Analytics.Synapse.Artifacts.Models.PublishStatus?), System.Collections.Generic.IDictionary properties = null, Azure.Analytics.Synapse.Artifacts.Models.BaseNamespace @namespace = null, string fromTableId = null, string fromTableName = null, string toTableId = null, string toTableName = null, Azure.Analytics.Synapse.Artifacts.Models.RelationshipType? relationshipType = default(Azure.Analytics.Synapse.Artifacts.Models.RelationshipType?), System.Collections.Generic.IEnumerable columnRelationshipInformations = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.RerunTriggerListResponse RerunTriggerListResponse(System.Collections.Generic.IEnumerable value = null, string nextLink = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.RerunTriggerResource RerunTriggerResource(string id = null, string name = null, string type = null, string etag = null, Azure.Analytics.Synapse.Artifacts.Models.RerunTumblingWindowTrigger properties = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.RerunTumblingWindowTrigger RerunTumblingWindowTrigger(string description = null, Azure.Analytics.Synapse.Artifacts.Models.TriggerRuntimeState? runtimeState = default(Azure.Analytics.Synapse.Artifacts.Models.TriggerRuntimeState?), System.Collections.Generic.IEnumerable annotations = null, System.Collections.Generic.IDictionary additionalProperties = null, object parentTrigger = null, System.DateTimeOffset requestedStartTime = default(System.DateTimeOffset), System.DateTimeOffset requestedEndTime = default(System.DateTimeOffset), int rerunConcurrency = 0) { throw null; } @@ -1341,8 +1275,6 @@ public static partial class ArtifactsModelFactory public static Azure.Analytics.Synapse.Artifacts.Models.RunNotebookSnapshotResponse RunNotebookSnapshotResponse(string message = null, Azure.Analytics.Synapse.Artifacts.Models.RunNotebookSnapshotResult result = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.RunNotebookSnapshotResult RunNotebookSnapshotResult(Azure.Analytics.Synapse.Artifacts.Models.RunNotebookSnapshot snapshot = null, Azure.Analytics.Synapse.Artifacts.Models.RunNotebookError error = null, string runId = null, string runStatus = null, string lastCheckedOn = null, long? sessionId = default(long?), string sparkPool = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.ScheduleTrigger ScheduleTrigger(string description = null, Azure.Analytics.Synapse.Artifacts.Models.TriggerRuntimeState? runtimeState = default(Azure.Analytics.Synapse.Artifacts.Models.TriggerRuntimeState?), System.Collections.Generic.IEnumerable annotations = null, System.Collections.Generic.IDictionary additionalProperties = null, System.Collections.Generic.IEnumerable pipelines = null, Azure.Analytics.Synapse.Artifacts.Models.ScheduleTriggerRecurrence recurrence = null) { throw null; } - public static Azure.Analytics.Synapse.Artifacts.Models.SchemaEntity SchemaEntity(string name = null, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType type = Azure.Analytics.Synapse.Artifacts.Models.SASEntityType.Database, string id = null, Azure.Analytics.Synapse.Artifacts.Models.SchemaProperties properties = null) { throw null; } - public static Azure.Analytics.Synapse.Artifacts.Models.SchemaProperties SchemaProperties(string originObjectId = null, string objectId = null, long? objectVersion = default(long?), Azure.Analytics.Synapse.Artifacts.Models.PublishStatus? publishStatus = default(Azure.Analytics.Synapse.Artifacts.Models.PublishStatus?), System.Collections.Generic.IDictionary properties = null, Azure.Analytics.Synapse.Artifacts.Models.BaseNamespace @namespace = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.SparkBatchJob SparkBatchJob(Azure.Analytics.Synapse.Artifacts.Models.SparkBatchJobState livyInfo = null, string name = null, string workspaceName = null, string sparkPoolName = null, string submitterName = null, string submitterId = null, string artifactId = null, Azure.Analytics.Synapse.Artifacts.Models.SparkJobType? jobType = default(Azure.Analytics.Synapse.Artifacts.Models.SparkJobType?), Azure.Analytics.Synapse.Artifacts.Models.SparkBatchJobResultType? result = default(Azure.Analytics.Synapse.Artifacts.Models.SparkBatchJobResultType?), Azure.Analytics.Synapse.Artifacts.Models.SparkScheduler scheduler = null, Azure.Analytics.Synapse.Artifacts.Models.SparkServicePlugin plugin = null, System.Collections.Generic.IEnumerable errors = null, System.Collections.Generic.IReadOnlyDictionary tags = null, int id = 0, string appId = null, System.Collections.Generic.IReadOnlyDictionary appInfo = null, Azure.Analytics.Synapse.Artifacts.Models.LivyStates? state = default(Azure.Analytics.Synapse.Artifacts.Models.LivyStates?), System.Collections.Generic.IEnumerable logLines = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.SparkBatchJobState SparkBatchJobState(System.DateTimeOffset? notStartedAt = default(System.DateTimeOffset?), System.DateTimeOffset? startingAt = default(System.DateTimeOffset?), System.DateTimeOffset? runningAt = default(System.DateTimeOffset?), System.DateTimeOffset? deadAt = default(System.DateTimeOffset?), System.DateTimeOffset? successAt = default(System.DateTimeOffset?), System.DateTimeOffset? terminatedAt = default(System.DateTimeOffset?), System.DateTimeOffset? recoveringAt = default(System.DateTimeOffset?), string currentState = null, Azure.Analytics.Synapse.Artifacts.Models.SparkRequest jobCreationRequest = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.SparkConfigurationResource SparkConfigurationResource(string id = null, string name = null, string type = null, string etag = null, Azure.Analytics.Synapse.Artifacts.Models.SparkConfiguration properties = null) { throw null; } @@ -1355,10 +1287,6 @@ public static partial class ArtifactsModelFactory public static Azure.Analytics.Synapse.Artifacts.Models.SqlPoolInfoListResult SqlPoolInfoListResult(string nextLink = null, System.Collections.Generic.IEnumerable value = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.SqlScriptResource SqlScriptResource(string id = null, string name = null, string type = null, string etag = null, Azure.Analytics.Synapse.Artifacts.Models.SqlScript properties = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.SubResource SubResource(string id = null, string name = null, string type = null, string etag = null) { throw null; } - public static Azure.Analytics.Synapse.Artifacts.Models.SyMsapiddlResponse SyMsapiddlResponse(Azure.Analytics.Synapse.Artifacts.Models.DDLType ddlType = Azure.Analytics.Synapse.Artifacts.Models.DDLType.Create, string entityName = null, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType entityType = Azure.Analytics.Synapse.Artifacts.Models.SASEntityType.Database, Azure.Analytics.Synapse.Artifacts.Models.PublishStatus publishStatus = default(Azure.Analytics.Synapse.Artifacts.Models.PublishStatus), string originObjectId = null, string objectId = null, long objectVersion = (long)0) { throw null; } - public static Azure.Analytics.Synapse.Artifacts.Models.SyMsapiddlResponses SyMsapiddlResponses(System.Collections.Generic.IEnumerable syMsApiDdlResponse = null) { throw null; } - public static Azure.Analytics.Synapse.Artifacts.Models.TableEntity TableEntity(string name = null, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType type = Azure.Analytics.Synapse.Artifacts.Models.SASEntityType.Database, string id = null, Azure.Analytics.Synapse.Artifacts.Models.TableProperties properties = null) { throw null; } - public static Azure.Analytics.Synapse.Artifacts.Models.TableProperties TableProperties(string originObjectId = null, string objectId = null, long? objectVersion = default(long?), Azure.Analytics.Synapse.Artifacts.Models.PublishStatus? publishStatus = default(Azure.Analytics.Synapse.Artifacts.Models.PublishStatus?), System.Collections.Generic.IDictionary properties = null, Azure.Analytics.Synapse.Artifacts.Models.TableNamespace @namespace = null, Azure.Analytics.Synapse.Artifacts.Models.TablePartitioning partitioning = null, Azure.Analytics.Synapse.Artifacts.Models.TableType tableType = Azure.Analytics.Synapse.Artifacts.Models.TableType.Managed, Azure.Analytics.Synapse.Artifacts.Models.StorageDescriptor storageDescriptor = null, bool? temporary = default(bool?), bool? isRewriteEnabled = default(bool?)) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.TrackedResource TrackedResource(string id = null, string name = null, string type = null, System.Collections.Generic.IDictionary tags = null, string location = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.Trigger Trigger(string type = null, string description = null, Azure.Analytics.Synapse.Artifacts.Models.TriggerRuntimeState? runtimeState = default(Azure.Analytics.Synapse.Artifacts.Models.TriggerRuntimeState?), System.Collections.Generic.IEnumerable annotations = null, System.Collections.Generic.IDictionary additionalProperties = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.TriggerResource TriggerResource(string id = null, string name = null, string type = null, string etag = null, Azure.Analytics.Synapse.Artifacts.Models.Trigger properties = null) { throw null; } @@ -1366,8 +1294,6 @@ public static partial class ArtifactsModelFactory public static Azure.Analytics.Synapse.Artifacts.Models.TriggerRunsQueryResponse TriggerRunsQueryResponse(System.Collections.Generic.IEnumerable value = null, string continuationToken = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.TriggerSubscriptionOperationStatus TriggerSubscriptionOperationStatus(string triggerName = null, Azure.Analytics.Synapse.Artifacts.Models.EventSubscriptionStatus? status = default(Azure.Analytics.Synapse.Artifacts.Models.EventSubscriptionStatus?)) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.TumblingWindowTrigger TumblingWindowTrigger(string description = null, Azure.Analytics.Synapse.Artifacts.Models.TriggerRuntimeState? runtimeState = default(Azure.Analytics.Synapse.Artifacts.Models.TriggerRuntimeState?), System.Collections.Generic.IEnumerable annotations = null, System.Collections.Generic.IDictionary additionalProperties = null, Azure.Analytics.Synapse.Artifacts.Models.TriggerPipelineReference pipeline = null, Azure.Analytics.Synapse.Artifacts.Models.TumblingWindowFrequency frequency = default(Azure.Analytics.Synapse.Artifacts.Models.TumblingWindowFrequency), int interval = 0, System.DateTimeOffset startTime = default(System.DateTimeOffset), System.DateTimeOffset? endTime = default(System.DateTimeOffset?), object delay = null, int maxConcurrency = 0, Azure.Analytics.Synapse.Artifacts.Models.RetryPolicy retryPolicy = null, System.Collections.Generic.IEnumerable dependsOn = null) { throw null; } - public static Azure.Analytics.Synapse.Artifacts.Models.ViewEntity ViewEntity(string name = null, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType type = Azure.Analytics.Synapse.Artifacts.Models.SASEntityType.Database, string id = null, Azure.Analytics.Synapse.Artifacts.Models.ViewEntityProperties properties = null) { throw null; } - public static Azure.Analytics.Synapse.Artifacts.Models.ViewEntityProperties ViewEntityProperties(string originObjectId = null, string objectId = null, long? objectVersion = default(long?), Azure.Analytics.Synapse.Artifacts.Models.PublishStatus? publishStatus = default(Azure.Analytics.Synapse.Artifacts.Models.PublishStatus?), System.Collections.Generic.IDictionary properties = null, Azure.Analytics.Synapse.Artifacts.Models.TableNamespace @namespace = null, Azure.Analytics.Synapse.Artifacts.Models.TablePartitioning partitioning = null, Azure.Analytics.Synapse.Artifacts.Models.StorageDescriptor storageDescriptor = null, string viewOriginalText = null, string viewExpandedText = null, bool? temporary = default(bool?), bool? isRewriteEnabled = default(bool?)) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.Workspace Workspace(string id = null, string name = null, string type = null, System.Collections.Generic.IDictionary tags = null, string location = null, Azure.Analytics.Synapse.Artifacts.Models.ManagedIdentity identity = null, Azure.Analytics.Synapse.Artifacts.Models.DataLakeStorageAccountDetails defaultDataLakeStorage = null, string sqlAdministratorLoginPassword = null, string managedResourceGroupName = null, string provisioningState = null, string sqlAdministratorLogin = null, Azure.Analytics.Synapse.Artifacts.Models.VirtualNetworkProfile virtualNetworkProfile = null, System.Collections.Generic.IDictionary connectivityEndpoints = null, string managedVirtualNetwork = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.Analytics.Synapse.Artifacts.Models.EncryptionDetails encryption = null, System.Guid? workspaceUID = default(System.Guid?), System.Collections.Generic.IReadOnlyDictionary extraProperties = null, Azure.Analytics.Synapse.Artifacts.Models.ManagedVirtualNetworkSettings managedVirtualNetworkSettings = null, Azure.Analytics.Synapse.Artifacts.Models.WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration = null, Azure.Analytics.Synapse.Artifacts.Models.PurviewConfiguration purviewConfiguration = null, string adlaResourceId = null) { throw null; } public static Azure.Analytics.Synapse.Artifacts.Models.WorkspaceIdentity WorkspaceIdentity(Azure.Analytics.Synapse.Artifacts.Models.WorkspaceIdentityType type = default(Azure.Analytics.Synapse.Artifacts.Models.WorkspaceIdentityType), string principalId = null, string tenantId = null) { throw null; } } @@ -2107,11 +2033,6 @@ public AzureTableStorageLinkedService() { } public Azure.Analytics.Synapse.Artifacts.Models.AzureKeyVaultSecretReference SasToken { get { throw null; } set { } } public object SasUri { get { throw null; } set { } } } - public partial class BaseNamespace - { - public BaseNamespace(string databaseName) { } - public string DatabaseName { get { throw null; } set { } } - } public partial class BigDataPoolParametrizationReference { public BigDataPoolParametrizationReference(Azure.Analytics.Synapse.Artifacts.Models.BigDataPoolReferenceType type, object referenceName) { } @@ -2323,12 +2244,6 @@ internal CloudError() { } public string Message { get { throw null; } } public string Target { get { throw null; } } } - public partial class ColumnRelationshipInformation - { - public ColumnRelationshipInformation(string fromColumnName, string toColumnName) { } - public string FromColumnName { get { throw null; } set { } } - public string ToColumnName { get { throw null; } set { } } - } public partial class CommonDataServiceForAppsEntityDataset : Azure.Analytics.Synapse.Artifacts.Models.Dataset { public CommonDataServiceForAppsEntityDataset(Azure.Analytics.Synapse.Artifacts.Models.LinkedServiceReference linkedServiceName) : base (default(Azure.Analytics.Synapse.Artifacts.Models.LinkedServiceReference)) { } @@ -2641,17 +2556,6 @@ public partial class CustomSetupBase { public CustomSetupBase() { } } - public partial class DatabaseEntity : Azure.Analytics.Synapse.Artifacts.Models.MDEntity - { - public DatabaseEntity(string name, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType type, Azure.Analytics.Synapse.Artifacts.Models.DatabaseProperties properties) : base (default(string), default(Azure.Analytics.Synapse.Artifacts.Models.SASEntityType)) { } - public Azure.Analytics.Synapse.Artifacts.Models.DatabaseProperties Properties { get { throw null; } set { } } - } - public partial class DatabaseProperties : Azure.Analytics.Synapse.Artifacts.Models.MDEntityProperties - { - public DatabaseProperties(Azure.Analytics.Synapse.Artifacts.Models.DataSource source) { } - public string Description { get { throw null; } set { } } - public Azure.Analytics.Synapse.Artifacts.Models.DataSource Source { get { throw null; } set { } } - } public partial class DatabricksNotebookActivity : Azure.Analytics.Synapse.Artifacts.Models.ExecutionActivity { public DatabricksNotebookActivity(string name, object notebookPath) : base (default(string)) { } @@ -2673,12 +2577,6 @@ public DatabricksSparkPythonActivity(string name, object pythonFile) : base (def public System.Collections.Generic.IList Parameters { get { throw null; } } public object PythonFile { get { throw null; } set { } } } - public partial class DataColumn - { - public DataColumn(string name, Azure.Analytics.Synapse.Artifacts.Models.TypeInfo originDataTypeName) { } - public string Name { get { throw null; } set { } } - public Azure.Analytics.Synapse.Artifacts.Models.TypeInfo OriginDataTypeName { get { throw null; } set { } } - } public partial class DataFlow { public DataFlow() { } @@ -2972,13 +2870,6 @@ public DatasetStorageFormat() { } public object Deserializer { get { throw null; } set { } } public object Serializer { get { throw null; } set { } } } - public partial class DataSource - { - public DataSource(string location) { } - public string Location { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Properties { get { throw null; } } - public string Provider { get { throw null; } set { } } - } public partial class DataworldLinkedService : Azure.Analytics.Synapse.Artifacts.Models.LinkedService { public DataworldLinkedService(Azure.Analytics.Synapse.Artifacts.Models.SecretBase apiToken) { } @@ -3037,24 +2928,6 @@ public Db2TableDataset(Azure.Analytics.Synapse.Artifacts.Models.LinkedServiceRef public object Table { get { throw null; } set { } } public object TableName { get { throw null; } set { } } } - public partial class DDLBatch - { - public DDLBatch(System.Collections.Generic.IEnumerable ddls) { } - public System.Collections.Generic.IList Ddls { get { throw null; } } - } - public partial class DDLPayload - { - public DDLPayload(Azure.Analytics.Synapse.Artifacts.Models.DDLType actionType) { } - public Azure.Analytics.Synapse.Artifacts.Models.DDLType ActionType { get { throw null; } } - public Azure.Analytics.Synapse.Artifacts.Models.MDEntity NewEntity { get { throw null; } set { } } - public Azure.Analytics.Synapse.Artifacts.Models.MDEntity OldEntity { get { throw null; } set { } } - } - public enum DDLType - { - Create = 0, - Alter = 1, - Drop = 2, - } public partial class DeleteActivity : Azure.Analytics.Synapse.Artifacts.Models.ExecutionActivity { public DeleteActivity(string name, Azure.Analytics.Synapse.Artifacts.Models.DatasetReference dataset) : base (default(string)) { } @@ -3143,14 +3016,6 @@ public DistcpSettings(object resourceManagerEndpoint, object tempScriptPath) { } public object ResourceManagerEndpoint { get { throw null; } set { } } public object TempScriptPath { get { throw null; } set { } } } - public partial class DistributionInfo - { - public DistributionInfo() { } - public int? Count { get { throw null; } set { } } - public System.Collections.Generic.IList Keys { get { throw null; } } - public System.Collections.Generic.IList SortKeys { get { throw null; } } - public string Type { get { throw null; } set { } } - } public partial class DocumentDbCollectionDataset : Azure.Analytics.Synapse.Artifacts.Models.Dataset { public DocumentDbCollectionDataset(Azure.Analytics.Synapse.Artifacts.Models.LinkedServiceReference linkedServiceName, object collectionName) : base (default(Azure.Analytics.Synapse.Artifacts.Models.LinkedServiceReference)) { } @@ -3566,16 +3431,6 @@ public ForEachActivity(string name, Azure.Analytics.Synapse.Artifacts.Models.Exp public bool? IsSequential { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.Expression Items { get { throw null; } set { } } } - public partial class FormatInfo - { - public FormatInfo(string inputFormat, string outputFormat, string formatType, string serializeLib) { } - public string FormatType { get { throw null; } set { } } - public string InputFormat { get { throw null; } set { } } - public string OutputFormat { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Properties { get { throw null; } } - public string SerDeName { get { throw null; } set { } } - public string SerializeLib { get { throw null; } set { } } - } public partial class FormatReadSettings { public FormatReadSettings() { } @@ -4990,22 +4845,6 @@ public partial class MarketoSource : Azure.Analytics.Synapse.Artifacts.Models.Ta public MarketoSource() { } public object Query { get { throw null; } set { } } } - public partial class MDEntity - { - public MDEntity(string name, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType type) { } - public string Id { get { throw null; } } - public string Name { get { throw null; } set { } } - public Azure.Analytics.Synapse.Artifacts.Models.SASEntityType Type { get { throw null; } set { } } - } - public partial class MDEntityProperties - { - public MDEntityProperties() { } - public string ObjectId { get { throw null; } } - public long? ObjectVersion { get { throw null; } } - public string OriginObjectId { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Properties { get { throw null; } } - public Azure.Analytics.Synapse.Artifacts.Models.PublishStatus? PublishStatus { get { throw null; } set { } } - } public partial class MetastoreRegisterObject { public MetastoreRegisterObject(string inputFolder) { } @@ -5067,7 +4906,7 @@ public partial class MongoDbAtlasLinkedService : Azure.Analytics.Synapse.Artifac public MongoDbAtlasLinkedService(object connectionString, object database) { } public object ConnectionString { get { throw null; } set { } } public object Database { get { throw null; } set { } } - public object MongoDbAtlasDriverVersion { get { throw null; } set { } } + public object DriverVersion { get { throw null; } set { } } } public partial class MongoDbAtlasSource : Azure.Analytics.Synapse.Artifacts.Models.CopySource { @@ -5669,23 +5508,6 @@ public ParquetWriteSettings() { } public object FileNamePrefix { get { throw null; } set { } } public object MaxRowsPerFile { get { throw null; } set { } } } - public partial class PartitionInfo : Azure.Analytics.Synapse.Artifacts.Models.MDEntity - { - public PartitionInfo(string name, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType type) : base (default(string), default(Azure.Analytics.Synapse.Artifacts.Models.SASEntityType)) { } - public Azure.Analytics.Synapse.Artifacts.Models.PartitionInfoProperties Properties { get { throw null; } set { } } - } - public partial class PartitionInfoNamespace : Azure.Analytics.Synapse.Artifacts.Models.TableNamespace - { - public PartitionInfoNamespace(string databaseName, string tableName) : base (default(string)) { } - public string TableName { get { throw null; } set { } } - } - public partial class PartitionInfoProperties : Azure.Analytics.Synapse.Artifacts.Models.MDEntityProperties - { - public PartitionInfoProperties(Azure.Analytics.Synapse.Artifacts.Models.PartitionInfoNamespace @namespace, Azure.Analytics.Synapse.Artifacts.Models.StorageDescriptor storageDescriptor, System.Collections.Generic.IEnumerable partitionKeyValues) { } - public Azure.Analytics.Synapse.Artifacts.Models.PartitionInfoNamespace Namespace { get { throw null; } set { } } - public System.Collections.Generic.IList PartitionKeyValues { get { throw null; } } - public Azure.Analytics.Synapse.Artifacts.Models.StorageDescriptor StorageDescriptor { get { throw null; } set { } } - } public partial class PaypalLinkedService : Azure.Analytics.Synapse.Artifacts.Models.LinkedService { public PaypalLinkedService(object host, object clientId) { } @@ -5972,34 +5794,11 @@ public partial class ProxyResource : Azure.Analytics.Synapse.Artifacts.Models.Re { public ProxyResource() { } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct PublishStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public PublishStatus(string value) { throw null; } - public static Azure.Analytics.Synapse.Artifacts.Models.PublishStatus PUBLISHED { get { throw null; } } - public bool Equals(Azure.Analytics.Synapse.Artifacts.Models.PublishStatus other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.Analytics.Synapse.Artifacts.Models.PublishStatus left, Azure.Analytics.Synapse.Artifacts.Models.PublishStatus right) { throw null; } - public static implicit operator Azure.Analytics.Synapse.Artifacts.Models.PublishStatus (string value) { throw null; } - public static bool operator !=(Azure.Analytics.Synapse.Artifacts.Models.PublishStatus left, Azure.Analytics.Synapse.Artifacts.Models.PublishStatus right) { throw null; } - public override string ToString() { throw null; } - } public partial class PurviewConfiguration { public PurviewConfiguration() { } public string PurviewResourceId { get { throw null; } set { } } } - public partial class QueryArtifactsResponse - { - internal QueryArtifactsResponse() { } - public string ContinuationToken { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Items { get { throw null; } } - } public partial class QueryTableStatusRequest { public QueryTableStatusRequest() { } @@ -6100,29 +5899,6 @@ public partial class RelationalTableDataset : Azure.Analytics.Synapse.Artifacts. public RelationalTableDataset(Azure.Analytics.Synapse.Artifacts.Models.LinkedServiceReference linkedServiceName) : base (default(Azure.Analytics.Synapse.Artifacts.Models.LinkedServiceReference)) { } public object TableName { get { throw null; } set { } } } - public partial class RelationshipEntity : Azure.Analytics.Synapse.Artifacts.Models.MDEntity - { - public RelationshipEntity(string name, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType type, Azure.Analytics.Synapse.Artifacts.Models.RelationshipProperties properties) : base (default(string), default(Azure.Analytics.Synapse.Artifacts.Models.SASEntityType)) { } - public Azure.Analytics.Synapse.Artifacts.Models.RelationshipProperties Properties { get { throw null; } set { } } - } - public partial class RelationshipProperties : Azure.Analytics.Synapse.Artifacts.Models.MDEntityProperties - { - public RelationshipProperties(Azure.Analytics.Synapse.Artifacts.Models.BaseNamespace @namespace, string fromTableName, string toTableName, System.Collections.Generic.IEnumerable columnRelationshipInformations) { } - public System.Collections.Generic.IList ColumnRelationshipInformations { get { throw null; } } - public string FromTableId { get { throw null; } } - public string FromTableName { get { throw null; } set { } } - public Azure.Analytics.Synapse.Artifacts.Models.BaseNamespace Namespace { get { throw null; } set { } } - public Azure.Analytics.Synapse.Artifacts.Models.RelationshipType? RelationshipType { get { throw null; } set { } } - public string ToTableId { get { throw null; } } - public string ToTableName { get { throw null; } set { } } - } - public enum RelationshipType - { - Onetoone = 0, - Onetomany = 1, - Manytoone = 2, - Manytomany = 3, - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct RequestStatus : System.IEquatable { @@ -6873,20 +6649,6 @@ public SapTableSource() { } public object RowSkips { get { throw null; } set { } } public object SapDataColumnDelimiter { get { throw null; } set { } } } - public enum SASEntityType - { - Database = 0, - Table = 1, - Schema = 2, - View = 3, - Function = 4, - Partitioninfo = 5, - Relationship = 6, - } - public partial class ScalarTypeInfo : Azure.Analytics.Synapse.Artifacts.Models.TypeInfo - { - public ScalarTypeInfo(string typeName) : base (default(string)) { } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct SchedulerCurrentState : System.IEquatable { @@ -6922,16 +6684,6 @@ public ScheduleTriggerRecurrence() { } public System.DateTimeOffset? StartTime { get { throw null; } set { } } public string TimeZone { get { throw null; } set { } } } - public partial class SchemaEntity : Azure.Analytics.Synapse.Artifacts.Models.MDEntity - { - public SchemaEntity(string name, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType type, Azure.Analytics.Synapse.Artifacts.Models.SchemaProperties properties) : base (default(string), default(Azure.Analytics.Synapse.Artifacts.Models.SASEntityType)) { } - public Azure.Analytics.Synapse.Artifacts.Models.SchemaProperties Properties { get { throw null; } set { } } - } - public partial class SchemaProperties : Azure.Analytics.Synapse.Artifacts.Models.MDEntityProperties - { - public SchemaProperties(Azure.Analytics.Synapse.Artifacts.Models.BaseNamespace @namespace) { } - public Azure.Analytics.Synapse.Artifacts.Models.BaseNamespace Namespace { get { throw null; } set { } } - } public partial class ScriptAction { public ScriptAction(string name, string uri, object roles) { } @@ -7280,17 +7032,6 @@ public SnowflakeSource(Azure.Analytics.Synapse.Artifacts.Models.SnowflakeExportC public Azure.Analytics.Synapse.Artifacts.Models.SnowflakeExportCopyCommand ExportSettings { get { throw null; } set { } } public object Query { get { throw null; } set { } } } - public partial class SortingItem - { - public SortingItem(string keyName, Azure.Analytics.Synapse.Artifacts.Models.SortOrder sortOrder) { } - public string KeyName { get { throw null; } set { } } - public Azure.Analytics.Synapse.Artifacts.Models.SortOrder SortOrder { get { throw null; } set { } } - } - public enum SortOrder - { - Desc = 0, - ASC = 1, - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct SparkAuthenticationType : System.IEquatable { @@ -8036,16 +7777,6 @@ public partial class StartDataFlowDebugSessionResponse public StartDataFlowDebugSessionResponse() { } public string JobVersion { get { throw null; } set { } } } - public partial class StorageDescriptor - { - public StorageDescriptor(System.Collections.Generic.IEnumerable columns, Azure.Analytics.Synapse.Artifacts.Models.FormatInfo format, Azure.Analytics.Synapse.Artifacts.Models.DataSource source) { } - public System.Collections.Generic.IList Columns { get { throw null; } } - public Azure.Analytics.Synapse.Artifacts.Models.DistributionInfo Distribution { get { throw null; } set { } } - public Azure.Analytics.Synapse.Artifacts.Models.FormatInfo Format { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Properties { get { throw null; } } - public object SerDeInfo { get { throw null; } set { } } - public Azure.Analytics.Synapse.Artifacts.Models.DataSource Source { get { throw null; } set { } } - } public partial class StoredProcedureParameter { public StoredProcedureParameter() { } @@ -8149,22 +7880,6 @@ public partial class SybaseTableDataset : Azure.Analytics.Synapse.Artifacts.Mode public SybaseTableDataset(Azure.Analytics.Synapse.Artifacts.Models.LinkedServiceReference linkedServiceName) : base (default(Azure.Analytics.Synapse.Artifacts.Models.LinkedServiceReference)) { } public object TableName { get { throw null; } set { } } } - public partial class SyMsapiddlResponse - { - internal SyMsapiddlResponse() { } - public Azure.Analytics.Synapse.Artifacts.Models.DDLType DdlType { get { throw null; } } - public string EntityName { get { throw null; } } - public Azure.Analytics.Synapse.Artifacts.Models.SASEntityType EntityType { get { throw null; } } - public string ObjectId { get { throw null; } } - public long ObjectVersion { get { throw null; } } - public string OriginObjectId { get { throw null; } } - public Azure.Analytics.Synapse.Artifacts.Models.PublishStatus PublishStatus { get { throw null; } } - } - public partial class SyMsapiddlResponses - { - internal SyMsapiddlResponses() { } - public System.Collections.Generic.IReadOnlyList SyMsApiDdlResponse { get { throw null; } } - } public partial class SynapseNotebookActivity : Azure.Analytics.Synapse.Artifacts.Models.ExecutionActivity { public SynapseNotebookActivity(string name, Azure.Analytics.Synapse.Artifacts.Models.SynapseNotebookReference notebook) : base (default(string)) { } @@ -8211,37 +7926,6 @@ public SynapseSparkJobReference(Azure.Analytics.Synapse.Artifacts.Models.SparkJo public string ReferenceName { get { throw null; } set { } } public Azure.Analytics.Synapse.Artifacts.Models.SparkJobReferenceType Type { get { throw null; } set { } } } - public partial class TableEntity : Azure.Analytics.Synapse.Artifacts.Models.MDEntity - { - public TableEntity(string name, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType type, Azure.Analytics.Synapse.Artifacts.Models.TableProperties properties) : base (default(string), default(Azure.Analytics.Synapse.Artifacts.Models.SASEntityType)) { } - public Azure.Analytics.Synapse.Artifacts.Models.TableProperties Properties { get { throw null; } set { } } - } - public partial class TableNamespace : Azure.Analytics.Synapse.Artifacts.Models.BaseNamespace - { - public TableNamespace(string databaseName) : base (default(string)) { } - public string SchemaName { get { throw null; } set { } } - } - public partial class TablePartitioning - { - public TablePartitioning(System.Collections.Generic.IEnumerable keys, string partitionFunctionType) { } - public System.Collections.Generic.IList Keys { get { throw null; } } - public string PartitionFunctionType { get { throw null; } set { } } - } - public partial class TableProperties : Azure.Analytics.Synapse.Artifacts.Models.MDEntityProperties - { - public TableProperties(Azure.Analytics.Synapse.Artifacts.Models.TableNamespace @namespace, Azure.Analytics.Synapse.Artifacts.Models.TableType tableType, Azure.Analytics.Synapse.Artifacts.Models.StorageDescriptor storageDescriptor) { } - public bool? IsRewriteEnabled { get { throw null; } set { } } - public Azure.Analytics.Synapse.Artifacts.Models.TableNamespace Namespace { get { throw null; } set { } } - public Azure.Analytics.Synapse.Artifacts.Models.TablePartitioning Partitioning { get { throw null; } set { } } - public Azure.Analytics.Synapse.Artifacts.Models.StorageDescriptor StorageDescriptor { get { throw null; } set { } } - public Azure.Analytics.Synapse.Artifacts.Models.TableType TableType { get { throw null; } set { } } - public bool? Temporary { get { throw null; } set { } } - } - public enum TableType - { - Managed = 0, - External = 1, - } public partial class TabularSource : Azure.Analytics.Synapse.Artifacts.Models.CopySource { public TabularSource() { } @@ -8562,19 +8246,6 @@ public TypeConversionSettings() { } public object TimeSpanFormat { get { throw null; } set { } } public object TreatBooleanAsNumber { get { throw null; } set { } } } - public partial class TypeInfo - { - public TypeInfo(string typeName) { } - public bool? IsComplexType { get { throw null; } set { } } - public bool? IsNullable { get { throw null; } set { } } - public bool? IsTableType { get { throw null; } set { } } - public int? Length { get { throw null; } set { } } - public int? Precision { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Properties { get { throw null; } } - public int? Scale { get { throw null; } set { } } - public string TypeFamily { get { throw null; } set { } } - public string TypeName { get { throw null; } set { } } - } public partial class UntilActivity : Azure.Analytics.Synapse.Artifacts.Models.ControlActivity { public UntilActivity(string name, Azure.Analytics.Synapse.Artifacts.Models.Expression expression, System.Collections.Generic.IEnumerable activities) : base (default(string)) { } @@ -8647,22 +8318,6 @@ public VerticaTableDataset(Azure.Analytics.Synapse.Artifacts.Models.LinkedServic public object Table { get { throw null; } set { } } public object TableName { get { throw null; } set { } } } - public partial class ViewEntity : Azure.Analytics.Synapse.Artifacts.Models.MDEntity - { - public ViewEntity(string name, Azure.Analytics.Synapse.Artifacts.Models.SASEntityType type, Azure.Analytics.Synapse.Artifacts.Models.ViewEntityProperties properties) : base (default(string), default(Azure.Analytics.Synapse.Artifacts.Models.SASEntityType)) { } - public Azure.Analytics.Synapse.Artifacts.Models.ViewEntityProperties Properties { get { throw null; } set { } } - } - public partial class ViewEntityProperties : Azure.Analytics.Synapse.Artifacts.Models.MDEntityProperties - { - public ViewEntityProperties(Azure.Analytics.Synapse.Artifacts.Models.TableNamespace @namespace, Azure.Analytics.Synapse.Artifacts.Models.StorageDescriptor storageDescriptor) { } - public bool? IsRewriteEnabled { get { throw null; } set { } } - public Azure.Analytics.Synapse.Artifacts.Models.TableNamespace Namespace { get { throw null; } set { } } - public Azure.Analytics.Synapse.Artifacts.Models.TablePartitioning Partitioning { get { throw null; } set { } } - public Azure.Analytics.Synapse.Artifacts.Models.StorageDescriptor StorageDescriptor { get { throw null; } set { } } - public bool? Temporary { get { throw null; } set { } } - public string ViewExpandedText { get { throw null; } set { } } - public string ViewOriginalText { get { throw null; } set { } } - } public partial class VirtualNetworkProfile { public VirtualNetworkProfile() { } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/ArtifactsClientOptions.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/ArtifactsClientOptions.cs index b2020f1cd059..98fc32f5ccb2 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/ArtifactsClientOptions.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/ArtifactsClientOptions.cs @@ -20,18 +20,16 @@ public enum ServiceVersion { /// Service version "2020-12-01". V2020_12_01 = 1, - /// Service version "2021-04-01". - V2021_04_01 = 2, /// Service version "2021-06-01-preview". - V2021_06_01_Preview = 3, + V2021_06_01_Preview = 2, /// Service version "2021-07-01-preview". - V2021_07_01_Preview = 4, + V2021_07_01_Preview = 3, /// Service version "2021-11-01-preview". - V2021_11_01_Preview = 5, + V2021_11_01_Preview = 4, /// Service version "2022-03-01-preview". - V2022_03_01_Preview = 6, + V2022_03_01_Preview = 5, /// Service version "2023-04-18-preview". - V2023_04_18_Preview = 7, + V2023_04_18_Preview = 6, } internal string Version { get; } @@ -42,7 +40,6 @@ public ArtifactsClientOptions(ServiceVersion version = LatestVersion) Version = version switch { ServiceVersion.V2020_12_01 => "2020-12-01", - ServiceVersion.V2021_04_01 => "2021-04-01", ServiceVersion.V2021_06_01_Preview => "2021-06-01-preview", ServiceVersion.V2021_07_01_Preview => "2021-07-01-preview", ServiceVersion.V2021_11_01_Preview => "2021-11-01-preview", diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/ArtifactsModelFactory.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/ArtifactsModelFactory.cs index ae49f3c19ca5..0f2f8e1e2aa2 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/ArtifactsModelFactory.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/ArtifactsModelFactory.cs @@ -999,92 +999,6 @@ public static ManagedIdentity ManagedIdentity(string principalId = null, Guid? t return new ManagedIdentity(principalId, tenantId, type); } - /// Initializes a new instance of MDEntity. - /// Entity Name. - /// Artifact type. - /// Entity Resource Id. - /// A new instance for mocking. - public static MDEntity MDEntity(string name = null, SASEntityType type = default, string id = null) - { - return new MDEntity(name, type, id); - } - - /// Initializes a new instance of SyMsapiddlResponses. - /// List of DDL response. - /// A new instance for mocking. - public static SyMsapiddlResponses SyMsapiddlResponses(IEnumerable syMsApiDdlResponse = null) - { - syMsApiDdlResponse ??= new List(); - - return new SyMsapiddlResponses(syMsApiDdlResponse?.ToList()); - } - - /// Initializes a new instance of SyMsapiddlResponse. - /// DDL type. - /// Entity name. - /// Artifact type. - /// Publish status. - /// Object id maintained by Origin Catalog. - /// Object id maintained by SyMS. - /// Object version maintained by SyMS. - /// A new instance for mocking. - public static SyMsapiddlResponse SyMsapiddlResponse(DDLType ddlType = default, string entityName = null, SASEntityType entityType = default, PublishStatus publishStatus = default, string originObjectId = null, string objectId = null, long objectVersion = default) - { - return new SyMsapiddlResponse(ddlType, entityName, entityType, publishStatus, originObjectId, objectId, objectVersion); - } - - /// Initializes a new instance of QueryArtifactsResponse. - /// - /// Continuation token to get next page. - /// A new instance for mocking. - public static QueryArtifactsResponse QueryArtifactsResponse(IEnumerable items = null, string continuationToken = null) - { - items ??= new List(); - - return new QueryArtifactsResponse(items?.ToList(), continuationToken); - } - - /// Initializes a new instance of DatabaseEntity. - /// Entity Name. - /// Artifact type. - /// Entity Resource Id. - /// Database properties. - /// A new instance for mocking. - public static DatabaseEntity DatabaseEntity(string name = null, SASEntityType type = default, string id = null, DatabaseProperties properties = null) - { - return new DatabaseEntity(name, type, id, properties); - } - - /// Initializes a new instance of DatabaseProperties. - /// Entity object id maintained by the caller. - /// Entity object id maintained by SyMS. - /// Entity object version maintained by SyMS. - /// Publish status. - /// Property bag. - /// Data source properties. - /// Description of the database. - /// A new instance for mocking. - public static DatabaseProperties DatabaseProperties(string originObjectId = null, string objectId = null, long? objectVersion = null, PublishStatus? publishStatus = null, IDictionary properties = null, DataSource source = null, string description = null) - { - properties ??= new Dictionary(); - - return new DatabaseProperties(originObjectId, objectId, objectVersion, publishStatus, properties, source, description); - } - - /// Initializes a new instance of MDEntityProperties. - /// Entity object id maintained by the caller. - /// Entity object id maintained by SyMS. - /// Entity object version maintained by SyMS. - /// Publish status. - /// Property bag. - /// A new instance for mocking. - public static MDEntityProperties MDEntityProperties(string originObjectId = null, string objectId = null, long? objectVersion = null, PublishStatus? publishStatus = null, IDictionary properties = null) - { - properties ??= new Dictionary(); - - return new MDEntityProperties(originObjectId, objectId, objectVersion, publishStatus, properties); - } - /// Initializes a new instance of WorkspaceIdentity. /// The identity type. Currently the only supported type is 'SystemAssigned'. /// The principal id of the identity. @@ -1286,157 +1200,6 @@ public static ChainingTrigger ChainingTrigger(string description = null, Trigger return new ChainingTrigger("ChainingTrigger", description, runtimeState, annotations?.ToList(), additionalProperties, pipeline, dependsOn?.ToList(), runDimension); } - /// Initializes a new instance of PartitionInfoProperties. - /// Entity object id maintained by the caller. - /// Entity object id maintained by SyMS. - /// Entity object version maintained by SyMS. - /// Publish status. - /// Property bag. - /// Partition information namespace. - /// Storage descriptor. - /// Partition key values. - /// A new instance for mocking. - public static PartitionInfoProperties PartitionInfoProperties(string originObjectId = null, string objectId = null, long? objectVersion = null, PublishStatus? publishStatus = null, IDictionary properties = null, PartitionInfoNamespace @namespace = null, StorageDescriptor storageDescriptor = null, IEnumerable partitionKeyValues = null) - { - properties ??= new Dictionary(); - partitionKeyValues ??= new List(); - - return new PartitionInfoProperties(originObjectId, objectId, objectVersion, publishStatus, properties, @namespace, storageDescriptor, partitionKeyValues?.ToList()); - } - - /// Initializes a new instance of SchemaProperties. - /// Entity object id maintained by the caller. - /// Entity object id maintained by SyMS. - /// Entity object version maintained by SyMS. - /// Publish status. - /// Property bag. - /// Namespace. - /// A new instance for mocking. - public static SchemaProperties SchemaProperties(string originObjectId = null, string objectId = null, long? objectVersion = null, PublishStatus? publishStatus = null, IDictionary properties = null, BaseNamespace @namespace = null) - { - properties ??= new Dictionary(); - - return new SchemaProperties(originObjectId, objectId, objectVersion, publishStatus, properties, @namespace); - } - - /// Initializes a new instance of ViewEntityProperties. - /// Entity object id maintained by the caller. - /// Entity object id maintained by SyMS. - /// Entity object version maintained by SyMS. - /// Publish status. - /// Property bag. - /// Table namespace. - /// Table partitioning information. - /// Storage descriptor. - /// View original text. - /// View expanded text. - /// Temporary. - /// Is rewrite enabled. - /// A new instance for mocking. - public static ViewEntityProperties ViewEntityProperties(string originObjectId = null, string objectId = null, long? objectVersion = null, PublishStatus? publishStatus = null, IDictionary properties = null, TableNamespace @namespace = null, TablePartitioning partitioning = null, StorageDescriptor storageDescriptor = null, string viewOriginalText = null, string viewExpandedText = null, bool? temporary = null, bool? isRewriteEnabled = null) - { - properties ??= new Dictionary(); - - return new ViewEntityProperties(originObjectId, objectId, objectVersion, publishStatus, properties, @namespace, partitioning, storageDescriptor, viewOriginalText, viewExpandedText, temporary, isRewriteEnabled); - } - - /// Initializes a new instance of RelationshipProperties. - /// Entity object id maintained by the caller. - /// Entity object id maintained by SyMS. - /// Entity object version maintained by SyMS. - /// Publish status. - /// Property bag. - /// Namespace. - /// From Table Id. - /// From Table Name. - /// To Table Id. - /// To Table Name. - /// Relation Type. - /// List of Column Relationships. - /// A new instance for mocking. - public static RelationshipProperties RelationshipProperties(string originObjectId = null, string objectId = null, long? objectVersion = null, PublishStatus? publishStatus = null, IDictionary properties = null, BaseNamespace @namespace = null, string fromTableId = null, string fromTableName = null, string toTableId = null, string toTableName = null, RelationshipType? relationshipType = null, IEnumerable columnRelationshipInformations = null) - { - properties ??= new Dictionary(); - columnRelationshipInformations ??= new List(); - - return new RelationshipProperties(originObjectId, objectId, objectVersion, publishStatus, properties, @namespace, fromTableId, fromTableName, toTableId, toTableName, relationshipType, columnRelationshipInformations?.ToList()); - } - - /// Initializes a new instance of TableProperties. - /// Entity object id maintained by the caller. - /// Entity object id maintained by SyMS. - /// Entity object version maintained by SyMS. - /// Publish status. - /// Property bag. - /// Table namespace. - /// Table partitioning information. - /// Entity type. - /// Storage descriptor. - /// Temporary. - /// Is rewrite enabled. - /// A new instance for mocking. - public static TableProperties TableProperties(string originObjectId = null, string objectId = null, long? objectVersion = null, PublishStatus? publishStatus = null, IDictionary properties = null, TableNamespace @namespace = null, TablePartitioning partitioning = null, TableType tableType = default, StorageDescriptor storageDescriptor = null, bool? temporary = null, bool? isRewriteEnabled = null) - { - properties ??= new Dictionary(); - - return new TableProperties(originObjectId, objectId, objectVersion, publishStatus, properties, @namespace, partitioning, tableType, storageDescriptor, temporary, isRewriteEnabled); - } - - /// Initializes a new instance of PartitionInfo. - /// Entity Name. - /// Artifact type. - /// Entity Resource Id. - /// Database properties. - /// A new instance for mocking. - public static PartitionInfo PartitionInfo(string name = null, SASEntityType type = default, string id = null, PartitionInfoProperties properties = null) - { - return new PartitionInfo(name, type, id, properties); - } - - /// Initializes a new instance of SchemaEntity. - /// Entity Name. - /// Artifact type. - /// Entity Resource Id. - /// Database properties. - /// A new instance for mocking. - public static SchemaEntity SchemaEntity(string name = null, SASEntityType type = default, string id = null, SchemaProperties properties = null) - { - return new SchemaEntity(name, type, id, properties); - } - - /// Initializes a new instance of ViewEntity. - /// Entity Name. - /// Artifact type. - /// Entity Resource Id. - /// Database properties. - /// A new instance for mocking. - public static ViewEntity ViewEntity(string name = null, SASEntityType type = default, string id = null, ViewEntityProperties properties = null) - { - return new ViewEntity(name, type, id, properties); - } - - /// Initializes a new instance of RelationshipEntity. - /// Entity Name. - /// Artifact type. - /// Entity Resource Id. - /// Database properties. - /// A new instance for mocking. - public static RelationshipEntity RelationshipEntity(string name = null, SASEntityType type = default, string id = null, RelationshipProperties properties = null) - { - return new RelationshipEntity(name, type, id, properties); - } - - /// Initializes a new instance of TableEntity. - /// Entity Name. - /// Artifact type. - /// Entity Resource Id. - /// Database properties. - /// A new instance for mocking. - public static TableEntity TableEntity(string name = null, SASEntityType type = default, string id = null, TableProperties properties = null) - { - return new TableEntity(name, type, id, properties); - } - /// Initializes a new instance of ManagedIntegrationRuntime. /// Type of integration runtime. /// Integration runtime description. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/BaseNamespace.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/BaseNamespace.Serialization.cs deleted file mode 100644 index dd76be28b482..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/BaseNamespace.Serialization.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(BaseNamespaceConverter))] - public partial class BaseNamespace : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("databaseName"u8); - writer.WriteStringValue(DatabaseName); - writer.WriteEndObject(); - } - - internal static BaseNamespace DeserializeBaseNamespace(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string databaseName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("databaseName"u8)) - { - databaseName = property.Value.GetString(); - continue; - } - } - return new BaseNamespace(databaseName); - } - - internal partial class BaseNamespaceConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, BaseNamespace model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override BaseNamespace Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeBaseNamespace(document.RootElement); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/BaseNamespace.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/BaseNamespace.cs deleted file mode 100644 index cf10b846dcaf..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/BaseNamespace.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Namespace. - public partial class BaseNamespace - { - /// Initializes a new instance of BaseNamespace. - /// Database name. - /// is null. - public BaseNamespace(string databaseName) - { - Argument.AssertNotNull(databaseName, nameof(databaseName)); - - DatabaseName = databaseName; - } - - /// Database name. - public string DatabaseName { get; set; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ColumnRelationshipInformation.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ColumnRelationshipInformation.Serialization.cs deleted file mode 100644 index b84880cc9ac6..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ColumnRelationshipInformation.Serialization.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(ColumnRelationshipInformationConverter))] - public partial class ColumnRelationshipInformation : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("fromColumnName"u8); - writer.WriteStringValue(FromColumnName); - writer.WritePropertyName("toColumnName"u8); - writer.WriteStringValue(ToColumnName); - writer.WriteEndObject(); - } - - internal static ColumnRelationshipInformation DeserializeColumnRelationshipInformation(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string fromColumnName = default; - string toColumnName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("fromColumnName"u8)) - { - fromColumnName = property.Value.GetString(); - continue; - } - if (property.NameEquals("toColumnName"u8)) - { - toColumnName = property.Value.GetString(); - continue; - } - } - return new ColumnRelationshipInformation(fromColumnName, toColumnName); - } - - internal partial class ColumnRelationshipInformationConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, ColumnRelationshipInformation model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override ColumnRelationshipInformation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeColumnRelationshipInformation(document.RootElement); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ColumnRelationshipInformation.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ColumnRelationshipInformation.cs deleted file mode 100644 index 068b3914d6fc..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ColumnRelationshipInformation.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Column information for relationship. - public partial class ColumnRelationshipInformation - { - /// Initializes a new instance of ColumnRelationshipInformation. - /// From Column Name. - /// To Column Name. - /// or is null. - public ColumnRelationshipInformation(string fromColumnName, string toColumnName) - { - Argument.AssertNotNull(fromColumnName, nameof(fromColumnName)); - Argument.AssertNotNull(toColumnName, nameof(toColumnName)); - - FromColumnName = fromColumnName; - ToColumnName = toColumnName; - } - - /// From Column Name. - public string FromColumnName { get; set; } - /// To Column Name. - public string ToColumnName { get; set; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLBatch.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLBatch.Serialization.cs deleted file mode 100644 index b893bbbd3585..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLBatch.Serialization.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(DDLBatchConverter))] - public partial class DDLBatch : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("ddls"u8); - writer.WriteStartArray(); - foreach (var item in Ddls) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WriteEndObject(); - } - - internal partial class DDLBatchConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, DDLBatch model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override DDLBatch Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - throw new NotImplementedException(); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLBatch.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLBatch.cs deleted file mode 100644 index 48214cd14dcb..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLBatch.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// DDL batch. - public partial class DDLBatch - { - /// Initializes a new instance of DDLBatch. - /// - /// is null. - public DDLBatch(IEnumerable ddls) - { - Argument.AssertNotNull(ddls, nameof(ddls)); - - Ddls = ddls.ToList(); - } - - /// Gets the ddls. - public IList Ddls { get; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLPayload.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLPayload.Serialization.cs deleted file mode 100644 index b0ce7bc09b48..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLPayload.Serialization.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(DDLPayloadConverter))] - public partial class DDLPayload : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("actionType"u8); - writer.WriteStringValue(ActionType.ToSerialString()); - if (Optional.IsDefined(OldEntity)) - { - writer.WritePropertyName("oldEntity"u8); - writer.WriteObjectValue(OldEntity); - } - if (Optional.IsDefined(NewEntity)) - { - writer.WritePropertyName("newEntity"u8); - writer.WriteObjectValue(NewEntity); - } - writer.WriteEndObject(); - } - - internal partial class DDLPayloadConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, DDLPayload model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override DDLPayload Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - throw new NotImplementedException(); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLPayload.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLPayload.cs deleted file mode 100644 index 1b8a3867aaf0..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLPayload.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// DDL payload. - public partial class DDLPayload - { - /// Initializes a new instance of DDLPayload. - /// DDL type. - public DDLPayload(DDLType actionType) - { - ActionType = actionType; - } - - /// DDL type. - public DDLType ActionType { get; } - /// MD Entity. - public MDEntity OldEntity { get; set; } - /// MD Entity. - public MDEntity NewEntity { get; set; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLType.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLType.Serialization.cs deleted file mode 100644 index b91a3f012d4e..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLType.Serialization.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - internal static partial class DDLTypeExtensions - { - public static string ToSerialString(this DDLType value) => value switch - { - DDLType.Create => "CREATE", - DDLType.Alter => "ALTER", - DDLType.Drop => "DROP", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown DDLType value.") - }; - - public static DDLType ToDDLType(this string value) - { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "CREATE")) return DDLType.Create; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "ALTER")) return DDLType.Alter; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "DROP")) return DDLType.Drop; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown DDLType value."); - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLType.cs deleted file mode 100644 index f84d0806ca39..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DDLType.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// DDL type. - public enum DDLType - { - /// CREATE. - Create, - /// ALTER. - Alter, - /// DROP. - Drop - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataColumn.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataColumn.Serialization.cs deleted file mode 100644 index 038404b826a6..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataColumn.Serialization.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(DataColumnConverter))] - public partial class DataColumn : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("originDataTypeName"u8); - writer.WriteObjectValue(OriginDataTypeName); - writer.WriteEndObject(); - } - - internal static DataColumn DeserializeDataColumn(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - TypeInfo originDataTypeName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("originDataTypeName"u8)) - { - originDataTypeName = TypeInfo.DeserializeTypeInfo(property.Value); - continue; - } - } - return new DataColumn(name, originDataTypeName); - } - - internal partial class DataColumnConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, DataColumn model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override DataColumn Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeDataColumn(document.RootElement); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataColumn.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataColumn.cs deleted file mode 100644 index f7ac617473e3..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataColumn.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Data column. - public partial class DataColumn - { - /// Initializes a new instance of DataColumn. - /// Column name. - /// Type information. - /// or is null. - public DataColumn(string name, TypeInfo originDataTypeName) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(originDataTypeName, nameof(originDataTypeName)); - - Name = name; - OriginDataTypeName = originDataTypeName; - } - - /// Column name. - public string Name { get; set; } - /// Type information. - public TypeInfo OriginDataTypeName { get; set; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataSource.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataSource.Serialization.cs deleted file mode 100644 index fc3acc860c65..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataSource.Serialization.cs +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(DataSourceConverter))] - public partial class DataSource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Provider)) - { - writer.WritePropertyName("provider"u8); - writer.WriteStringValue(Provider); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static DataSource DeserializeDataSource(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional provider = default; - string location = default; - Optional> properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("provider"u8)) - { - provider = property.Value.GetString(); - continue; - } - if (property.NameEquals("location"u8)) - { - location = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property0.Name, null); - } - else - { - dictionary.Add(property0.Name, property0.Value.GetObject()); - } - } - properties = dictionary; - continue; - } - } - return new DataSource(provider.Value, location, Optional.ToDictionary(properties)); - } - - internal partial class DataSourceConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, DataSource model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override DataSource Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeDataSource(document.RootElement); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataSource.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataSource.cs deleted file mode 100644 index cfdcdac41295..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataSource.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Data source properties. - public partial class DataSource - { - /// Initializes a new instance of DataSource. - /// Data source location. - /// is null. - public DataSource(string location) - { - Argument.AssertNotNull(location, nameof(location)); - - Location = location; - Properties = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of DataSource. - /// Data source provider information. - /// Data source location. - /// Property bag. - internal DataSource(string provider, string location, IDictionary properties) - { - Provider = provider; - Location = location; - Properties = properties; - } - - /// Data source provider information. - public string Provider { get; set; } - /// Data source location. - public string Location { get; set; } - /// Property bag. - public IDictionary Properties { get; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseEntity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseEntity.Serialization.cs deleted file mode 100644 index 0907b2841b7c..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseEntity.Serialization.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(DatabaseEntityConverter))] - public partial class DatabaseEntity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToSerialString()); - writer.WriteEndObject(); - } - - internal static DatabaseEntity DeserializeDatabaseEntity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DatabaseProperties properties = default; - string name = default; - SASEntityType type = default; - Optional id = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - properties = DatabaseProperties.DeserializeDatabaseProperties(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToSASEntityType(); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - } - return new DatabaseEntity(name, type, id.Value, properties); - } - - internal partial class DatabaseEntityConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, DatabaseEntity model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override DatabaseEntity Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeDatabaseEntity(document.RootElement); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseEntity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseEntity.cs deleted file mode 100644 index 145802601222..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseEntity.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Database entity. - public partial class DatabaseEntity : MDEntity - { - /// Initializes a new instance of DatabaseEntity. - /// Entity Name. - /// Artifact type. - /// Database properties. - /// or is null. - public DatabaseEntity(string name, SASEntityType type, DatabaseProperties properties) : base(name, type) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of DatabaseEntity. - /// Entity Name. - /// Artifact type. - /// Entity Resource Id. - /// Database properties. - internal DatabaseEntity(string name, SASEntityType type, string id, DatabaseProperties properties) : base(name, type, id) - { - Properties = properties; - } - - /// Database properties. - public DatabaseProperties Properties { get; set; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseProperties.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseProperties.Serialization.cs deleted file mode 100644 index 1cb0f9b5219a..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseProperties.Serialization.cs +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(DatabasePropertiesConverter))] - public partial class DatabaseProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("source"u8); - writer.WriteObjectValue(Source); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(OriginObjectId)) - { - writer.WritePropertyName("originObjectId"u8); - writer.WriteStringValue(OriginObjectId); - } - if (Optional.IsDefined(PublishStatus)) - { - writer.WritePropertyName("publishStatus"u8); - writer.WriteStringValue(PublishStatus.Value.ToString()); - } - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static DatabaseProperties DeserializeDatabaseProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DataSource source = default; - Optional description = default; - Optional originObjectId = default; - Optional objectId = default; - Optional objectVersion = default; - Optional publishStatus = default; - Optional> properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("source"u8)) - { - source = DataSource.DeserializeDataSource(property.Value); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("originObjectId"u8)) - { - originObjectId = property.Value.GetString(); - continue; - } - if (property.NameEquals("objectId"u8)) - { - objectId = property.Value.GetString(); - continue; - } - if (property.NameEquals("objectVersion"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - objectVersion = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("publishStatus"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - publishStatus = new PublishStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property0.Name, null); - } - else - { - dictionary.Add(property0.Name, property0.Value.GetObject()); - } - } - properties = dictionary; - continue; - } - } - return new DatabaseProperties(originObjectId.Value, objectId.Value, Optional.ToNullable(objectVersion), Optional.ToNullable(publishStatus), Optional.ToDictionary(properties), source, description.Value); - } - - internal partial class DatabasePropertiesConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, DatabaseProperties model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override DatabaseProperties Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeDatabaseProperties(document.RootElement); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseProperties.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseProperties.cs deleted file mode 100644 index 1176a9d7e399..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DatabaseProperties.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Database properties. - public partial class DatabaseProperties : MDEntityProperties - { - /// Initializes a new instance of DatabaseProperties. - /// Data source properties. - /// is null. - public DatabaseProperties(DataSource source) - { - Argument.AssertNotNull(source, nameof(source)); - - Source = source; - } - - /// Initializes a new instance of DatabaseProperties. - /// Entity object id maintained by the caller. - /// Entity object id maintained by SyMS. - /// Entity object version maintained by SyMS. - /// Publish status. - /// Property bag. - /// Data source properties. - /// Description of the database. - internal DatabaseProperties(string originObjectId, string objectId, long? objectVersion, PublishStatus? publishStatus, IDictionary properties, DataSource source, string description) : base(originObjectId, objectId, objectVersion, publishStatus, properties) - { - Source = source; - Description = description; - } - - /// Data source properties. - public DataSource Source { get; set; } - /// Description of the database. - public string Description { get; set; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DistributionInfo.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DistributionInfo.Serialization.cs deleted file mode 100644 index 7d4a600ad677..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DistributionInfo.Serialization.cs +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(DistributionInfoConverter))] - public partial class DistributionInfo : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Type)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } - if (Optional.IsCollectionDefined(Keys)) - { - writer.WritePropertyName("keys"u8); - writer.WriteStartArray(); - foreach (var item in Keys) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Count)) - { - writer.WritePropertyName("count"u8); - writer.WriteNumberValue(Count.Value); - } - if (Optional.IsCollectionDefined(SortKeys)) - { - writer.WritePropertyName("sortKeys"u8); - writer.WriteStartArray(); - foreach (var item in SortKeys) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - - internal static DistributionInfo DeserializeDistributionInfo(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional type = default; - Optional> keys = default; - Optional count = default; - Optional> sortKeys = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("keys"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - keys = array; - continue; - } - if (property.NameEquals("count"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - count = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("sortKeys"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SortingItem.DeserializeSortingItem(item)); - } - sortKeys = array; - continue; - } - } - return new DistributionInfo(type.Value, Optional.ToList(keys), Optional.ToNullable(count), Optional.ToList(sortKeys)); - } - - internal partial class DistributionInfoConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, DistributionInfo model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override DistributionInfo Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeDistributionInfo(document.RootElement); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DistributionInfo.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DistributionInfo.cs deleted file mode 100644 index f7eaf2b15190..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DistributionInfo.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Distribution information. - public partial class DistributionInfo - { - /// Initializes a new instance of DistributionInfo. - public DistributionInfo() - { - Keys = new ChangeTrackingList(); - SortKeys = new ChangeTrackingList(); - } - - /// Initializes a new instance of DistributionInfo. - /// Distribution type. - /// Distribution keys. - /// Distribution count. - /// Distribution sort keys. - internal DistributionInfo(string type, IList keys, int? count, IList sortKeys) - { - Type = type; - Keys = keys; - Count = count; - SortKeys = sortKeys; - } - - /// Distribution type. - public string Type { get; set; } - /// Distribution keys. - public IList Keys { get; } - /// Distribution count. - public int? Count { get; set; } - /// Distribution sort keys. - public IList SortKeys { get; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FormatInfo.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FormatInfo.Serialization.cs deleted file mode 100644 index 3f6812d28983..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FormatInfo.Serialization.cs +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(FormatInfoConverter))] - public partial class FormatInfo : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("inputFormat"u8); - writer.WriteStringValue(InputFormat); - writer.WritePropertyName("outputFormat"u8); - writer.WriteStringValue(OutputFormat); - writer.WritePropertyName("formatType"u8); - writer.WriteStringValue(FormatType); - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(SerDeName)) - { - writer.WritePropertyName("serDeName"u8); - writer.WriteStringValue(SerDeName); - } - writer.WritePropertyName("serializeLib"u8); - writer.WriteStringValue(SerializeLib); - writer.WriteEndObject(); - } - - internal static FormatInfo DeserializeFormatInfo(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string inputFormat = default; - string outputFormat = default; - string formatType = default; - Optional> properties = default; - Optional serDeName = default; - string serializeLib = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("inputFormat"u8)) - { - inputFormat = property.Value.GetString(); - continue; - } - if (property.NameEquals("outputFormat"u8)) - { - outputFormat = property.Value.GetString(); - continue; - } - if (property.NameEquals("formatType"u8)) - { - formatType = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property0.Name, null); - } - else - { - dictionary.Add(property0.Name, property0.Value.GetObject()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("serDeName"u8)) - { - serDeName = property.Value.GetString(); - continue; - } - if (property.NameEquals("serializeLib"u8)) - { - serializeLib = property.Value.GetString(); - continue; - } - } - return new FormatInfo(inputFormat, outputFormat, formatType, Optional.ToDictionary(properties), serDeName.Value, serializeLib); - } - - internal partial class FormatInfoConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, FormatInfo model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override FormatInfo Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeFormatInfo(document.RootElement); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FormatInfo.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FormatInfo.cs deleted file mode 100644 index 5fc80c1bfc72..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/FormatInfo.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Format information. - public partial class FormatInfo - { - /// Initializes a new instance of FormatInfo. - /// Input Format to be used. - /// Output Format to be used. - /// Format Type to be used to be used (csv, parquet, etc.). - /// Serialization Library to be used by Spark (org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe). - /// , , or is null. - public FormatInfo(string inputFormat, string outputFormat, string formatType, string serializeLib) - { - Argument.AssertNotNull(inputFormat, nameof(inputFormat)); - Argument.AssertNotNull(outputFormat, nameof(outputFormat)); - Argument.AssertNotNull(formatType, nameof(formatType)); - Argument.AssertNotNull(serializeLib, nameof(serializeLib)); - - InputFormat = inputFormat; - OutputFormat = outputFormat; - FormatType = formatType; - Properties = new ChangeTrackingDictionary(); - SerializeLib = serializeLib; - } - - /// Initializes a new instance of FormatInfo. - /// Input Format to be used. - /// Output Format to be used. - /// Format Type to be used to be used (csv, parquet, etc.). - /// Property bag. - /// SerDe name. - /// Serialization Library to be used by Spark (org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe). - internal FormatInfo(string inputFormat, string outputFormat, string formatType, IDictionary properties, string serDeName, string serializeLib) - { - InputFormat = inputFormat; - OutputFormat = outputFormat; - FormatType = formatType; - Properties = properties; - SerDeName = serDeName; - SerializeLib = serializeLib; - } - - /// Input Format to be used. - public string InputFormat { get; set; } - /// Output Format to be used. - public string OutputFormat { get; set; } - /// Format Type to be used to be used (csv, parquet, etc.). - public string FormatType { get; set; } - /// Property bag. - public IDictionary Properties { get; } - /// SerDe name. - public string SerDeName { get; set; } - /// Serialization Library to be used by Spark (org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe). - public string SerializeLib { get; set; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntity.Serialization.cs deleted file mode 100644 index fd97d7120c69..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntity.Serialization.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(MDEntityConverter))] - public partial class MDEntity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToSerialString()); - writer.WriteEndObject(); - } - - internal static MDEntity DeserializeMDEntity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - SASEntityType type = default; - Optional id = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToSASEntityType(); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - } - return new MDEntity(name, type, id.Value); - } - - internal partial class MDEntityConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, MDEntity model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override MDEntity Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeMDEntity(document.RootElement); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntity.cs deleted file mode 100644 index db823986ad5d..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntity.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// MD Entity. - public partial class MDEntity - { - /// Initializes a new instance of MDEntity. - /// Entity Name. - /// Artifact type. - /// is null. - public MDEntity(string name, SASEntityType type) - { - Argument.AssertNotNull(name, nameof(name)); - - Name = name; - Type = type; - } - - /// Initializes a new instance of MDEntity. - /// Entity Name. - /// Artifact type. - /// Entity Resource Id. - internal MDEntity(string name, SASEntityType type, string id) - { - Name = name; - Type = type; - Id = id; - } - - /// Entity Name. - public string Name { get; set; } - /// Artifact type. - public SASEntityType Type { get; set; } - /// Entity Resource Id. - public string Id { get; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntityProperties.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntityProperties.Serialization.cs deleted file mode 100644 index c06dde512442..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntityProperties.Serialization.cs +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(MDEntityPropertiesConverter))] - public partial class MDEntityProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(OriginObjectId)) - { - writer.WritePropertyName("originObjectId"u8); - writer.WriteStringValue(OriginObjectId); - } - if (Optional.IsDefined(PublishStatus)) - { - writer.WritePropertyName("publishStatus"u8); - writer.WriteStringValue(PublishStatus.Value.ToString()); - } - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static MDEntityProperties DeserializeMDEntityProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional originObjectId = default; - Optional objectId = default; - Optional objectVersion = default; - Optional publishStatus = default; - Optional> properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("originObjectId"u8)) - { - originObjectId = property.Value.GetString(); - continue; - } - if (property.NameEquals("objectId"u8)) - { - objectId = property.Value.GetString(); - continue; - } - if (property.NameEquals("objectVersion"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - objectVersion = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("publishStatus"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - publishStatus = new PublishStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property0.Name, null); - } - else - { - dictionary.Add(property0.Name, property0.Value.GetObject()); - } - } - properties = dictionary; - continue; - } - } - return new MDEntityProperties(originObjectId.Value, objectId.Value, Optional.ToNullable(objectVersion), Optional.ToNullable(publishStatus), Optional.ToDictionary(properties)); - } - - internal partial class MDEntityPropertiesConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, MDEntityProperties model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override MDEntityProperties Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeMDEntityProperties(document.RootElement); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntityProperties.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntityProperties.cs deleted file mode 100644 index 402298086e6b..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MDEntityProperties.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Defines the artifact entity. - public partial class MDEntityProperties - { - /// Initializes a new instance of MDEntityProperties. - public MDEntityProperties() - { - Properties = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of MDEntityProperties. - /// Entity object id maintained by the caller. - /// Entity object id maintained by SyMS. - /// Entity object version maintained by SyMS. - /// Publish status. - /// Property bag. - internal MDEntityProperties(string originObjectId, string objectId, long? objectVersion, PublishStatus? publishStatus, IDictionary properties) - { - OriginObjectId = originObjectId; - ObjectId = objectId; - ObjectVersion = objectVersion; - PublishStatus = publishStatus; - Properties = properties; - } - - /// Entity object id maintained by the caller. - public string OriginObjectId { get; set; } - /// Entity object id maintained by SyMS. - public string ObjectId { get; } - /// Entity object version maintained by SyMS. - public long? ObjectVersion { get; } - /// Publish status. - public PublishStatus? PublishStatus { get; set; } - /// Property bag. - public IDictionary Properties { get; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbAtlasLinkedService.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbAtlasLinkedService.Serialization.cs index 35251da8855a..7829872cee3f 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbAtlasLinkedService.Serialization.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbAtlasLinkedService.Serialization.cs @@ -63,10 +63,10 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteObjectValue(ConnectionString); writer.WritePropertyName("database"u8); writer.WriteObjectValue(Database); - if (Optional.IsDefined(MongoDbAtlasDriverVersion)) + if (Optional.IsDefined(DriverVersion)) { - writer.WritePropertyName("mongoDbAtlasDriverVersion"u8); - writer.WriteObjectValue(MongoDbAtlasDriverVersion); + writer.WritePropertyName("driverVersion"u8); + writer.WriteObjectValue(DriverVersion); } writer.WriteEndObject(); foreach (var item in AdditionalProperties) @@ -90,7 +90,7 @@ internal static MongoDbAtlasLinkedService DeserializeMongoDbAtlasLinkedService(J Optional> annotations = default; object connectionString = default; object database = default; - Optional mongoDbAtlasDriverVersion = default; + Optional driverVersion = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -168,13 +168,13 @@ internal static MongoDbAtlasLinkedService DeserializeMongoDbAtlasLinkedService(J database = property0.Value.GetObject(); continue; } - if (property0.NameEquals("mongoDbAtlasDriverVersion"u8)) + if (property0.NameEquals("driverVersion"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - mongoDbAtlasDriverVersion = property0.Value.GetObject(); + driverVersion = property0.Value.GetObject(); continue; } } @@ -183,7 +183,7 @@ internal static MongoDbAtlasLinkedService DeserializeMongoDbAtlasLinkedService(J additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new MongoDbAtlasLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, database, mongoDbAtlasDriverVersion.Value); + return new MongoDbAtlasLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, connectionString, database, driverVersion.Value); } internal partial class MongoDbAtlasLinkedServiceConverter : JsonConverter diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbAtlasLinkedService.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbAtlasLinkedService.cs index 43a876b17f09..358732c79fc5 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbAtlasLinkedService.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/MongoDbAtlasLinkedService.cs @@ -37,12 +37,12 @@ public MongoDbAtlasLinkedService(object connectionString, object database) /// Additional Properties. /// The MongoDB Atlas connection string. Type: string, SecureString or AzureKeyVaultSecretReference. Type: string, SecureString or AzureKeyVaultSecretReference. /// The name of the MongoDB Atlas database that you want to access. Type: string (or Expression with resultType string). - /// The MongoDB Atlas Driver version that you want to choose. Allowed value are 2.10.4 and 2.19.0. Type: string (or Expression with resultType string). - internal MongoDbAtlasLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, object database, object mongoDbAtlasDriverVersion) : base(type, connectVia, description, parameters, annotations, additionalProperties) + /// The driver version that you want to choose. Allowed value are v1 and v2. Type: string (or Expression with resultType string). + internal MongoDbAtlasLinkedService(string type, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, object connectionString, object database, object driverVersion) : base(type, connectVia, description, parameters, annotations, additionalProperties) { ConnectionString = connectionString; Database = database; - MongoDbAtlasDriverVersion = mongoDbAtlasDriverVersion; + DriverVersion = driverVersion; Type = type ?? "MongoDbAtlas"; } @@ -50,7 +50,7 @@ internal MongoDbAtlasLinkedService(string type, IntegrationRuntimeReference conn public object ConnectionString { get; set; } /// The name of the MongoDB Atlas database that you want to access. Type: string (or Expression with resultType string). public object Database { get; set; } - /// The MongoDB Atlas Driver version that you want to choose. Allowed value are 2.10.4 and 2.19.0. Type: string (or Expression with resultType string). - public object MongoDbAtlasDriverVersion { get; set; } + /// The driver version that you want to choose. Allowed value are v1 and v2. Type: string (or Expression with resultType string). + public object DriverVersion { get; set; } } } diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfo.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfo.Serialization.cs deleted file mode 100644 index 61104dbef96c..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfo.Serialization.cs +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(PartitionInfoConverter))] - public partial class PartitionInfo : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToSerialString()); - writer.WriteEndObject(); - } - - internal static PartitionInfo DeserializePartitionInfo(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional properties = default; - string name = default; - SASEntityType type = default; - Optional id = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - properties = PartitionInfoProperties.DeserializePartitionInfoProperties(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToSASEntityType(); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - } - return new PartitionInfo(name, type, id.Value, properties.Value); - } - - internal partial class PartitionInfoConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, PartitionInfo model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override PartitionInfo Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializePartitionInfo(document.RootElement); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfo.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfo.cs deleted file mode 100644 index 5dab8979a3a2..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfo.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// partition information. - public partial class PartitionInfo : MDEntity - { - /// Initializes a new instance of PartitionInfo. - /// Entity Name. - /// Artifact type. - /// is null. - public PartitionInfo(string name, SASEntityType type) : base(name, type) - { - Argument.AssertNotNull(name, nameof(name)); - } - - /// Initializes a new instance of PartitionInfo. - /// Entity Name. - /// Artifact type. - /// Entity Resource Id. - /// Database properties. - internal PartitionInfo(string name, SASEntityType type, string id, PartitionInfoProperties properties) : base(name, type, id) - { - Properties = properties; - } - - /// Database properties. - public PartitionInfoProperties Properties { get; set; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoNamespace.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoNamespace.Serialization.cs deleted file mode 100644 index 8e0aefd781fc..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoNamespace.Serialization.cs +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(PartitionInfoNamespaceConverter))] - public partial class PartitionInfoNamespace : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("tableName"u8); - writer.WriteStringValue(TableName); - if (Optional.IsDefined(SchemaName)) - { - writer.WritePropertyName("schemaName"u8); - writer.WriteStringValue(SchemaName); - } - writer.WritePropertyName("databaseName"u8); - writer.WriteStringValue(DatabaseName); - writer.WriteEndObject(); - } - - internal static PartitionInfoNamespace DeserializePartitionInfoNamespace(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string tableName = default; - Optional schemaName = default; - string databaseName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("tableName"u8)) - { - tableName = property.Value.GetString(); - continue; - } - if (property.NameEquals("schemaName"u8)) - { - schemaName = property.Value.GetString(); - continue; - } - if (property.NameEquals("databaseName"u8)) - { - databaseName = property.Value.GetString(); - continue; - } - } - return new PartitionInfoNamespace(databaseName, schemaName.Value, tableName); - } - - internal partial class PartitionInfoNamespaceConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, PartitionInfoNamespace model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override PartitionInfoNamespace Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializePartitionInfoNamespace(document.RootElement); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoNamespace.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoNamespace.cs deleted file mode 100644 index 107f794305d1..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoNamespace.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Partition information namespace. - public partial class PartitionInfoNamespace : TableNamespace - { - /// Initializes a new instance of PartitionInfoNamespace. - /// Database name. - /// Table name. - /// or is null. - public PartitionInfoNamespace(string databaseName, string tableName) : base(databaseName) - { - Argument.AssertNotNull(databaseName, nameof(databaseName)); - Argument.AssertNotNull(tableName, nameof(tableName)); - - TableName = tableName; - } - - /// Initializes a new instance of PartitionInfoNamespace. - /// Database name. - /// Schema name. - /// Table name. - /// is null. - internal PartitionInfoNamespace(string databaseName, string schemaName, string tableName) : base(databaseName, schemaName) - { - Argument.AssertNotNull(databaseName, nameof(databaseName)); - - TableName = tableName; - } - - /// Table name. - public string TableName { get; set; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoProperties.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoProperties.Serialization.cs deleted file mode 100644 index c836061e6cd3..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoProperties.Serialization.cs +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(PartitionInfoPropertiesConverter))] - public partial class PartitionInfoProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("namespace"u8); - writer.WriteObjectValue(Namespace); - writer.WritePropertyName("storageDescriptor"u8); - writer.WriteObjectValue(StorageDescriptor); - writer.WritePropertyName("partitionKeyValues"u8); - writer.WriteStartArray(); - foreach (var item in PartitionKeyValues) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(OriginObjectId)) - { - writer.WritePropertyName("originObjectId"u8); - writer.WriteStringValue(OriginObjectId); - } - if (Optional.IsDefined(PublishStatus)) - { - writer.WritePropertyName("publishStatus"u8); - writer.WriteStringValue(PublishStatus.Value.ToString()); - } - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static PartitionInfoProperties DeserializePartitionInfoProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - PartitionInfoNamespace @namespace = default; - StorageDescriptor storageDescriptor = default; - IList partitionKeyValues = default; - Optional originObjectId = default; - Optional objectId = default; - Optional objectVersion = default; - Optional publishStatus = default; - Optional> properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("namespace"u8)) - { - @namespace = PartitionInfoNamespace.DeserializePartitionInfoNamespace(property.Value); - continue; - } - if (property.NameEquals("storageDescriptor"u8)) - { - storageDescriptor = StorageDescriptor.DeserializeStorageDescriptor(property.Value); - continue; - } - if (property.NameEquals("partitionKeyValues"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(item.GetObject()); - } - } - partitionKeyValues = array; - continue; - } - if (property.NameEquals("originObjectId"u8)) - { - originObjectId = property.Value.GetString(); - continue; - } - if (property.NameEquals("objectId"u8)) - { - objectId = property.Value.GetString(); - continue; - } - if (property.NameEquals("objectVersion"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - objectVersion = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("publishStatus"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - publishStatus = new PublishStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property0.Name, null); - } - else - { - dictionary.Add(property0.Name, property0.Value.GetObject()); - } - } - properties = dictionary; - continue; - } - } - return new PartitionInfoProperties(originObjectId.Value, objectId.Value, Optional.ToNullable(objectVersion), Optional.ToNullable(publishStatus), Optional.ToDictionary(properties), @namespace, storageDescriptor, partitionKeyValues); - } - - internal partial class PartitionInfoPropertiesConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, PartitionInfoProperties model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override PartitionInfoProperties Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializePartitionInfoProperties(document.RootElement); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoProperties.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoProperties.cs deleted file mode 100644 index 3f743c0ae487..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PartitionInfoProperties.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Database properties. - public partial class PartitionInfoProperties : MDEntityProperties - { - /// Initializes a new instance of PartitionInfoProperties. - /// Partition information namespace. - /// Storage descriptor. - /// Partition key values. - /// , or is null. - public PartitionInfoProperties(PartitionInfoNamespace @namespace, StorageDescriptor storageDescriptor, IEnumerable partitionKeyValues) - { - Argument.AssertNotNull(@namespace, nameof(@namespace)); - Argument.AssertNotNull(storageDescriptor, nameof(storageDescriptor)); - Argument.AssertNotNull(partitionKeyValues, nameof(partitionKeyValues)); - - Namespace = @namespace; - StorageDescriptor = storageDescriptor; - PartitionKeyValues = partitionKeyValues.ToList(); - } - - /// Initializes a new instance of PartitionInfoProperties. - /// Entity object id maintained by the caller. - /// Entity object id maintained by SyMS. - /// Entity object version maintained by SyMS. - /// Publish status. - /// Property bag. - /// Partition information namespace. - /// Storage descriptor. - /// Partition key values. - internal PartitionInfoProperties(string originObjectId, string objectId, long? objectVersion, PublishStatus? publishStatus, IDictionary properties, PartitionInfoNamespace @namespace, StorageDescriptor storageDescriptor, IList partitionKeyValues) : base(originObjectId, objectId, objectVersion, publishStatus, properties) - { - Namespace = @namespace; - StorageDescriptor = storageDescriptor; - PartitionKeyValues = partitionKeyValues; - } - - /// Partition information namespace. - public PartitionInfoNamespace Namespace { get; set; } - /// Storage descriptor. - public StorageDescriptor StorageDescriptor { get; set; } - /// Partition key values. - public IList PartitionKeyValues { get; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PublishStatus.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PublishStatus.cs deleted file mode 100644 index 3d4c5a5628d9..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/PublishStatus.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Publish status. - public readonly partial struct PublishStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public PublishStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string PUBLISHEDValue = "PUBLISHED"; - - /// PUBLISHED. - public static PublishStatus PUBLISHED { get; } = new PublishStatus(PUBLISHEDValue); - /// Determines if two values are the same. - public static bool operator ==(PublishStatus left, PublishStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(PublishStatus left, PublishStatus right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator PublishStatus(string value) => new PublishStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is PublishStatus other && Equals(other); - /// - public bool Equals(PublishStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QueryArtifactsResponse.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QueryArtifactsResponse.Serialization.cs deleted file mode 100644 index 904b438a61b4..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QueryArtifactsResponse.Serialization.cs +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(QueryArtifactsResponseConverter))] - public partial class QueryArtifactsResponse - { - internal static QueryArtifactsResponse DeserializeQueryArtifactsResponse(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> items = default; - Optional continuationToken = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("items"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(item.GetObject()); - } - } - items = array; - continue; - } - if (property.NameEquals("continuationToken"u8)) - { - continuationToken = property.Value.GetString(); - continue; - } - } - return new QueryArtifactsResponse(Optional.ToList(items), continuationToken.Value); - } - - internal partial class QueryArtifactsResponseConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, QueryArtifactsResponse model, JsonSerializerOptions options) - { - throw new NotImplementedException(); - } - public override QueryArtifactsResponse Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeQueryArtifactsResponse(document.RootElement); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QueryArtifactsResponse.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QueryArtifactsResponse.cs deleted file mode 100644 index f4d211bbef6d..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/QueryArtifactsResponse.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Query artifacts response. - public partial class QueryArtifactsResponse - { - /// Initializes a new instance of QueryArtifactsResponse. - internal QueryArtifactsResponse() - { - Items = new ChangeTrackingList(); - } - - /// Initializes a new instance of QueryArtifactsResponse. - /// - /// Continuation token to get next page. - internal QueryArtifactsResponse(IReadOnlyList items, string continuationToken) - { - Items = items; - ContinuationToken = continuationToken; - } - - /// Gets the items. - public IReadOnlyList Items { get; } - /// Continuation token to get next page. - public string ContinuationToken { get; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipEntity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipEntity.Serialization.cs deleted file mode 100644 index 561790012737..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipEntity.Serialization.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(RelationshipEntityConverter))] - public partial class RelationshipEntity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToSerialString()); - writer.WriteEndObject(); - } - - internal static RelationshipEntity DeserializeRelationshipEntity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - RelationshipProperties properties = default; - string name = default; - SASEntityType type = default; - Optional id = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - properties = RelationshipProperties.DeserializeRelationshipProperties(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToSASEntityType(); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - } - return new RelationshipEntity(name, type, id.Value, properties); - } - - internal partial class RelationshipEntityConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, RelationshipEntity model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override RelationshipEntity Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeRelationshipEntity(document.RootElement); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipEntity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipEntity.cs deleted file mode 100644 index 1f09b84c545f..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipEntity.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Relationship Entity. - public partial class RelationshipEntity : MDEntity - { - /// Initializes a new instance of RelationshipEntity. - /// Entity Name. - /// Artifact type. - /// Database properties. - /// or is null. - public RelationshipEntity(string name, SASEntityType type, RelationshipProperties properties) : base(name, type) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of RelationshipEntity. - /// Entity Name. - /// Artifact type. - /// Entity Resource Id. - /// Database properties. - internal RelationshipEntity(string name, SASEntityType type, string id, RelationshipProperties properties) : base(name, type, id) - { - Properties = properties; - } - - /// Database properties. - public RelationshipProperties Properties { get; set; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipProperties.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipProperties.Serialization.cs deleted file mode 100644 index 797c67d75515..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipProperties.Serialization.cs +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(RelationshipPropertiesConverter))] - public partial class RelationshipProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("namespace"u8); - writer.WriteObjectValue(Namespace); - writer.WritePropertyName("fromTableName"u8); - writer.WriteStringValue(FromTableName); - writer.WritePropertyName("toTableName"u8); - writer.WriteStringValue(ToTableName); - if (Optional.IsDefined(RelationshipType)) - { - writer.WritePropertyName("relationshipType"u8); - writer.WriteStringValue(RelationshipType.Value.ToSerialString()); - } - writer.WritePropertyName("columnRelationshipInformations"u8); - writer.WriteStartArray(); - foreach (var item in ColumnRelationshipInformations) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(OriginObjectId)) - { - writer.WritePropertyName("originObjectId"u8); - writer.WriteStringValue(OriginObjectId); - } - if (Optional.IsDefined(PublishStatus)) - { - writer.WritePropertyName("publishStatus"u8); - writer.WriteStringValue(PublishStatus.Value.ToString()); - } - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static RelationshipProperties DeserializeRelationshipProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - BaseNamespace @namespace = default; - Optional fromTableId = default; - string fromTableName = default; - Optional toTableId = default; - string toTableName = default; - Optional relationshipType = default; - IList columnRelationshipInformations = default; - Optional originObjectId = default; - Optional objectId = default; - Optional objectVersion = default; - Optional publishStatus = default; - Optional> properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("namespace"u8)) - { - @namespace = BaseNamespace.DeserializeBaseNamespace(property.Value); - continue; - } - if (property.NameEquals("fromTableId"u8)) - { - fromTableId = property.Value.GetString(); - continue; - } - if (property.NameEquals("fromTableName"u8)) - { - fromTableName = property.Value.GetString(); - continue; - } - if (property.NameEquals("toTableId"u8)) - { - toTableId = property.Value.GetString(); - continue; - } - if (property.NameEquals("toTableName"u8)) - { - toTableName = property.Value.GetString(); - continue; - } - if (property.NameEquals("relationshipType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - relationshipType = property.Value.GetString().ToRelationshipType(); - continue; - } - if (property.NameEquals("columnRelationshipInformations"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ColumnRelationshipInformation.DeserializeColumnRelationshipInformation(item)); - } - columnRelationshipInformations = array; - continue; - } - if (property.NameEquals("originObjectId"u8)) - { - originObjectId = property.Value.GetString(); - continue; - } - if (property.NameEquals("objectId"u8)) - { - objectId = property.Value.GetString(); - continue; - } - if (property.NameEquals("objectVersion"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - objectVersion = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("publishStatus"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - publishStatus = new PublishStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property0.Name, null); - } - else - { - dictionary.Add(property0.Name, property0.Value.GetObject()); - } - } - properties = dictionary; - continue; - } - } - return new RelationshipProperties(originObjectId.Value, objectId.Value, Optional.ToNullable(objectVersion), Optional.ToNullable(publishStatus), Optional.ToDictionary(properties), @namespace, fromTableId.Value, fromTableName, toTableId.Value, toTableName, Optional.ToNullable(relationshipType), columnRelationshipInformations); - } - - internal partial class RelationshipPropertiesConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, RelationshipProperties model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override RelationshipProperties Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeRelationshipProperties(document.RootElement); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipProperties.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipProperties.cs deleted file mode 100644 index 2ca2a608e8bc..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipProperties.cs +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Database properties. - public partial class RelationshipProperties : MDEntityProperties - { - /// Initializes a new instance of RelationshipProperties. - /// Namespace. - /// From Table Name. - /// To Table Name. - /// List of Column Relationships. - /// , , or is null. - public RelationshipProperties(BaseNamespace @namespace, string fromTableName, string toTableName, IEnumerable columnRelationshipInformations) - { - Argument.AssertNotNull(@namespace, nameof(@namespace)); - Argument.AssertNotNull(fromTableName, nameof(fromTableName)); - Argument.AssertNotNull(toTableName, nameof(toTableName)); - Argument.AssertNotNull(columnRelationshipInformations, nameof(columnRelationshipInformations)); - - Namespace = @namespace; - FromTableName = fromTableName; - ToTableName = toTableName; - ColumnRelationshipInformations = columnRelationshipInformations.ToList(); - } - - /// Initializes a new instance of RelationshipProperties. - /// Entity object id maintained by the caller. - /// Entity object id maintained by SyMS. - /// Entity object version maintained by SyMS. - /// Publish status. - /// Property bag. - /// Namespace. - /// From Table Id. - /// From Table Name. - /// To Table Id. - /// To Table Name. - /// Relation Type. - /// List of Column Relationships. - internal RelationshipProperties(string originObjectId, string objectId, long? objectVersion, PublishStatus? publishStatus, IDictionary properties, BaseNamespace @namespace, string fromTableId, string fromTableName, string toTableId, string toTableName, RelationshipType? relationshipType, IList columnRelationshipInformations) : base(originObjectId, objectId, objectVersion, publishStatus, properties) - { - Namespace = @namespace; - FromTableId = fromTableId; - FromTableName = fromTableName; - ToTableId = toTableId; - ToTableName = toTableName; - RelationshipType = relationshipType; - ColumnRelationshipInformations = columnRelationshipInformations; - } - - /// Namespace. - public BaseNamespace Namespace { get; set; } - /// From Table Id. - public string FromTableId { get; } - /// From Table Name. - public string FromTableName { get; set; } - /// To Table Id. - public string ToTableId { get; } - /// To Table Name. - public string ToTableName { get; set; } - /// Relation Type. - public RelationshipType? RelationshipType { get; set; } - /// List of Column Relationships. - public IList ColumnRelationshipInformations { get; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipType.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipType.Serialization.cs deleted file mode 100644 index 430ddeaa911a..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipType.Serialization.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - internal static partial class RelationshipTypeExtensions - { - public static string ToSerialString(this RelationshipType value) => value switch - { - RelationshipType.Onetoone => "ONETOONE", - RelationshipType.Onetomany => "ONETOMANY", - RelationshipType.Manytoone => "MANYTOONE", - RelationshipType.Manytomany => "MANYTOMANY", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown RelationshipType value.") - }; - - public static RelationshipType ToRelationshipType(this string value) - { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "ONETOONE")) return RelationshipType.Onetoone; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "ONETOMANY")) return RelationshipType.Onetomany; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "MANYTOONE")) return RelationshipType.Manytoone; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "MANYTOMANY")) return RelationshipType.Manytomany; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown RelationshipType value."); - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipType.cs deleted file mode 100644 index af4681e56cec..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/RelationshipType.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Relation Type. - public enum RelationshipType - { - /// ONETOONE. - Onetoone, - /// ONETOMANY. - Onetomany, - /// MANYTOONE. - Manytoone, - /// MANYTOMANY. - Manytomany - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SASEntityType.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SASEntityType.Serialization.cs deleted file mode 100644 index c5aee3afc60d..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SASEntityType.Serialization.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - internal static partial class SASEntityTypeExtensions - { - public static string ToSerialString(this SASEntityType value) => value switch - { - SASEntityType.Database => "DATABASE", - SASEntityType.Table => "TABLE", - SASEntityType.Schema => "SCHEMA", - SASEntityType.View => "VIEW", - SASEntityType.Function => "FUNCTION", - SASEntityType.Partitioninfo => "PARTITIONINFO", - SASEntityType.Relationship => "RELATIONSHIP", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SASEntityType value.") - }; - - public static SASEntityType ToSASEntityType(this string value) - { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "DATABASE")) return SASEntityType.Database; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "TABLE")) return SASEntityType.Table; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "SCHEMA")) return SASEntityType.Schema; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "VIEW")) return SASEntityType.View; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "FUNCTION")) return SASEntityType.Function; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "PARTITIONINFO")) return SASEntityType.Partitioninfo; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "RELATIONSHIP")) return SASEntityType.Relationship; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SASEntityType value."); - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SASEntityType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SASEntityType.cs deleted file mode 100644 index ff8469d3430b..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SASEntityType.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Artifact type. - public enum SASEntityType - { - /// DATABASE. - Database, - /// TABLE. - Table, - /// SCHEMA. - Schema, - /// VIEW. - View, - /// FUNCTION. - Function, - /// PARTITIONINFO. - Partitioninfo, - /// RELATIONSHIP. - Relationship - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ScalarTypeInfo.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ScalarTypeInfo.Serialization.cs deleted file mode 100644 index 058c2874ddea..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ScalarTypeInfo.Serialization.cs +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(ScalarTypeInfoConverter))] - public partial class ScalarTypeInfo : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(TypeFamily)) - { - writer.WritePropertyName("typeFamily"u8); - writer.WriteStringValue(TypeFamily); - } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(TypeName); - if (Optional.IsDefined(IsTableType)) - { - writer.WritePropertyName("isTableType"u8); - writer.WriteBooleanValue(IsTableType.Value); - } - if (Optional.IsDefined(IsComplexType)) - { - writer.WritePropertyName("isComplexType"u8); - writer.WriteBooleanValue(IsComplexType.Value); - } - if (Optional.IsDefined(IsNullable)) - { - writer.WritePropertyName("isNullable"u8); - writer.WriteBooleanValue(IsNullable.Value); - } - if (Optional.IsDefined(Length)) - { - writer.WritePropertyName("length"u8); - writer.WriteNumberValue(Length.Value); - } - if (Optional.IsDefined(Precision)) - { - writer.WritePropertyName("precision"u8); - writer.WriteNumberValue(Precision.Value); - } - if (Optional.IsDefined(Scale)) - { - writer.WritePropertyName("scale"u8); - writer.WriteNumberValue(Scale.Value); - } - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static ScalarTypeInfo DeserializeScalarTypeInfo(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional typeFamily = default; - string typeName = default; - Optional isTableType = default; - Optional isComplexType = default; - Optional isNullable = default; - Optional length = default; - Optional precision = default; - Optional scale = default; - Optional> properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("typeFamily"u8)) - { - typeFamily = property.Value.GetString(); - continue; - } - if (property.NameEquals("typeName"u8)) - { - typeName = property.Value.GetString(); - continue; - } - if (property.NameEquals("isTableType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isTableType = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("isComplexType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isComplexType = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("isNullable"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isNullable = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("length"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - length = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("precision"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - precision = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("scale"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - scale = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property0.Name, null); - } - else - { - dictionary.Add(property0.Name, property0.Value.GetObject()); - } - } - properties = dictionary; - continue; - } - } - return new ScalarTypeInfo(typeFamily.Value, typeName, Optional.ToNullable(isTableType), Optional.ToNullable(isComplexType), Optional.ToNullable(isNullable), Optional.ToNullable(length), Optional.ToNullable(precision), Optional.ToNullable(scale), Optional.ToDictionary(properties)); - } - - internal partial class ScalarTypeInfoConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, ScalarTypeInfo model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override ScalarTypeInfo Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeScalarTypeInfo(document.RootElement); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ScalarTypeInfo.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ScalarTypeInfo.cs deleted file mode 100644 index 351c273b4f0c..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ScalarTypeInfo.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Scalar type information. - public partial class ScalarTypeInfo : TypeInfo - { - /// Initializes a new instance of ScalarTypeInfo. - /// Type name. - /// is null. - public ScalarTypeInfo(string typeName) : base(typeName) - { - Argument.AssertNotNull(typeName, nameof(typeName)); - } - - /// Initializes a new instance of ScalarTypeInfo. - /// Type family. - /// Type name. - /// Is Table type. - /// Is Complex type. - /// Is Nullable. - /// Length. - /// Precision. - /// Scale. - /// Property bag. - internal ScalarTypeInfo(string typeFamily, string typeName, bool? isTableType, bool? isComplexType, bool? isNullable, int? length, int? precision, int? scale, IDictionary properties) : base(typeFamily, typeName, isTableType, isComplexType, isNullable, length, precision, scale, properties) - { - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaEntity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaEntity.Serialization.cs deleted file mode 100644 index c5c67a1243fc..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaEntity.Serialization.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(SchemaEntityConverter))] - public partial class SchemaEntity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToSerialString()); - writer.WriteEndObject(); - } - - internal static SchemaEntity DeserializeSchemaEntity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - SchemaProperties properties = default; - string name = default; - SASEntityType type = default; - Optional id = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - properties = SchemaProperties.DeserializeSchemaProperties(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToSASEntityType(); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - } - return new SchemaEntity(name, type, id.Value, properties); - } - - internal partial class SchemaEntityConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, SchemaEntity model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override SchemaEntity Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeSchemaEntity(document.RootElement); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaEntity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaEntity.cs deleted file mode 100644 index b57e336b0bda..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaEntity.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// schema entity. - public partial class SchemaEntity : MDEntity - { - /// Initializes a new instance of SchemaEntity. - /// Entity Name. - /// Artifact type. - /// Database properties. - /// or is null. - public SchemaEntity(string name, SASEntityType type, SchemaProperties properties) : base(name, type) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of SchemaEntity. - /// Entity Name. - /// Artifact type. - /// Entity Resource Id. - /// Database properties. - internal SchemaEntity(string name, SASEntityType type, string id, SchemaProperties properties) : base(name, type, id) - { - Properties = properties; - } - - /// Database properties. - public SchemaProperties Properties { get; set; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaProperties.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaProperties.Serialization.cs deleted file mode 100644 index 1c0be484688c..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaProperties.Serialization.cs +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(SchemaPropertiesConverter))] - public partial class SchemaProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("namespace"u8); - writer.WriteObjectValue(Namespace); - if (Optional.IsDefined(OriginObjectId)) - { - writer.WritePropertyName("originObjectId"u8); - writer.WriteStringValue(OriginObjectId); - } - if (Optional.IsDefined(PublishStatus)) - { - writer.WritePropertyName("publishStatus"u8); - writer.WriteStringValue(PublishStatus.Value.ToString()); - } - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static SchemaProperties DeserializeSchemaProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - BaseNamespace @namespace = default; - Optional originObjectId = default; - Optional objectId = default; - Optional objectVersion = default; - Optional publishStatus = default; - Optional> properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("namespace"u8)) - { - @namespace = BaseNamespace.DeserializeBaseNamespace(property.Value); - continue; - } - if (property.NameEquals("originObjectId"u8)) - { - originObjectId = property.Value.GetString(); - continue; - } - if (property.NameEquals("objectId"u8)) - { - objectId = property.Value.GetString(); - continue; - } - if (property.NameEquals("objectVersion"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - objectVersion = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("publishStatus"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - publishStatus = new PublishStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property0.Name, null); - } - else - { - dictionary.Add(property0.Name, property0.Value.GetObject()); - } - } - properties = dictionary; - continue; - } - } - return new SchemaProperties(originObjectId.Value, objectId.Value, Optional.ToNullable(objectVersion), Optional.ToNullable(publishStatus), Optional.ToDictionary(properties), @namespace); - } - - internal partial class SchemaPropertiesConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, SchemaProperties model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override SchemaProperties Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeSchemaProperties(document.RootElement); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaProperties.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaProperties.cs deleted file mode 100644 index d27fae0bb595..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SchemaProperties.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Database properties. - public partial class SchemaProperties : MDEntityProperties - { - /// Initializes a new instance of SchemaProperties. - /// Namespace. - /// is null. - public SchemaProperties(BaseNamespace @namespace) - { - Argument.AssertNotNull(@namespace, nameof(@namespace)); - - Namespace = @namespace; - } - - /// Initializes a new instance of SchemaProperties. - /// Entity object id maintained by the caller. - /// Entity object id maintained by SyMS. - /// Entity object version maintained by SyMS. - /// Publish status. - /// Property bag. - /// Namespace. - internal SchemaProperties(string originObjectId, string objectId, long? objectVersion, PublishStatus? publishStatus, IDictionary properties, BaseNamespace @namespace) : base(originObjectId, objectId, objectVersion, publishStatus, properties) - { - Namespace = @namespace; - } - - /// Namespace. - public BaseNamespace Namespace { get; set; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortOrder.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortOrder.Serialization.cs deleted file mode 100644 index 06edb0d91b90..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortOrder.Serialization.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - internal static partial class SortOrderExtensions - { - public static string ToSerialString(this SortOrder value) => value switch - { - SortOrder.Desc => "DESC", - SortOrder.ASC => "ASC", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SortOrder value.") - }; - - public static SortOrder ToSortOrder(this string value) - { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "DESC")) return SortOrder.Desc; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "ASC")) return SortOrder.ASC; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SortOrder value."); - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortOrder.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortOrder.cs deleted file mode 100644 index a8777c47725a..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortOrder.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Sorting order. - public enum SortOrder - { - /// DESC. - Desc, - /// ASC. - ASC - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortingItem.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortingItem.Serialization.cs deleted file mode 100644 index cc50684e13b5..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortingItem.Serialization.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(SortingItemConverter))] - public partial class SortingItem : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("keyName"u8); - writer.WriteStringValue(KeyName); - writer.WritePropertyName("sortOrder"u8); - writer.WriteStringValue(SortOrder.ToSerialString()); - writer.WriteEndObject(); - } - - internal static SortingItem DeserializeSortingItem(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string keyName = default; - SortOrder sortOrder = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("keyName"u8)) - { - keyName = property.Value.GetString(); - continue; - } - if (property.NameEquals("sortOrder"u8)) - { - sortOrder = property.Value.GetString().ToSortOrder(); - continue; - } - } - return new SortingItem(keyName, sortOrder); - } - - internal partial class SortingItemConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, SortingItem model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override SortingItem Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeSortingItem(document.RootElement); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortingItem.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortingItem.cs deleted file mode 100644 index 35daf3fbd64b..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SortingItem.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Column sorting. - public partial class SortingItem - { - /// Initializes a new instance of SortingItem. - /// Name of column. - /// Sorting order. - /// is null. - public SortingItem(string keyName, SortOrder sortOrder) - { - Argument.AssertNotNull(keyName, nameof(keyName)); - - KeyName = keyName; - SortOrder = sortOrder; - } - - /// Name of column. - public string KeyName { get; set; } - /// Sorting order. - public SortOrder SortOrder { get; set; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StorageDescriptor.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StorageDescriptor.Serialization.cs deleted file mode 100644 index 63c715a536c1..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StorageDescriptor.Serialization.cs +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(StorageDescriptorConverter))] - public partial class StorageDescriptor : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Distribution)) - { - writer.WritePropertyName("distribution"u8); - writer.WriteObjectValue(Distribution); - } - writer.WritePropertyName("columns"u8); - writer.WriteStartArray(); - foreach (var item in Columns) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("format"u8); - writer.WriteObjectValue(Format); - writer.WritePropertyName("source"u8); - writer.WriteObjectValue(Source); - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(SerDeInfo)) - { - writer.WritePropertyName("serDeInfo"u8); - writer.WriteObjectValue(SerDeInfo); - } - writer.WriteEndObject(); - } - - internal static StorageDescriptor DeserializeStorageDescriptor(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional distribution = default; - IList columns = default; - FormatInfo format = default; - DataSource source = default; - Optional> properties = default; - Optional serDeInfo = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("distribution"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - distribution = DistributionInfo.DeserializeDistributionInfo(property.Value); - continue; - } - if (property.NameEquals("columns"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DataColumn.DeserializeDataColumn(item)); - } - columns = array; - continue; - } - if (property.NameEquals("format"u8)) - { - format = FormatInfo.DeserializeFormatInfo(property.Value); - continue; - } - if (property.NameEquals("source"u8)) - { - source = DataSource.DeserializeDataSource(property.Value); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property0.Name, null); - } - else - { - dictionary.Add(property0.Name, property0.Value.GetObject()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("serDeInfo"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - serDeInfo = property.Value.GetObject(); - continue; - } - } - return new StorageDescriptor(distribution.Value, columns, format, source, Optional.ToDictionary(properties), serDeInfo.Value); - } - - internal partial class StorageDescriptorConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, StorageDescriptor model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override StorageDescriptor Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeStorageDescriptor(document.RootElement); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StorageDescriptor.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StorageDescriptor.cs deleted file mode 100644 index 7324d9fe09e0..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/StorageDescriptor.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Storage descriptor. - public partial class StorageDescriptor - { - /// Initializes a new instance of StorageDescriptor. - /// Column information. - /// Storage descriptor format information. - /// Storage descriptor data source information. - /// , or is null. - public StorageDescriptor(IEnumerable columns, FormatInfo format, DataSource source) - { - Argument.AssertNotNull(columns, nameof(columns)); - Argument.AssertNotNull(format, nameof(format)); - Argument.AssertNotNull(source, nameof(source)); - - Columns = columns.ToList(); - Format = format; - Source = source; - Properties = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of StorageDescriptor. - /// Storage descriptor information. - /// Column information. - /// Storage descriptor format information. - /// Storage descriptor data source information. - /// Property bag. - /// SerDe information. - internal StorageDescriptor(DistributionInfo distribution, IList columns, FormatInfo format, DataSource source, IDictionary properties, object serDeInfo) - { - Distribution = distribution; - Columns = columns; - Format = format; - Source = source; - Properties = properties; - SerDeInfo = serDeInfo; - } - - /// Storage descriptor information. - public DistributionInfo Distribution { get; set; } - /// Column information. - public IList Columns { get; } - /// Storage descriptor format information. - public FormatInfo Format { get; set; } - /// Storage descriptor data source information. - public DataSource Source { get; set; } - /// Property bag. - public IDictionary Properties { get; } - /// SerDe information. - public object SerDeInfo { get; set; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponse.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponse.Serialization.cs deleted file mode 100644 index ad9fa7e302a5..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponse.Serialization.cs +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(SyMsapiddlResponseConverter))] - public partial class SyMsapiddlResponse - { - internal static SyMsapiddlResponse DeserializeSyMsapiddlResponse(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DDLType ddlType = default; - string entityName = default; - SASEntityType entityType = default; - PublishStatus publishStatus = default; - string originObjectId = default; - string objectId = default; - long objectVersion = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("ddlType"u8)) - { - ddlType = property.Value.GetString().ToDDLType(); - continue; - } - if (property.NameEquals("entityName"u8)) - { - entityName = property.Value.GetString(); - continue; - } - if (property.NameEquals("entityType"u8)) - { - entityType = property.Value.GetString().ToSASEntityType(); - continue; - } - if (property.NameEquals("publishStatus"u8)) - { - publishStatus = new PublishStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("originObjectId"u8)) - { - originObjectId = property.Value.GetString(); - continue; - } - if (property.NameEquals("objectId"u8)) - { - objectId = property.Value.GetString(); - continue; - } - if (property.NameEquals("objectVersion"u8)) - { - objectVersion = property.Value.GetInt64(); - continue; - } - } - return new SyMsapiddlResponse(ddlType, entityName, entityType, publishStatus, originObjectId, objectId, objectVersion); - } - - internal partial class SyMsapiddlResponseConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, SyMsapiddlResponse model, JsonSerializerOptions options) - { - throw new NotImplementedException(); - } - public override SyMsapiddlResponse Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeSyMsapiddlResponse(document.RootElement); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponse.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponse.cs deleted file mode 100644 index fb9ce9de8a72..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponse.cs +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Defines the response for create/publish operation on DDL payload. - public partial class SyMsapiddlResponse - { - /// Initializes a new instance of SyMsapiddlResponse. - /// DDL type. - /// Entity name. - /// Artifact type. - /// Object id maintained by Origin Catalog. - /// Object id maintained by SyMS. - /// Object version maintained by SyMS. - /// , or is null. - internal SyMsapiddlResponse(DDLType ddlType, string entityName, SASEntityType entityType, string originObjectId, string objectId, long objectVersion) - { - Argument.AssertNotNull(entityName, nameof(entityName)); - Argument.AssertNotNull(originObjectId, nameof(originObjectId)); - Argument.AssertNotNull(objectId, nameof(objectId)); - - DdlType = ddlType; - EntityName = entityName; - EntityType = entityType; - PublishStatus = PublishStatus.PUBLISHED; - OriginObjectId = originObjectId; - ObjectId = objectId; - ObjectVersion = objectVersion; - } - - /// Initializes a new instance of SyMsapiddlResponse. - /// DDL type. - /// Entity name. - /// Artifact type. - /// Publish status. - /// Object id maintained by Origin Catalog. - /// Object id maintained by SyMS. - /// Object version maintained by SyMS. - internal SyMsapiddlResponse(DDLType ddlType, string entityName, SASEntityType entityType, PublishStatus publishStatus, string originObjectId, string objectId, long objectVersion) - { - DdlType = ddlType; - EntityName = entityName; - EntityType = entityType; - PublishStatus = publishStatus; - OriginObjectId = originObjectId; - ObjectId = objectId; - ObjectVersion = objectVersion; - } - - /// DDL type. - public DDLType DdlType { get; } - /// Entity name. - public string EntityName { get; } - /// Artifact type. - public SASEntityType EntityType { get; } - /// Publish status. - public PublishStatus PublishStatus { get; } - /// Object id maintained by Origin Catalog. - public string OriginObjectId { get; } - /// Object id maintained by SyMS. - public string ObjectId { get; } - /// Object version maintained by SyMS. - public long ObjectVersion { get; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponses.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponses.Serialization.cs deleted file mode 100644 index 6d1e80397a89..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponses.Serialization.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(SyMsapiddlResponsesConverter))] - public partial class SyMsapiddlResponses - { - internal static SyMsapiddlResponses DeserializeSyMsapiddlResponses(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList syMsApiDdlResponse = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("syMsApiDdlResponse"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SyMsapiddlResponse.DeserializeSyMsapiddlResponse(item)); - } - syMsApiDdlResponse = array; - continue; - } - } - return new SyMsapiddlResponses(syMsApiDdlResponse); - } - - internal partial class SyMsapiddlResponsesConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, SyMsapiddlResponses model, JsonSerializerOptions options) - { - throw new NotImplementedException(); - } - public override SyMsapiddlResponses Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeSyMsapiddlResponses(document.RootElement); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponses.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponses.cs deleted file mode 100644 index c1af99516809..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SyMsapiddlResponses.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Defines the publish response. - public partial class SyMsapiddlResponses - { - /// Initializes a new instance of SyMsapiddlResponses. - /// List of DDL response. - /// is null. - internal SyMsapiddlResponses(IEnumerable syMsApiDdlResponse) - { - Argument.AssertNotNull(syMsApiDdlResponse, nameof(syMsApiDdlResponse)); - - SyMsApiDdlResponse = syMsApiDdlResponse.ToList(); - } - - /// Initializes a new instance of SyMsapiddlResponses. - /// List of DDL response. - internal SyMsapiddlResponses(IReadOnlyList syMsApiDdlResponse) - { - SyMsApiDdlResponse = syMsApiDdlResponse; - } - - /// List of DDL response. - public IReadOnlyList SyMsApiDdlResponse { get; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableEntity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableEntity.Serialization.cs deleted file mode 100644 index 62b0bf99820e..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableEntity.Serialization.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(TableEntityConverter))] - public partial class TableEntity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToSerialString()); - writer.WriteEndObject(); - } - - internal static TableEntity DeserializeTableEntity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - TableProperties properties = default; - string name = default; - SASEntityType type = default; - Optional id = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - properties = TableProperties.DeserializeTableProperties(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToSASEntityType(); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - } - return new TableEntity(name, type, id.Value, properties); - } - - internal partial class TableEntityConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, TableEntity model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override TableEntity Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeTableEntity(document.RootElement); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableEntity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableEntity.cs deleted file mode 100644 index 912fd12797e2..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableEntity.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Table entity. - public partial class TableEntity : MDEntity - { - /// Initializes a new instance of TableEntity. - /// Entity Name. - /// Artifact type. - /// Database properties. - /// or is null. - public TableEntity(string name, SASEntityType type, TableProperties properties) : base(name, type) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of TableEntity. - /// Entity Name. - /// Artifact type. - /// Entity Resource Id. - /// Database properties. - internal TableEntity(string name, SASEntityType type, string id, TableProperties properties) : base(name, type, id) - { - Properties = properties; - } - - /// Database properties. - public TableProperties Properties { get; set; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableNamespace.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableNamespace.Serialization.cs deleted file mode 100644 index 12d2a9947a50..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableNamespace.Serialization.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(TableNamespaceConverter))] - public partial class TableNamespace : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SchemaName)) - { - writer.WritePropertyName("schemaName"u8); - writer.WriteStringValue(SchemaName); - } - writer.WritePropertyName("databaseName"u8); - writer.WriteStringValue(DatabaseName); - writer.WriteEndObject(); - } - - internal static TableNamespace DeserializeTableNamespace(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional schemaName = default; - string databaseName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("schemaName"u8)) - { - schemaName = property.Value.GetString(); - continue; - } - if (property.NameEquals("databaseName"u8)) - { - databaseName = property.Value.GetString(); - continue; - } - } - return new TableNamespace(databaseName, schemaName.Value); - } - - internal partial class TableNamespaceConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, TableNamespace model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override TableNamespace Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeTableNamespace(document.RootElement); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableNamespace.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableNamespace.cs deleted file mode 100644 index c7b80a6ea7a8..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableNamespace.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Table namespace. - public partial class TableNamespace : BaseNamespace - { - /// Initializes a new instance of TableNamespace. - /// Database name. - /// is null. - public TableNamespace(string databaseName) : base(databaseName) - { - Argument.AssertNotNull(databaseName, nameof(databaseName)); - } - - /// Initializes a new instance of TableNamespace. - /// Database name. - /// Schema name. - /// is null. - internal TableNamespace(string databaseName, string schemaName) : base(databaseName) - { - Argument.AssertNotNull(databaseName, nameof(databaseName)); - - SchemaName = schemaName; - } - - /// Schema name. - public string SchemaName { get; set; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TablePartitioning.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TablePartitioning.Serialization.cs deleted file mode 100644 index ccc7df85e0c5..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TablePartitioning.Serialization.cs +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(TablePartitioningConverter))] - public partial class TablePartitioning : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("keys"u8); - writer.WriteStartArray(); - foreach (var item in Keys) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("partitionFunctionType"u8); - writer.WriteStringValue(PartitionFunctionType); - writer.WriteEndObject(); - } - - internal static TablePartitioning DeserializeTablePartitioning(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList keys = default; - string partitionFunctionType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("keys"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - keys = array; - continue; - } - if (property.NameEquals("partitionFunctionType"u8)) - { - partitionFunctionType = property.Value.GetString(); - continue; - } - } - return new TablePartitioning(keys, partitionFunctionType); - } - - internal partial class TablePartitioningConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, TablePartitioning model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override TablePartitioning Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeTablePartitioning(document.RootElement); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TablePartitioning.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TablePartitioning.cs deleted file mode 100644 index ac1f4712a6f8..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TablePartitioning.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Table partitioning information. - public partial class TablePartitioning - { - /// Initializes a new instance of TablePartitioning. - /// Table partitioning keys. - /// Partition Function Type (ex. value). - /// or is null. - public TablePartitioning(IEnumerable keys, string partitionFunctionType) - { - Argument.AssertNotNull(keys, nameof(keys)); - Argument.AssertNotNull(partitionFunctionType, nameof(partitionFunctionType)); - - Keys = keys.ToList(); - PartitionFunctionType = partitionFunctionType; - } - - /// Initializes a new instance of TablePartitioning. - /// Table partitioning keys. - /// Partition Function Type (ex. value). - internal TablePartitioning(IList keys, string partitionFunctionType) - { - Keys = keys; - PartitionFunctionType = partitionFunctionType; - } - - /// Table partitioning keys. - public IList Keys { get; } - /// Partition Function Type (ex. value). - public string PartitionFunctionType { get; set; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableProperties.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableProperties.Serialization.cs deleted file mode 100644 index 2935c51b66ad..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableProperties.Serialization.cs +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(TablePropertiesConverter))] - public partial class TableProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("namespace"u8); - writer.WriteObjectValue(Namespace); - if (Optional.IsDefined(Partitioning)) - { - writer.WritePropertyName("partitioning"u8); - writer.WriteObjectValue(Partitioning); - } - writer.WritePropertyName("tableType"u8); - writer.WriteStringValue(TableType.ToSerialString()); - writer.WritePropertyName("storageDescriptor"u8); - writer.WriteObjectValue(StorageDescriptor); - if (Optional.IsDefined(Temporary)) - { - writer.WritePropertyName("temporary"u8); - writer.WriteBooleanValue(Temporary.Value); - } - if (Optional.IsDefined(IsRewriteEnabled)) - { - writer.WritePropertyName("isRewriteEnabled"u8); - writer.WriteBooleanValue(IsRewriteEnabled.Value); - } - if (Optional.IsDefined(OriginObjectId)) - { - writer.WritePropertyName("originObjectId"u8); - writer.WriteStringValue(OriginObjectId); - } - if (Optional.IsDefined(PublishStatus)) - { - writer.WritePropertyName("publishStatus"u8); - writer.WriteStringValue(PublishStatus.Value.ToString()); - } - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static TableProperties DeserializeTableProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - TableNamespace @namespace = default; - Optional partitioning = default; - TableType tableType = default; - StorageDescriptor storageDescriptor = default; - Optional temporary = default; - Optional isRewriteEnabled = default; - Optional originObjectId = default; - Optional objectId = default; - Optional objectVersion = default; - Optional publishStatus = default; - Optional> properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("namespace"u8)) - { - @namespace = TableNamespace.DeserializeTableNamespace(property.Value); - continue; - } - if (property.NameEquals("partitioning"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitioning = TablePartitioning.DeserializeTablePartitioning(property.Value); - continue; - } - if (property.NameEquals("tableType"u8)) - { - tableType = property.Value.GetString().ToTableType(); - continue; - } - if (property.NameEquals("storageDescriptor"u8)) - { - storageDescriptor = StorageDescriptor.DeserializeStorageDescriptor(property.Value); - continue; - } - if (property.NameEquals("temporary"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - temporary = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("isRewriteEnabled"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isRewriteEnabled = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("originObjectId"u8)) - { - originObjectId = property.Value.GetString(); - continue; - } - if (property.NameEquals("objectId"u8)) - { - objectId = property.Value.GetString(); - continue; - } - if (property.NameEquals("objectVersion"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - objectVersion = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("publishStatus"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - publishStatus = new PublishStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property0.Name, null); - } - else - { - dictionary.Add(property0.Name, property0.Value.GetObject()); - } - } - properties = dictionary; - continue; - } - } - return new TableProperties(originObjectId.Value, objectId.Value, Optional.ToNullable(objectVersion), Optional.ToNullable(publishStatus), Optional.ToDictionary(properties), @namespace, partitioning.Value, tableType, storageDescriptor, Optional.ToNullable(temporary), Optional.ToNullable(isRewriteEnabled)); - } - - internal partial class TablePropertiesConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, TableProperties model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override TableProperties Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeTableProperties(document.RootElement); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableProperties.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableProperties.cs deleted file mode 100644 index 9e02c2fc45f5..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableProperties.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Database properties. - public partial class TableProperties : MDEntityProperties - { - /// Initializes a new instance of TableProperties. - /// Table namespace. - /// Entity type. - /// Storage descriptor. - /// or is null. - public TableProperties(TableNamespace @namespace, TableType tableType, StorageDescriptor storageDescriptor) - { - Argument.AssertNotNull(@namespace, nameof(@namespace)); - Argument.AssertNotNull(storageDescriptor, nameof(storageDescriptor)); - - Namespace = @namespace; - TableType = tableType; - StorageDescriptor = storageDescriptor; - } - - /// Initializes a new instance of TableProperties. - /// Entity object id maintained by the caller. - /// Entity object id maintained by SyMS. - /// Entity object version maintained by SyMS. - /// Publish status. - /// Property bag. - /// Table namespace. - /// Table partitioning information. - /// Entity type. - /// Storage descriptor. - /// Temporary. - /// Is rewrite enabled. - internal TableProperties(string originObjectId, string objectId, long? objectVersion, PublishStatus? publishStatus, IDictionary properties, TableNamespace @namespace, TablePartitioning partitioning, TableType tableType, StorageDescriptor storageDescriptor, bool? temporary, bool? isRewriteEnabled) : base(originObjectId, objectId, objectVersion, publishStatus, properties) - { - Namespace = @namespace; - Partitioning = partitioning; - TableType = tableType; - StorageDescriptor = storageDescriptor; - Temporary = temporary; - IsRewriteEnabled = isRewriteEnabled; - } - - /// Table namespace. - public TableNamespace Namespace { get; set; } - /// Table partitioning information. - public TablePartitioning Partitioning { get; set; } - /// Entity type. - public TableType TableType { get; set; } - /// Storage descriptor. - public StorageDescriptor StorageDescriptor { get; set; } - /// Temporary. - public bool? Temporary { get; set; } - /// Is rewrite enabled. - public bool? IsRewriteEnabled { get; set; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableType.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableType.Serialization.cs deleted file mode 100644 index de76be8042c6..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableType.Serialization.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - internal static partial class TableTypeExtensions - { - public static string ToSerialString(this TableType value) => value switch - { - TableType.Managed => "MANAGED", - TableType.External => "EXTERNAL", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown TableType value.") - }; - - public static TableType ToTableType(this string value) - { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "MANAGED")) return TableType.Managed; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "EXTERNAL")) return TableType.External; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown TableType value."); - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableType.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableType.cs deleted file mode 100644 index a18971ecc67c..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TableType.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Entity type. - public enum TableType - { - /// MANAGED. - Managed, - /// EXTERNAL. - External - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TypeInfo.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TypeInfo.Serialization.cs deleted file mode 100644 index c27f25700ef9..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TypeInfo.Serialization.cs +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(TypeInfoConverter))] - public partial class TypeInfo : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(TypeFamily)) - { - writer.WritePropertyName("typeFamily"u8); - writer.WriteStringValue(TypeFamily); - } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(TypeName); - if (Optional.IsDefined(IsTableType)) - { - writer.WritePropertyName("isTableType"u8); - writer.WriteBooleanValue(IsTableType.Value); - } - if (Optional.IsDefined(IsComplexType)) - { - writer.WritePropertyName("isComplexType"u8); - writer.WriteBooleanValue(IsComplexType.Value); - } - if (Optional.IsDefined(IsNullable)) - { - writer.WritePropertyName("isNullable"u8); - writer.WriteBooleanValue(IsNullable.Value); - } - if (Optional.IsDefined(Length)) - { - writer.WritePropertyName("length"u8); - writer.WriteNumberValue(Length.Value); - } - if (Optional.IsDefined(Precision)) - { - writer.WritePropertyName("precision"u8); - writer.WriteNumberValue(Precision.Value); - } - if (Optional.IsDefined(Scale)) - { - writer.WritePropertyName("scale"u8); - writer.WriteNumberValue(Scale.Value); - } - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static TypeInfo DeserializeTypeInfo(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional typeFamily = default; - string typeName = default; - Optional isTableType = default; - Optional isComplexType = default; - Optional isNullable = default; - Optional length = default; - Optional precision = default; - Optional scale = default; - Optional> properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("typeFamily"u8)) - { - typeFamily = property.Value.GetString(); - continue; - } - if (property.NameEquals("typeName"u8)) - { - typeName = property.Value.GetString(); - continue; - } - if (property.NameEquals("isTableType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isTableType = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("isComplexType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isComplexType = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("isNullable"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isNullable = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("length"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - length = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("precision"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - precision = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("scale"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - scale = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property0.Name, null); - } - else - { - dictionary.Add(property0.Name, property0.Value.GetObject()); - } - } - properties = dictionary; - continue; - } - } - return new TypeInfo(typeFamily.Value, typeName, Optional.ToNullable(isTableType), Optional.ToNullable(isComplexType), Optional.ToNullable(isNullable), Optional.ToNullable(length), Optional.ToNullable(precision), Optional.ToNullable(scale), Optional.ToDictionary(properties)); - } - - internal partial class TypeInfoConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, TypeInfo model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override TypeInfo Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeTypeInfo(document.RootElement); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TypeInfo.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TypeInfo.cs deleted file mode 100644 index 9a6332bbca76..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/TypeInfo.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Type information. - public partial class TypeInfo - { - /// Initializes a new instance of TypeInfo. - /// Type name. - /// is null. - public TypeInfo(string typeName) - { - Argument.AssertNotNull(typeName, nameof(typeName)); - - TypeName = typeName; - Properties = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of TypeInfo. - /// Type family. - /// Type name. - /// Is Table type. - /// Is Complex type. - /// Is Nullable. - /// Length. - /// Precision. - /// Scale. - /// Property bag. - internal TypeInfo(string typeFamily, string typeName, bool? isTableType, bool? isComplexType, bool? isNullable, int? length, int? precision, int? scale, IDictionary properties) - { - TypeFamily = typeFamily; - TypeName = typeName; - IsTableType = isTableType; - IsComplexType = isComplexType; - IsNullable = isNullable; - Length = length; - Precision = precision; - Scale = scale; - Properties = properties; - } - - /// Type family. - public string TypeFamily { get; set; } - /// Type name. - public string TypeName { get; set; } - /// Is Table type. - public bool? IsTableType { get; set; } - /// Is Complex type. - public bool? IsComplexType { get; set; } - /// Is Nullable. - public bool? IsNullable { get; set; } - /// Length. - public int? Length { get; set; } - /// Precision. - public int? Precision { get; set; } - /// Scale. - public int? Scale { get; set; } - /// Property bag. - public IDictionary Properties { get; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValidationStatus.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValidationStatus.Serialization.cs deleted file mode 100644 index 8ed49797fe6d..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValidationStatus.Serialization.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - internal static partial class ValidationStatusExtensions - { - public static string ToSerialString(this ValidationStatus value) => value switch - { - ValidationStatus.Valid => "VALID", - ValidationStatus.Invalid => "INVALID", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ValidationStatus value.") - }; - - public static ValidationStatus ToValidationStatus(this string value) - { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "VALID")) return ValidationStatus.Valid; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "INVALID")) return ValidationStatus.Invalid; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ValidationStatus value."); - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValidationStatus.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValidationStatus.cs deleted file mode 100644 index 5cbc67590f6e..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ValidationStatus.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Validation Status. - internal enum ValidationStatus - { - /// VALID. - Valid, - /// INVALID. - Invalid - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntity.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntity.Serialization.cs deleted file mode 100644 index cf4f40c26404..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntity.Serialization.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(ViewEntityConverter))] - public partial class ViewEntity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToSerialString()); - writer.WriteEndObject(); - } - - internal static ViewEntity DeserializeViewEntity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ViewEntityProperties properties = default; - string name = default; - SASEntityType type = default; - Optional id = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - properties = ViewEntityProperties.DeserializeViewEntityProperties(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString().ToSASEntityType(); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - } - return new ViewEntity(name, type, id.Value, properties); - } - - internal partial class ViewEntityConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, ViewEntity model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override ViewEntity Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeViewEntity(document.RootElement); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntity.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntity.cs deleted file mode 100644 index b4e12f8a11d6..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntity.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// View entity. - public partial class ViewEntity : MDEntity - { - /// Initializes a new instance of ViewEntity. - /// Entity Name. - /// Artifact type. - /// Database properties. - /// or is null. - public ViewEntity(string name, SASEntityType type, ViewEntityProperties properties) : base(name, type) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of ViewEntity. - /// Entity Name. - /// Artifact type. - /// Entity Resource Id. - /// Database properties. - internal ViewEntity(string name, SASEntityType type, string id, ViewEntityProperties properties) : base(name, type, id) - { - Properties = properties; - } - - /// Database properties. - public ViewEntityProperties Properties { get; set; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntityProperties.Serialization.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntityProperties.Serialization.cs deleted file mode 100644 index 780f7ee48537..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntityProperties.Serialization.cs +++ /dev/null @@ -1,213 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - [JsonConverter(typeof(ViewEntityPropertiesConverter))] - public partial class ViewEntityProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("namespace"u8); - writer.WriteObjectValue(Namespace); - if (Optional.IsDefined(Partitioning)) - { - writer.WritePropertyName("partitioning"u8); - writer.WriteObjectValue(Partitioning); - } - writer.WritePropertyName("storageDescriptor"u8); - writer.WriteObjectValue(StorageDescriptor); - if (Optional.IsDefined(ViewOriginalText)) - { - writer.WritePropertyName("viewOriginalText"u8); - writer.WriteStringValue(ViewOriginalText); - } - if (Optional.IsDefined(ViewExpandedText)) - { - writer.WritePropertyName("viewExpandedText"u8); - writer.WriteStringValue(ViewExpandedText); - } - if (Optional.IsDefined(Temporary)) - { - writer.WritePropertyName("temporary"u8); - writer.WriteBooleanValue(Temporary.Value); - } - if (Optional.IsDefined(IsRewriteEnabled)) - { - writer.WritePropertyName("isRewriteEnabled"u8); - writer.WriteBooleanValue(IsRewriteEnabled.Value); - } - if (Optional.IsDefined(OriginObjectId)) - { - writer.WritePropertyName("originObjectId"u8); - writer.WriteStringValue(OriginObjectId); - } - if (Optional.IsDefined(PublishStatus)) - { - writer.WritePropertyName("publishStatus"u8); - writer.WriteStringValue(PublishStatus.Value.ToString()); - } - if (Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static ViewEntityProperties DeserializeViewEntityProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - TableNamespace @namespace = default; - Optional partitioning = default; - StorageDescriptor storageDescriptor = default; - Optional viewOriginalText = default; - Optional viewExpandedText = default; - Optional temporary = default; - Optional isRewriteEnabled = default; - Optional originObjectId = default; - Optional objectId = default; - Optional objectVersion = default; - Optional publishStatus = default; - Optional> properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("namespace"u8)) - { - @namespace = TableNamespace.DeserializeTableNamespace(property.Value); - continue; - } - if (property.NameEquals("partitioning"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitioning = TablePartitioning.DeserializeTablePartitioning(property.Value); - continue; - } - if (property.NameEquals("storageDescriptor"u8)) - { - storageDescriptor = StorageDescriptor.DeserializeStorageDescriptor(property.Value); - continue; - } - if (property.NameEquals("viewOriginalText"u8)) - { - viewOriginalText = property.Value.GetString(); - continue; - } - if (property.NameEquals("viewExpandedText"u8)) - { - viewExpandedText = property.Value.GetString(); - continue; - } - if (property.NameEquals("temporary"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - temporary = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("isRewriteEnabled"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isRewriteEnabled = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("originObjectId"u8)) - { - originObjectId = property.Value.GetString(); - continue; - } - if (property.NameEquals("objectId"u8)) - { - objectId = property.Value.GetString(); - continue; - } - if (property.NameEquals("objectVersion"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - objectVersion = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("publishStatus"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - publishStatus = new PublishStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property0.Name, null); - } - else - { - dictionary.Add(property0.Name, property0.Value.GetObject()); - } - } - properties = dictionary; - continue; - } - } - return new ViewEntityProperties(originObjectId.Value, objectId.Value, Optional.ToNullable(objectVersion), Optional.ToNullable(publishStatus), Optional.ToDictionary(properties), @namespace, partitioning.Value, storageDescriptor, viewOriginalText.Value, viewExpandedText.Value, Optional.ToNullable(temporary), Optional.ToNullable(isRewriteEnabled)); - } - - internal partial class ViewEntityPropertiesConverter : JsonConverter - { - public override void Write(Utf8JsonWriter writer, ViewEntityProperties model, JsonSerializerOptions options) - { - writer.WriteObjectValue(model); - } - public override ViewEntityProperties Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - using var document = JsonDocument.ParseValue(ref reader); - return DeserializeViewEntityProperties(document.RootElement); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntityProperties.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntityProperties.cs deleted file mode 100644 index d73e6fd0fa02..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/ViewEntityProperties.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Analytics.Synapse.Artifacts.Models -{ - /// Database properties. - public partial class ViewEntityProperties : MDEntityProperties - { - /// Initializes a new instance of ViewEntityProperties. - /// Table namespace. - /// Storage descriptor. - /// or is null. - public ViewEntityProperties(TableNamespace @namespace, StorageDescriptor storageDescriptor) - { - Argument.AssertNotNull(@namespace, nameof(@namespace)); - Argument.AssertNotNull(storageDescriptor, nameof(storageDescriptor)); - - Namespace = @namespace; - StorageDescriptor = storageDescriptor; - } - - /// Initializes a new instance of ViewEntityProperties. - /// Entity object id maintained by the caller. - /// Entity object id maintained by SyMS. - /// Entity object version maintained by SyMS. - /// Publish status. - /// Property bag. - /// Table namespace. - /// Table partitioning information. - /// Storage descriptor. - /// View original text. - /// View expanded text. - /// Temporary. - /// Is rewrite enabled. - internal ViewEntityProperties(string originObjectId, string objectId, long? objectVersion, PublishStatus? publishStatus, IDictionary properties, TableNamespace @namespace, TablePartitioning partitioning, StorageDescriptor storageDescriptor, string viewOriginalText, string viewExpandedText, bool? temporary, bool? isRewriteEnabled) : base(originObjectId, objectId, objectVersion, publishStatus, properties) - { - Namespace = @namespace; - Partitioning = partitioning; - StorageDescriptor = storageDescriptor; - ViewOriginalText = viewOriginalText; - ViewExpandedText = viewExpandedText; - Temporary = temporary; - IsRewriteEnabled = isRewriteEnabled; - } - - /// Table namespace. - public TableNamespace Namespace { get; set; } - /// Table partitioning information. - public TablePartitioning Partitioning { get; set; } - /// Storage descriptor. - public StorageDescriptor StorageDescriptor { get; set; } - /// View original text. - public string ViewOriginalText { get; set; } - /// View expanded text. - public string ViewExpandedText { get; set; } - /// Temporary. - public bool? Temporary { get; set; } - /// Is rewrite enabled. - public bool? IsRewriteEnabled { get; set; } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SynapseMetadataClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SynapseMetadataClient.cs deleted file mode 100644 index ef891de4fa80..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SynapseMetadataClient.cs +++ /dev/null @@ -1,894 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Analytics.Synapse.Artifacts.Models; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.Analytics.Synapse.Artifacts -{ - /// The SynapseMetadata service client. - public partial class SynapseMetadataClient - { - private readonly ClientDiagnostics _clientDiagnostics; - private readonly HttpPipeline _pipeline; - internal SynapseMetadataRestClient RestClient { get; } - - /// Initializes a new instance of SynapseMetadataClient for mocking. - protected SynapseMetadataClient() - { - } - - /// Initializes a new instance of SynapseMetadataClient. - /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - public SynapseMetadataClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) - { - if (endpoint == null) - { - throw new ArgumentNullException(nameof(endpoint)); - } - if (credential == null) - { - throw new ArgumentNullException(nameof(credential)); - } - - options ??= new ArtifactsClientOptions(); - _clientDiagnostics = new ClientDiagnostics(options); - string[] scopes = { "https://dev.azuresynapse.net/.default" }; - _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); - RestClient = new SynapseMetadataRestClient(_clientDiagnostics, _pipeline, endpoint); - } - - /// Initializes a new instance of SynapseMetadataClient. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. - /// , or is null. - internal SynapseMetadataClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint) - { - RestClient = new SynapseMetadataRestClient(clientDiagnostics, pipeline, endpoint); - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - /// Batch execution of DDL Payload. - /// DDLBatch payload containing artifact drafts to be created or deleted or modified. - /// The cancellation token to use. - /// Batch execution of DDL Payload. - public virtual async Task> ExecuteChangeAsync(DDLBatch createArtifactsPayload, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ExecuteChange"); - scope.Start(); - try - { - return await RestClient.ExecuteChangeAsync(createArtifactsPayload, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Batch execution of DDL Payload. - /// DDLBatch payload containing artifact drafts to be created or deleted or modified. - /// The cancellation token to use. - /// Batch execution of DDL Payload. - public virtual Response ExecuteChange(DDLBatch createArtifactsPayload, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ExecuteChange"); - scope.Start(); - try - { - return RestClient.ExecuteChange(createArtifactsPayload, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get all databases in a workspace. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// Get all databases in a workspace. - public virtual async Task> ListDatabasesAsync(string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ListDatabases"); - scope.Start(); - try - { - return await RestClient.ListDatabasesAsync(continuationToken, maxPageSize, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get all databases in a workspace. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// Get all databases in a workspace. - public virtual Response ListDatabases(string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ListDatabases"); - scope.Start(); - try - { - return RestClient.ListDatabases(continuationToken, maxPageSize, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// List all Artifacts of a type in a database. - /// Database name. - /// Artifact type. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// List all Artifacts of a type in a database. - public virtual async Task> ListArtifactsAsync(string databaseName, SASEntityType artifactType, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ListArtifacts"); - scope.Start(); - try - { - return await RestClient.ListArtifactsAsync(databaseName, artifactType, continuationToken, maxPageSize, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// List all Artifacts of a type in a database. - /// Database name. - /// Artifact type. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// List all Artifacts of a type in a database. - public virtual Response ListArtifacts(string databaseName, SASEntityType artifactType, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ListArtifacts"); - scope.Start(); - try - { - return RestClient.ListArtifacts(databaseName, artifactType, continuationToken, maxPageSize, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// List all artifacts in schema by type. - /// Database name. - /// Schema name. - /// Artifact type. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// List all Artifacts in schema by type. - public virtual async Task> ListArtifactsInSchemaByTypeAsync(string databaseName, string schemaName, SASEntityType artifactType, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ListArtifactsInSchemaByType"); - scope.Start(); - try - { - return await RestClient.ListArtifactsInSchemaByTypeAsync(databaseName, schemaName, artifactType, continuationToken, maxPageSize, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// List all artifacts in schema by type. - /// Database name. - /// Schema name. - /// Artifact type. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// List all Artifacts in schema by type. - public virtual Response ListArtifactsInSchemaByType(string databaseName, string schemaName, SASEntityType artifactType, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ListArtifactsInSchemaByType"); - scope.Start(); - try - { - return RestClient.ListArtifactsInSchemaByType(databaseName, schemaName, artifactType, continuationToken, maxPageSize, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// List all partition information for a table. - /// Database name. - /// Table name. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// List all partition information for a table. - public virtual async Task> ListPartitionInfosForTableAsync(string databaseName, string tableName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ListPartitionInfosForTable"); - scope.Start(); - try - { - return await RestClient.ListPartitionInfosForTableAsync(databaseName, tableName, continuationToken, maxPageSize, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// List all partition information for a table. - /// Database name. - /// Table name. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// List all partition information for a table. - public virtual Response ListPartitionInfosForTable(string databaseName, string tableName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ListPartitionInfosForTable"); - scope.Start(); - try - { - return RestClient.ListPartitionInfosForTable(databaseName, tableName, continuationToken, maxPageSize, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// List all partition information for a view. - /// Database name. - /// View name. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// List all partition information for a view. - public virtual async Task> ListPartitionInfosForViewAsync(string databaseName, string viewName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ListPartitionInfosForView"); - scope.Start(); - try - { - return await RestClient.ListPartitionInfosForViewAsync(databaseName, viewName, continuationToken, maxPageSize, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// List all partition information for a view. - /// Database name. - /// View name. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// List all partition information for a view. - public virtual Response ListPartitionInfosForView(string databaseName, string viewName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ListPartitionInfosForView"); - scope.Start(); - try - { - return RestClient.ListPartitionInfosForView(databaseName, viewName, continuationToken, maxPageSize, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// List all partition information for table in schema. - /// Database name. - /// Schema name. - /// Table name. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// List all partition information for a table in schema. - public virtual async Task> ListPartitionInfosForSchemaAndTableAsync(string databaseName, string schemaName, string tableName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ListPartitionInfosForSchemaAndTable"); - scope.Start(); - try - { - return await RestClient.ListPartitionInfosForSchemaAndTableAsync(databaseName, schemaName, tableName, continuationToken, maxPageSize, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// List all partition information for table in schema. - /// Database name. - /// Schema name. - /// Table name. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// List all partition information for a table in schema. - public virtual Response ListPartitionInfosForSchemaAndTable(string databaseName, string schemaName, string tableName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ListPartitionInfosForSchemaAndTable"); - scope.Start(); - try - { - return RestClient.ListPartitionInfosForSchemaAndTable(databaseName, schemaName, tableName, continuationToken, maxPageSize, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// List all partition information for a view in schema. - /// Database name. - /// Schema name. - /// View name. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// List all partition information for a view in schema. - public virtual async Task> ListPartitionInfosForSchemaAndViewAsync(string databaseName, string schemaName, string viewName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ListPartitionInfosForSchemaAndView"); - scope.Start(); - try - { - return await RestClient.ListPartitionInfosForSchemaAndViewAsync(databaseName, schemaName, viewName, continuationToken, maxPageSize, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// List all partition information for a view in schema. - /// Database name. - /// Schema name. - /// View name. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// List all partition information for a view in schema. - public virtual Response ListPartitionInfosForSchemaAndView(string databaseName, string schemaName, string viewName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.ListPartitionInfosForSchemaAndView"); - scope.Start(); - try - { - return RestClient.ListPartitionInfosForSchemaAndView(databaseName, schemaName, viewName, continuationToken, maxPageSize, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get details about a database. - /// Database name. - /// The cancellation token to use. - /// Get details about a database. - public virtual async Task> GetDatabaseAsync(string databaseName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.GetDatabase"); - scope.Start(); - try - { - return await RestClient.GetDatabaseAsync(databaseName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get details about a database. - /// Database name. - /// The cancellation token to use. - /// Get details about a database. - public virtual Response GetDatabase(string databaseName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.GetDatabase"); - scope.Start(); - try - { - return RestClient.GetDatabase(databaseName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Put a database. - /// Database name. - /// Database entity payload to create or update a Database. - /// The cancellation token to use. - /// Put a database. - public virtual async Task> PutDatabaseAsync(string databaseName, DatabaseEntity createArtifactsPayload, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.PutDatabase"); - scope.Start(); - try - { - return await RestClient.PutDatabaseAsync(databaseName, createArtifactsPayload, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Put a database. - /// Database name. - /// Database entity payload to create or update a Database. - /// The cancellation token to use. - /// Put a database. - public virtual Response PutDatabase(string databaseName, DatabaseEntity createArtifactsPayload, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.PutDatabase"); - scope.Start(); - try - { - return RestClient.PutDatabase(databaseName, createArtifactsPayload, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Delete a database. - /// Database name. - /// The cancellation token to use. - /// Delete a database. - public virtual async Task DeleteDatabaseAsync(string databaseName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.DeleteDatabase"); - scope.Start(); - try - { - return await RestClient.DeleteDatabaseAsync(databaseName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Delete a database. - /// Database name. - /// The cancellation token to use. - /// Delete a database. - public virtual Response DeleteDatabase(string databaseName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.DeleteDatabase"); - scope.Start(); - try - { - return RestClient.DeleteDatabase(databaseName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get an artifact from database. - /// Database name. - /// Artifact type. - /// Artifact name. - /// The cancellation token to use. - /// Get an artifact from database. - public virtual async Task> GetArtifactFromDBAsync(string databaseName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.GetArtifactFromDB"); - scope.Start(); - try - { - return await RestClient.GetArtifactFromDBAsync(databaseName, artifactType, artifactName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get an artifact from database. - /// Database name. - /// Artifact type. - /// Artifact name. - /// The cancellation token to use. - /// Get an artifact from database. - public virtual Response GetArtifactFromDB(string databaseName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.GetArtifactFromDB"); - scope.Start(); - try - { - return RestClient.GetArtifactFromDB(databaseName, artifactType, artifactName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Put an artifact in a Database. - /// Database name. - /// Artifact type. - /// Artifact name. - /// Payload containing artifact entity to be created/modified. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// Put an artifact in a Database. - public virtual async Task> PutArtifactInDBAsync(string databaseName, SASEntityType artifactType, string artifactName, MDEntity createArtifactsPayload, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.PutArtifactInDB"); - scope.Start(); - try - { - return await RestClient.PutArtifactInDBAsync(databaseName, artifactType, artifactName, createArtifactsPayload, continuationToken, maxPageSize, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Put an artifact in a Database. - /// Database name. - /// Artifact type. - /// Artifact name. - /// Payload containing artifact entity to be created/modified. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// Put an artifact in a Database. - public virtual Response PutArtifactInDB(string databaseName, SASEntityType artifactType, string artifactName, MDEntity createArtifactsPayload, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.PutArtifactInDB"); - scope.Start(); - try - { - return RestClient.PutArtifactInDB(databaseName, artifactType, artifactName, createArtifactsPayload, continuationToken, maxPageSize, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Delete an artifact in a Database. - /// Database name. - /// Artifact type. - /// Artifact name. - /// The cancellation token to use. - /// Delete an artifact in a Database. - public virtual async Task DeleteArtifactForDBAsync(string databaseName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.DeleteArtifactForDB"); - scope.Start(); - try - { - return await RestClient.DeleteArtifactForDBAsync(databaseName, artifactType, artifactName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Delete an artifact in a Database. - /// Database name. - /// Artifact type. - /// Artifact name. - /// The cancellation token to use. - /// Delete an artifact in a Database. - public virtual Response DeleteArtifactForDB(string databaseName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.DeleteArtifactForDB"); - scope.Start(); - try - { - return RestClient.DeleteArtifactForDB(databaseName, artifactType, artifactName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get an artifact from schema. - /// Database name. - /// Schema name. - /// Artifact type. - /// Artifact name. - /// The cancellation token to use. - /// Get an artifact from schema. - public virtual async Task> GetArtifactFromSchemaAsync(string databaseName, string schemaName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.GetArtifactFromSchema"); - scope.Start(); - try - { - return await RestClient.GetArtifactFromSchemaAsync(databaseName, schemaName, artifactType, artifactName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get an artifact from schema. - /// Database name. - /// Schema name. - /// Artifact type. - /// Artifact name. - /// The cancellation token to use. - /// Get an artifact from schema. - public virtual Response GetArtifactFromSchema(string databaseName, string schemaName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.GetArtifactFromSchema"); - scope.Start(); - try - { - return RestClient.GetArtifactFromSchema(databaseName, schemaName, artifactType, artifactName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Create or Update an artifact in a schema. - /// Database name. - /// Schema name. - /// Artifact type. - /// Artifact name. - /// Payload containing artifact object to be create/updated. - /// The cancellation token to use. - /// Create or Update an artifact in a schema. - public virtual async Task> PutArtifactInSchemaAsync(string databaseName, string schemaName, SASEntityType artifactType, string artifactName, MDEntity createArtifactsPayload, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.PutArtifactInSchema"); - scope.Start(); - try - { - return await RestClient.PutArtifactInSchemaAsync(databaseName, schemaName, artifactType, artifactName, createArtifactsPayload, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Create or Update an artifact in a schema. - /// Database name. - /// Schema name. - /// Artifact type. - /// Artifact name. - /// Payload containing artifact object to be create/updated. - /// The cancellation token to use. - /// Create or Update an artifact in a schema. - public virtual Response PutArtifactInSchema(string databaseName, string schemaName, SASEntityType artifactType, string artifactName, MDEntity createArtifactsPayload, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.PutArtifactInSchema"); - scope.Start(); - try - { - return RestClient.PutArtifactInSchema(databaseName, schemaName, artifactType, artifactName, createArtifactsPayload, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Delete an artifact from Schema. - /// Database name. - /// Schema name. - /// Artifact type. - /// Artifact name. - /// The cancellation token to use. - /// Delete an artifact from Schema. - public virtual async Task DeleteArtifactFromSchemaAsync(string databaseName, string schemaName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.DeleteArtifactFromSchema"); - scope.Start(); - try - { - return await RestClient.DeleteArtifactFromSchemaAsync(databaseName, schemaName, artifactType, artifactName, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Delete an artifact from Schema. - /// Database name. - /// Schema name. - /// Artifact type. - /// Artifact name. - /// The cancellation token to use. - /// Delete an artifact from Schema. - public virtual Response DeleteArtifactFromSchema(string databaseName, string schemaName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.DeleteArtifactFromSchema"); - scope.Start(); - try - { - return RestClient.DeleteArtifactFromSchema(databaseName, schemaName, artifactType, artifactName, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get the status of validation by operation Id. - /// Operation Id. - /// The cancellation token to use. - /// Get the status of validation by operation Id. - public virtual async Task> GetSyMSOperationStatusAsync(string operationId, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.GetSyMSOperationStatus"); - scope.Start(); - try - { - return await RestClient.GetSyMSOperationStatusAsync(operationId, cancellationToken).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get the status of validation by operation Id. - /// Operation Id. - /// The cancellation token to use. - /// Get the status of validation by operation Id. - public virtual Response GetSyMSOperationStatus(string operationId, CancellationToken cancellationToken = default) - { - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.GetSyMSOperationStatus"); - scope.Start(); - try - { - return RestClient.GetSyMSOperationStatus(operationId, cancellationToken); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Batch execution of DDL Payload. - /// Validation Type - Currently only IDWValidation is supported. - /// DDLBatch containing artifacts to be Created or Deleted or Modified. - /// The cancellation token to use. - /// or is null. - /// Batch execution of DDL Payload. - public virtual async Task StartExecuteChangeWithValidationAsync(string validationType, DDLBatch createArtifactsPayload, CancellationToken cancellationToken = default) - { - if (validationType == null) - { - throw new ArgumentNullException(nameof(validationType)); - } - if (createArtifactsPayload == null) - { - throw new ArgumentNullException(nameof(createArtifactsPayload)); - } - - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.StartExecuteChangeWithValidation"); - scope.Start(); - try - { - var originalResponse = await RestClient.ExecuteChangeWithValidationAsync(validationType, createArtifactsPayload, cancellationToken).ConfigureAwait(false); - return new SynapseMetadataExecuteChangeWithValidationOperation(_clientDiagnostics, _pipeline, RestClient.CreateExecuteChangeWithValidationRequest(validationType, createArtifactsPayload).Request, originalResponse); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Batch execution of DDL Payload. - /// Validation Type - Currently only IDWValidation is supported. - /// DDLBatch containing artifacts to be Created or Deleted or Modified. - /// The cancellation token to use. - /// or is null. - /// Batch execution of DDL Payload. - public virtual SynapseMetadataExecuteChangeWithValidationOperation StartExecuteChangeWithValidation(string validationType, DDLBatch createArtifactsPayload, CancellationToken cancellationToken = default) - { - if (validationType == null) - { - throw new ArgumentNullException(nameof(validationType)); - } - if (createArtifactsPayload == null) - { - throw new ArgumentNullException(nameof(createArtifactsPayload)); - } - - using var scope = _clientDiagnostics.CreateScope("SynapseMetadataClient.StartExecuteChangeWithValidation"); - scope.Start(); - try - { - var originalResponse = RestClient.ExecuteChangeWithValidation(validationType, createArtifactsPayload, cancellationToken); - return new SynapseMetadataExecuteChangeWithValidationOperation(_clientDiagnostics, _pipeline, RestClient.CreateExecuteChangeWithValidationRequest(validationType, createArtifactsPayload).Request, originalResponse); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SynapseMetadataExecuteChangeWithValidationOperation.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SynapseMetadataExecuteChangeWithValidationOperation.cs deleted file mode 100644 index 80269a74d1b1..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SynapseMetadataExecuteChangeWithValidationOperation.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.Analytics.Synapse.Artifacts -{ - /// Batch execution of DDL Payload. - public partial class SynapseMetadataExecuteChangeWithValidationOperation : Operation - { - private readonly OperationInternal _operation; - - /// Initializes a new instance of SynapseMetadataExecuteChangeWithValidationOperation for mocking. - protected SynapseMetadataExecuteChangeWithValidationOperation() - { - } - - internal SynapseMetadataExecuteChangeWithValidationOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) - { - IOperation nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, OperationFinalStateVia.Location); - _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "SynapseMetadataExecuteChangeWithValidationOperation"); - } - - /// -#pragma warning disable CA1822 - public override string Id => throw new NotImplementedException(); -#pragma warning restore CA1822 - - /// - public override bool HasCompleted => _operation.HasCompleted; - - /// - public override Response GetRawResponse() => _operation.RawResponse; - - /// - public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); - - /// - public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); - - /// - public override Response WaitForCompletionResponse(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(cancellationToken); - - /// - public override Response WaitForCompletionResponse(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(pollingInterval, cancellationToken); - - /// - public override ValueTask WaitForCompletionResponseAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(cancellationToken); - - /// - public override ValueTask WaitForCompletionResponseAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(pollingInterval, cancellationToken); - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SynapseMetadataRestClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SynapseMetadataRestClient.cs deleted file mode 100644 index c7bbe4d84e8c..000000000000 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SynapseMetadataRestClient.cs +++ /dev/null @@ -1,1718 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Analytics.Synapse.Artifacts.Models; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.Analytics.Synapse.Artifacts -{ - internal partial class SynapseMetadataRestClient - { - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - - /// The ClientDiagnostics is used to provide tracing support for the client library. - internal ClientDiagnostics ClientDiagnostics { get; } - - /// Initializes a new instance of SynapseMetadataRestClient. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. - /// , or is null. - public SynapseMetadataRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint) - { - ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? throw new ArgumentNullException(nameof(endpoint)); - } - - internal HttpMessage CreateExecuteChangeRequest(DDLBatch createArtifactsPayload) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/databases/ExecuteChange", false); - uri.AppendQuery("api-version", "2021-04-01", true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(createArtifactsPayload); - request.Content = content; - return message; - } - - /// Batch execution of DDL Payload. - /// DDLBatch payload containing artifact drafts to be created or deleted or modified. - /// The cancellation token to use. - /// is null. - /// Batch execution of DDL Payload. - public async Task> ExecuteChangeAsync(DDLBatch createArtifactsPayload, CancellationToken cancellationToken = default) - { - if (createArtifactsPayload == null) - { - throw new ArgumentNullException(nameof(createArtifactsPayload)); - } - - using var message = CreateExecuteChangeRequest(createArtifactsPayload); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SyMsapiddlResponses value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SyMsapiddlResponses.DeserializeSyMsapiddlResponses(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Batch execution of DDL Payload. - /// DDLBatch payload containing artifact drafts to be created or deleted or modified. - /// The cancellation token to use. - /// is null. - /// Batch execution of DDL Payload. - public Response ExecuteChange(DDLBatch createArtifactsPayload, CancellationToken cancellationToken = default) - { - if (createArtifactsPayload == null) - { - throw new ArgumentNullException(nameof(createArtifactsPayload)); - } - - using var message = CreateExecuteChangeRequest(createArtifactsPayload); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SyMsapiddlResponses value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SyMsapiddlResponses.DeserializeSyMsapiddlResponses(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateExecuteChangeWithValidationRequest(string validationType, DDLBatch createArtifactsPayload) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/databases/ExecuteChangeWithValidation", false); - uri.AppendQuery("validationType", validationType, true); - uri.AppendQuery("api-version", "2021-04-01", true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(createArtifactsPayload); - request.Content = content; - return message; - } - - /// Batch execution of DDL Payload. - /// Validation Type - Currently only IDWValidation is supported. - /// DDLBatch containing artifacts to be Created or Deleted or Modified. - /// The cancellation token to use. - /// or is null. - /// Batch execution of DDL Payload. - public async Task ExecuteChangeWithValidationAsync(string validationType, DDLBatch createArtifactsPayload, CancellationToken cancellationToken = default) - { - if (validationType == null) - { - throw new ArgumentNullException(nameof(validationType)); - } - if (createArtifactsPayload == null) - { - throw new ArgumentNullException(nameof(createArtifactsPayload)); - } - - using var message = CreateExecuteChangeWithValidationRequest(validationType, createArtifactsPayload); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Batch execution of DDL Payload. - /// Validation Type - Currently only IDWValidation is supported. - /// DDLBatch containing artifacts to be Created or Deleted or Modified. - /// The cancellation token to use. - /// or is null. - /// Batch execution of DDL Payload. - public Response ExecuteChangeWithValidation(string validationType, DDLBatch createArtifactsPayload, CancellationToken cancellationToken = default) - { - if (validationType == null) - { - throw new ArgumentNullException(nameof(validationType)); - } - if (createArtifactsPayload == null) - { - throw new ArgumentNullException(nameof(createArtifactsPayload)); - } - - using var message = CreateExecuteChangeWithValidationRequest(validationType, createArtifactsPayload); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListDatabasesRequest(string continuationToken, long? maxPageSize) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/databases", false); - uri.AppendQuery("api-version", "2021-04-01", true); - if (continuationToken != null) - { - uri.AppendQuery("continuationToken", continuationToken, true); - } - if (maxPageSize != null) - { - uri.AppendQuery("maxPageSize", maxPageSize.Value, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Get all databases in a workspace. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// Get all databases in a workspace. - public async Task> ListDatabasesAsync(string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - using var message = CreateListDatabasesRequest(continuationToken, maxPageSize); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - QueryArtifactsResponse value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get all databases in a workspace. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// Get all databases in a workspace. - public Response ListDatabases(string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - using var message = CreateListDatabasesRequest(continuationToken, maxPageSize); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - QueryArtifactsResponse value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListArtifactsRequest(string databaseName, SASEntityType artifactType, string continuationToken, long? maxPageSize) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/databases/", false); - uri.AppendPath(databaseName, true); - uri.AppendPath("/", false); - uri.AppendPath(artifactType.ToSerialString(), true); - uri.AppendPath("s", false); - uri.AppendQuery("api-version", "2021-04-01", true); - if (continuationToken != null) - { - uri.AppendQuery("continuationToken", continuationToken, true); - } - if (maxPageSize != null) - { - uri.AppendQuery("maxPageSize", maxPageSize.Value, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// List all Artifacts of a type in a database. - /// Database name. - /// Artifact type. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// is null. - /// List all Artifacts of a type in a database. - public async Task> ListArtifactsAsync(string databaseName, SASEntityType artifactType, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - - using var message = CreateListArtifactsRequest(databaseName, artifactType, continuationToken, maxPageSize); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - QueryArtifactsResponse value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List all Artifacts of a type in a database. - /// Database name. - /// Artifact type. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// is null. - /// List all Artifacts of a type in a database. - public Response ListArtifacts(string databaseName, SASEntityType artifactType, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - - using var message = CreateListArtifactsRequest(databaseName, artifactType, continuationToken, maxPageSize); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - QueryArtifactsResponse value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListArtifactsInSchemaByTypeRequest(string databaseName, string schemaName, SASEntityType artifactType, string continuationToken, long? maxPageSize) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/databases/", false); - uri.AppendPath(databaseName, true); - uri.AppendPath("/schemas/", false); - uri.AppendPath(schemaName, true); - uri.AppendPath("/", false); - uri.AppendPath(artifactType.ToSerialString(), true); - uri.AppendPath("s", false); - uri.AppendQuery("api-version", "2021-04-01", true); - if (continuationToken != null) - { - uri.AppendQuery("continuationToken", continuationToken, true); - } - if (maxPageSize != null) - { - uri.AppendQuery("maxPageSize", maxPageSize.Value, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// List all artifacts in schema by type. - /// Database name. - /// Schema name. - /// Artifact type. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// or is null. - /// List all Artifacts in schema by type. - public async Task> ListArtifactsInSchemaByTypeAsync(string databaseName, string schemaName, SASEntityType artifactType, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - if (schemaName == null) - { - throw new ArgumentNullException(nameof(schemaName)); - } - - using var message = CreateListArtifactsInSchemaByTypeRequest(databaseName, schemaName, artifactType, continuationToken, maxPageSize); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - QueryArtifactsResponse value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List all artifacts in schema by type. - /// Database name. - /// Schema name. - /// Artifact type. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// or is null. - /// List all Artifacts in schema by type. - public Response ListArtifactsInSchemaByType(string databaseName, string schemaName, SASEntityType artifactType, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - if (schemaName == null) - { - throw new ArgumentNullException(nameof(schemaName)); - } - - using var message = CreateListArtifactsInSchemaByTypeRequest(databaseName, schemaName, artifactType, continuationToken, maxPageSize); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - QueryArtifactsResponse value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListPartitionInfosForTableRequest(string databaseName, string tableName, string continuationToken, long? maxPageSize) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/databases/", false); - uri.AppendPath(databaseName, true); - uri.AppendPath("/tables/", false); - uri.AppendPath(tableName, true); - uri.AppendPath("/partitionInfos", false); - uri.AppendQuery("api-version", "2021-04-01", true); - if (continuationToken != null) - { - uri.AppendQuery("continuationToken", continuationToken, true); - } - if (maxPageSize != null) - { - uri.AppendQuery("maxPageSize", maxPageSize.Value, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// List all partition information for a table. - /// Database name. - /// Table name. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// or is null. - /// List all partition information for a table. - public async Task> ListPartitionInfosForTableAsync(string databaseName, string tableName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - if (tableName == null) - { - throw new ArgumentNullException(nameof(tableName)); - } - - using var message = CreateListPartitionInfosForTableRequest(databaseName, tableName, continuationToken, maxPageSize); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - QueryArtifactsResponse value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List all partition information for a table. - /// Database name. - /// Table name. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// or is null. - /// List all partition information for a table. - public Response ListPartitionInfosForTable(string databaseName, string tableName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - if (tableName == null) - { - throw new ArgumentNullException(nameof(tableName)); - } - - using var message = CreateListPartitionInfosForTableRequest(databaseName, tableName, continuationToken, maxPageSize); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - QueryArtifactsResponse value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListPartitionInfosForViewRequest(string databaseName, string viewName, string continuationToken, long? maxPageSize) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/databases/", false); - uri.AppendPath(databaseName, true); - uri.AppendPath("/views/", false); - uri.AppendPath(viewName, true); - uri.AppendPath("/partitionInfos", false); - uri.AppendQuery("api-version", "2021-04-01", true); - if (continuationToken != null) - { - uri.AppendQuery("continuationToken", continuationToken, true); - } - if (maxPageSize != null) - { - uri.AppendQuery("maxPageSize", maxPageSize.Value, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// List all partition information for a view. - /// Database name. - /// View name. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// or is null. - /// List all partition information for a view. - public async Task> ListPartitionInfosForViewAsync(string databaseName, string viewName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - if (viewName == null) - { - throw new ArgumentNullException(nameof(viewName)); - } - - using var message = CreateListPartitionInfosForViewRequest(databaseName, viewName, continuationToken, maxPageSize); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - QueryArtifactsResponse value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List all partition information for a view. - /// Database name. - /// View name. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// or is null. - /// List all partition information for a view. - public Response ListPartitionInfosForView(string databaseName, string viewName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - if (viewName == null) - { - throw new ArgumentNullException(nameof(viewName)); - } - - using var message = CreateListPartitionInfosForViewRequest(databaseName, viewName, continuationToken, maxPageSize); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - QueryArtifactsResponse value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListPartitionInfosForSchemaAndTableRequest(string databaseName, string schemaName, string tableName, string continuationToken, long? maxPageSize) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/databases/", false); - uri.AppendPath(databaseName, true); - uri.AppendPath("/schemas/", false); - uri.AppendPath(schemaName, true); - uri.AppendPath("/tables/", false); - uri.AppendPath(tableName, true); - uri.AppendPath("/partitionInfos", false); - uri.AppendQuery("api-version", "2021-04-01", true); - if (continuationToken != null) - { - uri.AppendQuery("continuationToken", continuationToken, true); - } - if (maxPageSize != null) - { - uri.AppendQuery("maxPageSize", maxPageSize.Value, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// List all partition information for table in schema. - /// Database name. - /// Schema name. - /// Table name. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// , or is null. - /// List all partition information for a table in schema. - public async Task> ListPartitionInfosForSchemaAndTableAsync(string databaseName, string schemaName, string tableName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - if (schemaName == null) - { - throw new ArgumentNullException(nameof(schemaName)); - } - if (tableName == null) - { - throw new ArgumentNullException(nameof(tableName)); - } - - using var message = CreateListPartitionInfosForSchemaAndTableRequest(databaseName, schemaName, tableName, continuationToken, maxPageSize); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - QueryArtifactsResponse value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List all partition information for table in schema. - /// Database name. - /// Schema name. - /// Table name. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// , or is null. - /// List all partition information for a table in schema. - public Response ListPartitionInfosForSchemaAndTable(string databaseName, string schemaName, string tableName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - if (schemaName == null) - { - throw new ArgumentNullException(nameof(schemaName)); - } - if (tableName == null) - { - throw new ArgumentNullException(nameof(tableName)); - } - - using var message = CreateListPartitionInfosForSchemaAndTableRequest(databaseName, schemaName, tableName, continuationToken, maxPageSize); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - QueryArtifactsResponse value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListPartitionInfosForSchemaAndViewRequest(string databaseName, string schemaName, string viewName, string continuationToken, long? maxPageSize) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/databases/", false); - uri.AppendPath(databaseName, true); - uri.AppendPath("/schemas/", false); - uri.AppendPath(schemaName, true); - uri.AppendPath("/views/", false); - uri.AppendPath(viewName, true); - uri.AppendPath("/partitionInfos", false); - uri.AppendQuery("api-version", "2021-04-01", true); - if (continuationToken != null) - { - uri.AppendQuery("continuationToken", continuationToken, true); - } - if (maxPageSize != null) - { - uri.AppendQuery("maxPageSize", maxPageSize.Value, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// List all partition information for a view in schema. - /// Database name. - /// Schema name. - /// View name. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// , or is null. - /// List all partition information for a view in schema. - public async Task> ListPartitionInfosForSchemaAndViewAsync(string databaseName, string schemaName, string viewName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - if (schemaName == null) - { - throw new ArgumentNullException(nameof(schemaName)); - } - if (viewName == null) - { - throw new ArgumentNullException(nameof(viewName)); - } - - using var message = CreateListPartitionInfosForSchemaAndViewRequest(databaseName, schemaName, viewName, continuationToken, maxPageSize); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - QueryArtifactsResponse value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List all partition information for a view in schema. - /// Database name. - /// Schema name. - /// View name. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// , or is null. - /// List all partition information for a view in schema. - public Response ListPartitionInfosForSchemaAndView(string databaseName, string schemaName, string viewName, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - if (schemaName == null) - { - throw new ArgumentNullException(nameof(schemaName)); - } - if (viewName == null) - { - throw new ArgumentNullException(nameof(viewName)); - } - - using var message = CreateListPartitionInfosForSchemaAndViewRequest(databaseName, schemaName, viewName, continuationToken, maxPageSize); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - QueryArtifactsResponse value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetDatabaseRequest(string databaseName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/databases/", false); - uri.AppendPath(databaseName, true); - uri.AppendQuery("api-version", "2021-04-01", true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Get details about a database. - /// Database name. - /// The cancellation token to use. - /// is null. - /// Get details about a database. - public async Task> GetDatabaseAsync(string databaseName, CancellationToken cancellationToken = default) - { - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - - using var message = CreateGetDatabaseRequest(databaseName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - DatabaseEntity value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DatabaseEntity.DeserializeDatabaseEntity(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get details about a database. - /// Database name. - /// The cancellation token to use. - /// is null. - /// Get details about a database. - public Response GetDatabase(string databaseName, CancellationToken cancellationToken = default) - { - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - - using var message = CreateGetDatabaseRequest(databaseName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - DatabaseEntity value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DatabaseEntity.DeserializeDatabaseEntity(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreatePutDatabaseRequest(string databaseName, DatabaseEntity createArtifactsPayload) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/databases/", false); - uri.AppendPath(databaseName, true); - uri.AppendQuery("api-version", "2021-04-01", true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(createArtifactsPayload); - request.Content = content; - return message; - } - - /// Put a database. - /// Database name. - /// Database entity payload to create or update a Database. - /// The cancellation token to use. - /// or is null. - /// Put a database. - public async Task> PutDatabaseAsync(string databaseName, DatabaseEntity createArtifactsPayload, CancellationToken cancellationToken = default) - { - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - if (createArtifactsPayload == null) - { - throw new ArgumentNullException(nameof(createArtifactsPayload)); - } - - using var message = CreatePutDatabaseRequest(databaseName, createArtifactsPayload); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SyMsapiddlResponse value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SyMsapiddlResponse.DeserializeSyMsapiddlResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Put a database. - /// Database name. - /// Database entity payload to create or update a Database. - /// The cancellation token to use. - /// or is null. - /// Put a database. - public Response PutDatabase(string databaseName, DatabaseEntity createArtifactsPayload, CancellationToken cancellationToken = default) - { - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - if (createArtifactsPayload == null) - { - throw new ArgumentNullException(nameof(createArtifactsPayload)); - } - - using var message = CreatePutDatabaseRequest(databaseName, createArtifactsPayload); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SyMsapiddlResponse value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SyMsapiddlResponse.DeserializeSyMsapiddlResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteDatabaseRequest(string databaseName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/databases/", false); - uri.AppendPath(databaseName, true); - uri.AppendQuery("api-version", "2021-04-01", true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Delete a database. - /// Database name. - /// The cancellation token to use. - /// is null. - /// Delete a database. - public async Task DeleteDatabaseAsync(string databaseName, CancellationToken cancellationToken = default) - { - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - - using var message = CreateDeleteDatabaseRequest(databaseName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Delete a database. - /// Database name. - /// The cancellation token to use. - /// is null. - /// Delete a database. - public Response DeleteDatabase(string databaseName, CancellationToken cancellationToken = default) - { - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - - using var message = CreateDeleteDatabaseRequest(databaseName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetArtifactFromDBRequest(string databaseName, SASEntityType artifactType, string artifactName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/databases/", false); - uri.AppendPath(databaseName, true); - uri.AppendPath("/", false); - uri.AppendPath(artifactType.ToSerialString(), true); - uri.AppendPath("s/", false); - uri.AppendPath(artifactName, true); - uri.AppendQuery("api-version", "2021-04-01", true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Get an artifact from database. - /// Database name. - /// Artifact type. - /// Artifact name. - /// The cancellation token to use. - /// or is null. - /// Get an artifact from database. - public async Task> GetArtifactFromDBAsync(string databaseName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) - { - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - if (artifactName == null) - { - throw new ArgumentNullException(nameof(artifactName)); - } - - using var message = CreateGetArtifactFromDBRequest(databaseName, artifactType, artifactName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - MDEntity value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MDEntity.DeserializeMDEntity(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get an artifact from database. - /// Database name. - /// Artifact type. - /// Artifact name. - /// The cancellation token to use. - /// or is null. - /// Get an artifact from database. - public Response GetArtifactFromDB(string databaseName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) - { - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - if (artifactName == null) - { - throw new ArgumentNullException(nameof(artifactName)); - } - - using var message = CreateGetArtifactFromDBRequest(databaseName, artifactType, artifactName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - MDEntity value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MDEntity.DeserializeMDEntity(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreatePutArtifactInDBRequest(string databaseName, SASEntityType artifactType, string artifactName, MDEntity createArtifactsPayload, string continuationToken, long? maxPageSize) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/databases/", false); - uri.AppendPath(databaseName, true); - uri.AppendPath("/", false); - uri.AppendPath(artifactType.ToSerialString(), true); - uri.AppendPath("s/", false); - uri.AppendPath(artifactName, true); - uri.AppendQuery("api-version", "2021-04-01", true); - if (continuationToken != null) - { - uri.AppendQuery("continuationToken", continuationToken, true); - } - if (maxPageSize != null) - { - uri.AppendQuery("maxPageSize", maxPageSize.Value, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(createArtifactsPayload); - request.Content = content; - return message; - } - - /// Put an artifact in a Database. - /// Database name. - /// Artifact type. - /// Artifact name. - /// Payload containing artifact entity to be created/modified. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// , or is null. - /// Put an artifact in a Database. - public async Task> PutArtifactInDBAsync(string databaseName, SASEntityType artifactType, string artifactName, MDEntity createArtifactsPayload, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - if (artifactName == null) - { - throw new ArgumentNullException(nameof(artifactName)); - } - if (createArtifactsPayload == null) - { - throw new ArgumentNullException(nameof(createArtifactsPayload)); - } - - using var message = CreatePutArtifactInDBRequest(databaseName, artifactType, artifactName, createArtifactsPayload, continuationToken, maxPageSize); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SyMsapiddlResponse value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SyMsapiddlResponse.DeserializeSyMsapiddlResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Put an artifact in a Database. - /// Database name. - /// Artifact type. - /// Artifact name. - /// Payload containing artifact entity to be created/modified. - /// Continuation token to get next page. - /// Max page size. - /// The cancellation token to use. - /// , or is null. - /// Put an artifact in a Database. - public Response PutArtifactInDB(string databaseName, SASEntityType artifactType, string artifactName, MDEntity createArtifactsPayload, string continuationToken = null, long? maxPageSize = null, CancellationToken cancellationToken = default) - { - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - if (artifactName == null) - { - throw new ArgumentNullException(nameof(artifactName)); - } - if (createArtifactsPayload == null) - { - throw new ArgumentNullException(nameof(createArtifactsPayload)); - } - - using var message = CreatePutArtifactInDBRequest(databaseName, artifactType, artifactName, createArtifactsPayload, continuationToken, maxPageSize); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SyMsapiddlResponse value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SyMsapiddlResponse.DeserializeSyMsapiddlResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteArtifactForDBRequest(string databaseName, SASEntityType artifactType, string artifactName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/databases/", false); - uri.AppendPath(databaseName, true); - uri.AppendPath("/", false); - uri.AppendPath(artifactType.ToSerialString(), true); - uri.AppendPath("s/", false); - uri.AppendPath(artifactName, true); - uri.AppendQuery("api-version", "2021-04-01", true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Delete an artifact in a Database. - /// Database name. - /// Artifact type. - /// Artifact name. - /// The cancellation token to use. - /// or is null. - /// Delete an artifact in a Database. - public async Task DeleteArtifactForDBAsync(string databaseName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) - { - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - if (artifactName == null) - { - throw new ArgumentNullException(nameof(artifactName)); - } - - using var message = CreateDeleteArtifactForDBRequest(databaseName, artifactType, artifactName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Delete an artifact in a Database. - /// Database name. - /// Artifact type. - /// Artifact name. - /// The cancellation token to use. - /// or is null. - /// Delete an artifact in a Database. - public Response DeleteArtifactForDB(string databaseName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) - { - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - if (artifactName == null) - { - throw new ArgumentNullException(nameof(artifactName)); - } - - using var message = CreateDeleteArtifactForDBRequest(databaseName, artifactType, artifactName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetArtifactFromSchemaRequest(string databaseName, string schemaName, SASEntityType artifactType, string artifactName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/databases/", false); - uri.AppendPath(databaseName, true); - uri.AppendPath("/schemas/", false); - uri.AppendPath(schemaName, true); - uri.AppendPath("/", false); - uri.AppendPath(artifactType.ToSerialString(), true); - uri.AppendPath("s/", false); - uri.AppendPath(artifactName, true); - uri.AppendQuery("api-version", "2021-04-01", true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Get an artifact from schema. - /// Database name. - /// Schema name. - /// Artifact type. - /// Artifact name. - /// The cancellation token to use. - /// , or is null. - /// Get an artifact from schema. - public async Task> GetArtifactFromSchemaAsync(string databaseName, string schemaName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) - { - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - if (schemaName == null) - { - throw new ArgumentNullException(nameof(schemaName)); - } - if (artifactName == null) - { - throw new ArgumentNullException(nameof(artifactName)); - } - - using var message = CreateGetArtifactFromSchemaRequest(databaseName, schemaName, artifactType, artifactName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - MDEntity value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MDEntity.DeserializeMDEntity(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get an artifact from schema. - /// Database name. - /// Schema name. - /// Artifact type. - /// Artifact name. - /// The cancellation token to use. - /// , or is null. - /// Get an artifact from schema. - public Response GetArtifactFromSchema(string databaseName, string schemaName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) - { - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - if (schemaName == null) - { - throw new ArgumentNullException(nameof(schemaName)); - } - if (artifactName == null) - { - throw new ArgumentNullException(nameof(artifactName)); - } - - using var message = CreateGetArtifactFromSchemaRequest(databaseName, schemaName, artifactType, artifactName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - MDEntity value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MDEntity.DeserializeMDEntity(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreatePutArtifactInSchemaRequest(string databaseName, string schemaName, SASEntityType artifactType, string artifactName, MDEntity createArtifactsPayload) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/databases/", false); - uri.AppendPath(databaseName, true); - uri.AppendPath("/schemas/", false); - uri.AppendPath(schemaName, true); - uri.AppendPath("/", false); - uri.AppendPath(artifactType.ToSerialString(), true); - uri.AppendPath("s/", false); - uri.AppendPath(artifactName, true); - uri.AppendQuery("api-version", "2021-04-01", true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(createArtifactsPayload); - request.Content = content; - return message; - } - - /// Create or Update an artifact in a schema. - /// Database name. - /// Schema name. - /// Artifact type. - /// Artifact name. - /// Payload containing artifact object to be create/updated. - /// The cancellation token to use. - /// , , or is null. - /// Create or Update an artifact in a schema. - public async Task> PutArtifactInSchemaAsync(string databaseName, string schemaName, SASEntityType artifactType, string artifactName, MDEntity createArtifactsPayload, CancellationToken cancellationToken = default) - { - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - if (schemaName == null) - { - throw new ArgumentNullException(nameof(schemaName)); - } - if (artifactName == null) - { - throw new ArgumentNullException(nameof(artifactName)); - } - if (createArtifactsPayload == null) - { - throw new ArgumentNullException(nameof(createArtifactsPayload)); - } - - using var message = CreatePutArtifactInSchemaRequest(databaseName, schemaName, artifactType, artifactName, createArtifactsPayload); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SyMsapiddlResponse value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SyMsapiddlResponse.DeserializeSyMsapiddlResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Create or Update an artifact in a schema. - /// Database name. - /// Schema name. - /// Artifact type. - /// Artifact name. - /// Payload containing artifact object to be create/updated. - /// The cancellation token to use. - /// , , or is null. - /// Create or Update an artifact in a schema. - public Response PutArtifactInSchema(string databaseName, string schemaName, SASEntityType artifactType, string artifactName, MDEntity createArtifactsPayload, CancellationToken cancellationToken = default) - { - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - if (schemaName == null) - { - throw new ArgumentNullException(nameof(schemaName)); - } - if (artifactName == null) - { - throw new ArgumentNullException(nameof(artifactName)); - } - if (createArtifactsPayload == null) - { - throw new ArgumentNullException(nameof(createArtifactsPayload)); - } - - using var message = CreatePutArtifactInSchemaRequest(databaseName, schemaName, artifactType, artifactName, createArtifactsPayload); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SyMsapiddlResponse value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SyMsapiddlResponse.DeserializeSyMsapiddlResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteArtifactFromSchemaRequest(string databaseName, string schemaName, SASEntityType artifactType, string artifactName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/databases/", false); - uri.AppendPath(databaseName, true); - uri.AppendPath("/schemas/", false); - uri.AppendPath(schemaName, true); - uri.AppendPath("/", false); - uri.AppendPath(artifactType.ToSerialString(), true); - uri.AppendPath("s/", false); - uri.AppendPath(artifactName, true); - uri.AppendQuery("api-version", "2021-04-01", true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Delete an artifact from Schema. - /// Database name. - /// Schema name. - /// Artifact type. - /// Artifact name. - /// The cancellation token to use. - /// , or is null. - /// Delete an artifact from Schema. - public async Task DeleteArtifactFromSchemaAsync(string databaseName, string schemaName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) - { - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - if (schemaName == null) - { - throw new ArgumentNullException(nameof(schemaName)); - } - if (artifactName == null) - { - throw new ArgumentNullException(nameof(artifactName)); - } - - using var message = CreateDeleteArtifactFromSchemaRequest(databaseName, schemaName, artifactType, artifactName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Delete an artifact from Schema. - /// Database name. - /// Schema name. - /// Artifact type. - /// Artifact name. - /// The cancellation token to use. - /// , or is null. - /// Delete an artifact from Schema. - public Response DeleteArtifactFromSchema(string databaseName, string schemaName, SASEntityType artifactType, string artifactName, CancellationToken cancellationToken = default) - { - if (databaseName == null) - { - throw new ArgumentNullException(nameof(databaseName)); - } - if (schemaName == null) - { - throw new ArgumentNullException(nameof(schemaName)); - } - if (artifactName == null) - { - throw new ArgumentNullException(nameof(artifactName)); - } - - using var message = CreateDeleteArtifactFromSchemaRequest(databaseName, schemaName, artifactType, artifactName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetSyMSOperationStatusRequest(string operationId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/databases/operations/", false); - uri.AppendPath(operationId, true); - uri.AppendQuery("api-version", "2021-04-01", true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Get the status of validation by operation Id. - /// Operation Id. - /// The cancellation token to use. - /// is null. - /// Get the status of validation by operation Id. - public async Task> GetSyMSOperationStatusAsync(string operationId, CancellationToken cancellationToken = default) - { - if (operationId == null) - { - throw new ArgumentNullException(nameof(operationId)); - } - - using var message = CreateGetSyMSOperationStatusRequest(operationId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - QueryArtifactsResponse value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get the status of validation by operation Id. - /// Operation Id. - /// The cancellation token to use. - /// is null. - /// Get the status of validation by operation Id. - public Response GetSyMSOperationStatus(string operationId, CancellationToken cancellationToken = default) - { - if (operationId == null) - { - throw new ArgumentNullException(nameof(operationId)); - } - - using var message = CreateGetSyMSOperationStatusRequest(operationId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - QueryArtifactsResponse value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = QueryArtifactsResponse.DeserializeQueryArtifactsResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/autorest.md b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/autorest.md index ee5e38b4efe1..78b7e73a315f 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/autorest.md +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/autorest.md @@ -8,7 +8,7 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml tag: package-artifacts-composite-v7 require: - - https://github.com/Azure/azure-rest-api-specs/blob/6f34f95365ecb16f52f9b94f5cc664bfd1499173/specification/synapse/data-plane/readme.md + - https://github.com/Azure/azure-rest-api-specs/blob/8d060a29de4fea88816267daebd714c047c67c31/specification/synapse/data-plane/readme.md namespace: Azure.Analytics.Synapse.Artifacts generation1-convenience-client: true public-clients: true From 20d82577e9f9cf3b9b2c899399787867fa995aef Mon Sep 17 00:00:00 2001 From: pshao25 <97225342+pshao25@users.noreply.github.com> Date: Fri, 21 Jul 2023 10:36:21 +0800 Subject: [PATCH 4/6] update --- .vscode/cspell.json | 10 ---------- .../src/autorest.md | 19 +------------------ 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/.vscode/cspell.json b/.vscode/cspell.json index a402e2de5a23..98a46277bfd1 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -1017,11 +1017,8 @@ "adla", "adls", "byoa", - "ddls", "distcp", "eloqua", - "ename", - "evalue", "exfiltration", "fqdns", "hana", @@ -1043,13 +1040,6 @@ "vertica", "xero", "Asana", - "Ddls", - "Ename", - "Evalue", - "Informations", - "Manytoone", - "Msapiddl", - "Onetoone", "Twilio" ] }, diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/autorest.md b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/autorest.md index 78b7e73a315f..b05cdd538863 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/autorest.md +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/autorest.md @@ -8,7 +8,7 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml tag: package-artifacts-composite-v7 require: - - https://github.com/Azure/azure-rest-api-specs/blob/8d060a29de4fea88816267daebd714c047c67c31/specification/synapse/data-plane/readme.md + - https://github.com/Azure/azure-rest-api-specs/blob/1e56b6fbe36e2dcbaccd342f108b7c6efb175181/specification/synapse/data-plane/readme.md namespace: Azure.Analytics.Synapse.Artifacts generation1-convenience-client: true public-clients: true @@ -29,23 +29,6 @@ directive: where: $.parameters.Endpoint transform: $.format = "url" ``` -### Handle name conflict with BLC type - -``` yaml -directive: - from: swagger-document - where: $.definitions.Sorting - transform: > - $['x-ms-client-name'] = "SortingItem"; -``` - -``` yaml -directive: - from: swagger-document - where: $.definitions.Namespace - transform: > - $['x-ms-client-name'] = "BaseNamespace"; -``` ### Add nullable annotations From 9d8612e64bd8f151f95ad6b1b877dc91e430f646 Mon Sep 17 00:00:00 2001 From: pshao25 <97225342+pshao25@users.noreply.github.com> Date: Fri, 21 Jul 2023 17:15:15 +0800 Subject: [PATCH 5/6] update --- .vscode/cspell.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 5a89b8987080..72a9d52df478 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -1027,6 +1027,8 @@ "byoa", "distcp", "eloqua", + "ename", + "evalue", "exfiltration", "fqdns", "hana", @@ -1048,6 +1050,8 @@ "vertica", "xero", "Asana", + "Ename", + "Evalue", "Twilio" ] }, From b6348a53a74e62b21cfb544627e9f6f45de55b2f Mon Sep 17 00:00:00 2001 From: pshao25 <97225342+pshao25@users.noreply.github.com> Date: Wed, 26 Jul 2023 13:32:13 +0800 Subject: [PATCH 6/6] Add change log --- .../CHANGELOG.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/CHANGELOG.md b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/CHANGELOG.md index a325096c1278..510ebf497be6 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/CHANGELOG.md +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/CHANGELOG.md @@ -1,14 +1,15 @@ # Release History -## 1.0.0-preview.18 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes +## 1.0.0-preview.18 (2023-08-08) +- Added `authenticationType`, `containerUri`, `sasUri` and `sasToken` properties to BlobService +- Added `setSystemVariable` proprety to SetVariableActivityTypeProperties +- Added `mongoDbAtlasDriverVersion` property to MongoDbAtlasLinkedServiceTypeProperties +- Added `ActionOnExistingTargetTable` property for Synapse Link +- Added `OutputColumn` Object For Office365Source outputColumns +- Added `configurationType` ,`targetSparkConfiguration` and `sparkConfig` properties for SynapseNotebookActivityTypeProperties +- Added `credential` property for LinkedService +- Added `isolationLevel` property for SQLServerSource +- Added new apis of Create/Cancel/GetStatus/GetSnapshot for RunNotebook ## 1.0.0-preview.17 (2023-01-10) - Added `workspaceResourceId` to AzureSynapseArtifactsLinkedServiceTypeProperties